2012-03-28, 19:32
Batch script (save as updater.bat)
Notes
Then simply create a shortcut for the build.bat and pass the skin folder name as a parameter like this -
Here's my repo addon.xml -
My repo is stored in my Public DropBox folder so if you use the same method just change your URLs.
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
- Assumes you have http://anarchintosh-projects.googlecode....nerator.py in your repository folder
- Assumes you have a TexturePacker folder containing all the nessecary files on C:
- Change the location F:\xbmc.repo.hitcher to your repository folder
Then simply create a shortcut for the build.bat and pass the skin folder name as a parameter like this -
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.