From 33979d7381e1f687dabb6ed792b9a11e23ce132c Mon Sep 17 00:00:00 2001 From: Daemonratte Date: Mon, 19 Oct 2026 14:01:59 +0200 Subject: [PATCH] gtk-update-icon-cache: give the manifest resource its numbers The .rc took the names from winbase.h, which does not define them (they are in winuser.h), so windres made a resource named "RT_MANIFEST" that Windows never looks at, and the program, "update" in its name, could ask for elevation. The numbers need no header, and the mingw-w64 headers that warned about a macro defined twice are gone too. --- gtk/Makefile.am | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gtk/Makefile.am b/gtk/Makefile.am index 718dc5701..103aac80f 100644 --- a/gtk/Makefile.am +++ b/gtk/Makefile.am @@ -1192,8 +1192,11 @@ $(GTK_UPDATE_ICON_CACHE_MANIFEST): echo ' ' ; \ echo '' ) >$@ +# 1 and 24 are CREATEPROCESS_MANIFEST_RESOURCE_ID and RT_MANIFEST, whose +# headers some mingw-w64 releases can't take twice without warnings $(GTK_UPDATE_ICON_CACHE_RC): - (echo -e '#include \nCREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "'$(GTK_UPDATE_ICON_CACHE_MANIFEST)'"') >$@ + (echo '/* the manifest of the program */' ; \ + echo '1 24 "'$(GTK_UPDATE_ICON_CACHE_MANIFEST)'"') >$@ $(GTK_UPDATE_ICON_CACHE_MANIFEST_OBJECT): $(GTK_UPDATE_ICON_CACHE_RC) $(GTK_UPDATE_ICON_CACHE_MANIFEST) $(WINDRES) --input $< --output $@ --output-format=coff