diff options
| author | David Lönnhager <david.l@mullvad.net> | 2024-11-07 18:09:57 +0100 |
|---|---|---|
| committer | David Lönnhager <david.l@mullvad.net> | 2024-11-11 10:47:41 +0100 |
| commit | 2df0a89dfd529fd1b3cb1be9b8ff63249482cab1 (patch) | |
| tree | 5ea08078d3ca31173ecf7fa91364e8ebeb863f19 /dist-assets | |
| parent | 3543da02f94ee0102cf1938c845adeb00cdaf453 (diff) | |
| download | mullvadvpn-2df0a89dfd529fd1b3cb1be9b8ff63249482cab1.tar.xz mullvadvpn-2df0a89dfd529fd1b3cb1be9b8ff63249482cab1.zip | |
Prevent install of x86 app on arm64 Windows, and vice versa
Diffstat (limited to 'dist-assets')
| -rw-r--r-- | dist-assets/windows/installer.nsh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/dist-assets/windows/installer.nsh b/dist-assets/windows/installer.nsh index 1d146563b4..4b6273d75b 100644 --- a/dist-assets/windows/installer.nsh +++ b/dist-assets/windows/installer.nsh @@ -690,6 +690,22 @@ Abort ${EndIf} + Var /GLOBAL NativeTarget + ${If} ${IsNativeAMD64} + StrCpy $NativeTarget "x64" + ${ElseIf} ${IsNativeARM64} + StrCpy $NativeTarget "arm64" + ${Else} + StrCpy $NativeTarget "unsupported arch" + ${EndIf} + + # $%TARGET_ARCHITECTURE% is set by distribution.js to the corresponding architecture + # in https://www.electron.build/builder-util.typealias.archtype + ${If} $%TARGET_ARCHITECTURE% != $NativeTarget + MessageBox MB_ICONSTOP|MB_TOPMOST|MB_OK "This build of the app does not run on $NativeTarget Windows. Please find the appropriate installer on the website." + Abort + ${EndIf} + # Application settings key # Migrate 2018.(x<6) to current registry::MoveKey "HKLM\SOFTWARE\8fa2c331-e09e-5709-bc74-c59df61f0c7e" "HKLM\SOFTWARE\${PRODUCT_NAME}" |
