Merge branch 'fix-win11-sdk' into 'master'

Fix building against the Windows 11 SDK (GTK master/4.x)

See merge request GNOME/gtk!4063
This commit is contained in:
Matthias Clasen 2021-10-19 02:42:15 +00:00
commit 46ba4b9d8c
2 changed files with 5 additions and 4 deletions

View File

@ -1,5 +1,5 @@
#include <winuser.h>
#include <winver.h>
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
GTK_ICON ICON "gtk.ico"

View File

@ -24,7 +24,7 @@ def main():
help='require admin access to application')
parser.add_argument('--input-resource-file', dest='resource',
default=None,
help='existing .rc file to embed UAC manifest (do not generate a new .rc file), must have included winuser.h in it')
help='existing .rc file to embed UAC manifest (do not generate a new .rc file), must have included windows.h in it')
parser.add_argument('--output-dir', dest='outdir',
default=None,
help='directory to output resulting files')
@ -92,7 +92,8 @@ def write_rc_file(name, resource, outdir):
if resource is None:
outfile = open(output_file_base_name + '.rc', 'w+')
outfile.write('#include <winuser.h>')
outfile.write('#define WIN32_LEAN_AND_MEAN\n')
outfile.write('#include <windows.h>\n')
else:
if resource != output_file_base_name + '.rc':
outfile = open(output_file_base_name + '.rc', 'w+')