fix: version NSCurl plugin in workflow, detect and use arm64 vc_redist for arm64

Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
This commit is contained in:
Rachel Powers
2024-10-03 21:56:19 -07:00
parent ed15a28eb3
commit bcb1d456d4
3 changed files with 27 additions and 12 deletions

View File

@ -44,14 +44,20 @@ configure_file(prismlauncher.ico prismlauncher.ico COPYONLY)
if(MSVC)
set(Launcher_MSVC_Redist_NSIS_Section [=[
!ifdef haveNSIScurl
!ifdef haveNScurl
Section "Visual Studio Runtime"
Var /GLOBAL vc_redist_exe
${If} ${IsNativeARM64}
StrCpy $vc_redist_exe "vc_redist.arm64.exe"
${Else}
StrCpy $vc_redist_exe "vc_redist.x64.exe"
${EndIf}
DetailPrint 'Downloading Microsoft Visual C++ Redistributable...'
NScurl::http GET "https://aka.ms/vs/17/release/vc_redist.x64.exe" "$INSTDIR\vc_redist\vc_redist.x64.exe" /INSIST /CANCEL /Zone.Identifier /END
NScurl::http GET "https://aka.ms/vs/17/release/${vc_redist_exe}" "$INSTDIR\vc_redist\${vc_redist_exe}" /INSIST /CANCEL /Zone.Identifier /END
Pop $0
${If} $0 == "OK"
DetailPrint "Download successful"
ExecWait "$INSTDIR\vc_redist\vc_redist.x64.exe /install /passive /norestart\"
ExecWait "$INSTDIR\vc_redist\${vc_redist_exe} /install /passive /norestart\"
${Else}
DetailPrint "Download failed with error $0"
${EndIf}