diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | project/Win32BuildSetup/BuildSetup.bat | 3 | ||||
-rw-r--r-- | project/Win32BuildSetup/XBMC for Windows.nsi | 5 | ||||
-rw-r--r-- | project/Win32BuildSetup/buildpvraddons.bat | 88 | ||||
-rw-r--r-- | project/Win32BuildSetup/genNsisIncludes.bat | 12 |
5 files changed, 109 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore index da4354f644..9b4f7f0373 100644 --- a/.gitignore +++ b/.gitignore @@ -363,6 +363,7 @@ lib/cmyth/Makefile /project/Win32BuildSetup/XBMC.log /project/Win32BuildSetup/XBMCSetup*.exe /project/Win32BuildSetup/languages.nsi +/project/Win32BuildSetup/xbmc-pvr-addons.nsi /project/Win32BuildSetup/BUILD_WIN32/ /project/Win32BuildSetup/dependencies diff --git a/project/Win32BuildSetup/BuildSetup.bat b/project/Win32BuildSetup/BuildSetup.bat index 8407d5391c..b3afd93b09 100644 --- a/project/Win32BuildSetup/BuildSetup.bat +++ b/project/Win32BuildSetup/BuildSetup.bat @@ -199,6 +199,9 @@ IF %comp%==vs2010 ( xcopy ..\..\system BUILD_WIN32\Xbmc\system /E /Q /I /Y /EXCLUDE:exclude.txt > NUL xcopy ..\..\media BUILD_WIN32\Xbmc\media /E /Q /I /Y /EXCLUDE:exclude.txt > NUL xcopy ..\..\sounds BUILD_WIN32\Xbmc\sounds /E /Q /I /Y /EXCLUDE:exclude.txt > NUL + + ECHO ------------------------------------------------------------ + call buildpvraddons.bat %NET% IF EXIST error.log del error.log > NUL SET build_path=%CD% diff --git a/project/Win32BuildSetup/XBMC for Windows.nsi b/project/Win32BuildSetup/XBMC for Windows.nsi index 5d3e4fe61d..7af23dfd73 100644 --- a/project/Win32BuildSetup/XBMC for Windows.nsi +++ b/project/Win32BuildSetup/XBMC for Windows.nsi @@ -205,6 +205,11 @@ SectionGroupEnd !include /nonfatal "plugins.nsi" ;SectionGroupEnd +SectionGroup "PVR Addons" SecPvrAddons +;xbmc-pvr-addons.nsi is generated by genNsisIncludes.bat +!include /nonfatal "xbmc-pvr-addons.nsi" +SectionGroupEnd + ;-------------------------------- ;Descriptions diff --git a/project/Win32BuildSetup/buildpvraddons.bat b/project/Win32BuildSetup/buildpvraddons.bat new file mode 100644 index 0000000000..07b96a8f62 --- /dev/null +++ b/project/Win32BuildSetup/buildpvraddons.bat @@ -0,0 +1,88 @@ +@ECHO OFF + +REM Batch file to download and build xbmc-pvr-addons and place them in xbmc's addons folder + +SET CUR_DIR=%CD% +SET EXITCODE=0 + +SET DEPS_DIR=..\BuildDependencies +SET TMP_DIR=%DEPS_DIR%\tmp + +SET LIBNAME=xbmc-pvr-addons +SET VERSION=252fbbeaa1b2615ec21204756f5db8309b144da8 +SET SOURCE=%LIBNAME%-%VERSION% +SET GIT_URL=git://github.com/opdenkamp/%LIBNAME%.git +SET SOURCE_DIR=%TMP_DIR%\%SOURCE% +SET BUILT_ADDONS_DIR=%SOURCE_DIR%\addons + +set OPTS_EXE=%SOURCE_DIR%\project\VS2010Express\xbmc-pvr-addons.sln /build Release + +REM Try wrapped msysgit - must be in the path +SET GITEXE=git.cmd +CALL %GITEXE% --help > NUL 2>&1 +IF errorlevel 1 GOTO nowrapmsysgit +GOTO work + +:nowrapmsysgit + +REM Fallback on regular msysgit - must be in the path +SET GITEXE=git.exe +%GITEXE% --help > NUL +IF errorlevel 9009 IF NOT errorlevel 9010 GOTO nomsysgit +GOTO work + +:nomsysgit + +REM Fallback on tgit.exe of TortoiseGit if available +SET GITEXE=tgit.exe +%GITEXE% --version > NUL 2>&1 +IF errorlevel 9009 IF NOT errorlevel 9010 GOTO error +GOTO work + + +:work +IF NOT EXIST "%TMP_DIR%" MD "%TMP_DIR%" + +REM clone the git repository into SOURCE_DIR +CALL %GITEXE% clone %GIT_URL% "%SOURCE_DIR%" > NUL + +:build +REM run DownloadBuildDeps.bat of xbmc-pvr-addons +CD "%SOURCE_DIR%\project\BuildDependencies" +CALL DownloadBuildDeps.bat > NUL 2>&1 +CD "%CUR_DIR%" + +REM build xbmc-pvr-addons.sln +ECHO Building PVR addons +%1 %OPTS_EXE% + +REM copy the built pvr addons into ADDONS_DIR +CD "%BUILT_ADDONS_DIR%" +SET ADDONS_DIR=..\..\..\..\Win32BuildSetup\BUILD_WIN32\Xbmc\xbmc-pvr-addons + +REM exclude some files +ECHO addon.xml.in > exclude.txt +ECHO _win32.exp >> exclude.txt +ECHO _win32.lib >> exclude.txt +ECHO _win32.pdb >> exclude.txt +FOR /D %%A IN ("pvr.*") DO ( + IF EXIST "%%A\addon" ( + ECHO Installing %%A + XCOPY "%%A\addon\*" "%ADDONS_DIR%\%%A" /E /Q /I /Y /EXCLUDE:exclude.txt > NUL + ) +) +DEL exclude.txt > NUL +CD "%CUR_DIR%" + +REM cleanup temporary directories +RMDIR "%TMP_DIR%" /S /Q > NUL + +GOTO done + +:error +ECHO No git command available. Unable to fetch and build xbmc-pvr-addons. +SET EXITCODE=1 + +:done +SET GITEXE= +EXIT /B %EXITCODE% diff --git a/project/Win32BuildSetup/genNsisIncludes.bat b/project/Win32BuildSetup/genNsisIncludes.bat index f05479c423..2195766aab 100644 --- a/project/Win32BuildSetup/genNsisIncludes.bat +++ b/project/Win32BuildSetup/genNsisIncludes.bat @@ -5,9 +5,11 @@ rem http://xbmc.org rem Script by chadoe rem This script generates nullsoft installer include files for xbmc's languages +rem and pvr addons rem languages IF EXIST languages.nsi del languages.nsi > NUL +IF EXIST xbmc-pvr-addons.nsi del xbmc-pvr-addons.nsi > NUL SETLOCAL ENABLEDELAYEDEXPANSION SET Counter=1 FOR /F "tokens=*" %%S IN ('dir /B /AD BUILD_WIN32\Xbmc\language') DO ( @@ -21,4 +23,14 @@ FOR /F "tokens=*" %%S IN ('dir /B /AD BUILD_WIN32\Xbmc\language') DO ( SET /A Counter = !Counter! + 1 ) ) + +SET Counter=1 +FOR /F "tokens=*" %%P IN ('dir /B /AD BUILD_WIN32\Xbmc\xbmc-pvr-addons') DO ( + ECHO Section "%%P" SecPvrAddons!Counter! >> xbmc-pvr-addons.nsi + ECHO SectionIn 1 #section is in installtype Full >> xbmc-pvr-addons.nsi + ECHO SetOutPath "$INSTDIR\addons\%%P" >> xbmc-pvr-addons.nsi + ECHO File /r "${xbmc_root}\Xbmc\xbmc-pvr-addons\%%P\*.*" >> xbmc-pvr-addons.nsi + ECHO SectionEnd >> xbmc-pvr-addons.nsi + SET /A Counter = !Counter! + 1 +) ENDLOCAL
\ No newline at end of file |