Add revision number label include to your skins.
#1
If any skinner would like to display the revision number somewhere in your skin.

Here is an addition you can add to you skins build.bat.

It automatically set's the skins name by the folder name build.bat is in.
It grabs the revision number for your skin (not the whole trunk) from .svn\entries.
It then creates an include named "Revision" in a include file named revision.xml in the BUILD\skinname\PAL folder. (so make sure you add this code below where you create the build folder)

All you need to do is add revision.xml to your includes.xml file and then the label somewhere in your skin, like system info or settings.

I added this to a couple scripts thinking it might be helpful.

Here is the code:
Code:
:Begin
:: Set script name based on current directory
FOR /F "Delims=" %%D IN ('ECHO %CD%') DO SET SkinName=%%~nD
:: Set window title
TITLE %SkinName% Build Script!
:GetRevision
:: Extract Revision # and SET %Revision% variable
ECHO ----------------------------------------------------------------------
ECHO.
ECHO Extracting revision number . . .
ECHO.
FOR /F "Tokens=2* Delims=]" %%R IN ('FIND /v /n "&_&_&_&" ".svn\entries" ^| FIND "[11]"') DO SET Revision=%%R
:MakeReleaseBuild
:: Create release build
ECHO ----------------------------------------------------------------------
ECHO.
ECHO Copying required files to \Build\%SkinName%\ folder . . .
:: Create new default.py with __svn_revision__ embedded
ECHO ^<!-- %SkinName% skin revision: %Revision% - built with build.bat version 1.0 --^>> "BUILD\%SkinName%\PAL\revision.xml"
ECHO ^<includes^>>> "BUILD\%SkinName%\PAL\revision.xml"
ECHO     ^<include name="Revision"^>>> "BUILD\%SkinName%\PAL\revision.xml"
ECHO         ^<number^>%Revision%^</number^>>> "BUILD\%SkinName%\PAL\revision.xml"
ECHO     ^</include^>>> "BUILD\%SkinName%\PAL\revision.xml"
ECHO ^</includes^>>> "BUILD\%SkinName%\PAL\revision.xml"
ECHO.


Here is an example revision.xml:
Code:
<!-- Xbox-Classic skin revision: 890 - built with build.bat version 1.0 -->
<includes>
    <include name="Revision">
        <number>890</number>
    </include>
</includes>

Hope it's useful
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#2
Here's an update, <number> tags were not working for me.

http://xbmc-scripting.googlecode.com/svn...KINXML.zip

This formats a full line, it fits good below MPlayer build in SystemInfo.

Example revision.xml:

PHP Code:
<!-- Xbox-Classic skin revision986 built with build.bat version 1.0 -->
<
includes>
    <include 
name="Revision">
        <
label>Xbox-Classic $LOCALIZE[310132.1 r986 (Mon 11/19/2007)</label>
    </include>
</
includes

The $LOCALIZE is using a skins language file "Skin Version:", but you can change that. It automatically puts the skins name version, revision # and date compiled.

It's fully automatic, the only change you may need is the call to make the xpr, depending on how you have your media laid out.
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#3
http://xbmc-addons.googlecode.com/svn/pa...KINXML.BAT
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply

Logout Mark Read Team Forum Stats Members Help
Add revision number label include to your skins.4