You use the RC_FILE variable in your PRO file to name a Windows resource file to include into your executable (you need that for the Windows desktop icon anyway). That resource file, in turn, drags in a manifest file. Something like:
myprog.pro:
RC_FILE = myprog.rc
RC_FILE = myprog.rc
To copy to clipboard, switch view to plain text mode
myprog.rc:
...
CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "myprog.exe.manifest"
...
...
CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "myprog.exe.manifest"
...
To copy to clipboard, switch view to plain text mode
myprog.exe.manifest:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity version="1.0.0.0" processorArchitecture="X86"
name="com.example.myprog" type="win32" />
<description>My Prog</description>
<dependency />
<!-- Identify the application security requirements. -->
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges>
<requestedExecutionLevel
level="asInvoker"
uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
<!-- padding to eight-byte multiple file size including BOM -->
<!-- padding 123 -->
</assembly>
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity version="1.0.0.0" processorArchitecture="X86"
name="com.example.myprog" type="win32" />
<description>My Prog</description>
<dependency />
<!-- Identify the application security requirements. -->
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges>
<requestedExecutionLevel
level="asInvoker"
uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
<!-- padding to eight-byte multiple file size including BOM -->
<!-- padding 123 -->
</assembly>
To copy to clipboard, switch view to plain text mode
Your manifest may vary, but the one above is typical for user apps. I am not sure if the file size requirement still exists (it avoided a bug).
Bookmarks