Well I currently do this. But we sometimes also use WPKG repos on different shares or simply on an external hard disc either for testing reasons or to get a machine updated much quicker than over the network etc. So now I have to define the variable in the configuration with the full path and always have to change it depending on the location where wpkg is located. but wpkg.js should actually know where it is located and I simply want to replace in your example \\srv1\installs$\wpkg with what directory wpkg.js is located in. This way I can copy wpkg repo to whatever location I want and simply call in on the command line where it is located. No changes needed in the wpkg repository itself. Does that make sense? On 13.05.2014 11:12, Nicolas Briche wrote: > Le 2014-05-13 10:01, Oliver Sauder a écrit : >> I so far could not find a way to reference the wpkg base dir in my >> packages.xml. base dir in terms of where wpkg.js actually is located. >> >> e.g. I would like to do something like this: >> <variable name="SOMEPATH" value="%base_dir%\somedir"/> >> >> Is there a way to do this? > > Yup, in config.xml, <variables> node. > > You can put a whole bunch of interesting things in there, in fact; > here's mine: > > <variables> > > <variable name="PROG_FILES32" value="%PROGRAMFILES%" architecture="x86" /> > <variable name="PROG_FILES32" value="%PROGRAMFILES(x86)%" > architecture="x64" /> > > <variable name="DESKTOP" value="%ALLUSERSPROFILE%\Bureau" os="windows > xp" /> > <variable name="DESKTOP" value="%PUBLIC%\Desktop" > os="windows 7" /> > > <variable name='STARTUP' value='c:\Documents and settings\All Users\Menu > Démarrer\Programmes\Démarrage' os="windows xp" /> > <variable name='STARTUP' value='c:\Documents and settings\All Users\Menu > Démarrer\Programmes\Démarrage' os="server 2003.+5\.2\.\d{4}" /> > <variable name='STARTUP' value='C:\ProgramData\Microsoft\Windows\Start > Menu\Programs\Startup' os="windows 7" /> > > <variable name='SOFTWARE' value='\\srv1\installs$' > ipaddresses='^172\.17\.([0-9]|[1-5][0-9]|6[0-3])\.([0-9]|[1-9][0-9]|1([0-9][0-9])|2([0-4][0-9]|5[0-5]))$' > /> > <variable name='SOFTWARE' value='\\srv2\installs$' > ipaddresses='^172\.17\.(6[4-7])\.([0-9]|[1-9][0-9]|1([0-9][0-9])|2([0-4][0-9]|5[0-5]))$' > /> > <variable name='SOFTWARE' value='\\srv3\installs$' > ipaddresses='^172\.17\.(6[8-9]|[7-8][0-9])\.([0-9]|[1-9][0-9]|1([0-9][0-9])|2([0-4][0-9]|5[0-5]))$' > /> > > <variable name='CHECKPROC' > value='\\srv1\installs$\wpkg\tools\3rd-party\matchprocess\matchprocess.js' > /> > > </variables> > > > N. > |