aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/buildsteps/win32/make-addon-depends.bat39
-rw-r--r--tools/buildsteps/win32/make-addons.bat64
2 files changed, 69 insertions, 34 deletions
diff --git a/tools/buildsteps/win32/make-addon-depends.bat b/tools/buildsteps/win32/make-addon-depends.bat
index 7197cd80f5..e1c3fdab5e 100644
--- a/tools/buildsteps/win32/make-addon-depends.bat
+++ b/tools/buildsteps/win32/make-addon-depends.bat
@@ -4,6 +4,18 @@ SETLOCAL
SET EXITCODE=0
+SET noclean=false
+SET dependency=
+FOR %%b in (%1, %2) DO (
+ IF %%b == noclean (
+ SET noclean=true
+ ) ELSE ( IF %%b == clean (
+ SET noclean=false
+ ) ELSE (
+ SET dependency=%%b
+ ))
+)
+
rem set Visual C++ build environment
call "%VS120COMNTOOLS%..\..\VC\bin\vcvars32.bat"
@@ -24,24 +36,23 @@ SET ADDON_DEPENDS_BUILD_PATH=%ADDON_DEPENDS_PATH%\build
SET ERRORFILE=%BASE_PATH%\make-addon-depends.error
-rem remove the output directory if it exists
-IF EXIST "%ADDONS_OUTPUT_PATH%" (
- RMDIR "%ADDONS_OUTPUT_PATH%" /S /Q > NUL
+IF %noclean% == false (
+ rem remove the output directory if it exists
+ IF EXIST "%ADDONS_OUTPUT_PATH%" (
+ RMDIR "%ADDONS_OUTPUT_PATH%" /S /Q > NUL
+ )
+
+ rem remove the build directory if it exists
+ IF EXIST "%ADDON_DEPENDS_BUILD_PATH%" (
+ RMDIR "%ADDON_DEPENDS_BUILD_PATH%" /S /Q > NUL
+ )
)
rem create the output directory
-MKDIR "%ADDONS_OUTPUT_PATH%"
-
-rem go into the addon depends directory
-CD %ADDON_DEPENDS_PATH%
-
-rem remove the build directory if it exists
-IF EXIST "%ADDON_DEPENDS_BUILD_PATH%" (
- RMDIR "%ADDON_DEPENDS_BUILD_PATH%" /S /Q > NUL
-)
+IF NOT EXIST "%ADDONS_OUTPUT_PATH%" MKDIR "%ADDONS_OUTPUT_PATH%"
rem create the build directory
-MKDIR "%ADDON_DEPENDS_BUILD_PATH%"
+IF NOT EXIST "%ADDON_DEPENDS_BUILD_PATH%" MKDIR "%ADDON_DEPENDS_BUILD_PATH%"
rem go into the build directory
CD "%ADDON_DEPENDS_BUILD_PATH%"
@@ -56,7 +67,7 @@ IF ERRORLEVEL 1 (
)
rem execute nmake to build the addon depends
-nmake
+nmake %dependency%
IF ERRORLEVEL 1 (
ECHO nmake error level: %ERRORLEVEL% > %ERRORFILE%
GOTO ERROR
diff --git a/tools/buildsteps/win32/make-addons.bat b/tools/buildsteps/win32/make-addons.bat
index 36071e508a..10a2a8bc4d 100644
--- a/tools/buildsteps/win32/make-addons.bat
+++ b/tools/buildsteps/win32/make-addons.bat
@@ -6,9 +6,20 @@ SET EXITCODE=0
SET getdepends=true
SET install=false
-FOR %%b in (%1) DO (
- IF %%b == nodepends SET getdepends=false
- IF %%b == install SET install=true
+SET noclean=false
+SET addon=
+FOR %%b in (%1, %2, %3, %4) DO (
+ IF %%b == nodepends (
+ SET getdepends=false
+ ) ELSE ( IF %%b == install (
+ SET install=true
+ ) ELSE ( IF %%b == noclean (
+ SET noclean=true
+ ) ELSE ( IF %%b == clean (
+ SET noclean=false
+ ) ELSE (
+ SET addon=%%b
+ ))))
)
rem set Visual C++ build environment
@@ -32,34 +43,43 @@ SET ERRORFILE=%BASE_PATH%\make-addons.error
SET XBMC_INCLUDE_PATH=%ADDON_DEPENDS_PATH%\include\xbmc
SET XBMC_LIB_PATH=%ADDON_DEPENDS_PATH%\lib\xbmc
+rem determine whether make-addon-depends.bat should be called with noclean or not
+SET addon_depends_mode=clean
+IF %noclean% == true (
+ SET addon_depends_mode=noclean
+)
+
IF %getdepends% == true (
- CALL make-addon-depends.bat
+ ECHO --------------------------------------------------
+ ECHO Building addon dependencies
+ ECHO --------------------------------------------------
+
+ CALL make-addon-depends.bat %addon_depends_mode%
IF ERRORLEVEL 1 (
ECHO make-addon-depends error level: %ERRORLEVEL% > %ERRORFILE%
GOTO ERROR
)
-)
-rem make sure the xbmc include and library paths exist
-IF EXIST "%XBMC_INCLUDE_PATH%" (
- RMDIR "%XBMC_INCLUDE_PATH%" /S /Q > NUL
-)
-IF EXIST "%XBMC_LIB_PATH%" (
- RMDIR "%XBMC_LIB_PATH%" /S /Q > NUL
+ ECHO.
)
-MKDIR "%XBMC_INCLUDE_PATH%"
-MKDIR "%XBMC_LIB_PATH%"
-rem go into the addons directory
-CD %ADDONS_PATH%
+IF %noclean% == false (
+ rem remove the build directory if it exists
+ IF EXIST "%ADDONS_BUILD_PATH%" (
+ RMDIR "%ADDONS_BUILD_PATH%" /S /Q > NUL
+ )
+)
-rem remove the build directory if it exists
-IF EXIST "%ADDONS_BUILD_PATH%" (
- RMDIR "%ADDONS_BUILD_PATH%" /S /Q > NUL
+rem make sure the xbmc include and library paths exist
+IF NOT EXIST "%XBMC_INCLUDE_PATH%" (
+ MKDIR "%XBMC_INCLUDE_PATH%"
+)
+IF NOT EXIST "%XBMC_LIB_PATH%" (
+ MKDIR "%XBMC_LIB_PATH%"
)
rem create the build directory
-MKDIR "%ADDONS_BUILD_PATH%"
+IF NOT EXIST "%ADDONS_BUILD_PATH%" MKDIR "%ADDONS_BUILD_PATH%"
rem go into the build directory
CD "%ADDONS_BUILD_PATH%"
@@ -71,6 +91,10 @@ IF %install% == true (
SET ADDONS_INSTALL_PATH=%WORKDIR%\project\Win32BuildSetup\BUILD_WIN32\Xbmc\xbmc-addons
)
+ECHO --------------------------------------------------
+ECHO Building addons
+ECHO --------------------------------------------------
+
rem execute cmake to generate makefiles processable by nmake
cmake "%ADDONS_PATH%" -G "NMake Makefiles" ^
-DCMAKE_BUILD_TYPE=Release ^
@@ -87,7 +111,7 @@ IF ERRORLEVEL 1 (
)
rem execute nmake to build the addons
-nmake
+nmake %addon%
IF ERRORLEVEL 1 (
ECHO nmake error level: %ERRORLEVEL% > %ERRORFILE%
GOTO ERROR