fix: ask the user if they want to install the VC redist 2010 if not present on the system #55

This commit is contained in:
Jelle Glebbeek
2021-05-20 03:12:36 +02:00
parent 59b44a31dc
commit c2b75691fe
5 changed files with 20 additions and 1 deletions

BIN
build/elevate.exe Normal file

Binary file not shown.

15
build/vcredist.nsh Normal file
View File

@@ -0,0 +1,15 @@
!include LogicLib.nsh
!macro customInstall
ReadRegDword $R1 HKLM "SOFTWARE\WOW6432Node\Microsoft\VisualStudio\10.0\VC\VCRedist\x86" "Installed"
ReadRegDword $R2 HKLM "SOFTWARE\WOW6432Node\Microsoft\VisualStudio\10.0\VC\VCRedist\x64" "Installed"
${If} $R1 != "1"
${AndIf} $R2 != "1"
MessageBox MB_YESNO "For this program to work, the Visual C++ 2010 redistributable must be installed. Do you want to install it now? " IDYES true IDNO false
true:
File /oname=$PLUGINSDIR\vcredist_x86.exe "${BUILD_RESOURCES_DIR}\vcredist_x86.exe"
File /oname=$PLUGINSDIR\elevate.exe "${BUILD_RESOURCES_DIR}\elevate.exe"
ExecWait '"$PLUGINSDIR\elevate.exe" "$PLUGINSDIR\vcredist_x86.exe" /q /norestart'
false:
${EndIf}
!macroend

BIN
build/vcredist_x86.exe Normal file

Binary file not shown.

View File

@@ -49,9 +49,13 @@
"url": "https://github.com/jely2002/youtube-dl-gui.git"
},
"build": {
"afterPack": "./appimage-fix.js",
"afterPack": "./build/appimage-fix.js",
"appId": "com.jelleglebbeek.youtube-dl-gui",
"asarUnpack": "**/binaries/*",
"nsis": {
"include": "./build/vcredist.nsh",
"packElevateHelper": false
},
"productName": "YouTube Downloader GUI",
"copyright": "Copyright © 2020-2021 Jelle Glebbeek",
"win": {