Difference between revisions of "WPKG"

From WPKG | Open Source Software Deployment and Distribution
Jump to: navigation, search
 
Line 9: Line 9:
 
         priority="100"
 
         priority="100"
 
         reboot="false">
 
         reboot="false">
 
+
 
         <check type="uninstall" condition="exists" path="WPKG" />
 
         <check type="uninstall" condition="exists" path="WPKG" />
 
+
 
         <install cmd='msiexec /qb /i %SOFTWARE%\WPKG\WPKGSetup.msi SETTINGSFILE=%WPKGROOT%\settings.xml' />
 
         <install cmd='msiexec /qb /i %SOFTWARE%\WPKG\WPKGSetup.msi SETTINGSFILE=%WPKGROOT%\settings.xml' />
 
         <upgrade cmd='msiexec /qb /i %SOFTWARE%\WPKG\WPKGSetup.msi' />
 
         <upgrade cmd='msiexec /qb /i %SOFTWARE%\WPKG\WPKGSetup.msi' />
Line 25: Line 25:
 
         execute="once">
 
         execute="once">
 
         <depends package-id="wpkg"/>
 
         <depends package-id="wpkg"/>
 
+
 
         <install cmd='%PROGRAMFILES%\WPKG\wpkginst.exe --SETTINGSFILE=%WPKGROOT%\settings.xml' />
 
         <install cmd='%PROGRAMFILES%\WPKG\wpkginst.exe --SETTINGSFILE=%WPKGROOT%\settings.xml' />
 
         <upgrade cmd='%PROGRAMFILES%\WPKG\wpkginst.exe --SETTINGSFILE=%WPKGROOT%\settings.xml' />
 
         <upgrade cmd='%PROGRAMFILES%\WPKG\wpkginst.exe --SETTINGSFILE=%WPKGROOT%\settings.xml' />

Revision as of 16:42, 7 December 2006

Computer scientists love recursion, or bootstrap, so this it a temptation to write a WPKG xml file that... install itself.

NOTE that as of current version (0.70) upgrade will not work, but seems that newer versions will support upgrade. I trust on this. ;)

<package
       id="wpkg"
       name="WPKG"
       revision="70"
       priority="100"
       reboot="false">

       <check type="uninstall" condition="exists" path="WPKG" />

       <install cmd='msiexec /qb /i %SOFTWARE%\WPKG\WPKGSetup.msi SETTINGSFILE=%WPKGROOT%\settings.xml' />
       <upgrade cmd='msiexec /qb /i %SOFTWARE%\WPKG\WPKGSetup.msi' />
       <remove cmd='msiexec /qb /x{BD368683-C6EB-480A-B497-56CE35D59D28}' />
</package>

<package
       id="wpkg-settings"
       name="WPKG Settings"
       revision="5"
       priority="5"
       reboot="false"
       execute="once">
       <depends package-id="wpkg"/>

       <install cmd='%PROGRAMFILES%\WPKG\wpkginst.exe --SETTINGSFILE=%WPKGROOT%\settings.xml' />
       <upgrade cmd='%PROGRAMFILES%\WPKG\wpkginst.exe --SETTINGSFILE=%WPKGROOT%\settings.xml' />
       <remove cmd='echo "nothing"' />
</package>

I use this setup fro now to install all the stuff with a single command; i've simply build up a batch file that define the same environment variable defined in settings.xml and start directly wpkg.js, as:

:: Startup script for wpkg, for the first installation
::

:: These are not (still) defined elsewhere, define it.
::
set WPKGROOT=\\FILE\wpkg
set SOFTWARE=\\MEDIA\Software
set VPSERVER=MORPHEUS

:: Call directly wpkg.js, note the %* at the end, that permit to add custom parameters...
::
cscript %WPKGROOT%\wpkg.js /synchronize %*