gtk: Fix building version resource on Windows 11 SDK

The rc.exe that comes with the Windows 11 SDK does not allow one to include
winuser.h directly in the .rc scripts, so make sure that we do not try to
generate the final gtk.rc with it, but instead include windows.h with
WIN32_LEAN_AND_MEAN defined.
This commit is contained in:
Chun-wei Fan 2021-10-13 11:41:31 +08:00
parent dceed915e8
commit c4d8575c30
3 changed files with 2 additions and 3 deletions

View File

@ -44,7 +44,6 @@ gtk-win32-res.o : gtk-win32.rc libgtk3.manifest
$(WINDRES) gtk-win32.rc $@
gtk-win32.rc: gtk-win32.rc.body
echo "#include <winuser.h>" >>$@
cat $< >>$@
echo "ISOLATIONAWARE_MANIFEST_RESOURCE_ID RT_MANIFEST libgtk3.manifest" >>$@

View File

@ -11,7 +11,6 @@ old_msvc = sys.argv[3]
with open(out_file, 'w', encoding='utf-8') as o:
if old_msvc is not None and old_msvc == "1":
o.write("#define ISOLATION_AWARE_ENABLED 1\n")
o.write('#include <winuser.h>\n')
with open(in_file, 'r', encoding='utf-8') as f:
for line in f:

View File

@ -1,4 +1,5 @@
#include <winver.h>
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
VS_VERSION_INFO VERSIONINFO
FILEVERSION @GTK_MAJOR_VERSION@,@GTK_MINOR_VERSION@,@GTK_MICRO_VERSION@,0