Bug 961958 - on Vista and above use SetProcessDPIAware in the installers so fonts aren't blurry on HDPI devices. r=bbondy
authorRobert Strong <robert.bugzilla@gmail.com>
Fri, 24 Jan 2014 10:38:30 -0800
changeset 165083 376538c22d1f0ebec730c51bc9158533091fdcdf
parent 165082 2afb7bf0bf0b2481fbd4a69f92ff88c0c65d07ef
child 165084 d319f9ddf227f214bff261fe81fd1638379ade32
push id38895
push userrstrong@mozilla.com
push dateFri, 24 Jan 2014 18:38:43 +0000
treeherdermozilla-inbound@376538c22d1f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbbondy
bugs961958
milestone29.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 961958 - on Vista and above use SetProcessDPIAware in the installers so fonts aren't blurry on HDPI devices. r=bbondy
browser/installer/windows/nsis/installer.nsi
browser/installer/windows/nsis/maintenanceservice_installer.nsi
browser/installer/windows/nsis/stub.nsi
browser/installer/windows/nsis/uninstaller.nsi
--- a/browser/installer/windows/nsis/installer.nsi
+++ b/browser/installer/windows/nsis/installer.nsi
@@ -1043,16 +1043,20 @@ Function .onInit
   System::Call 'kernel32::SetDllDirectoryW(w "")'
 
   StrCpy $PageName ""
   StrCpy $LANGUAGE 0
   ${SetBrandNameVars} "$EXEDIR\core\distribution\setup.ini"
 
   ${InstallOnInitCommon} "$(WARN_MIN_SUPPORTED_OS_MSG)"
 
+  ${If} ${AtLeastWinVista}
+    System::Call 'user32::SetProcessDPIAware()'
+  ${EndIf}
+
   !insertmacro InitInstallOptionsFile "options.ini"
   !insertmacro InitInstallOptionsFile "shortcuts.ini"
   !insertmacro InitInstallOptionsFile "components.ini"
   !insertmacro InitInstallOptionsFile "summary.ini"
 
   WriteINIStr "$PLUGINSDIR\options.ini" "Settings" NumFields "5"
 
   WriteINIStr "$PLUGINSDIR\options.ini" "Field 1" Type   "label"
--- a/browser/installer/windows/nsis/maintenanceservice_installer.nsi
+++ b/browser/installer/windows/nsis/maintenanceservice_installer.nsi
@@ -127,16 +127,20 @@ Function .onInit
   ${EndUnless}
 FunctionEnd
 
 Function un.onInit
   ; Remove the current exe directory from the search order.
   ; This only effects LoadLibrary calls and not implicitly loaded DLLs.
   System::Call 'kernel32::SetDllDirectoryW(w "")'
 
+  ${If} ${AtLeastWinVista}
+    System::Call 'user32::SetProcessDPIAware()'
+  ${EndIf}
+
   StrCpy $BrandFullNameDA "${MaintFullName}"
   StrCpy $BrandFullName "${MaintFullName}"
 FunctionEnd
 
 Section "MaintenanceService"
   AllowSkipFiles off
 
   CreateDirectory $INSTDIR
--- a/browser/installer/windows/nsis/stub.nsi
+++ b/browser/installer/windows/nsis/stub.nsi
@@ -331,16 +331,20 @@ Function .onInit
       Quit
     ${EndIf}
   ${EndUnless}
 !endif
 
   ; Require elevation if the user can elevate
   ${ElevateUAC}
 
+  ${If} ${AtLeastWinVista}
+    System::Call 'user32::SetProcessDPIAware()'
+  ${EndIf}
+
   ; Create a mutex to prevent multiple launches of the same stub installer in
   ; the same location on the file system. This intentionally won't handle the
   ; case where someone runs multiple copies of the stub on the file system but
   ; it does handle the important case which is a user launching the same stub
   ; multiple times.
   StrCpy $1 "$EXEPATH"
   ; Backslashes are illegal in a mutex name so replace all occurences of a
   ; backslash with a forward slash.
--- a/browser/installer/windows/nsis/uninstaller.nsi
+++ b/browser/installer/windows/nsis/uninstaller.nsi
@@ -680,16 +680,20 @@ Function un.onInit
   ; Remove the current exe directory from the search order.
   ; This only effects LoadLibrary calls and not implicitly loaded DLLs.
   System::Call 'kernel32::SetDllDirectoryW(w "")'
 
   StrCpy $LANGUAGE 0
 
   ${un.UninstallUnOnInitCommon}
 
+  ${If} ${AtLeastWinVista}
+    System::Call 'user32::SetProcessDPIAware()'
+  ${EndIf}
+
   !insertmacro InitInstallOptionsFile "unconfirm.ini"
 FunctionEnd
 
 Function .onGUIEnd
   ${OnEndCommon}
 FunctionEnd
 
 Function un.onGUIEnd