2012-03-10, 00:50
Jezz_X Wrote:heh I went a little more generic and advanced I guess than that hitcher my folder layout looks like this
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:
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
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.