Skip to content

Commit bbb1bfe

Browse files
committed
Add Windows application manifest
The manifest contains four things: - declare compatibility with Windows 10 & 11 - we were running inside a Windows Vista compatibility context before - set process DPI awareness to PerMonitorV2 - this is already set by Qt programmatically at start up - use v6 instead of v5 of the CommonControls library - enable modern styles in system dialogs - user account control settings - for completeness. The linker adds that by default anyway, so this was already part of the executable
1 parent c86de2d commit bbb1bfe

File tree

2 files changed

+47
-1
lines changed

2 files changed

+47
-1
lines changed

src/app/CMakeLists.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,13 @@ endif ()
195195
set (MSCORE_APPEND_SRC)
196196

197197
if (OS_IS_WIN)
198-
list(APPEND MSCORE_APPEND_SRC ${WINDOWS_ICONS_RC})
198+
set(MANIFEST_FILE_NAME "${EXECUTABLE_NAME}.manifest")
199+
configure_file("app_win.manifest.in" ${MANIFEST_FILE_NAME} @ONLY)
200+
201+
list(APPEND MSCORE_APPEND_SRC
202+
${WINDOWS_ICONS_RC}
203+
"${CMAKE_CURRENT_BINARY_DIR}/${MANIFEST_FILE_NAME}"
204+
)
199205
endif()
200206

201207
if (MUE_CONFIGURATION_IS_APPWEB)

src/app/app_win.manifest.in

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2+
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"
3+
xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
4+
<assemblyIdentity type="win32" name="Muse.MuseScore.@MUSE_APP_NAME_MACHINE_READABLE@"
5+
version="@[email protected]" />
6+
7+
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
8+
<application>
9+
<!-- Windows 10 and Windows 11 -->
10+
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />
11+
</application>
12+
</compatibility>
13+
14+
<asmv3:application>
15+
<asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">
16+
<dpiAwareness>PerMonitorV2</dpiAwareness>
17+
</asmv3:windowsSettings>
18+
</asmv3:application>
19+
20+
<dependency>
21+
<dependentAssembly>
22+
<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls"
23+
version="6.0.0.0" processorArchitecture="*"
24+
publicKeyToken="6595b64144ccf1df" language="*" />
25+
</dependentAssembly>
26+
</dependency>
27+
28+
<!--
29+
UAC settings:
30+
- app should run at same integrity level as calling process
31+
- app does not need to manipulate windows belonging to higher-integrity-level processes
32+
-->
33+
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
34+
<security>
35+
<requestedPrivileges>
36+
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
37+
</requestedPrivileges>
38+
</security>
39+
</trustInfo>
40+
</assembly>

0 commit comments

Comments
 (0)