2007-08-13, 01:46
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:
Here is an example revision.xml:
Hope it's useful
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