NSIS: add support for Windows ARM64 build

Qt >=6.8 can native compile on Windows ARM64 machine, and GitHub also provides windows-11-arm runner. so I think It's time to add support.

I've tested from my branch and Snapdragon 8cx gen3 computer. all ci build passed.

Closes #11465
PR #23328.
This commit is contained in:
namoen0301
2025-10-20 16:43:44 +08:00
committed by GitHub
parent d67163269b
commit df2998c7a9
61 changed files with 282 additions and 17 deletions

View File

@@ -128,6 +128,19 @@ Function .onInit
Abort
${EndIf}
; check installer and current system architecture
${If} "${QBT_CPU_ARCH}" == "x64"
${AndIf} ${IsNativeARM64} ;x64 use arm64 installer
MessageBox MB_OK|MB_ICONEXCLAMATION $(inst_arch_mismatch_x64_on_arm64) /SD IDOK
SetErrorLevel 1654 # WinError.h: `ERROR_INSTALL_REJECTED`
Abort
${ElseIf} "${QBT_CPU_ARCH}" == "arm64"
${AndIf} ${IsNativeAMD64} ;arm64 use x64 installer
MessageBox MB_OK|MB_ICONEXCLAMATION $(inst_arch_mismatch_arm64_on_x64) /SD IDOK
SetErrorLevel 1654 # WinError.h: `ERROR_INSTALL_REJECTED`
Abort
${EndIf}
;Search if qBittorrent is already installed.
FindFirst $0 $1 "$INSTDIR\uninst.exe"
FindClose $0