aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthexai <58434170+thexai@users.noreply.github.com>2021-04-21 10:31:53 +0200
committerthexai <58434170+thexai@users.noreply.github.com>2021-04-22 23:16:27 +0200
commitdb06c79f855fdf1cb8abdeee2cc8d8a7e71d4f75 (patch)
tree83787c94a01bcbe814df5e3e1064f0ce508267fa
parentf19624acf158e3dbe316df65e535a49cde817e86 (diff)
[Windows] Updates VC runtime to be compatible with both VS2019 and VS2017
-rw-r--r--project/Win32BuildSetup/genNsisInstaller.nsi14
-rw-r--r--project/Win32BuildSetup/getdeploydependencies.bat15
2 files changed, 14 insertions, 15 deletions
diff --git a/project/Win32BuildSetup/genNsisInstaller.nsi b/project/Win32BuildSetup/genNsisInstaller.nsi
index d8418b4afa..ed8626a567 100644
--- a/project/Win32BuildSetup/genNsisInstaller.nsi
+++ b/project/Win32BuildSetup/genNsisInstaller.nsi
@@ -328,14 +328,14 @@ SectionEnd
;vs redist installer Section
SectionGroup "Microsoft Visual C++ packages" SEC_VCREDIST
-Section "VS2017 C++ re-distributable Package (${TARGET_ARCHITECTURE})" SEC_VCREDIST1
-DetailPrint "Running VS2017 re-distributable setup..."
+Section "VS2017-2019 C++ re-distributable Package (${TARGET_ARCHITECTURE})" SEC_VCREDIST1
+DetailPrint "Running VS2017-2019 re-distributable setup..."
SectionIn 1 2 #section is in install type Full
- SetOutPath "$TEMP\vc2017"
- File "${app_root}\..\..\BuildDependencies\downloads\vcredist\2017\vcredist_${TARGET_ARCHITECTURE}.exe"
- ExecWait '"$TEMP\vc2017\vcredist_${TARGET_ARCHITECTURE}.exe" /install /quiet /norestart' $VSRedistSetupError
- RMDir /r "$TEMP\vc2017"
- DetailPrint "Finished VS2017 re-distributable setup"
+ SetOutPath "$TEMP\vc2019"
+ File "${app_root}\..\..\BuildDependencies\downloads\vcredist\2017-2019\vcredist_${TARGET_ARCHITECTURE}.exe"
+ ExecWait '"$TEMP\vc2019\vcredist_${TARGET_ARCHITECTURE}.exe" /install /quiet /norestart' $VSRedistSetupError
+ RMDir /r "$TEMP\vc2019"
+ DetailPrint "Finished VS2017-2019 re-distributable setup"
SetOutPath "$INSTDIR"
SectionEnd
diff --git a/project/Win32BuildSetup/getdeploydependencies.bat b/project/Win32BuildSetup/getdeploydependencies.bat
index 2054984505..c339111f8e 100644
--- a/project/Win32BuildSetup/getdeploydependencies.bat
+++ b/project/Win32BuildSetup/getdeploydependencies.bat
@@ -1,18 +1,17 @@
@echo off
-REM If KODI_MIRROR is not set externally to this script, set it to the default mirror URL
-IF "%KODI_MIRROR%" == "" SET KODI_MIRROR=http://mirrors.kodi.tv
-echo Downloading from mirror %KODI_MIRROR%
-
+set DOWNLOAD_URL=https://aka.ms/vs/16/release/vc_redist.%TARGET_ARCHITECTURE%.exe
+set DOWNLOAD_FOLDER=..\BuildDependencies\downloads\vcredist\2017-2019
+set DOWNLOAD_FILE=vcredist_%TARGET_ARCHITECTURE%.exe
:: Following commands expect this script's parent directory to be the current directory, so make sure that's so
PUSHD %~dp0
-if not exist ..\BuildDependencies\downloads\vcredist\2017 mkdir ..\BuildDependencies\downloads\vcredist\2017
+if not exist %DOWNLOAD_FOLDER% mkdir %DOWNLOAD_FOLDER%
-if not exist ..\BuildDependencies\downloads\vcredist\2017\vcredist_%TARGET_ARCHITECTURE%.exe (
- echo Downloading vc141 redist...
- ..\BuildDependencies\bin\wget --tries=5 --retry-connrefused --waitretry=2 -nv -O ..\BuildDependencies\downloads\vcredist\2017\vcredist_%TARGET_ARCHITECTURE%.exe %KODI_MIRROR%/build-deps/win32/vcredist/2017/vcredist_%TARGET_ARCHITECTURE%.exe
+if not exist %DOWNLOAD_FOLDER%\%DOWNLOAD_FILE% (
+ echo Downloading vc142 redist...
+ ..\BuildDependencies\bin\wget --tries=5 --retry-connrefused --waitretry=2 -nv -O %DOWNLOAD_FOLDER%\%DOWNLOAD_FILE% %DOWNLOAD_URL%
)
:: Restore the previous current directory
POPD