[wpkg-users] WPKG with multiple systems and architectures

Rainer Meier r.meier at wpkg.org
Wed Feb 11 11:37:00 CET 2009


Hi Daniel,

Daniel Dehennin wrote:
> Rainer Meier <r.meier at wpkg.org> writes:
> 
> [...]
> 
>> For most applications I use a bunch of cmd scripts to install them.
>> First of all my generic installer ("install.cmd"). Then I use a simple
>> "unattended.cmd" batch file which makes use of "install.cmd".
>> For uninstall I am using a script called "unattended-uninstall.cmd".
> 
> [...]
> 
> --8<---------------cut here---------------start------------->8---
>> ##################################
>> #### unattended-uninstall.cmd ####
>> #### script for MSI packages  ####
>> ##################################
>> @echo off
>>
>> set PROGRAM_NAME=Program
>> set CMD32=package.msi
>> set CMD64=%CMD32%
>> set INSTALLER=install.cmd
>> set INSTALLER_LOC=%~dp0
>>
>> echo Removing %PROGRAM_NAME%
>>
>> call "%INSTALLER_LOC%%INSTALLER%" msiuninstall "%CMD32%" "%CMD64%"
>> ###################################
>> #### /unattended-uninstall.cmd ####
>> #### script for MSI packages   ####
>> ###################################
> --8<---------------cut here---------------end--------------->8---
> 
> Hello,
> 
> Ok, I'm able to give them a try now ;-)
> 
> The uninstall.cmd requires to be in a version-specific directory, which
> is ok.
> 
> As a leasy man, is it possible to use the revision as a variable ?
> 
> Something like:
> 
> --8<---------------cut here---------------start------------->8---
> <?xml version="1.0" encoding="utf-8" ?>
> <packages>
> 
> <package id='Pidgin'
>          name='Pidgin IM'
>          revision='2.5.4'
>          priority='50'
>          reboot='false' >
>   <!-- Pidgin Instant Messaging -->
>   <check type='uninstall' condition='exists' path='Pidgin' />
>   <install cmd='"%SOFTWARE%\Pidgin\%revision%\unattended.cmd"' />
>   <remove cmd='"%SOFTWARE%\Pidgin\%revision%\unattended-uninstall.cmd"' />
>   <upgrade cmd='"%SOFTWARE%\Pidgin\%revision%\unattended.cmd"' />
>   <depends package-id='GTK' />
> </package>
> </packages>
> --8<---------------cut here---------------end--------------->8---


Yes, theoretically you should be able to use variables. However it seems
that there are some issues currently with per-package variables.

But the scripts I gave to you do not require to use versions within the
directory structure. You could also just store them at
"%SOFTWARE%\Pidgin" (without any version number. When a new version is
released you just need to update the cmd scripts (and even this is not
required if the installer does not contain changing strings within the
filename) and update the version of the package within the XML file.

br,
Rainer



More information about the wpkg-users mailing list