This element allows you to define conditions which can be used to dynamically change the installer, e.g. the panels shown, the variables set, files parsed, files executed and much more. When you define a condition it will get a type and an id. The id has to be unique. Conditions can be referenced based on this id (e.g. with the RefCondition).
When you define a set of conditions, you just have to write as many <condition> tags as you like.
Basic Condition Types
The following basic types of conditions can be used:
The following attributes must be set in a <condition> element definition:
The type of the condition. For built-in types, this is the lowercase portion of the condition class name without condition appended (variable,packselection,java, ...). Custom condition types should be referenced by the full qualified class name, e.g. de.dr.rules.MyCoolCondition.
The id of the condition. This will be used to refer to this conditions in other elements
<condition> - Nested Elements
The condition element can have several child elements depending on the condition type. For instance, the VariableCondition has a name and value child element to specify, which variable should have a certain value to fullfil this condition.
Here is an example which defines four conditions, two VariableConditions, a JavaCondition and a AndCondition which will refer to two of the first conditions:
Beginning with IzPack 5.0, there is also the possibility to use a more complex expression language which evaluates based on boolean precedence rules, which is also reflected in the following table. The higher an operator is, the higher is its precedence.
an operator for the Xor Conditon
an operator for the And Condition
an operator for the Or Condition
an operator for the Not Condition
(!conditionA) && conditionB && (!conditionC)
In order to use the complex expression language the expression must start with a '@' character.