Always run MSVC runtime installer

This commit is contained in:
Jonas Kvinge
2025-01-08 18:04:08 +01:00
parent 558eae1ca1
commit 9095b0d6b2
2 changed files with 11 additions and 4 deletions

View File

@@ -1452,6 +1452,11 @@ jobs:
exit 1 exit 1
fi fi
- name: Download MSVC runtime
shell: bash
working-directory: build
run: curl -f -O -L https://aka.ms/vs/17/release/vc_redist.$(test "${{matrix.arch}}" = "x86_64" && echo "x64" || echo "${{matrix.arch}}").exe
- name: Create nsis installer - name: Create nsis installer
shell: cmd shell: cmd
working-directory: build working-directory: build

View File

@@ -208,14 +208,16 @@ FunctionEnd
!ifdef msvc !ifdef msvc
!define vc_redist_file "vc_redist.${arch}.exe" !define vc_redist_file "vc_redist.${arch}.exe"
Function InstallMSVCRuntime Function InstallMSVCRuntime
${registry::Read} "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\14.0\VC\Runtimes\${arch}" "Version" $R0 $R1 SetOutPath "$TEMP"
${If} $R0 == "" File "${vc_redist_file}"
; ${registry::Read} "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\14.0\VC\Runtimes\${arch}" "Version" $R0 $R1
; ${If} $R0 == ""
SetDetailsView hide SetDetailsView hide
inetc::get /caption "Downloading..." "https://aka.ms/vs/17/release/${vc_redist_file}" "$TEMP\${vc_redist_file}" /end ; inetc::get /caption "Downloading..." "https://aka.ms/vs/17/release/${vc_redist_file}" "$TEMP\${vc_redist_file}" /end
ExecWait '"$TEMP\${vc_redist_file}" /install /passive' ExecWait '"$TEMP\${vc_redist_file}" /install /passive'
Delete "$TEMP\${vc_redist_file}" Delete "$TEMP\${vc_redist_file}"
SetDetailsView show SetDetailsView show
${EndIf} ; ${EndIf}
FunctionEnd FunctionEnd
!endif !endif