Skip to content

Commit

Permalink
git.rc: include winuser.h
Browse files Browse the repository at this point in the history
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 <mha1993@live.de>
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
  • Loading branch information
rimrul authored and Git for Windows Build Agent committed Oct 22, 2024
1 parent 414421a commit 896d146
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions contrib/buildsystems/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ if(CMAKE_C_COMPILER_ID STREQUAL "MSVC")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR})
add_compile_options(/MP /std:c11)
add_link_options(/MANIFEST:NO)
endif()

#default behaviour
Expand Down
1 change: 0 additions & 1 deletion contrib/buildsystems/Generators/Vcxproj.pm
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,6 @@ sub createProject {
<AdditionalDependencies>\$(VCPKGLibs);\$(AdditionalDependencies)</AdditionalDependencies>
<AdditionalOptions>invalidcontinue.obj %(AdditionalOptions)</AdditionalOptions>
<EntryPointSymbol>$entrypoint</EntryPointSymbol>
<ManifestFile>$cdup\\compat\\win32\\git.manifest</ManifestFile>
<SubSystem>$subsystem</SubSystem>
</Link>
EOM
Expand Down
1 change: 1 addition & 0 deletions git.rc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include<winuser.h>
1 VERSIONINFO
FILEVERSION MAJOR,MINOR,MICRO,PATCHLEVEL
PRODUCTVERSION MAJOR,MINOR,MICRO,PATCHLEVEL
Expand Down

0 comments on commit 896d146

Please sign in to comment.