summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2021-10-13 12:17:44 +0800
committerChun-wei Fan <fanchunwei@src.gnome.org>2021-10-13 12:21:10 +0800
commit53705a537c1aa51ffbecfaaf685501b9ea1cb6ba (patch)
treeb87bb0d6d0a4546eefbd84ba3d44f67a620b3937 /tools
parent3481ebdafb474ce7e312914e998e7212ecdbc5ba (diff)
downloadgtk+-53705a537c1aa51ffbecfaaf685501b9ea1cb6ba.tar.gz
tools/generate-uac-manifest.py: Fix UAC manifest .rc
The resource compiler in the Windows 11 SDK does not allow one to include winuser.h directly in resource scripts (.rc) with a rather cryptic error message, so fix generating the .rc file to embed the UAC manifest by including windows.h with WIN32_LEAN_AND_MEAN instead.
Diffstat (limited to 'tools')
-rw-r--r--tools/generate-uac-manifest.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/generate-uac-manifest.py b/tools/generate-uac-manifest.py
index ede6ba5044..62f063a8bb 100644
--- a/tools/generate-uac-manifest.py
+++ b/tools/generate-uac-manifest.py
@@ -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+')