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.
This commit is contained in:
Zack Middleton 2017-09-07 21:01:23 -05:00
parent 6f0736ce9a
commit aeaecb4ae5
3 changed files with 39 additions and 2 deletions

View File

@ -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

31
code/sys/win_manifest.xml Normal file
View File

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
<dependency>
<dependentAssembly>
<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="*" publicKeyToken="6595b64144ccf1df" language="*">
</assemblyIdentity>
</dependentAssembly>
</dependency>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- No id for Windows XP -->
<!-- Windows Vista -->
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
<!-- Windows 7 -->
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
<!-- Windows 8 -->
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
<!-- Windows 8.1 -->
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
<!-- Windows 10 -->
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
</application>
</compatibility>
</assembly>

View File

@ -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
/////////////////////////////////////////////////////////////////////////////