When you define a set of conditions, you just have to write as many <condition> tags as you like.
Basic Condition Types
There is a number of built-in condition types in IzPack which can be used in an installation description, which are evaluated dynamically at a given moment as soon as they are referenced, depending on the installer state, the processed user inputs and the parameters given to them:
- CompareNumerics Condition
Set when a certain comparison operation matches two numeric values.
- CompareVersions Condition
Set when a certain comparison operation matches two version string values.
- Empty Condition
True if a given value, file or directory is empty.
- Exists Condition
True if a given variable, file or directory exists.
- Java Condition
Set based on a static java field or method
- Packselection Condition
Set when a certain pack is selected for installation.
- Ref Condition
Set when a another, referenced condition is set.
- Variable Condition
Set when a certain value matches the value of an IzPack variable.
- User Condition
Set when a certain user is using the installer.
There are several aggregate conditions, which logically combine or alter one ore more conditions:
- And Condition
All nested conditions have to be true.
- Or Condition
At least one nested condition has to be true.
- Xor Condition
Exactly one nested condition has to be true
- Not Condition
The nested condition has to be false (negated state).
There is a number of built-in conditions which are statically pre-set on launching the installation and which can be only referenced by their ID:
True if the current OS is (any) Windows.
True if the current OS is Windows XP.
True if the current OS is Windows Server 2003.
True if the current OS is Windows Vista.
True if the current OS is Windows 7.
True if the current OS is Windows 8.
True if the current OS is Mac OS X.
True if the current OS is (any) Linux.
True if the current OS is (any) Solaris.
True if the current OS is (any) Solaris x86.
True if the current OS is (any) Solaris Sparc.
The following basic types of conditions can be used:
See the links for more details.
Conditions are defined in the installation definition as nested
<condition> elements of the
<condition> - Attributes
The following attributes must be set in a <condition> element definition:
Complex expression language
With IZPACK-577 and IZPACK-581 fixed and released, you can also Beginning with IzPack 5.0, there is also the possibility to use a more Complex complex expression language that which evaluates using the based on boolean precedence rules, which is also reflected in the following table. The higher an operator is, the higher is its precedence.