fiqs8sjn5by0n

Compiling your own build of XBMC?

By jack | January 6, 2009

  • so, I've been doing CVS (and now SVN) compiles of XBMC for almost a year now, and just recently got into using complicated batch scripting to do stuff.

    Was just curious if anybody else on here does their own builds and if so, how do you do it? just use the generic Build.bat?

    My current one applies a variety of cleaup and customizations, as well as doing built-from-SVN skin and scipt add-ons :)


  • Sounds good, thanks.


  • XBMCDBR ;) Now is XBMCToolkit


  • meh. I used to use that but wanted additional customization, so I did a lot of editing on the generic build.bat. AFAI can tell, XBMCToolkit just runs the build.bat inside of a nice-looking console and does a few other things on top which can be done via batching anyway, so its kindof redundant.

    The main thing that got me into this is that I wanted to be able to customize what is removed in addition to what is added.


  • get_source_pre.bat
    get_source_post.bat
    build_textures_pre.bat
    build_textures_post.bat
    build_xbmc_pre.bat
    build_xbmc_post.bat
    rar_pre.bat
    rar_post.bat


    This would be great - it seems like an easy way to really customize the build without xbmcdbr having to have every little thing coded into it. Of course, it makes it a little harder (or impossible) to effectively handle/report errors in the build process if something goes bad in one of the batch files, but that's probably no big deal.

    Something I'll work on soon is applying patches. Currently xbmcdbr will replace entire source files with those of your choosing. This isn't ideal, since it means you've got to manually update those to account for svn changes as well as the patched functionality.

    Patches should use true diff files (*.diff/*.patch) so that merges can be done. This is all very easy to set up and use in the Tortoise gui, and of course has a command line equivalent that could be used in dbr or batch scripts.

    jgawera: if I get my act together I'll code this into the dbr and see how it works.


  • XBMCDBR ;) Now is XBMCToolkit

    Same. Works great.


  • meh. I used to use that but wanted additional customization, so I did a lot of editing on the generic build.bat. AFAI can tell, XBMCToolkit just runs the build.bat inside of a nice-looking console and does a few other things on top which can be done via batching anyway, so its kindof redundant.

    The main thing that got me into this is that I wanted to be able to customize what is removed in addition to what is added.

    I've been a longtime XBMCDBR user, too, and I like it quite a bit. Essentially you're right, but it does a great job at what it does, and is easy for new users to set up. The option to remove stuff would be a welcome addition.

    Would you be interested in sharing your build system? I'm always looking for ways to improve my own build system.


  • sure sure.
    directory structure:
    -[root]:where the batches and some helper .exes are
    -[root]SVN: local copy of the XBMC source code
    -[root]AddOns: just XBMCDBR, everything from here is copied into the root dir of a new build.
    -[root]skins: local copy of the SVN repository for the skins

    first script is just a dumb launcher:
    Go!.bat
    @ECHO OFF
    cd SVN
    call Build.bat

    SVNBuild.bat
    :@ECHO OFF
    ECHO Updating local SVN Repository...
    SVN update
    cd..
    svn info SVNsfk filter -!Path -!URL -!Rep -!Node -!Sche -!Last -replace _"Revision: "__>Revision.txt
    SET /P REVISION= DEL Revision.txt /Q
    ECHO You are currently at Revision %REVISION%
    IF EXIST "XBMC Revision %REVISION%.7z" (
    ECHO We are up to date, no need to make a new build.
    GOTO DONE
    ) ELSE (
    ECHO We are NOT up to date, compiling new build.
    GOTO BUILD
    )
    :BUILD
    cd SVN
    IF "%VS71COMNTOOLS%"=="" (
    set NET="%ProgramFiles%Microsoft Visual Studio .NET 2003Common7IDEdevenv.com"
    ) ELSE (
    set NET="%VS71COMNTOOLS%..IDEdevenv.com"
    )
    ECHO Compiling Default.xbe
    %NET% xbmc.sln /clean release
    del releasexbmc.map
    %NET% xbmc.sln /build release
    xbepatch.exe releasedefault.xbe
    rmdir BUILD /S /Q
    md BUILD
    Echo .svn>exclude.txt
    Echo Thumbs.db>>exclude.txt
    Echo Desktop.ini>>exclude.txt
    Echo dsstdfx.bin>>exclude.txt
    Echo exclude.txt>>exclude.txt
    Echo readme.txt>>exclude.txt
    Echo Readme.txt>>exclude.txt
    Echo Read Me.txt>>exclude.txt
    Echo splash_original.png>>exclude.txt
    Echo splash_PM3.png>>exclude.txt
    Echo Changelog_PM.txt>>exclude.txt
    Echo CHANGES>>exclude.txt
    Echo LICENCE>>exclude.txt
    Echo makefile>>exclude.txt
    Echo README>>exclude.txt
    Echo RELEASE>>exclude.txt
    Echo THANKS>>exclude.txt

    copy releasedefault.xbe BUILD

    cd "skinProject Mayhem III"
    ECHO Building skin
    CALL build.bat
    cd ....
    ECHO Building directory structure
    xcopy "skinProject Mayhem IIIBUILDProject Mayhem III" "BUILDskinProject Mayhem III" /E /Q /I /Y /EXCLUDE:exclude.txt
    xcopy languageenglish BUILDlanguageenglish /E /Q /I /Y /EXCLUDE:exclude.txt
    xcopy screensaversDrempels BUILDscreensaversDrempels /E /Q /I /Y /EXCLUDE:exclude.txt
    copy screensaversAsteroids.xbs BUILDscreensavers
    copy screensaversDrempels.xbs BUILDscreensavers
    copy screensaversPingPong.xbs BUILDscreensavers
    copy screensaversPingPong.xml BUILDscreensavers
    copy screensaversStars.xbs BUILDscreensavers
    copy screensaversStars.xml BUILDscreensavers
    xcopy visualisationsMilkdrop BUILDvisualisationsMilkdrop /E /Q /I /Y /EXCLUDE:exclude.txt
    xcopy visualisationsVortex BUILDvisualisationsVortex /E /Q /I /Y /EXCLUDE:exclude.txt
    copy visualisationsMilkdrop.vis BUILDvisualisations
    copy visualisationsVortex.vis BUILDvisualisations
    copy visualisationslogo31a.bmp BUILDvisualisations
    xcopy system BUILDsystem /E /Q /I /Y /EXCLUDE:exclude.txt
    xcopy media BUILDmedia /E /Q /I /Y /EXCLUDE:exclude.txt
    del exclude.txt
    cd..
    MOVE "%CD%SVNBUILD" XBMC
    call skins.bat
    ECHO Copying AddOns directory.
    xcopy AddOns XBMC /E /Q /I /Y
    ECHO Generating Changelog
    svn log SVN --xml>>Changelog.xml
    changelog.exe changelog.xml XBMCchangelog.txt
    del "%CD%changelog.xml" /Q
    ECHO Compressing to 7zip archive.
    ::7za a "XBMC Revision %REVISION%" XBMC*
    ::rmdir /S /Q "%CD%XBMC"
    :DONE
    PAUSE

    skins.bat
    SVN co "https://svn.sourceforge.net/svnroot/xboxmediacenter/Blackbolt Classic" "skinsBlackbolt Classic"
    del "%CD%skinsBlackbolt Classicchangelog.txt" /Q
    svn log "skinsBlackbolt Classic" --xml>>Changelog.xml
    changelog.exe changelog.xml "skinsBlackbolt Classicchangelog.txt"
    del "%CD%changelog.xml" /Q
    CD "skinsBlackbolt Classic"
    call build.bat /Q
    move "%CD%changelog.txt" "BUILDBlackbolt Classic"
    cd..
    cd..
    rmdir "AddOnsskinBlackbolt Classic" /S /Q
    move "%CD%skinsBlackbolt ClassicBUILDBlackbolt Classic" "AddOnsskinBlackbolt Classic"
    SVN co "https://svn.sourceforge.net/svnroot/xboxmediacenter/Clearity" "skinsClearity"
    del "%CD%skinsClearitychangelog.txt" /Q
    svn log "skinsClearity" --xml>>Changelog.xml
    changelog.exe changelog.xml "skinsClearitychangelog.txt"
    del "%CD%changelog.xml" /Q
    CD "skinsClearity"
    call build.bat /Q
    move "%CD%changelog.txt" "BUILDClearity"
    cd..
    cd..
    rmdir "AddOnsskinClearity" /S /Q
    move "%CD%skinsClearityBUILDClearity" "AddOnsskinClearity"
    SVN co "https://svn.sourceforge.net/svnroot/xboxmediacenter/PDM" "skinsPDM"
    del "%CD%skinsPDMchangelog.txt" /Q
    svn log "skinsPDM" --xml>>Changelog.xml
    changelog.exe changelog.xml "skinsPDMchangelog.txt"
    del "%CD%changelog.xml" /Q
    CD "skinsPDM"
    call build.bat /Q
    move "%CD%changelog.txt" "BUILDPDM"
    cd..
    cd..
    rmdir "AddOnsskinPDM" /S /Q
    move "%CD%skinsPDMBUILDPDM" "AddOnsskinPDM"
    SVN co "https://svn.sourceforge.net/svnroot/xboxmediacenter/Project Mayhem I" "skinsProject Mayhem I"
    del "%CD%skinsProject Mayhem Ichangelog.txt" /Q
    svn log "skinsProject Mayhem I" --xml>>Changelog.xml
    changelog.exe changelog.xml "skinsProject Mayhem Ichangelog.txt"
    del "%CD%changelog.xml" /Q
    CD "skinsProject Mayhem I"
    call build.bat /Q
    move "%CD%changelog.txt" "BUILDProject Mayhem I"
    cd..
    cd..
    rmdir "AddOnsskinProject Mayhem I" /S /Q
    move "%CD%skinsProject Mayhem IBUILDProject Mayhem I" "AddOnsskinProject Mayhem I"
    SVN co "https://svn.sourceforge.net/svnroot/xboxmediacenter/Project Mayhem II" "skinsProject Mayhem II"
    del "%CD%skinsProject Mayhem IIchangelog.txt" /Q
    svn log "skinsProject Mayhem II" --xml>>Changelog.xml
    changelog.exe changelog.xml "skinsProject Mayhem IIchangelog.txt"
    del "%CD%changelog.xml" /Q
    CD "skinsProject Mayhem II"
    call build.bat /Q
    move "%CD%changelog.txt" "BUILDProject Mayhem II"
    cd..
    cd..
    rmdir "AddOnsskinProject Mayhem II" /S /Q
    move "%CD%skinsProject Mayhem IIBUILDProject Mayhem II" "AddOnsskinProject Mayhem II"
    SVN co "https://svn.sourceforge.net/svnroot/xboxmediacenter/Project Mayhem III Lite" "skinsProject Mayhem III Lite"
    del "%CD%skinsProject Mayhem III Litechangelog.txt" /Q
    svn log "skinsProject Mayhem III Lite" --xml>>Changelog.xml
    changelog.exe changelog.xml "skinsProject Mayhem III Litechangelog.txt"
    del "%CD%changelog.xml" /Q
    CD "skinsProject Mayhem III Lite"
    call build.bat /Q
    move "%CD%changelog.txt" "BUILDProject Mayhem III Lite"
    cd..
    cd..
    rmdir "AddOnsskinProject Mayhem III Lite" /S /Q
    move "%CD%skinsProject Mayhem III LiteBUILDProject Mayhem III Lite" "AddOnsskinProject Mayhem III Lite"


  • XBMCDBR is really designed to be a one click builder for XBMC.
    I'm always interested to hear about feature requestes and I can see that some of the things you do would be useful to others.

    I've thought about adding some hook script calls to XBMCDBR to allow further customisation, but I really want to keep it simple for people that don't need advanced stuff.
    If there was a directory of custom scripts which XBMCDBR would call at various stages throughout the build, that would allow a lot of customisations.

    Something like the following
    get_source_pre.bat
    get_source_post.bat
    build_textures_pre.bat
    build_textures_post.bat
    build_xbmc_pre.bat
    build_xbmc_post.bat
    rar_pre.bat
    rar_post.bat

    By default these would do nothing, and if you wanted to customise a particular step, you write your own bat file. Would this be any use to anyone? would it be any better/worse than what you have now? To me, this seems like trying to cram too much into XBMCDBR, and maybe for more advanced useres, batch files are the way to go.

    XBMCDBR doesn't actually call build.bat, but it does just about all the same stuff. Once i've tidied up the code some, it would be easier to add the above calls if that is something that people are interested in.







  • #If you have any other info about this subject , Please add it free.#
    Your name:
    E-mail:
    Telphone:

    Your comments:


    If you have any other info about Compiling your own build of XBMC? , Please add it free.

    Topics: enart.xn--fiqs8sjn5by0n.com | edit

    Cash Loan: Affable Financial Assistance for Emergencies Learn Spoken English Through the Correct Method