Skip to content

Commit b478fc7

Browse files
rimruldscho
authored andcommitted
git.rc: include winuser.h
winuser.h contains the definition of RT_MANIFEST that our LLVM based toolchain needs to understand that we want to embed compat/win32/git.manifest as an application manifest. It currently just embeds it as additional data that Windows doesn't understand. This also helps our GCC based toolchain understand that we only want one copy embedded. It currently embeds one working assembly manifest and one nearly identical, but useless copy as additional data. This also teaches our Visual Studio based buildsystems to pick up the manifest file from git.rc. This means we don't have to explicitly specify it in contrib/buildsystems/Generators/Vcxproj.pm anymore. Slightly counter-intuitively this also means we have to explicitly tell Cmake not to embed a default manifest. This fixes #4707 Signed-off-by: Matthias Aßhauer <[email protected]> Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 4ced2ab commit b478fc7

File tree

3 files changed

+2
-1
lines changed

3 files changed

+2
-1
lines changed

contrib/buildsystems/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ if(CMAKE_C_COMPILER_ID STREQUAL "MSVC")
219219
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR})
220220
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR})
221221
add_compile_options(/MP /std:c11)
222+
add_link_options(/MANIFEST:NO)
222223
endif()
223224

224225
#default behaviour

contrib/buildsystems/Generators/Vcxproj.pm

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,6 @@ sub createProject {
187187
<AdditionalDependencies>\$(VCPKGLibs);\$(AdditionalDependencies)</AdditionalDependencies>
188188
<AdditionalOptions>invalidcontinue.obj %(AdditionalOptions)</AdditionalOptions>
189189
<EntryPointSymbol>$entrypoint</EntryPointSymbol>
190-
<ManifestFile>$cdup\\compat\\win32\\git.manifest</ManifestFile>
191190
<SubSystem>$subsystem</SubSystem>
192191
</Link>
193192
EOM

git.rc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#include<winuser.h>
12
1 VERSIONINFO
23
FILEVERSION MAJOR,MINOR,MICRO,PATCHLEVEL
34
PRODUCTVERSION MAJOR,MINOR,MICRO,PATCHLEVEL

0 commit comments

Comments
 (0)