• 1
  • 8
  • 9
  • 10(current)
  • 11
  • 12
  • 13
HOW-TO compile XBMC for Xbox from SVN
(jgawera @ nov. 19 2004,09:31 Wrote:i've now tried the script a couple of times and i'm pretty sure there's something wrong with it.

in the upload directory, under mplayer there is just codecs, no mplayer.dll

in the skins\project mayhem\ there is a file called media, should be a folder.
i think you might need a \ on the end of this line
Quote:copy "%home%\xbmc\skin\project mayhem\media\textures.xpr" "%home%\upload\skin\project mayhem\media
just comparing this with a release i got off suprnova, i found the following differences.
all docs moved to the docs folder (fair enough, looks tidier this way)
credits folder is missing
media folder is empty
skin\project mayhem contains only one file "media" and an empty fonts folder
visualisations folder is empty
weather folder is empty

am i doing something wrong?

thanks for any help
umm, it works fine for everybody in the x-s forums... not sure, unless you don't actually have my script and you have a different one?
Image
Reply
sorry, i think i've found the problem now,
just running it to make sure

the problem was that i was running the script in d:\cvs\dbr
and all of the exclude file stuff with xcopy excluded everything because of the cvs in the full path.

i'll let you know how i get on.
Reply
hmm, wanna get on as part of my one man team and write the part that would automatically find the unrar.exe and rar.exe install directories? since you already have the solution for the visual studio... i figure i'll add this functionality if you can write it, i will go ahead and figure it out sometime if you don't feel like it...
Image
Reply
ok, here's something i knocked up
i'm not really a command script programmer so forgive the ugliness of it, but it does work on my system
feel free to tidy it up or just rewrite it Smile

i kind of figured out what was going on in some of the earlier posts and hacked something together from that.

Quote:set rar_get_reg_cmd=reg query "hklm\software\microsoft\windows\currentversion\app paths\winrar.exe" /v path
for /f "tokens=3 delims= " %%f in ('%rar_get_reg_folder%')  do (
set winrarfolder=%%f
)
echo %winrarfolder%
set rar=%winrarfolder%\rar.exe
set unrar=%winrarfolder%\unrar.exe
echo %rar%
echo %unrar%
Reply
and here's a little thing to let the user know it won't work in a path with cvs in it

Quote:echo %home% | find "cvs"
if errorlevel 1 (
echo this script won't work if run in a folder with cvs in it %home%
pause
exit 1
)
Reply
when compiling with vs.net. if i would leave my xbox on with the xdk launcher on when it is compiling at the end when it says connecting to xbox. would it connect and what would it do? would it copy files? it is setup as a dev debug xbox and i have the xbox neighborhood on my desktop and my xdk launcher ip address is setup for vs.net. just wondering i can compile with just vs but was wondering what it would do if it actually connected to my xbox. thanks
Reply
Question 
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 trkish>>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
Reply
edit: deleted (bad information)

nuka1195 :nuts:
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
yes, that works, thanks
i'm not sure what happenned with that, i definately had it working on my xp machine and i have winrar in the "program files" folder so it does have a space in it.

looking at the code i posted, it can't have been the final version anyway as in one place i use rar_get_reg_cmd and a couple of lines later i use rar_get_reg_folder

ah well, it works now, maybe yuyu will add it to his cool script now. much nicer than the "directory setter" script i always forget to run Smile

happy xbmc
Reply
yeah, i didn't think you used cut and paste. Smile

and i agree your method is very nice.
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
this sets rar and unrar variables: delims= {tab} not spaces
original code by, jgawera

Quote::: sets rar and unrar variables
set regcmd=reg query "hklm\software\microsoft\windows\currentversion\app paths\winrar.exe" /v path
for /f "tokens=3 delims= " %%i in ('%regcmd%')  do (
set rar=%%i\rar.exe
set unrar=%%i\unrar.exe
)

this sets net variable: delims={tab} not spaces

Quote::: sets net variable
set regcmd=reg query "hklm\software\microsoft\windows\currentversion\app paths\devenv.exe" /ve
for /f "tokens=3 delims= " %%i in ('%regcmd%')  do (
set net=%%i
)

edit: streamlined code, cut and paste may not work
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
did you see my earlier script
Quote::findcompiler_begin
set msvcnet2003_compiler=devenv
call :testreachability
if not errorlevel 1 goto findcompilersuccess
rem check if handy location variable from installation is available
if defined vs71comntools (
for /f "delims=" %%i in ("%vs71comntools%..\ide") do set msvcnet2003_compiler="%%~fi\devenv"
call :testreachability
if not errorlevel 1 goto findcompilersuccess
) else (
echo %~n0: variable vs71comntools undefined. visual studio .net 2003 might not be installed properly.
set errorlevel 1
goto findcompiler_end
)
rem ran out of ideas...
echo %~n0: visual studio .net 2003 compiler not found.
goto :eof
:testreachability
rem test reachability by calling up usage info on compiler
%msvcnet2003_compiler% /? > nul 2>&1
goto :eof
:findcompilersuccess
echo %~n0: msvcnet2003_compiler=%msvcnet2003_compiler%
:findcompiler_end
uses variables created when visual studio is installed.
Reply
interesting,

i edited my previous post. streamlined the code
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
@ jgawera: i figured out what happened with your code. you put a tab after delims= and it only showed as a space. you can't copy and past. your code works perfectly.
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
appart from having two different variable names Smile

thanks, that was bugging the hell out of me.

are you working on your own script?
or a mod of the dbr script?

i've been looking for one that is a bit more customisable. i want one that i can use easily for developing, when i get some time (probably after the holidays now) i'd like to see if i can help with xbmc development. would be nice to have a quick script to work off my own source files instead of downloading them each time.
i guess it's probably easiest to just hack out bits of the dbr script.
maybe once that is fully automated then we can add some command line options to it so that you can choose which parts you want it to do.
Reply
  • 1
  • 8
  • 9
  • 10(current)
  • 11
  • 12
  • 13

Logout Mark Read Team Forum Stats Members Help
HOW-TO compile XBMC for Xbox from SVN0