3 REM Batch file to download and build xbmc-pvr-addons and place them in xbmc's addons folder
8 SET DEPS_DIR=..\BuildDependencies
9 SET TMP_DIR=%DEPS_DIR%\tmp
11 SET LIBNAME=xbmc-pvr-addons
12 SET VERSION=18597fd733003e3a7edfedc284b36428c4b97647
14 SET GIT_URL=git://github.com/opdenkamp/%LIBNAME%.git
15 SET SOURCE_DIR=%TMP_DIR%\%SOURCE%
16 SET BUILT_ADDONS_DIR=%SOURCE_DIR%\addons
18 REM check if MSBuild.exe is used because it requires different command line switches
19 IF "%msbuildemitsolution%" == "1" (
20 set OPTS_EXE=%SOURCE_DIR%\project\VS2010Express\xbmc-pvr-addons.sln /t:Build /p:Configuration="Release"
22 set OPTS_EXE=%SOURCE_DIR%\project\VS2010Express\xbmc-pvr-addons.sln /build Release
25 REM Try wrapped msysgit - must be in the path
27 CALL %GITEXE% --help > NUL 2>&1
28 IF errorlevel 1 GOTO nowrapmsysgit
33 REM Fallback on regular msysgit - must be in the path
36 IF errorlevel 9009 IF NOT errorlevel 9010 GOTO nomsysgit
41 REM Fallback on tgit.exe of TortoiseGit if available
43 %GITEXE% --version > NUL 2>&1
44 IF errorlevel 9009 IF NOT errorlevel 9010 GOTO error
49 IF NOT EXIST "%TMP_DIR%" MD "%TMP_DIR%"
51 REM clone the git repository into SOURCE_DIR
52 CALL %GITEXE% clone %GIT_URL% "%SOURCE_DIR%" > NUL 2>&1
54 REM get the proper revision
55 CALL %GITEXE% checkout %VERSION% > NUL 2>&1
58 REM run DownloadBuildDeps.bat of xbmc-pvr-addons
59 CD "project\BuildDependencies"
60 CALL DownloadBuildDeps.bat > NUL 2>&1
63 REM build xbmc-pvr-addons.sln
64 ECHO Building PVR addons
67 REM copy the built pvr addons into ADDONS_DIR
68 CD "%BUILT_ADDONS_DIR%"
69 SET ADDONS_DIR=..\..\..\..\Win32BuildSetup\BUILD_WIN32\Xbmc\xbmc-pvr-addons
71 REM exclude some files
72 ECHO addon.xml.in > exclude.txt
73 ECHO _win32.exp >> exclude.txt
74 ECHO _win32.lib >> exclude.txt
75 ECHO _win32.pdb >> exclude.txt
76 FOR /D %%A IN ("pvr.*") DO (
77 IF EXIST "%%A\addon" (
79 XCOPY "%%A\addon\*" "%ADDONS_DIR%\%%A" /E /Q /I /Y /EXCLUDE:exclude.txt > NUL
85 REM cleanup temporary directories
86 RMDIR "%TMP_DIR%" /S /Q > NUL
91 ECHO No git command available. Unable to fetch and build xbmc-pvr-addons.