i just thought i'd post the latest version of my build script. it can also be found floating around the net as part of the make xbmc package (mkxbmc-1.rar, mkxbmc-2.r##, mkxbmc-3.r##). just edit the options and run, it should be pretty self-explanatory. the three build choices which you're presented with do the following:
"quick" downloads any changed files in the xbmc source, downloads the project mayhem aqtbrowser, kmlbrowse and webserver skins if they aren't cached locally, compiles a new build of xbmc and prepares a release in the \release subdirectory.
"full" deletes and re-downloads the xbmc source and project mayhem aqtbrowser, kmlbrowse and webserver skins, compiles a new build of xbmc, prepares a release in the \release subdirectory and compresses the release to a date-tagged .rar in the \builds subdirectory.
"compress" compresses the files in the \release subdirectory to a date-tagged .rar in the \builds subdirectory.
Quote:@echo off
title make xbmc
:: set the xbmc version ::
set version=1.1.0
:: set your tag ::
set tag=[anonymous]
:: get the date, this is only set automatically on nt ::
for /f "tokens=2-4 delims=/ " %%f in ('date /t') do (
set mm=%%f
set dd=%%g
set yyyy=%%h
)
:: get the current location, this is only set automatically on nt ::
set home=%cd%
:: the files and directories in this location will be copied to the distribution ::
set include=%home%\include
:: path to command line cvs, from http://www.cvshome.org/downloads.html ::
set cvs=%home%\programs\cvs\cvs.exe
:: path to visual studio .net 7.1 2003 (with ms xbox sdk 5778+ installed) ::
set net=d:\program files\visual studio .net\common7\ide\devenv.exe
:: path to command line rar.exe included with winrar, from http://www.rarlab.com/download.htm ::
set rar=%home%\programs\rar\rar.exe
:: compression options ::
set compressops=a -ep1 -r -m5 -y
set rarcomment=%home%\comment.txt
:: extraction options ::
set extractops=x -r -y
:: path to general search and replace, from http://home.online.no/~tjaberg/ ::
set gsar=%home%\programs\gsar\gsar.exe
:: path to url2file, from http://www.chami.com/free/url2file_wincon.html ::
set url2file=%home%\programs\url2file\url2file.exe
:: path to xbepatch, from http://www.xbox-scene.com/tools/tools.php?page=xbexbx ::
set xbe=%home%\programs\xbepatch\xbepatch.exe
if not exist "%home%" goto error
if not exist "%cvs%" goto error
if not exist "%net%" goto error
if not exist "%rar%" goto error
if not exist "%gsar%" goto error
if not exist "%url2file%" goto error
if not exist "%xbe%" goto error
goto start
:error
cls
echo a directory or file specified in this script's configuration does not exist.
echo please edit this file, fix the error and try again.
goto finished
:start
cls
echo please choose a build method and press enter:
echo.
echo [q]uick
echo [f]ull
echo [c]ompress
echo [e]xit
echo.
set choice=
set /p choice=
if not '%choice%'=='' set choice=%choice:~0,1%
if /i '%choice%'=='q' goto compile
if /i '%choice%'=='f' goto compile
if /i '%choice%'=='c' goto compress
if /i '%choice%'=='e' exit
goto start
:compile
cls
echo starting the build process. some steps may take a while.
echo.
echo cleaning local data...
if exist "%temp%\makexbmc\" rmdir "%temp%\makexbmc\" /s /q
cd /d "%home%"
if exist exclude.txt del exclude.txt
echo cvs>exclude.txt
echo german (austia)>>exclude.txt
echo portugese>>exclude.txt
echo schinese>>exclude.txt
echo tchinese>>exclude.txt
echo thumbs.db>>exclude.txt
echo trkish>>exclude.txt
if /i '%choice%'=='f' if exist "%home%\cache\" rmdir "%home%\cache\" /s /q
if /i '%choice%'=='q' if exist "%home%\cache\xbmc\release\" rmdir "%home%\cache\xbmc\release\" /s /q
if not exist "%home%\cache" mkdir "%home%\cache"
echo retrieving xbmc source...
cd /d "%home%\cache"
"%cvs%" -z3 -d :pserver:anonymous:@cvs.sourceforge.net:/cvsroot/xbmc checkout xbmc
echo retrieving additional files...
if not exist "%home%\cache\aqtbrowser.rar" "%url2file%" "http://www.critikill.net/content/file10.asp" "%home%\cache\aqtbrowser.rar"
if not exist "%home%\cache\kmlbrowse.rar" "%url2file%" "http://www.critikill.net/content/file9.asp" "%home%\cache\kmlbrowse.rar"
if not exist "%home%\cache\webserver.rar" "%url2file%" "http://www.critikill.net/content/file12.asp" "%home%\cache\webserver.rar"
echo building xbmc...
"%net%" /rebuild release xbox "%home%\cache\xbmc\xbmc.sln"
if not exist "%home%\cache\xbmc\release\default.xbe" echo there was an error building xbmc. please check your system setup.
if not exist "%home%\cache\xbmc\release\default.xbe" goto finished
echo patching xbe...
"%xbe%" "%home%\cache\xbmc\release\default.xbe"
echo cleaning release directory...
if exist "%home%\release" rmdir "%home%\release" /s /q
md "%home%\release"
md "%home%\release\docs"
md "%home%\release\scripts"
echo extracting archives...
"%rar%" %extractops% "%home%\cache\aqtbrowser.rar" "%temp%\makexbmc\aqtbrowser\"
del "%temp%\makexbmc\aqtbrowser\*16x9.*"
"%rar%" %extractops% "%home%\cache\webserver.rar" "%home%\release\web\"
if exist "%include%\scripts\kmlbrowse.py" "%rar%" %extractops% "%home%\cache\kmlbrowse.rar" "%home%\release\scripts\"
echo copying files...
cd /d "%home%"
xcopy "%home%\cache\xbmc\credits" "%home%\release\credits" /q /i /y /exclude:exclude.txt
xcopy "%home%\cache\xbmc\language" "%home%\release\language" /e /q /i /y /exclude:exclude.txt
xcopy "%home%\cache\xbmc\media" "%home%\release\media" /e /q /i /y /exclude:exclude.txt
xcopy "%home%\cache\xbmc\mplayer" "%home%\release\mplayer" /e /q /i /y /exclude:exclude.txt
xcopy "%home%\cache\xbmc\python" "%home%\release\python" /e /q /i /y /exclude:exclude.txt
xcopy "%home%\cache\xbmc\screensavers" "%home%\release\screensavers" /e /q /i /y /exclude:exclude.txt
xcopy "%home%\cache\xbmc\skin\project mayhem\*.xml" "%home%\release\skin\project mayhem" /e /q /i /y /exclude:exclude.txt
xcopy "%home%\cache\xbmc\skin\project mayhem\fonts" "%home%\release\skin\project mayhem\fonts" /e /q /i /y /exclude:exclude.txt
xcopy "%home%\cache\xbmc\visualisations" "%home%\release\visualisations" /e /q /i /y /exclude:exclude.txt
xcopy "%home%\cache\xbmc\weather" "%home%\release\weather" /e /q /i /y /exclude:exclude.txt
xcopy "%home%\cache\xbmc\xbmc\keyboard\media" "%home%\release\media" /e /q /i /y /exclude:exclude.txt
if exist "%include%" xcopy "%include%" "%home%\release" /e /q /i /y
copy "%home%\cache\xbmc\release\default.xbe" "%home%\release"
copy "%home%\cache\xbmc\*.xml" "%home%\release"
copy "%home%\cache\xbmc\*.txt" "%home%\release\docs"
copy "%home%\cache\xbmc\license.gpl" "%home%\release\docs\license.txt"
copy "%temp%\makexbmc\aqtbrowser\*.py" "%home%\release\scripts\"
copy "%temp%\makexbmc\aqtbrowser\*.png" "%home%\release\skin\project mayhem\media\"
copy "%home%\cache\xbmc\skin\project mayhem\media\textures.xpr" "%home%\release\skin\project mayhem\media\"
copy "%home%\cache\xbmc\skin\project mayhem\media\background.png" "%home%\release\skin\project mayhem\media\"
copy "%home%\cache\xbmc\skin\project mayhem\media\background2.png" "%home%\release\skin\project mayhem\media\"
echo deleting files...
del "%home%\exclude.txt"
del "%home%\release\screensavers\template*.*"
del "%home%\release\scripts\put this in your scripts folder.txt"
rmdir "%temp%\makexbmc\" /s /q
echo updating files...
"%gsar%" "-sxbox media center %version%" "-rxbmc %version% %tag%" -o "%home%\release\language\english\strings.xml"
"%gsar%" "-sdefault_size = 2" "-rdefault_size = -1" -o "%home%\release\scripts\aqtbrowser.py"
if /i '%choice%'=='q' goto finished
:compress
echo compressing distribution...
if exist "%home%\builds\xbmc xbox media center %version% %yyyy%-%mm%-%dd% %tag%.rar" del "%home%\builds\xbmc xbox media center %version% %yyyy%-%mm%-%dd% %tag%.rar"
"%rar%" %compressops% "%home%\builds\xbmc xbox media center %version% %yyyy%-%mm%-%dd% %tag%.rar" "%home%\release\*"
if exist "%rarcomment%" "%rar%" c -z"%rarcomment%" "%home%\builds\xbmc xbox media center %version% %yyyy%-%mm%-%dd% %tag%.rar"
:finished
echo.
echo script completed.
echo
pause