Use .manifest file for apps on Windows

Works with CMake, and also adds DPI awareness to DolphinQt2 (which
wasn't enabled before).
This commit is contained in:
Michael Maltese 2017-02-09 23:46:23 -08:00
parent 96e83b5d54
commit 715170759c
6 changed files with 29 additions and 3 deletions

View File

@ -32,6 +32,10 @@ set(SRCS
list(APPEND LIBS core uicommon)
if(WIN32)
list(APPEND SRCS DolphinQt2.manifest)
endif()
set(DOLPHINQT2_BINARY dolphin-emu-qt2)
add_executable(${DOLPHINQT2_BINARY} ${SRCS} ${UI_HEADERS})

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
</windowsSettings>
</application>
</assembly>

View File

@ -65,6 +65,9 @@
<ResourceCompile>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ExternalsDir)/gettext</AdditionalIncludeDirectories>
</ResourceCompile>
<Manifest>
<AdditionalManifestFiles>DolphinQt2.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles>
</Manifest>
</ItemDefinitionGroup>
<!--QRC and UI files are handled automatically-->
<ItemGroup>

View File

@ -108,7 +108,10 @@ if(APPLE)
endif()
if(WIN32)
list(APPEND SRCS DolphinWX.rc)
list(APPEND SRCS
DolphinWX.manifest
DolphinWX.rc
)
endif()
if(APPLE)

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
</windowsSettings>
</application>
</assembly>

View File

@ -51,7 +51,7 @@
<ClCompile />
<ClCompile />
<Manifest>
<EnableDpiAwareness>true</EnableDpiAwareness>
<AdditionalManifestFiles>DolphinWX.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles>
</Manifest>
</ItemDefinitionGroup>
<ItemGroup>