aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Saunders <saunders@aggienetwork.com>2015-03-28 21:32:36 -0700
committerRyan Saunders <saunders@aggienetwork.com>2015-06-08 17:07:11 -0700
commitc1778dd65690c24eab2cc4d6b661ce77723fae12 (patch)
tree1949c41c6336b066af2130679e5db776b0db85ce
parentcdd0feeda8898730ce1ebc78420b2583daf5f6b6 (diff)
Improve Win32 build/download scripts. This change adds support for
a KODI_MIRROR environment variable which, if set, overrides the default mirror URL of http://mirrors.kodi.tv. In the event that a package download fails, DownloadBuildDeps.bat will now suggest that the user manually choose an alternate mirror and re-run. Also, this change improves the download scripts in several ways. get_formed.cmd now reports failed package downloads at the end, and DownloadBuildDeps.bat, DownloadMingwBuildEnv.bat and make-mingwlibs.bat all support being run from an arbitrary directory (e.g., c:\kodi> project\BuildDependencies\DownloadBuildDeps.bat).
-rw-r--r--project/BuildDependencies/DownloadBuildDeps.bat38
-rw-r--r--project/BuildDependencies/DownloadMingwBuildEnv.bat36
-rw-r--r--project/BuildDependencies/scripts/dlextract.bat25
-rw-r--r--project/BuildDependencies/scripts/get_formed.cmd43
-rw-r--r--project/BuildDependencies/scripts/get_mingw_env.bat1
-rw-r--r--project/BuildDependencies/scripts/get_mingw_env.txt62
-rw-r--r--project/BuildDependencies/scripts/get_msys_env.bat1
-rw-r--r--project/BuildDependencies/scripts/get_msys_env.txt60
-rw-r--r--project/Win32BuildSetup/getdeploydependencies.bat19
-rw-r--r--project/cmake/addons/depends/common/tinyxml/tinyxml.txt2
-rw-r--r--project/cmake/scripts/common/prepare-env.cmake7
-rw-r--r--tools/buildsteps/win32/make-mingwlibs.bat12
-rw-r--r--tools/depends/Makefile.include.in5
-rwxr-xr-xtools/rbp/setup-sdk.sh7
14 files changed, 211 insertions, 107 deletions
diff --git a/project/BuildDependencies/DownloadBuildDeps.bat b/project/BuildDependencies/DownloadBuildDeps.bat
index e9fdd2e8b5..cfadcf1c8e 100644
--- a/project/BuildDependencies/DownloadBuildDeps.bat
+++ b/project/BuildDependencies/DownloadBuildDeps.bat
@@ -2,23 +2,31 @@
SETLOCAL
-SET CUR_PATH=%CD%
-SET APP_PATH=%CD%\..\..
-SET TMP_PATH=%CD%\scripts\tmp
+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%
-rem can't run rmdir and md back to back. access denied error otherwise.
+REM Locate the BuildDependencies directory, based on the path of this script
+SET BUILD_DEPS_PATH=%~dp0
+SET APP_PATH=%BUILD_DEPS_PATH%\..\..
+SET TMP_PATH=%BUILD_DEPS_PATH%\scripts\tmp
+
+REM Change to the BuildDependencies directory, if we're not there already
+PUSHD %BUILD_DEPS_PATH%
+
+REM Can't run rmdir and md back to back. access denied error otherwise.
IF EXIST lib rmdir lib /S /Q
IF EXIST include rmdir include /S /Q
IF EXIST %TMP_PATH% rmdir %TMP_PATH% /S /Q
IF $%1$ == $$ (
- SET DL_PATH="%CD%\downloads"
+ SET DL_PATH="%BUILD_DEPS_PATH%\downloads"
) ELSE (
SET DL_PATH="%1"
)
-SET WGET=%CUR_PATH%\bin\wget
-SET ZIP=%CUR_PATH%\..\Win32BuildSetup\tools\7z\7za
+SET WGET=%BUILD_DEPS_PATH%\bin\wget
+SET ZIP=%BUILD_DEPS_PATH%\..\Win32BuildSetup\tools\7z\7za
IF NOT EXIST %DL_PATH% md %DL_PATH%
@@ -33,10 +41,22 @@ REM Trick to preserve console title
start /b /wait cmd.exe /c get_formed.cmd
IF NOT EXIST %FORMED_OK_FLAG% (
ECHO ERROR: Not all formed packages are ready!
+ ECHO.
+ ECHO I tried to get the packages from %KODI_MIRROR%;
+ ECHO if this download mirror seems to be having problems, try choosing another from
+ ECHO the list on http://mirrors.kodi.tv/list.html, and setting %%KODI_MIRROR%% to
+ ECHO point to it, like so:
+ ECHO C:\^> SET KODI_MIRROR=http://example.com/pub/xbmc/
+ ECHO.
+ ECHO Then, rerun this script.
EXIT /B 101
)
-cd %CUR_PATH%
-
rmdir %TMP_PATH% /S /Q
+
+REM Restore the previous current directory
+POPD
+
+ENDLOCAL
+
EXIT /B 0
diff --git a/project/BuildDependencies/DownloadMingwBuildEnv.bat b/project/BuildDependencies/DownloadMingwBuildEnv.bat
index 793309f5b7..dd7c5ef753 100644
--- a/project/BuildDependencies/DownloadMingwBuildEnv.bat
+++ b/project/BuildDependencies/DownloadMingwBuildEnv.bat
@@ -2,25 +2,31 @@
SETLOCAL
-SET MSYS_INSTALL_PATH="%CD%\msys"
-SET MINGW_INSTALL_PATH="%CD%\msys\mingw"
+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 CUR_PATH=%CD%
-SET APP_PATH=%CD%\..\..
-SET TMP_PATH=%CD%\scripts\tmp
+REM Locate the BuildDependencies directory, based on the path of this script
+SET BUILD_DEPS_PATH=%~dp0
+SET APP_PATH=%BUILD_DEPS_PATH%\..\..
+SET TMP_PATH=%BUILD_DEPS_PATH%\scripts\tmp
-rem can't run rmdir and md back to back. access denied error otherwise.
+SET MSYS_INSTALL_PATH="%BUILD_DEPS_PATH%\msys"
+SET MINGW_INSTALL_PATH="%BUILD_DEPS_PATH%\msys\mingw"
+
+
+REM can't run rmdir and md back to back. access denied error otherwise.
IF EXIST %MSYS_INSTALL_PATH% rmdir %MSYS_INSTALL_PATH% /S /Q
IF EXIST %TMP_PATH% rmdir %TMP_PATH% /S /Q
IF $%1$ == $$ (
- SET DL_PATH="%CD%\downloads2"
+ SET DL_PATH="%BUILD_DEPS_PATH%\downloads2"
) ELSE (
SET DL_PATH="%1"
)
-SET WGET=%CUR_PATH%\bin\wget
-SET ZIP=%CUR_PATH%\..\Win32BuildSetup\tools\7z\7za
+SET WGET=%BUILD_DEPS_PATH%\bin\wget
+SET ZIP=%BUILD_DEPS_PATH%\..\Win32BuildSetup\tools\7z\7za
IF NOT EXIST %DL_PATH% md %DL_PATH%
@@ -28,15 +34,15 @@ IF NOT EXIST %MSYS_INSTALL_PATH% md %MSYS_INSTALL_PATH%
IF NOT EXIST %MINGW_INSTALL_PATH% md %MINGW_INSTALL_PATH%
IF NOT EXIST %TMP_PATH% md %TMP_PATH%
-cd scripts
+PUSHD %BUILD_DEPS_PATH%\scripts
CALL get_msys_env.bat
IF EXIST %TMP_PATH% rmdir %TMP_PATH% /S /Q
CALL get_mingw_env.bat
-cd %CUR_PATH%
+POPD
-rem update fstab to install path
+REM update fstab to install path
SET FSTAB=%MINGW_INSTALL_PATH%
SET FSTAB=%FSTAB:\=/%
SET FSTAB=%FSTAB:"=%
@@ -46,12 +52,12 @@ SET FSTAB=%FSTAB:\=/%
SET FSTAB=%FSTAB:"=%
ECHO %FSTAB% /xbmc>>"%MSYS_INSTALL_PATH%\etc\fstab"
-rem insert call to vsvars32.bat in msys.bat
-cd %MSYS_INSTALL_PATH%
+REM insert call to vsvars32.bat in msys.bat
+PUSHD %MSYS_INSTALL_PATH%
Move msys.bat msys.bat_dist
ECHO CALL "%VS120COMNTOOLS%vsvars32.bat">>msys.bat
TYPE msys.bat_dist>>msys.bat
-cd %CUR_PATH%
+POPD
IF EXIST %TMP_PATH% rmdir %TMP_PATH% /S /Q
diff --git a/project/BuildDependencies/scripts/dlextract.bat b/project/BuildDependencies/scripts/dlextract.bat
index a9d7fe7738..90a65a356a 100644
--- a/project/BuildDependencies/scripts/dlextract.bat
+++ b/project/BuildDependencies/scripts/dlextract.bat
@@ -1,14 +1,23 @@
@ECHO OFF
+REM Turn on delayed variable expansion so that we can interpolate environment variables in the URLs
+SETLOCAL enableDelayedExpansion
+
echo Downloading %1
echo --------------
cd %DL_PATH%
FOR /F "eol=; tokens=1,2" %%f IN (%2) DO (
-echo %%f %%g
+ set MIRROR=%%g
+ set MIRROR=!MIRROR:$KODI_MIRROR=%KODI_MIRROR%!
+ echo !MIRROR! %%f
IF NOT EXIST %%f (
- %WGET% "%%g/%%f"
+ %WGET% "!MIRROR!%%f"
+ IF NOT EXIST %%f (
+ echo Failed to download file %%f from !MIRROR!
+ EXIT /B 1
+ )
) ELSE (
echo Already have %%f
)
@@ -23,8 +32,18 @@ cd %TMP_PATH%
FOR /F "eol=; tokens=1,2" %%f IN (%2) DO (
%ZIP% x -y %%f
+ IF %ERRORLEVEL% NEQ 0 (
+ echo Failed to unpack archive %%f
+ EXIT /B 2
+ )
)
FOR /F "tokens=*" %%f IN ('dir /B "*.tar"') DO (
%ZIP% x -y %%f
-) \ No newline at end of file
+ IF %ERRORLEVEL% NEQ 0 (
+ echo Failed to unpack archive %%f
+ EXIT /B 2
+ )
+)
+
+ENDLOCAL
diff --git a/project/BuildDependencies/scripts/get_formed.cmd b/project/BuildDependencies/scripts/get_formed.cmd
index f006bb8f0b..9d424a2741 100644
--- a/project/BuildDependencies/scripts/get_formed.cmd
+++ b/project/BuildDependencies/scripts/get_formed.cmd
@@ -2,6 +2,9 @@
SETLOCAL
+REM So that we can expand variables inside of IF and FOR
+SETLOCAL enableDelayedExpansion
+
REM Check presence of required file
dir 0_package.list >NUL 2>NUL || (
ECHO 0_package.list not found!
@@ -14,17 +17,36 @@ IF EXIST %FORMED_OK_FLAG% (
del /F /Q "%FORMED_OK_FLAG%" || EXIT /B 4
)
+REM Clear the "failures" list
+SET FORMED_FAILED_LIST=%TMP_PATH%\failed-formed-packages
+IF EXIST %FORMED_FAILED_LIST% (
+ del /F /Q "%FORMED_FAILED_LIST%" || EXIT /B 4
+)
+
+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%
+
+
CALL :setStageName Starting downloads of formed packages...
SET SCRIPT_PATH=%CD%
CD %DL_PATH% || EXIT /B 10
FOR /F "eol=; tokens=1" %%f IN (%SCRIPT_PATH%\0_package.list) DO (
-CALL :processFile %%f
-IF ERRORLEVEL 1 EXIT /B %ERRORLEVEL%
+ CALL :processFile %%f
)
-CALL :setStageName All formed packages ready.
-ECHO %DATE% %TIME% > "%FORMED_OK_FLAG%"
-EXIT /B 0
+REM Report any errors
+IF EXIST %FORMED_FAILED_LIST% (
+ CALL :setStageName Some formed packages had errors
+ ECHO.
+ FOR /F "tokens=1,2 delims=|" %%x IN (%FORMED_FAILED_LIST%) DO @ECHO %%x: - %%y
+ ECHO.
+ EXIT /B 101
+) ELSE (
+ CALL :setStageName All formed packages ready.
+ ECHO %DATE% %TIME% > "%FORMED_OK_FLAG%"
+ EXIT /B 0
+)
REM End of main body
@@ -36,7 +58,8 @@ IF EXIST %1 (
ECHO Using downloaded %1
) ELSE (
CALL :setSubStageName Downloading %1...
- %WGET% "http://mirrors.xbmc.org/build-deps/win32/%1" || EXIT /B 7
+ SET DOWNLOAD_URL=%KODI_MIRROR%/build-deps/win32/%1
+ %WGET% "!DOWNLOAD_URL!" || ECHO %1^|Download of !DOWNLOAD_URL! failed >> %FORMED_FAILED_LIST% && EXIT /B 7
TITLE Getting %1
)
@@ -51,6 +74,8 @@ PUSHD "%TMP_PATH%" || EXIT /B 10
del /f "%1"
SET RetryDownload=NO
GOTO startDownloadingFile
+ ) ELSE (
+ ECHO %1^|Can't extract files from archive %1 >> %FORMED_FAILED_LIST%
)
exit /B 6
)
@@ -58,17 +83,17 @@ PUSHD "%TMP_PATH%" || EXIT /B 10
dir /A:-D "%~n1\*.*" >NUL 2>NUL && (
CALL :setSubStageName Pre-Cleaning %1...
REM Remove any non-dir files in extracted ".\packagename\"
-FOR /F %%f IN ('dir /B /A:-D "%~n1\*.*"') DO (del "%~n1\%%f" /F /Q || EXIT /B 4)
+FOR /F %%f IN ('dir /B /A:-D "%~n1\*.*"') DO (del "%~n1\%%f" /F /Q || (ECHO %1^|Failed to pre-clean %~n1\%%f >> %FORMED_FAILED_LIST% && EXIT /B 4))
)
CALL :setSubStageName Copying %1 to build tree...
REM Copy only content of extracted ".\packagename\"
-XCOPY "%~n1\*" "%APP_PATH%\" /E /I /Y /F /R /H /K || EXIT /B 5
+XCOPY "%~n1\*" "%APP_PATH%\" /E /I /Y /F /R /H /K || (ECHO %1^|Failed to copy package contents to build tree >> %FORMED_FAILED_LIST% && EXIT /B 5)
dir /A:-D * >NUL 2>NUL && (
CALL :setSubStageName Post-Cleaning %1...
REM Delete package archive and possible garbage
-FOR /F %%f IN ('dir /B /A:-D') DO (del %%f /F /Q || EXIT /B 4)
+FOR /F %%f IN ('dir /B /A:-D') DO (del %%f /F /Q || (ECHO %1^|Failed to post-clean %%f >> %FORMED_FAILED_LIST% && EXIT /B 4))
)
ECHO.
diff --git a/project/BuildDependencies/scripts/get_mingw_env.bat b/project/BuildDependencies/scripts/get_mingw_env.bat
index 9228100350..ef3d80c99e 100644
--- a/project/BuildDependencies/scripts/get_mingw_env.bat
+++ b/project/BuildDependencies/scripts/get_mingw_env.bat
@@ -6,6 +6,7 @@ SET FILES=%LOC_PATH%\get_mingw_env.txt
IF NOT EXIST %TMP_PATH% md %TMP_PATH%
CALL dlextract.bat mingw_env %FILES%
+IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
cd %TMP_PATH%
diff --git a/project/BuildDependencies/scripts/get_mingw_env.txt b/project/BuildDependencies/scripts/get_mingw_env.txt
index faac35127d..218a983d7c 100644
--- a/project/BuildDependencies/scripts/get_mingw_env.txt
+++ b/project/BuildDependencies/scripts/get_mingw_env.txt
@@ -1,31 +1,31 @@
-; filename mirror source of the file
-mingwrt-4.0.3-1-mingw32-dev.tar.lzma http://mirrors.xbmc.org/build-deps/win32/mingw-msys/ http://sourceforge.net/projects/mingw/files/MinGW/Base/
-mingwrt-4.0.3-1-mingw32-dll.tar.lzma http://mirrors.xbmc.org/build-deps/win32/mingw-msys/ http://sourceforge.net/projects/mingw/files/MinGW/Base/
-w32api-4.0.3-1-mingw32-dev.tar.lzma http://mirrors.xbmc.org/build-deps/win32/mingw-msys/ http://sourceforge.net/projects/mingw/files/MinGW/Base/
-gcc-core-4.6.2-1-mingw32-bin.tar.lzma http://mirrors.xbmc.org/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MinGW/BaseSystem/GCC/Version4/gcc-4.6.2-1/
-gcc-c++-4.6.2-1-mingw32-bin.tar.lzma http://mirrors.xbmc.org/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MinGW/BaseSystem/GCC/Version4/gcc-4.6.2-1/
-libstdc++-4.6.2-1-mingw32-dll-6.tar.lzma http://mirrors.xbmc.org/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MinGW/BaseSystem/GCC/Version4/gcc-4.6.2-1/
-libgcc-4.6.2-1-mingw32-dll-1.tar.lzma http://mirrors.xbmc.org/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MinGW/BaseSystem/GCC/Version4/gcc-4.6.2-1/
-binutils-2.22-1-mingw32-bin.tar.lzma http://mirrors.xbmc.org/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MinGW/BaseSystem/GNU-Binutils/binutils-2.22/
-yasm-1.2.0-win32.exe http://mirrors.xbmc.org/build-deps/win32/mingw-msys/ http://www.tortall.net/projects/yasm/releases/
-dlfcn-win32-static-r19.tar.bz2 http://mirrors.xbmc.org/build-deps/win32/mingw-msys/ http://code.google.com/p/dlfcn-win32/downloads/list
-libexpat-2.0.1-1-mingw32-dev.tar.gz http://mirrors.xbmc.org/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MinGW/expat/expat-2.0.1-1/
-libz-1.2.5-1-mingw32-dev.tar.lzma http://mirrors.xbmc.org/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MinGW/zlib/zlib-1.2.5-1-mingw32/
-libgmp-5.0.1-1-mingw32-dll-10.tar.lzma http://mirrors.xbmc.org/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MinGW/gmp/gmp-5.0.1-1/
-libmpc-0.8.1-1-mingw32-dll-2.tar.lzma http://mirrors.xbmc.org/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MinGW/mpc/mpc-0.8.1-1/
-libmpfr-2.4.1-1-mingw32-dll-1.tar.lzma http://mirrors.xbmc.org/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MinGW/mpfr/mpfr-2.4.1-1/
-automake1.11-1.11.1-1-mingw32-bin.tar.lzma http://mirrors.xbmc.org/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MinGW/automake/automake1.11/automake1.11-1.11.1-1/
-libtool-2.4-1-mingw32-bin.tar.lzma http://mirrors.xbmc.org/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MinGW/libtool/libtool-2.4-1/
-mads_1.9.3.7z http://mirrors.xbmc.org/build-deps/win32/mingw-msys/ http://mads.atari8.info/
-xasm-3.0.2-windows.zip http://mirrors.xbmc.org/build-deps/win32/mingw-msys/ http://atariarea.krap.pl/x-asm/
-plibc-0.1.6.zip http://mirrors.xbmc.org/build-deps/win32/mingw-msys/ http://sourceforge.net/projects/plibc/files/plibc/0.1.6/
-pthreads-w32-2.9.0-mingw32-pre-20110507-2-dev.tar.lzma http://mirrors.xbmc.org/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MinGW/pthreads-w32/pthreads-w32-2.9.0-pre-20110507-2/pthreads-w32-2.9.0-mingw32-pre-20110507-2-dev.tar.lzma
-libpthreadgc-2.9.0-mingw32-pre-20110507-2-dll-2.tar.lzma http://mirrors.xbmc.org/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MinGW/Base/pthreads-w32/pthreads-w32-2.9.0-pre-20110507-2/libpthreadgc-2.9.0-mingw32-pre-20110507-2-dll-2.tar.lzma
-gettext-0.17-1-mingw32-dev.tar.lzma http://mirrors.xbmc.org/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MinGW/gettext/gettext-0.17-1/gettext-0.17-1-mingw32-dev.tar.lzma
-libgettextpo-0.17-1-mingw32-dll-0.tar.lzma http://mirrors.xbmc.org/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MinGW/gettext/gettext-0.17-1/libgettextpo-0.17-1-mingw32-dll-0.tar.lzma
-libintl-0.17-1-mingw32-dll-8.tar.lzma http://mirrors.xbmc.org/build-deps/win32/mingw-msys/ http://sourceforge.net/projects/mingw/files/MinGW/gettext/gettext-0.17-1/
-libiconv-1.13.1-1-mingw32-dll-2.tar.lzma http://mirrors.xbmc.org/build-deps/win32/mingw-msys/ http://sourceforge.net/projects/mingw/files/MinGW/libiconv/libiconv-1.13.1-1/
-libiconv-1.13.1-1-mingw32-dev.tar.lzma http://mirrors.xbmc.org/build-deps/win32/mingw-msys/ http://sourceforge.net/projects/mingw/files/MinGW/libiconv/libiconv-1.13.1-1/
-make-3.82-5-mingw32-bin.tar.lzma http://mirrors.xbmc.org/build-deps/win32/mingw-msys/ http://sourceforge.net/projects/mingw/files/MinGW/Extension/make/make-3.82-mingw32/
-pkg-config-lite-0.28-1_bin-win32.zip http://mirrors.xbmc.org/build-deps/win32/mingw-msys/ http://sourceforge.net/projects/pkgconfiglite/files/http://sourceforge.net/projects/pkgconfiglite/files/
-gnutls-3.2.3-mingw32.zip http://mirrors.xbmc.org/build-deps/win32/mingw-msys/ ftp://ftp.gnutls.org/gcrypt/gnutls/w32/
+; filename mirror source of the file
+mingwrt-4.0.3-1-mingw32-dev.tar.lzma $KODI_MIRROR/build-deps/win32/mingw-msys/ http://sourceforge.net/projects/mingw/files/MinGW/Base/
+mingwrt-4.0.3-1-mingw32-dll.tar.lzma $KODI_MIRROR/build-deps/win32/mingw-msys/ http://sourceforge.net/projects/mingw/files/MinGW/Base/
+w32api-4.0.3-1-mingw32-dev.tar.lzma $KODI_MIRROR/build-deps/win32/mingw-msys/ http://sourceforge.net/projects/mingw/files/MinGW/Base/
+gcc-core-4.6.2-1-mingw32-bin.tar.lzma $KODI_MIRROR/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MinGW/BaseSystem/GCC/Version4/gcc-4.6.2-1/
+gcc-c++-4.6.2-1-mingw32-bin.tar.lzma $KODI_MIRROR/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MinGW/BaseSystem/GCC/Version4/gcc-4.6.2-1/
+libstdc++-4.6.2-1-mingw32-dll-6.tar.lzma $KODI_MIRROR/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MinGW/BaseSystem/GCC/Version4/gcc-4.6.2-1/
+libgcc-4.6.2-1-mingw32-dll-1.tar.lzma $KODI_MIRROR/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MinGW/BaseSystem/GCC/Version4/gcc-4.6.2-1/
+binutils-2.22-1-mingw32-bin.tar.lzma $KODI_MIRROR/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MinGW/BaseSystem/GNU-Binutils/binutils-2.22/
+yasm-1.2.0-win32.exe $KODI_MIRROR/build-deps/win32/mingw-msys/ http://www.tortall.net/projects/yasm/releases/
+dlfcn-win32-static-r19.tar.bz2 $KODI_MIRROR/build-deps/win32/mingw-msys/ http://code.google.com/p/dlfcn-win32/downloads/list
+libexpat-2.0.1-1-mingw32-dev.tar.gz $KODI_MIRROR/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MinGW/expat/expat-2.0.1-1/
+libz-1.2.5-1-mingw32-dev.tar.lzma $KODI_MIRROR/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MinGW/zlib/zlib-1.2.5-1-mingw32/
+libgmp-5.0.1-1-mingw32-dll-10.tar.lzma $KODI_MIRROR/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MinGW/gmp/gmp-5.0.1-1/
+libmpc-0.8.1-1-mingw32-dll-2.tar.lzma $KODI_MIRROR/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MinGW/mpc/mpc-0.8.1-1/
+libmpfr-2.4.1-1-mingw32-dll-1.tar.lzma $KODI_MIRROR/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MinGW/mpfr/mpfr-2.4.1-1/
+automake1.11-1.11.1-1-mingw32-bin.tar.lzma $KODI_MIRROR/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MinGW/automake/automake1.11/automake1.11-1.11.1-1/
+libtool-2.4-1-mingw32-bin.tar.lzma $KODI_MIRROR/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MinGW/libtool/libtool-2.4-1/
+mads_1.9.3.7z $KODI_MIRROR/build-deps/win32/mingw-msys/ http://mads.atari8.info/
+xasm-3.0.2-windows.zip $KODI_MIRROR/build-deps/win32/mingw-msys/ http://atariarea.krap.pl/x-asm/
+plibc-0.1.6.zip $KODI_MIRROR/build-deps/win32/mingw-msys/ http://sourceforge.net/projects/plibc/files/plibc/0.1.6/
+pthreads-w32-2.9.0-mingw32-pre-20110507-2-dev.tar.lzma $KODI_MIRROR/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MinGW/pthreads-w32/pthreads-w32-2.9.0-pre-20110507-2/pthreads-w32-2.9.0-mingw32-pre-20110507-2-dev.tar.lzma
+libpthreadgc-2.9.0-mingw32-pre-20110507-2-dll-2.tar.lzma $KODI_MIRROR/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MinGW/Base/pthreads-w32/pthreads-w32-2.9.0-pre-20110507-2/libpthreadgc-2.9.0-mingw32-pre-20110507-2-dll-2.tar.lzma
+gettext-0.17-1-mingw32-dev.tar.lzma $KODI_MIRROR/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MinGW/gettext/gettext-0.17-1/gettext-0.17-1-mingw32-dev.tar.lzma
+libgettextpo-0.17-1-mingw32-dll-0.tar.lzma $KODI_MIRROR/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MinGW/gettext/gettext-0.17-1/libgettextpo-0.17-1-mingw32-dll-0.tar.lzma
+libintl-0.17-1-mingw32-dll-8.tar.lzma $KODI_MIRROR/build-deps/win32/mingw-msys/ http://sourceforge.net/projects/mingw/files/MinGW/gettext/gettext-0.17-1/
+libiconv-1.13.1-1-mingw32-dll-2.tar.lzma $KODI_MIRROR/build-deps/win32/mingw-msys/ http://sourceforge.net/projects/mingw/files/MinGW/libiconv/libiconv-1.13.1-1/
+libiconv-1.13.1-1-mingw32-dev.tar.lzma $KODI_MIRROR/build-deps/win32/mingw-msys/ http://sourceforge.net/projects/mingw/files/MinGW/libiconv/libiconv-1.13.1-1/
+make-3.82-5-mingw32-bin.tar.lzma $KODI_MIRROR/build-deps/win32/mingw-msys/ http://sourceforge.net/projects/mingw/files/MinGW/Extension/make/make-3.82-mingw32/
+pkg-config-lite-0.28-1_bin-win32.zip $KODI_MIRROR/build-deps/win32/mingw-msys/ http://sourceforge.net/projects/pkgconfiglite/files/http://sourceforge.net/projects/pkgconfiglite/files/
+gnutls-3.2.3-mingw32.zip $KODI_MIRROR/build-deps/win32/mingw-msys/ ftp://ftp.gnutls.org/gcrypt/gnutls/w32/
diff --git a/project/BuildDependencies/scripts/get_msys_env.bat b/project/BuildDependencies/scripts/get_msys_env.bat
index 7ebb34d6f0..a389d34064 100644
--- a/project/BuildDependencies/scripts/get_msys_env.bat
+++ b/project/BuildDependencies/scripts/get_msys_env.bat
@@ -4,6 +4,7 @@ SET LOC_PATH=%CD%
SET FILES=%LOC_PATH%\get_msys_env.txt
CALL dlextract.bat msys_env %FILES%
+IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
cd %TMP_PATH%
diff --git a/project/BuildDependencies/scripts/get_msys_env.txt b/project/BuildDependencies/scripts/get_msys_env.txt
index 1be8257ac2..93a02617cd 100644
--- a/project/BuildDependencies/scripts/get_msys_env.txt
+++ b/project/BuildDependencies/scripts/get_msys_env.txt
@@ -1,32 +1,32 @@
-; filename mirror source of the file
-msysCORE-1.0.17-1-msys-1.0.17-bin.tar.lzma http://mirrors.xbmc.org/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MSYS/BaseSystem/msys-core/msys-1.0.17-1/
-msysCORE-1.0.17-1-msys-1.0.17-ext.tar.lzma http://mirrors.xbmc.org/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MSYS/BaseSystem/msys-core/msys-1.0.17-1/
-libregex-1.20090805-2-msys-1.0.13-dll-1.tar.lzma http://mirrors.xbmc.org/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MSYS/BaseSystem/regex/regex-1.20090805-2/
-libtermcap-0.20050421_1-2-msys-1.0.13-dll-0.tar.lzma http://mirrors.xbmc.org/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MSYS/BaseSystem/termcap/termcap-0.20050421_1-2/
-gettext-0.17-2-msys-1.0.13-bin.tar.lzma http://mirrors.xbmc.org/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MSYS/BaseSystem/gettext/gettext-0.17-2/
-libintl-0.17-2-msys-dll-8.tar.lzma http://mirrors.xbmc.org/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MSYS/BaseSystem/gettext/gettext-0.17-2/
-libiconv-1.13.1-2-msys-1.0.13-dll-2.tar.lzma http://mirrors.xbmc.org/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MSYS/BaseSystem/libiconv/libiconv-1.13.1-2/
-coreutils-5.97-3-msys-1.0.13-bin.tar.lzma http://mirrors.xbmc.org/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MSYS/BaseSystem/coreutils/coreutils-5.97-3/
-bash-3.1.17-4-msys-1.0.16-bin.tar.lzma http://mirrors.xbmc.org/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MSYS/BaseSystem/bash/bash-3.1.17-4/
-rxvt-2.7.2-3-msys-1.0.14-bin.tar.lzma http://mirrors.xbmc.org/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MSYS/rxvt/rxvt-2.7.2-3/
-make-3.81-3-msys-1.0.13-bin.tar.lzma http://mirrors.xbmc.org/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MSYS/make/make-3.81-3/
-sed-4.2.1-2-msys-1.0.13-bin.tar.lzma http://mirrors.xbmc.org/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MSYS/BaseSystem/sed/sed-4.2.1-2/
-grep-2.5.4-2-msys-1.0.13-bin.tar.lzma http://mirrors.xbmc.org/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MSYS/BaseSystem/grep/grep-2.5.4-2/
-diffutils-2.8.7.20071206cvs-3-msys-1.0.13-bin.tar.lzma http://mirrors.xbmc.org/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MSYS/BaseSystem/diffutils/diffutils-2.8.7.20071206cvs-3/
-tar-1.23-1-msys-1.0.13-bin.tar.lzma http://mirrors.xbmc.org/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MSYS/BaseSystem/tar/tar-1.23-1/
-gzip-1.3.12-2-msys-1.0.13-bin.tar.lzma http://mirrors.xbmc.org/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MSYS/BaseSystem/gzip/gzip-1.3.12-2/
-gawk-3.1.7-2-msys-1.0.13-bin.tar.lzma http://mirrors.xbmc.org/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MSYS/BaseSystem/gawk/gawk-3.1.7-2/
-xz-4.999.9beta_20100401-1-msys-1.0.13-bin.tar.gz http://mirrors.xbmc.org/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MSYS/BaseSystem/xz/xz-4.999.9beta_20100401-1/
-patch-2.6.1-1-msys-1.0.13-bin.tar.lzma http://mirrors.xbmc.org/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MSYS/patch/patch-2.6.1-1/
-perl-5.6.1_2-2-msys-1.0.13-bin.tar.lzma http://mirrors.xbmc.org/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MSYS/perl/perl-5.6.1_2-2/
-libcrypt-1.1_1-3-msys-1.0.13-dll-0.tar.lzma http://mirrors.xbmc.org/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MSYS/crypt/crypt-1.1_1-3/
-autoconf-2.68-1-msys-1.0.17-bin.tar.lzma http://mirrors.xbmc.org/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MSYS/autoconf/autoconf-2.68-1/
-m4-1.4.14-1-msys-1.0.13-bin.tar.lzma http://mirrors.xbmc.org/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MSYS/m4/m4-1.4.14-1/
+; filename mirror source of the file
+msysCORE-1.0.17-1-msys-1.0.17-bin.tar.lzma $KODI_MIRROR/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MSYS/BaseSystem/msys-core/msys-1.0.17-1/
+msysCORE-1.0.17-1-msys-1.0.17-ext.tar.lzma $KODI_MIRROR/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MSYS/BaseSystem/msys-core/msys-1.0.17-1/
+libregex-1.20090805-2-msys-1.0.13-dll-1.tar.lzma $KODI_MIRROR/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MSYS/BaseSystem/regex/regex-1.20090805-2/
+libtermcap-0.20050421_1-2-msys-1.0.13-dll-0.tar.lzma $KODI_MIRROR/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MSYS/BaseSystem/termcap/termcap-0.20050421_1-2/
+gettext-0.17-2-msys-1.0.13-bin.tar.lzma $KODI_MIRROR/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MSYS/BaseSystem/gettext/gettext-0.17-2/
+libintl-0.17-2-msys-dll-8.tar.lzma $KODI_MIRROR/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MSYS/BaseSystem/gettext/gettext-0.17-2/
+libiconv-1.13.1-2-msys-1.0.13-dll-2.tar.lzma $KODI_MIRROR/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MSYS/BaseSystem/libiconv/libiconv-1.13.1-2/
+coreutils-5.97-3-msys-1.0.13-bin.tar.lzma $KODI_MIRROR/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MSYS/BaseSystem/coreutils/coreutils-5.97-3/
+bash-3.1.17-4-msys-1.0.16-bin.tar.lzma $KODI_MIRROR/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MSYS/BaseSystem/bash/bash-3.1.17-4/
+rxvt-2.7.2-3-msys-1.0.14-bin.tar.lzma $KODI_MIRROR/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MSYS/rxvt/rxvt-2.7.2-3/
+make-3.81-3-msys-1.0.13-bin.tar.lzma $KODI_MIRROR/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MSYS/make/make-3.81-3/
+sed-4.2.1-2-msys-1.0.13-bin.tar.lzma $KODI_MIRROR/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MSYS/BaseSystem/sed/sed-4.2.1-2/
+grep-2.5.4-2-msys-1.0.13-bin.tar.lzma $KODI_MIRROR/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MSYS/BaseSystem/grep/grep-2.5.4-2/
+diffutils-2.8.7.20071206cvs-3-msys-1.0.13-bin.tar.lzma $KODI_MIRROR/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MSYS/BaseSystem/diffutils/diffutils-2.8.7.20071206cvs-3/
+tar-1.23-1-msys-1.0.13-bin.tar.lzma $KODI_MIRROR/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MSYS/BaseSystem/tar/tar-1.23-1/
+gzip-1.3.12-2-msys-1.0.13-bin.tar.lzma $KODI_MIRROR/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MSYS/BaseSystem/gzip/gzip-1.3.12-2/
+gawk-3.1.7-2-msys-1.0.13-bin.tar.lzma $KODI_MIRROR/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MSYS/BaseSystem/gawk/gawk-3.1.7-2/
+xz-4.999.9beta_20100401-1-msys-1.0.13-bin.tar.gz $KODI_MIRROR/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MSYS/BaseSystem/xz/xz-4.999.9beta_20100401-1/
+patch-2.6.1-1-msys-1.0.13-bin.tar.lzma $KODI_MIRROR/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MSYS/patch/patch-2.6.1-1/
+perl-5.6.1_2-2-msys-1.0.13-bin.tar.lzma $KODI_MIRROR/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MSYS/perl/perl-5.6.1_2-2/
+libcrypt-1.1_1-3-msys-1.0.13-dll-0.tar.lzma $KODI_MIRROR/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MSYS/crypt/crypt-1.1_1-3/
+autoconf-2.68-1-msys-1.0.17-bin.tar.lzma $KODI_MIRROR/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MSYS/autoconf/autoconf-2.68-1/
+m4-1.4.14-1-msys-1.0.13-bin.tar.lzma $KODI_MIRROR/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MSYS/m4/m4-1.4.14-1/
; to get pr.exe
-coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2 http://mirrors.xbmc.org/build-deps/win32/mingw-msys/ http://www.finalmediaplayer.com/downloads/3rdparty/
+coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2 $KODI_MIRROR/build-deps/win32/mingw-msys/ http://www.finalmediaplayer.com/downloads/3rdparty/
; for xargs.exe
-findutils-4.4.2-2-msys-1.0.13-bin.tar.lzma http://mirrors.xbmc.org/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MSYS/findutils/findutils-4.4.2-2/
-automake-1.11.1-1-msys-1.0.13-bin.tar.lzma http://mirrors.xbmc.org/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MSYS/automake/automake-1.11.1-1/
-mktemp-1.6-2-msys-1.0.13-bin.tar.lzma http://mirrors.xbmc.org/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MSYS/mktemp/mktemp-1.6-2/
-texinfo-4.13a-2-msys-1.0.13-bin.tar.lzma http://mirrors.xbmc.org/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MSYS/texinfo/texinfo-4.13a-2/
-libtool-2.4-1-msys-1.0.15-bin.tar.lzma http://mirrors.xbmc.org/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MSYS/libtool/libtool-2.4-1/libtool-2.4-1-msys-1.0.15-bin.tar.lzma \ No newline at end of file
+findutils-4.4.2-2-msys-1.0.13-bin.tar.lzma $KODI_MIRROR/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MSYS/findutils/findutils-4.4.2-2/
+automake-1.11.1-1-msys-1.0.13-bin.tar.lzma $KODI_MIRROR/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MSYS/automake/automake-1.11.1-1/
+mktemp-1.6-2-msys-1.0.13-bin.tar.lzma $KODI_MIRROR/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MSYS/mktemp/mktemp-1.6-2/
+texinfo-4.13a-2-msys-1.0.13-bin.tar.lzma $KODI_MIRROR/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MSYS/texinfo/texinfo-4.13a-2/
+libtool-2.4-1-msys-1.0.15-bin.tar.lzma $KODI_MIRROR/build-deps/win32/mingw-msys/ http://downloads.sourceforge.net/project/mingw/MSYS/libtool/libtool-2.4-1/libtool-2.4-1-msys-1.0.15-bin.tar.lzma
diff --git a/project/Win32BuildSetup/getdeploydependencies.bat b/project/Win32BuildSetup/getdeploydependencies.bat
index 5a0e4a6f39..7828d3ef00 100644
--- a/project/Win32BuildSetup/getdeploydependencies.bat
+++ b/project/Win32BuildSetup/getdeploydependencies.bat
@@ -1,24 +1,35 @@
@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%
+
+
+:: Following commands expect this script's parent directory to be the current directory, so make sure that's so
+PUSHD %~dp0
+
if not exist dependencies\vcredist\2008 mkdir dependencies\vcredist\2008
if not exist dependencies\vcredist\2010 mkdir dependencies\vcredist\2010
if not exist dependencies\vcredist\2013 mkdir dependencies\vcredist\2013
if not exist dependencies\vcredist\2008\vcredist_x86.exe (
echo Downloading vc90 redist...
- ..\BuildDependencies\bin\wget -nv -O dependencies\vcredist\2008\vcredist_x86.exe http://mirrors.xbmc.org/build-deps/win32/vcredist/2008/vcredist_x86.exe
+ ..\BuildDependencies\bin\wget -nv -O dependencies\vcredist\2008\vcredist_x86.exe %KODI_MIRROR%/build-deps/win32/vcredist/2008/vcredist_x86.exe
)
if not exist dependencies\vcredist\2010\vcredist_x86.exe (
echo Downloading vc100 redist...
- ..\BuildDependencies\bin\wget -nv -O dependencies\vcredist\2010\vcredist_x86.exe http://mirrors.xbmc.org/build-deps/win32/vcredist/2010/vcredist_x86.exe
+ ..\BuildDependencies\bin\wget -nv -O dependencies\vcredist\2010\vcredist_x86.exe %KODI_MIRROR%/build-deps/win32/vcredist/2010/vcredist_x86.exe
)
if not exist dependencies\vcredist\2013\vcredist_x86.exe (
echo Downloading vc120 redist...
- ..\BuildDependencies\bin\wget -nv -O dependencies\vcredist\2013\vcredist_x86.exe http://mirrors.xbmc.org/build-deps/win32/vcredist/2013/vcredist_x86.exe
+ ..\BuildDependencies\bin\wget -nv -O dependencies\vcredist\2013\vcredist_x86.exe %KODI_MIRROR%/build-deps/win32/vcredist/2013/vcredist_x86.exe
)
if not exist dependencies\dxsetup mkdir dependencies\dxsetup
for %%f in (DSETUP.dll dsetup32.dll dxdllreg_x86.cab DXSETUP.exe dxupdate.cab Jun2010_D3DCompiler_43_x86.cab Jun2010_d3dx9_43_x86.cab) do (
if not exist dependencies\dxsetup\%%f (
- ..\BuildDependencies\bin\wget -nv -O dependencies\dxsetup\%%f http://mirrors.xbmc.org/build-deps/win32/dxsetup/%%f
+ ..\BuildDependencies\bin\wget -nv -O dependencies\dxsetup\%%f %KODI_MIRROR%/build-deps/win32/dxsetup/%%f
)
)
+
+:: Restore the previous current directory
+POPD
diff --git a/project/cmake/addons/depends/common/tinyxml/tinyxml.txt b/project/cmake/addons/depends/common/tinyxml/tinyxml.txt
index 456b0c59e5..f8e05e8756 100644
--- a/project/cmake/addons/depends/common/tinyxml/tinyxml.txt
+++ b/project/cmake/addons/depends/common/tinyxml/tinyxml.txt
@@ -1 +1 @@
-tinyxml http://mirrors.xbmc.org/build-deps/sources/tinyxml-2.6.2_2.tar.gz
+tinyxml http://mirrors.kodi.tv/build-deps/sources/tinyxml-2.6.2_2.tar.gz
diff --git a/project/cmake/scripts/common/prepare-env.cmake b/project/cmake/scripts/common/prepare-env.cmake
index a616ed8400..5d6e2634cb 100644
--- a/project/cmake/scripts/common/prepare-env.cmake
+++ b/project/cmake/scripts/common/prepare-env.cmake
@@ -20,6 +20,11 @@ if(NOT DEFINED APP_VERSION_MAJOR OR NOT DEFINED APP_VERSION_MINOR)
message(FATAL_ERROR "Could not determine app version! make sure that ${APP_ROOT}/version.txt exists")
endif()
+# in case we need to download something, set KODI_MIRROR to the default if not alread set
+if(NOT DEFINED KODI_MIRROR)
+ set(KODI_MIRROR "http://mirrors.kodi.tv")
+endif()
+
### copy all the addon binding header files to include/kodi
# make sure include/kodi exists and is empty
set(KODI_LIB_DIR ${DEPENDS_PATH}/lib/kodi)
@@ -104,7 +109,7 @@ if(WIN32)
else()
set(PATCH_ARCHIVE_NAME "patch-2.5.9-7-bin-1")
set(PATCH_ARCHIVE "${PATCH_ARCHIVE_NAME}.zip")
- set(PATCH_URL "http://mirrors.xbmc.org/build-deps/win32/${PATCH_ARCHIVE}")
+ set(PATCH_URL "${KODI_MIRROR}/build-deps/win32/${PATCH_ARCHIVE}")
set(PATCH_DOWNLOAD ${BUILD_DIR}/download/${PATCH_ARCHIVE})
# download the archive containing patch.exe
diff --git a/tools/buildsteps/win32/make-mingwlibs.bat b/tools/buildsteps/win32/make-mingwlibs.bat
index 98930e05ef..cdb63b4c6a 100644
--- a/tools/buildsteps/win32/make-mingwlibs.bat
+++ b/tools/buildsteps/win32/make-mingwlibs.bat
@@ -1,4 +1,6 @@
@ECHO OFF
+SETLOCAL
+
rem batch file to compile mingw libs via BuildSetup
SET WORKDIR=%WORKSPACE%
rem set M$ env
@@ -15,9 +17,13 @@ FOR %%b in (%1, %2, %3) DO (
)
IF "%WORKDIR%"=="" (
- SET WORKDIR=%CD%\..\..\..
+ SET WORKDIR=%~dp0\..\..\..
)
+REM Prepend the msys and mingw paths onto %PATH%
+SET MSYS_INSTALL_PATH=%WORKDIR%\project\BuildDependencies\msys
+SET PATH=%MSYS_INSTALL_PATH%\mingw\bin;%MSYS_INSTALL_PATH%\bin;%PATH%
+
SET ERRORFILE=%WORKDIR%\project\Win32BuildSetup\errormingw
SET BS_DIR=%WORKDIR%\project\Win32BuildSetup
@@ -53,4 +59,6 @@ GOTO ENDWITHERROR
ECHO failed to build mingw libs
EXIT /B 1
)
- EXIT /B 0 \ No newline at end of file
+ EXIT /B 0
+
+ENDLOCAL
diff --git a/tools/depends/Makefile.include.in b/tools/depends/Makefile.include.in
index e1ac05c9af..6e37022544 100644
--- a/tools/depends/Makefile.include.in
+++ b/tools/depends/Makefile.include.in
@@ -32,7 +32,10 @@ LINK_ICONV=@link_iconv@
ENABLE_GPLV3=@use_gplv3@
HAS_LIBCRYSTAX=@has_libcrystax@
-BASE_URL=http://mirrors.xbmc.org/build-deps/sources
+BASE_URL=http://mirrors.kodi.tv/build-deps/sources
+ifneq ($(KODI_MIRROR),)
+BASE_URL=$(KODI_MIRROR)/build-deps/sources
+endif
RETRIEVE_TOOL_FLAGS=-Ls --create-dirs -f -O
ARCHIVE_TOOL_FLAGS=--strip-components=1 -xf
CONFIG_SUB=@prefix@/@tool_dir@/share/automake-1.11/config.sub
diff --git a/tools/rbp/setup-sdk.sh b/tools/rbp/setup-sdk.sh
index 70f2a36e00..0452e4fe91 100755
--- a/tools/rbp/setup-sdk.sh
+++ b/tools/rbp/setup-sdk.sh
@@ -28,6 +28,11 @@ else
[ -w $(dirname $XBMCPREFIX) ] || SUDO="sudo"
fi
+if [ -z "$KODI_MIRROR" ]
+then
+ KODI_MIRROR="http://mirrors.kodi.tv"
+fi
+
$SUDO mkdir -p $XBMCPREFIX
$SUDO chmod 777 $XBMCPREFIX
mkdir -p $XBMCPREFIX/lib
@@ -39,7 +44,7 @@ echo "TARGETFS=$TARGETFS" >> $SCRIP
echo "TOOLCHAIN=$TOOLCHAIN" >> $SCRIPT_PATH/Makefile.include
echo "BUILDROOT=$BUILDROOT" >> $SCRIPT_PATH/Makefile.include
echo "USE_BUILDROOT=$USE_BUILDROOT" >> $SCRIPT_PATH/Makefile.include
-echo "BASE_URL=http://mirrors.xbmc.org/build-deps/darwin-libs" >> $SCRIPT_PATH/Makefile.include
+echo "BASE_URL=${KODI_MIRROR}/build-deps/darwin-libs" >> $SCRIPT_PATH/Makefile.include
echo "TARBALLS_LOCATION=$TARBALLS" >> $SCRIPT_PATH/Makefile.include
echo "RETRIEVE_TOOL=/usr/bin/curl" >> $SCRIPT_PATH/Makefile.include
echo "RETRIEVE_TOOL_FLAGS=-Ls --create-dirs --output \$(TARBALLS_LOCATION)/\$(ARCHIVE)" >> $SCRIPT_PATH/Makefile.include