From da1a72ed19b92d9877abf82fce68fec7ac131cca Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Mon, 18 Jan 2016 11:59:16 -0800 Subject: [PATCH] manually set installer/uninstaller dpi aware --- cmake/templates/NSIS.template.in | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/cmake/templates/NSIS.template.in b/cmake/templates/NSIS.template.in index ec60bc9824..65496c28dc 100644 --- a/cmake/templates/NSIS.template.in +++ b/cmake/templates/NSIS.template.in @@ -37,7 +37,6 @@ ; Set name prior to inner loop so uninstaller has correct values Name "@CPACK_NSIS_PACKAGE_NAME@" BrandingText " " - ManifestDPIAware true !ifdef INNER !echo "Inner invocation" ; just to see what's going on @@ -989,6 +988,11 @@ FunctionEnd ; determine admin versus local install Function un.onInit + ; manually set this process to DPI aware for fonts on high-dpi screens + ${If} ${AtLeastWinVista} + System::Call 'user32::SetProcessDPIAware()' + ${EndIf} + ; In order for the uninstaller to be able to remove itself, we have to do some trickery here. ; If the $EXEPATH does not contain the $TEMP dir, this instance is not the copied one ; so we move it to the $TEMP dir and then execute the copied uninstaller. @@ -1214,6 +1218,11 @@ SectionEnd Function .onInit + ; manually set this process to DPI aware for fonts on high-dpi screens + ${If} ${AtLeastWinVista} + System::Call 'user32::SetProcessDPIAware()' + ${EndIf} + !ifdef INNER ; If INNER is defined, then we aren't supposed to do anything except write out ; the installer. This is better than processing a command line option as it means