aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--project/BuildDependencies/DownloadBuildDeps.bat22
-rw-r--r--project/BuildDependencies/scripts/dlextract.bat26
-rw-r--r--project/BuildDependencies/scripts/fontconfig_d.bat17
-rw-r--r--project/BuildDependencies/scripts/fontconfig_d.txt4
-rw-r--r--project/BuildDependencies/scripts/libexpat_d.bat15
-rw-r--r--project/BuildDependencies/scripts/libexpat_d.txt3
6 files changed, 60 insertions, 27 deletions
diff --git a/project/BuildDependencies/DownloadBuildDeps.bat b/project/BuildDependencies/DownloadBuildDeps.bat
index a9e84ee9f2..14a2bd4bd7 100644
--- a/project/BuildDependencies/DownloadBuildDeps.bat
+++ b/project/BuildDependencies/DownloadBuildDeps.bat
@@ -1,14 +1,24 @@
@ECHO OFF
+SETLOCAL
+
SET CUR_PATH=%CD%
SET XBMC_PATH=%CD%\..\..
-SET WGET=..\..\bin\wget
-SET ZIP=..\..\..\Win32BuildSetup\tools\7z\7za
+SET DL_PATH=%CD%\downloads
+SET TMP_PATH=%CD%\scripts\tmp
+
+SET WGET=%CUR_PATH%\bin\wget
+SET ZIP=%CUR_PATH%\..\Win32BuildSetup\tools\7z\7za
-rmdir lib /S /Q
-rmdir include /S /Q
+IF NOT EXIST %DL_PATH% md %DL_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
md lib
md include
+md %TMP_PATH%
cd scripts
@@ -17,4 +27,6 @@ FOR /F "tokens=*" %%S IN ('dir /B "*_d.bat"') DO (
CALL %%S
)
-cd %CUR_PATH% \ No newline at end of file
+cd %CUR_PATH%
+
+rmdir %TMP_PATH% /S /Q
diff --git a/project/BuildDependencies/scripts/dlextract.bat b/project/BuildDependencies/scripts/dlextract.bat
new file mode 100644
index 0000000000..450225f01c
--- /dev/null
+++ b/project/BuildDependencies/scripts/dlextract.bat
@@ -0,0 +1,26 @@
+@ECHO OFF
+
+echo Downloading %1
+echo --------------
+
+cd %DL_PATH%
+
+FOR /F "eol=; tokens=1,2" %%f IN (%2) DO (
+echo %%f %%g
+ IF NOT EXIST %%f (
+ %WGET% "%%g/%%f"
+ ) ELSE (
+ echo Already have %%f
+ )
+
+ copy /b %%f %TMP_PATH%
+)
+
+echo Extracting...
+echo -------------
+
+cd %TMP_PATH%
+
+FOR /F "eol=; tokens=1,2" %%f IN (%2) DO (
+ %ZIP% x %%f
+)
diff --git a/project/BuildDependencies/scripts/fontconfig_d.bat b/project/BuildDependencies/scripts/fontconfig_d.bat
index 7de3985d12..9fcf7b6548 100644
--- a/project/BuildDependencies/scripts/fontconfig_d.bat
+++ b/project/BuildDependencies/scripts/fontconfig_d.bat
@@ -1,18 +1,11 @@
@ECHO OFF
-rmdir tmp /S /Q
-md tmp
-cd tmp
+SET LOC_PATH=%CD%
+SET FILES=%LOC_PATH%\fontconfig_d.txt
-echo Downloading fontconfig and freetype6.dll ...
-echo ------------------------------------------
-%WGET% "http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/fontconfig-dev_2.8.0-2_win32.zip"
-%WGET% "http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/fontconfig_2.8.0-2_win32.zip"
-%WGET% "http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/freetype_2.3.12-1_win32.zip"
+CALL dlextract.bat fontconfig %FILES%
-%ZIP% x fontconfig-dev_2.8.0-2_win32.zip
-%ZIP% x fontconfig_2.8.0-2_win32.zip
-%ZIP% x freetype_2.3.12-1_win32.zip
+cd %TMP_PATH%
xcopy include\fontconfig "%CUR_PATH%\include\fontconfig" /E /Q /I /Y
copy lib\fontconfig.lib "%CUR_PATH%\lib\" /Y
@@ -20,4 +13,4 @@ rem libfontconfig-1.dll requires libexpat-1.dll which is copied by libexpat_d.ba
copy bin\libfontconfig-1.dll "%XBMC_PATH%\system\players\dvdplayer\"
copy bin\freetype6.dll "%XBMC_PATH%\system\players\dvdplayer\"
-cd ..
+cd %LOC_PATH%
diff --git a/project/BuildDependencies/scripts/fontconfig_d.txt b/project/BuildDependencies/scripts/fontconfig_d.txt
new file mode 100644
index 0000000000..cb648f492c
--- /dev/null
+++ b/project/BuildDependencies/scripts/fontconfig_d.txt
@@ -0,0 +1,4 @@
+; filename source of the file
+fontconfig-dev_2.8.0-2_win32.zip http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies
+fontconfig_2.8.0-2_win32.zip http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies
+freetype_2.3.12-1_win32.zip http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies
diff --git a/project/BuildDependencies/scripts/libexpat_d.bat b/project/BuildDependencies/scripts/libexpat_d.bat
index 42e7bb6e7d..ea65ce7640 100644
--- a/project/BuildDependencies/scripts/libexpat_d.bat
+++ b/project/BuildDependencies/scripts/libexpat_d.bat
@@ -1,16 +1,11 @@
@ECHO OFF
-rmdir tmp /S /Q
-md tmp
-cd tmp
+SET LOC_PATH=%CD%
+SET FILES=%LOC_PATH%\libexpat_d.txt
-echo Downloading libexpat ...
-echo ------------------------
-%WGET% "http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/expat_2.0.1-1_win32.zip"
-%WGET% "http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/expat-dev_2.0.1-1_win32.zip"
+CALL dlextract.bat libexpat %FILES%
-%ZIP% x expat_2.0.1-1_win32.zip
-%ZIP% x expat-dev_2.0.1-1_win32.zip
+cd %TMP_PATH%
copy include\* "%CUR_PATH%\include\" /Y
copy lib\expat.lib "%CUR_PATH%\lib\libexpat.lib" /Y
@@ -18,4 +13,4 @@ copy bin\libexpat-1.dll "%XBMC_PATH%\system\libexpat.dll"
rem libexpat-1.dll for libfontconfig-1.dll which is needed for libass.dll
copy bin\libexpat-1.dll "%XBMC_PATH%\system\players\dvdplayer\"
-cd ..
+cd %LOC_PATH%
diff --git a/project/BuildDependencies/scripts/libexpat_d.txt b/project/BuildDependencies/scripts/libexpat_d.txt
new file mode 100644
index 0000000000..bffce460d5
--- /dev/null
+++ b/project/BuildDependencies/scripts/libexpat_d.txt
@@ -0,0 +1,3 @@
+; filename source of the file
+expat_2.0.1-1_win32.zip http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies
+expat-dev_2.0.1-1_win32.zip http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies