Skip to content

Commit 1f32272

Browse files
rimrulGit for Windows Build Agent
authored and
Git for Windows Build Agent
committed
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]>
1 parent d6d7cf2 commit 1f32272

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
@@ -237,6 +237,7 @@ if(CMAKE_C_COMPILER_ID STREQUAL "MSVC")
237237
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR})
238238
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR})
239239
add_compile_options(/MP /std:c11)
240+
add_link_options(/MANIFEST:NO)
240241
endif()
241242

242243
#default behaviour

contrib/buildsystems/Generators/Vcxproj.pm

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,6 @@ sub createProject {
198198
<AdditionalDependencies>\$(VCPKGLibs);\$(AdditionalDependencies)</AdditionalDependencies>
199199
<AdditionalOptions>invalidcontinue.obj %(AdditionalOptions)</AdditionalOptions>
200200
<EntryPointSymbol>$entrypoint</EntryPointSymbol>
201-
<ManifestFile>$cdup\\compat\\win32\\git.manifest</ManifestFile>
202201
<SubSystem>$subsystem</SubSystem>
203202
</Link>
204203
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)