2008-08-22, 02:32
kricker made a post in a few days ago bout any easy way of including only few scripts from a svn pull down insed of all in the svn trunk.
that got me thinking of the automated inclusions of scripts plugins and skins in general. I had been copying all the optional extras i wanted to temporary directory's then after building an installer I would delete them.
After some investigation i decided to try and do the creation and deletion of these temporary dir's using .bat files, linked to the build buildsetup.bat making it one click solution to build
copy.bat
I then modified this section of the buildsetup.bat adding a call I've highlighted the change for identification only
and the a file I called delete.bat
I then modified the end of the buildsetup.bat make a call to delete the temp folder created by the copy bat again highlighted for identification
then I placed these files in the same folder as the buildsetup.bat and set the new paths in the config.in (the end)
This took me an extreme amount of reading random web pages pluse trial and error. As I knew nothing about CMD, DOS commands or bat files when i started. i don't think its going to work out a time saver for me for some timeto come:p..............but hopefully this can help others that are building from source.
I would like to make a point out that that the delete.bat file could be extremely dangerous if modified incorrectly. Especially if running on a data drive that is why I was using the C:\, as I have no data on it and os files svn pull downs could not be deleted using them commands. Plus the face that i could just copy and past the paths and just add temp to the new ones
1) things I learnt the hard way "quotetion marks" are needed to not only separate paths. But also in any signal file path with spaces eg this needs quotetion marks
mkdir "C:\temp\extras\scripts\trunk\Apple Movie Trailers"
and this doesn't
mkdir C:\temp\extras\skins\MediaStream
So avoid at all costs having folder names with spaces. If it is unavoidable as it in the first example then use quotetion marks or better yet use them around every thing.
2)DOS and cmd commands are not the same
3)not every thing in svn will build for instanced Tetris I've included is from TC3H build I had issue with the these skins as well.
clearty
mc360
vision
xtv
cromer
xbox classic
PDM
fushion
most had no graphics just text maybe they build a debug build by default
this works like a charm for me now I can update all the svn folders and place any new non svn skins in the same folder. The same can be done for pugins and scripts each new build is up to the minute.
The only thing that prevents it being a set up and forget about scenario is that if you update the svn. Then the modifications to the buildsetup.bat will be reverted so you need to back it up some were and then overwrite.
Unless these call's could be added to the buildsetup.bat I know its a bit cheeky in feature freeze but I see its more a function any way.
ps
(sorry this seem to have turned out to be a long and convoluted post, well never mind it'll be right)
that got me thinking of the automated inclusions of scripts plugins and skins in general. I had been copying all the optional extras i wanted to temporary directory's then after building an installer I would delete them.
After some investigation i decided to try and do the creation and deletion of these temporary dir's using .bat files, linked to the build buildsetup.bat making it one click solution to build
copy.bat
Quote:@echo OFF
skins
mkdir C:\temp\extras\skins\Aeon
xcopy /S /Y "C:\extras\skins\Aeon" "C:\temp\extras\skins\Aeon"
mkdir C:\temp\extras\skins\Focus
xcopy /S /Y "C:\extras\skins\Focus" "C:\temp\extras\skins\Focus"
mkdir C:\temp\extras\skins\MARK-III
xcopy /S /Y "C:\extras\skins\MARK-III" "C:\temp\extras\skins\MARK-III"
mkdir C:\temp\extras\skins\Vision2
xcopy /S /Y "C:\extras\skins\Vision2" "C:\temp\extras\skins\Vision2"
mkdir C:\temp\extras\skins\MediaStream
xcopy /S /Y "C:\extras\skins\MediaStream" "C:\temp\extras\skins\MediaStream"
Scripts
mkdir "C:\temp\extras\scripts\trunk\Apple Movie Trailers"
xcopy /S /Y "C:\extras\scripts\trunk\Apple Movie Trailers" "C:\temp\extras\scripts\trunk\Apple Movie Trailers"
mkdir "C:\temp\extras\scripts\trunk\XBMC Lyrics"
xcopy /S /Y "C:\extras\scripts\trunk\XBMC Lyrics" "C:\temp\extras\scripts\trunk\XBMC Lyrics"
mkdir C:\temp\extras\scripts\trunk\Tetris
xcopy /S /Y "C:\extras\scripts\trunk\Tetris" "C:\temp\extras\scripts\trunk\Tetris"
plugins
mkdir C:\temp\extras\plugins\pictures
mkdir C:\temp\extras\plugins\music
mkdir C:\temp\extras\plugins\video
mkdir C:\temp\extras\plugins\programs\Launcher
xcopy /S /Y "C:\extras\plugins\programs\Launcher" "C:\temp\extras\plugins\programs\Launcher"
mkdir "C:\temp\extras\plugins\programs\XBMC-Addons Installer"
xcopy /S /Y "C:\extras\plugins\programs\XBMC-Addons Installer" "C:\temp\extras\plugins\programs\XBMC-Addons Installer"
I then modified this section of the buildsetup.bat adding a call I've highlighted the change for identification only
Quote:IF EXIST error.log del error.log > NUL
call copy.bat
call buildskins.bat %skinpath%
call buildscripts.bat %scriptpath%
call buildplugins.bat %pluginpath%
rem reset variables
SET skinpath=
SET scriptpath=
SET pluginpath=
rem restore color and title, some scripts mess these up
COLOR 1B
TITLE XBMC for Windows Build Script
IF EXIST exclude.txt del exclude.txt > NUL
ECHO ------------------------------------------------------------
ECHO Build Succeeded!
GOTO NSIS_EXE
and the a file I called delete.bat
Quote:@echo off
RD /S /Q C:\temp
I then modified the end of the buildsetup.bat make a call to delete the temp folder created by the copy bat again highlighted for identification
Quote::END
call delete.bat
ECHO Press any key to exit...
pause > NUL
then I placed these files in the same folder as the buildsetup.bat and set the new paths in the config.in (the end)
This took me an extreme amount of reading random web pages pluse trial and error. As I knew nothing about CMD, DOS commands or bat files when i started. i don't think its going to work out a time saver for me for some timeto come:p..............but hopefully this can help others that are building from source.
I would like to make a point out that that the delete.bat file could be extremely dangerous if modified incorrectly. Especially if running on a data drive that is why I was using the C:\, as I have no data on it and os files svn pull downs could not be deleted using them commands. Plus the face that i could just copy and past the paths and just add temp to the new ones
1) things I learnt the hard way "quotetion marks" are needed to not only separate paths. But also in any signal file path with spaces eg this needs quotetion marks
mkdir "C:\temp\extras\scripts\trunk\Apple Movie Trailers"
and this doesn't
mkdir C:\temp\extras\skins\MediaStream
So avoid at all costs having folder names with spaces. If it is unavoidable as it in the first example then use quotetion marks or better yet use them around every thing.
2)DOS and cmd commands are not the same
3)not every thing in svn will build for instanced Tetris I've included is from TC3H build I had issue with the these skins as well.
clearty
mc360
vision
xtv
cromer
xbox classic
PDM
fushion
most had no graphics just text maybe they build a debug build by default
this works like a charm for me now I can update all the svn folders and place any new non svn skins in the same folder. The same can be done for pugins and scripts each new build is up to the minute.
The only thing that prevents it being a set up and forget about scenario is that if you update the svn. Then the modifications to the buildsetup.bat will be reverted so you need to back it up some were and then overwrite.
Unless these call's could be added to the buildsetup.bat I know its a bit cheeky in feature freeze but I see its more a function any way.
ps
(sorry this seem to have turned out to be a long and convoluted post, well never mind it'll be right)