[izpack-users] Accessing variables at install time

Bartz, Klaus Klaus.Bartz at coi.de
Wed Aug 9 09:00:31 CEST 2006


Hi Paul,
attached my InstallerListener for writing all IzPack variables with the
prefix "EJBProperties." into the file $INSTALL_PATH/project/system/ejbsystem.properties.
One reason to put it not in the contribution of IzPack is, that a common version of
this "peanuts" needs the 5th time or more.
You see, much of the configuration of this custom action is hard coded. May be a 
configuration file driven custom action will be nicer, but for my requirements the relation
between implementation time, benefit and maintenance is very good.
In the method "setFixedEJBProperties" I set defaults and properties which value I can
resolve from already setted IzPack variables.
 
Hope it helps
 
Klaus

-----Original Message-----
From: izpack-users-bounces at lists.berlios.de [mailto:izpack-users-bounces at lists.berlios.de]On Behalf Of Paul Stuart
Sent: Tuesday, August 08, 2006 8:37 PM
To: izpack-users at lists.berlios.de
Subject: Re: [izpack-users] Accessing variables at install time


Hi Klaus,

Thanks for the feedback. Yes, sample source would be valuable :-)

I'm prepared to do custom code for this, I just wanted to avoid reinventing the wheel. I would think that this would be built in--after all, one has just gathered up all a user's input for an installation but there is no standard mechanism to apply that data. 

I'm impressed by the product and hope to be able to contribute to it as well.

Cheers,
Paul


On 8/8/06, Bartz, Klaus <  <mailto:Klaus.Bartz at coi.de> Klaus.Bartz at coi.de> wrote: 

Hi Paul,
more than one way goes to Rom...
I use the AntActionInstallerListener of IzPack for revise our ear file. 
It contains place holder in some config files. For it I have written a
little ant task which unpacks the ear, uses the replace task and packs
it again. The placeholder are in a properties file.
This file I create in an other custom action on the fly. There is no 
template, else the defaults are written in the source of the custom action.
All IzPack variables for this have a prefix. All variables with such an
prefix will be write into the properties file. Therefore only the 
variable have to be declared to add a new one.
If needed, I can give you the source.
I do not use the UserInputPanel else I write my own panels (in the moment
I change the layout behavior for this). I create simple the variables 
in the isValidated() method like
idata.setVariable("EJBProperties.EJB_Host", hostName.getText());

Cheers

Klaus

>-----Original Message-----
>From: izpack-users-bounces at lists.berlios.de
>[mailto: izpack-users-bounces at lists.berlios.de]On Behalf Of Paul Stuart
>Sent: Monday, August 07, 2006 5:40 PM 
>To: izpack-users at lists.berlios.de
>Subject: [izpack-users] Accessing variables at install time
>
>
>Hi,
>
>Our software currently is installed using a script wrapper around an 
>ant installer. The user has to edit a properties file and then run the
>script.
>
>I would like to use IzPack to gather user input and generate the
>properties file and then run the script. 
>
>I've created a "Hello World" installer with multiple UserInputPanel
>panels but haven't been able to figure out how to acces all those user
>input variables at install time (to generate a new properties file). I 
>see
>
>I also couldn't see a clean way of importing the initial properties
>file into the installer--the only way it looks like would be for me to
>do a transform of the file to a <variables> list and insert that into 
>install.xml.
>
>Any insight would be appreciated!
>
>-Paul
>_______________________________________________
>izpack-users mailing list
>  <mailto:izpack-users at lists.berlios.de> izpack-users at lists.berlios.de
> http://bat.berlios.de/mailman/listinfo/izpack-users
>
_______________________________________________
izpack-users mailing list
izpack-users at lists.berlios.de
http://bat.berlios.de/mailman/listinfo/izpack-users  <http://bat.berlios.de/mailman/listinfo/izpack-users> 



-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.berlios.de/pipermail/izpack-users/attachments/20060809/f1b784bd/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: EJBPropertiesInstallerListener.java
Type: application/octet-stream
Size: 5652 bytes
Desc: EJBPropertiesInstallerListener.java
Url : https://lists.berlios.de/pipermail/izpack-users/attachments/20060809/f1b784bd/attachment.obj 


More information about the izpack-users mailing list