From aeaecb4ae581c25b7628ccde0303dbc4a5ea11e1 Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Thu, 7 Sep 2017 21:01:23 -0500 Subject: [PATCH] Add Windows application manifest - Use common controls 6 so error dialogs use correct visuals on Windows XP or later! - Specify running as invoker so Windows doesn't guess if it should prompt for admin permission on Vista or later. - Specify compatible with Vista through Windows 10. Tells Windows not to emulate Vista behavior, not sure if it affects anything. Makefile automatically runs windres when manifest changes. --- Makefile | 4 ++-- code/sys/win_manifest.xml | 31 +++++++++++++++++++++++++++++++ code/sys/win_resource.rc | 6 ++++++ 3 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 code/sys/win_manifest.xml diff --git a/Makefile b/Makefile index 45339aab..44d2862c 100644 --- a/Makefile +++ b/Makefile @@ -2665,7 +2665,7 @@ $(B)/client/%.o: $(SYSDIR)/%.c $(B)/client/%.o: $(SYSDIR)/%.m $(DO_CC) -$(B)/client/%.o: $(SYSDIR)/%.rc +$(B)/client/win_resource.o: $(SYSDIR)/win_resource.rc $(SYSDIR)/win_manifest.xml $(DO_WINDRES) @@ -2722,7 +2722,7 @@ $(B)/ded/%.o: $(SYSDIR)/%.c $(B)/ded/%.o: $(SYSDIR)/%.m $(DO_DED_CC) -$(B)/ded/%.o: $(SYSDIR)/%.rc +$(B)/ded/win_resource.o: $(SYSDIR)/win_resource.rc $(SYSDIR)/win_manifest.xml $(DO_WINDRES) $(B)/ded/%.o: $(NDIR)/%.c diff --git a/code/sys/win_manifest.xml b/code/sys/win_manifest.xml new file mode 100644 index 00000000..2055dc9e --- /dev/null +++ b/code/sys/win_manifest.xml @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/code/sys/win_resource.rc b/code/sys/win_resource.rc index b1c39d50..b9c8c6ea 100644 --- a/code/sys/win_resource.rc +++ b/code/sys/win_resource.rc @@ -70,6 +70,12 @@ BEGIN IDS_STRING1 "Quake3" END +///////////////////////////////////////////////////////////////////////////// +// +// Application Manifest +// +CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "win_manifest.xml" + #endif // English (U.S.) resources /////////////////////////////////////////////////////////////////////////////