Thread Rating:
  • 0 Vote(s) - 0 Average
Help with workflow for skinning
#16
I personally would say no but my opinion may not be the teams mainly because it can cause issues when conditions for visibility and other things can cause issues like having a live TV button in settings will confuse users when it does nothing for them in non pvr
Reply
#17
Jezz_X Wrote:heh I went a little more generic and advanced I guess than that hitcher my folder layout looks like this
Image
where each one of the ticks is the git a separate git repo https://github.com/JezzX
and the texturepacker dir holds the exe files to make the xbt.

The shortcuts like "Build PM3.HD" is a shortcut to build.bat with the folder name passed as a paramater eg:
Image
but you could easily type "BuildSkin.bat PM3.HD" at the command line and it would do the same, I'm just lazy and do the double click in windows Smile

And anyway in the end out pops a folder inside "BUILD" with the compiled skin

here is the bat file
Code:
@echo off

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

if exist BUILD\%1 rmdir BUILD\%1 /S /Q
md BUILD\%1\media\

ECHO ----------------------------------------
Echo Building main skin XBT
ECHO ----------------------------------------
START /B /WAIT TexturePacker\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 TexturePacker\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
pause

Thanks for posting this Jezz, I've switched over to this method.

Anyone know if it's possible to extract the revision number from the addon.xml and append it to the skin folder and changelog? And then zip the skin folder?

Thanks.
Reply
#18
Hitcher Wrote:Thanks for posting this Jezz, I've switched over to this method.

Anyone know if it's possible to extract the revision number from the addon.xml and append it to the skin folder and changelog? And then zip the skin folder?

Thanks.

Finally got it set up so I can simply click on a desktop shortcut and it'll build the texture.xbt (and theme.xbt if present); copy all the relevant files and folders; zip up the skin with it's current version number appended; do the same for the changelog.txt; and finally move the zip, fanart, icon, and changelog to my repo folder.
Reply
#19
Hitcher Wrote:Finally got it set up so I can simply click on a desktop shortcut and it'll build the texture.xbt (and theme.xbt if present); copy all the relevant files and folders; zip up the skin with it's current version number appended; do the same for the changelog.txt; and finally move the zip, fanart, icon, and changelog to my repo folder.

That's what I call a real workflow Smile Minimum clicks and minimum "human" intervention!
Reply
#20
(2012-03-11, 01:47)Hitcher Wrote:
Hitcher Wrote:Thanks for posting this Jezz, I've switched over to this method.

Anyone know if it's possible to extract the revision number from the addon.xml and append it to the skin folder and changelog? And then zip the skin folder?

Thanks.

Finally got it set up so I can simply click on a desktop shortcut and it'll build the texture.xbt (and theme.xbt if present); copy all the relevant files and folders; zip up the skin with it's current version number appended; do the same for the changelog.txt; and finally move the zip, fanart, icon, and changelog to my repo folder.

Would you mind sharing your .bat file ?
Noli illegitimi carborundum


Reply
#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

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.
Reply
#22
Thanks, It's brilliant Big Grin
Noli illegitimi carborundum


Reply
#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
Reply
 
Thread Rating:
  • 0 Vote(s) - 0 Average



Logout Mark Read Team Forum Stats Members Help
Help with workflow for skinning00