-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Windows] Updates VC runtime to be compatible with both VS2019 and VS…
…2017
- Loading branch information
Showing
2 changed files
with
14 additions
and
15 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
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,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 |