Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
inclusion of skins scripts and pugins
#1
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

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 Laugh

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 Sad

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 defaultHuh

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.batHuh 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)
Reply
#2
I just scanned thru atm, so I might have skipped something, but would it be possible to have your .bat do its thing then call the svn setup batch file so you don't have to worry about it getting updated.
Reply
#3
The buildsetup.bat will be auto reverted to is original state unless the calls I add (the first to copy the second to delete) are included in the buildsetup.bat in the repository.

the only other solutions I have thought of are to back up the modified buildsetup.bat. Then have yet another .bat file deploy it overwriting the new one, after Tortoise SVN exits or can Tortoise SVN set ignore just that fileHuh
Reply
#4
marlboroman1 Wrote:the only other solutions I have thought of are to back up the modified buildsetup.bat. Then have yet another .bat file deploy it overwriting the new one, after Tortoise SVN exits or can Tortoise SVN set ignore just that fileHuh
I was thinking of that as well Smile
Reply
#5
It seems that I have manufactured a problem that didn't exist. I've just updated the svn and it had no effect on the changes I made to the buildsetup.bat. That'll teach me to make assumptions probably best to back up just in case

any how is all good now
Reply

Logout Mark Read Team Forum Stats Members Help
inclusion of skins scripts and pugins0