diff options
author | bitraid <bitraid@protonmail.ch> | 2023-08-13 12:38:19 +1200 |
---|---|---|
committer | toofar <toofar@spalge.com> | 2023-08-13 15:14:24 +1200 |
commit | 7599dbc2090466ecac8c75ac5c36ec9ffbd882b2 (patch) | |
tree | 868316d245d964a5ce5fb91bb6a2fe4e3c8c7ef7 | |
parent | 6f7b76f06602f22eed83fc24b8c2c78442199bc1 (diff) | |
download | qutebrowser-feat/mac_sandbox_pre_release_pyinstaller.tar.gz qutebrowser-feat/mac_sandbox_pre_release_pyinstaller.zip |
nsis: custom error message for Qt5 OS version checkfeat/mac_sandbox_pre_release_pyinstaller
The CheckPlatform macro will prompt the user user to use the 32bit installer
if they are on a 32bit system. But we don't provide a 32bit installer anymore.
This commit changes the OS version check for Qt5 builds to be based on checking
version numbers ourselves too, so that we can have our own error message.
Also moves the Qt5 conditionals to be compile time ones.
-rwxr-xr-x | misc/nsis/install.nsh | 38 |
1 files changed, 23 insertions, 15 deletions
diff --git a/misc/nsis/install.nsh b/misc/nsis/install.nsh index dffe707c5..282a254eb 100755 --- a/misc/nsis/install.nsh +++ b/misc/nsis/install.nsh @@ -432,24 +432,32 @@ Function .onInit StrCpy $KeepReg 1 ; OS version check - ${If} ${QT5} == "True" - !insertmacro CheckPlatform ${PLATFORM} - !insertmacro CheckMinWinVer ${MIN_WIN_VER} - Goto _os_check_pass - ${ElseIf} ${RunningX64} + ${If} ${RunningX64} + ; https://learn.microsoft.com/en-us/windows/win32/api/winnt/ns-winnt-osversioninfoa#remarks GetWinVer $R0 Major - IntCmpU $R0 10 0 _os_check_fail _os_check_pass - GetWinVer $R1 Build - ${If} $R1 >= 22000 ; Windows 11 21H2 - Goto _os_check_pass - ${ElseIf} $R1 >= 14393 ; Windows 10 1607 - ${AndIf} ${IsNativeAMD64} ; Windows 10 has no x86_64 emulation on arm64 - Goto _os_check_pass - ${EndIf} + !if "${QT5}" == "True" + IntCmpU $R0 6 0 _os_check_fail _os_check_pass + GetWinVer $R1 Minor + IntCmpU $R1 2 _os_check_pass _os_check_fail _os_check_pass + !else + IntCmpU $R0 10 0 _os_check_fail _os_check_pass + GetWinVer $R1 Build + ${If} $R1 >= 22000 ; Windows 11 21H2 + Goto _os_check_pass + ${ElseIf} $R1 >= 14393 ; Windows 10 1607 + ${AndIf} ${IsNativeAMD64} ; Windows 10 has no x86_64 emulation on arm64 + Goto _os_check_pass + ${EndIf} + !endif ${EndIf} _os_check_fail: - MessageBox MB_OK|MB_ICONSTOP "This version of ${PRODUCT_NAME} requires a 64-bit$\r$\n\ - version of Windows 10 1607 or later." + !if "${QT5}" == "True" + MessageBox MB_OK|MB_ICONSTOP "This version of ${PRODUCT_NAME} requires a 64-bit$\r$\n\ + version of Windows 8 or later." + !else + MessageBox MB_OK|MB_ICONSTOP "This version of ${PRODUCT_NAME} requires a 64-bit$\r$\n\ + version of Windows 10 1607 or later." + !endif Abort _os_check_pass: |