[izpack-users] variable dependent on os

Dennis Reil Dennis.Reil at reddot.de
Thu Sep 27 08:43:12 CEST 2007


Currently this can only be done in UserInputPanel by using the variable element and custom conditions on OS, e.g.

In your userinputpanel.xml:

<panel ...>
...
   <variable name="MY_VAR" value="Blue" conditionid="unixos" />
   <variable name="MY_VAR" value="Yellow" conditionid="windowsos" />
...
</panel>

And you'll have to implement a condition based on com.izforge.izpack.rules.Condition, assuming a name of com.mycompany.OsCondition, 
your conditions.xml has to look like:

conditions.xml:
<conditions>
  <condition type="com.mycompany.OsCondition" id="unixos">
     <os family="unix" />
  </condition>
  <condition type="com.mycompany.OsCondition" id="windowsos">
     <os family="windows" />
  </condition>
</conditions>

Regards,
   Dennis

-----Ursprüngliche Nachricht-----
Von: izpack-users-bounces at lists.berlios.de [mailto:izpack-users-bounces at lists.berlios.de] Im Auftrag von nbc
Gesendet: Mittwoch, 26. September 2007 17:59
An: izpack-users at lists.berlios.de
Betreff: [izpack-users] variable dependent on os


Hi everyone:

I wanted to define a variable depneding upon a particular os.  Example: If
the os is unix, then I want $MY_VAR = Blue, if the os is windows, I want
$MY_VAR = Yellow.  The variable will then be used in substituion within a
file.

Any help welcomed.

Thanks
-- 
View this message in context: http://www.nabble.com/variable-dependent-on-os-tf4523224.html#a12903923
Sent from the izpack users mailing list archive at Nabble.com.

_______________________________________________
izpack-users mailing list
izpack-users at lists.berlios.de
https://lists.berlios.de/mailman/listinfo/izpack-users


More information about the izpack-users mailing list