-
-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: include vc_redist net installer in Windows and vulkan runtime
- Loading branch information
1 parent
2a6cfc4
commit 221e4bb
Showing
2 changed files
with
53 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,13 @@ | ||
{ | ||
"bundle": { | ||
"resources": { | ||
"ffmpeg\\bin\\x64\\*": "./" | ||
} | ||
} | ||
"bundle": { | ||
"windows": { | ||
"nsis": { | ||
"installerHooks": "vc_redist.nsh" | ||
} | ||
}, | ||
"resources": { | ||
"ffmpeg\\bin\\x64\\*": "./", | ||
"vulkan_runtime\\x64\\*.dll": "./" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
Section | ||
; Check if the VC++ Redistributable is already installed | ||
ReadRegStr $0 HKLM "SOFTWARE\Wow6432Node\Microsoft\VisualStudio\14.0\VC\Runtimes\x64" "Installed" | ||
|
||
${If} $0 != "" | ||
DetailPrint "vc_redist found! Skipping installation." | ||
${Else} | ||
; Define download URL and target path for vc_redist.x64.exe | ||
StrCpy $0 "https://aka.ms/vs/17/release/vc_redist.x64.exe" | ||
StrCpy $1 "$TEMP\vc_redist.x64.exe" | ||
|
||
; Download the vc_redist.x64.exe installer | ||
NSISdl::download $0 $1 | ||
Pop $0 | ||
${If} $0 == "success" | ||
DetailPrint "vc_redist downloaded successfully" | ||
${Else} | ||
DetailPrint "vc_redist failed to download" | ||
Call InstallFailed | ||
Abort "vc_redist download failed, aborting installation" | ||
${EndIf} | ||
|
||
; Execute the downloaded installer | ||
ExecWait '"$1" /install /passive /norestart' $0 | ||
${If} $0 == 0 | ||
DetailPrint "vc_redist installation completed successfully" | ||
${Else} | ||
DetailPrint "vc_redist installation failed" | ||
Call InstallFailed | ||
Abort "vc_redist installation failed, aborting process" | ||
${EndIf} | ||
${EndIf} | ||
SectionEnd | ||
|
||
|
||
Function InstallFailed | ||
DetailPrint "vc_redist failed to download" | ||
; Show a message box to inform the user | ||
MessageBox MB_OK|MB_ICONEXCLAMATION "Failed to download VC++ Redistributable. Please download and install it manually. Click OK to open the URL to download." | ||
; Open the URL in the default browser | ||
ExecShell "open" "https://aka.ms/vs/17/release/vc_redist.x64.exe" | ||
FunctionEnd |