Skip to content

gtk4-update-icon-cache: Avoid UAC on 32-bit Windows

Chun-wei Fan requested to merge uac.meson.master into master

Hi,

From the commit message:

As the program executable name has 'update' in its filename, gtk4-update-icon-cache.exe is considered to be an installer program on 32-bit Windows [1], which will cause the program to fail to run unless it is running with elevated privileges (i.e. UAC).

Avoid this situation by embedding a manifest file into the final executable that tells Windows that this is not a program that requires elevation.

Fixes issue #3632 (closed).

[1]: https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-vista/cc709628(v=ws.10)?redirectedfrom=MSDN, under section "Installer Detection Technology"

This matches what is done in GTK-3.x's autotools build files--note that this fix will also be needed for the gtk-4.0 branch as well as gtk-3-24, for the Meson build files, for both MinGW/mingw-w64 and Visual Studio. So, I will backport this to the aforementioned branches when this MR is deemed acceptable. The Visual Studio project files in gtk-3-24 handles this automatically, by the way.

With blessings, thank you!

Edited by Chun-wei Fan

Merge request reports