Help with workflow for skinning

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Hitcher Offline
Skilled Skinner
Posts: 9,976
Joined: Aug 2007
Reputation: 67
Location: Eastleigh, UK
Post: #21
Batch script (save as updater.bat)

Code:
@echo off

Echo .svn>exclude.txt
Echo .git>>exclude.txt
Echo %1\media>>exclude.txt
Echo %1\themes>>exclude.txt

md BUILD\%1\media\

ECHO ----------------------------------------
Echo Building main skin XBT
ECHO ----------------------------------------

START /B /WAIT C:\SkinBuilder\TexturePacker -dupecheck -input %1\media -output BUILD\%1\media\Textures.xbt

ECHO ----------------------------------------
Echo Finished building main skin XBT
if exist %1\themes (
    Echo Building theme skin XBT Files
    ECHO ----------------------------------------
    for /f "tokens=*" %%f in ('dir /b/ad %1\themes') do START /B /WAIT C:\SkinBuilder\TexturePacker -dupecheck -input %1\themes\%%f -output BUILD\%1\media\%%f.xbt
    Echo Finished Building theme skin XBT Files
)

ECHO ----------------------------------------
Echo Copying other files
ECHO ----------------------------------------

for /f "tokens=*" %%c in ('dir /b/ad %1') do xcopy "%1\%%c" "BUILD\%1\%%c" /Q /S /I /Y /EXCLUDE:exclude.txt
for /f "tokens=*" %%c in ('dir /b/a-d %1') do copy %1\%%c "BUILD\%1\%%c"

del exclude.txt

FOR /F "skip=2 Tokens=2 Delims== " %%V IN ('FIND "    version=" "BUILD\%1\addon.xml"') DO SET Version=%%~V

ECHO ----------------------------------------
ECHO Current skin version is %Version%
ECHO ----------------------------------------

cd BUILD
C:\SkinBuilder\zip -r -q %1-%Version%.zip %1

ECHO ----------------------------------------
ECHO Moving files to repository
ECHO ----------------------------------------

if exist "F:\xbmc.repo.hitcher\%1\" rmdir "F:\xbmc.repo.hitcher\%1\" /S /Q
md "F:\xbmc.repo.hitcher\%1\"
copy "%1-%Version%.zip" "F:\xbmc.repo.hitcher\%1\"
copy "%1\fanart.jpg" "F:\xbmc.repo.hitcher\%1\fanart.jpg"
copy "%1\icon.png" "F:\xbmc.repo.hitcher\%1\icon.png"
copy "%1\addon.xml" "F:\xbmc.repo.hitcher\%1\addon.xml"
copy "%1\changelog.txt" "F:\xbmc.repo.hitcher\%1\changelog-%Version%.txt"

ECHO ----------------------------------------
ECHO Removing BUILD folder
ECHO ----------------------------------------

cd ..
rmdir BUILD /S /Q

ECHO ----------------------------------------
ECHO Generating addons.xml and addons.xml.md5
ECHO ----------------------------------------

F:
cd xbmc.repo.hitcher\
python addons_xml_generator.py

pause

Notes

Then simply create a shortcut for the build.bat and pass the skin folder name as a parameter like this -

[Image: 15mfiw5.png]

Here's my repo addon.xml -

PHP Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon
    id="xbmc.repo.hitcher"
    name="Hitcher's repository"
    version="3.0.1"
    provider-name="Hitcher">
    <extension point="xbmc.addon.repository"
        name="Hitcher's Add-on Repository">
        <info>http://dl.dropbox.com/u/19745842/Repo/addons.xml</info> 
        <checksum>http://dl.dropbox.com/u/19745842/Repo/addons.xml.md5</checksum> 
        <datadir zip="true">http://dl.dropbox.com/u/19745842/Repo</datadir>  
    </extension>
    <extension point="xbmc.addon.metadata">
        <summary>Hitcher's Add-ons for XBMC</summary>
        <description>Download and install Add-ons for XBMC.</description>
        <disclaimer>If it breaks, you get to keep the pieces</disclaimer>
        <platform>all</platform>
    </extension>
</addon> 

My repo is stored in my Public DropBox folder so if you use the same method just change your URLs.

[Image: sig_zps3af3b48e.jpg]
(This post was last modified: 2012-06-11 16:42 by Hitcher.)
find quote
Mudislander Offline
Skilled Skinner
Posts: 1,179
Joined: Jun 2009
Reputation: 20
Post: #22
Thanks, It's brilliant Big Grin

Noli illegitimi carborundum
find quote
jingai Offline
Skilled Skinner
Posts: 888
Joined: Mar 2010
Reputation: 8
Post: #23
It would be nice if you could 'hold' a specific version of an addon/skin within XBMC. That way, if I want to contribute to a given skin, I can:

* put the skin on hold
* clone their repo straight into my working addons folder
* branch, do work, commit, push
* take skin off hold

I currently achieve this by just setting the skin's version to 9.9.9 whenever I'm working on it, but this would be a bit nicer.

-j
find quote
Post Reply