We need you!

Icon

The IzPack documentation needs work, and you are invited to edit it!

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

...

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:

  • izpack.windowsinstall
    True if the current OS is (any) Windows.
  • izpack.windowsinstall.xp
    True if the current OS is Windows XP.
  • izpack.windowsinstall.2003
    True if the current OS is Windows Server 2003.
  • izpack.windowsinstall.vista
    True if the current OS is Windows Vista.
  • izpack.windowsinstall.7
    True if the current OS is Windows 7.
  • izpack.windowsinstall.8
    True if the current OS is Windows 8.
  • izpack.macinstall
    True if the current OS is Mac OS X.
  • izpack.linuxinstall
    True if the current OS is (any) Linux.
  • izpack.solarisinstall
    True if the current OS is (any) Solaris.
  • izpack.solarisinstall.x86
    True if the current OS is (any) Solaris x86.
  • izpack.solarisinstall.sparc
    True if the current OS is (any) Solaris Sparc.

Further, IzPack automatically sets reserved conditions depending on the packs selected by the user or an unattended installation (auto-install.xml) to be installed:

  • izpack.selected.<packname>

where <packname> is the name attribute of the according pack. If the appropriate pack <pack name="..."> defined in the installation description is selected, the condition validates true. Packs can be selected either in unattended installations by replaying a record of a previous installation (auto-install.xml) or interactively by the user by means of PacksPanel or its derivates, ImgPacksPanel or TreePacksPanel.

Using Conditions

Defining Conditions

...

Conditions are defined in the installation definition as nested <condition> elements of the <conditions/> element.

Foe example: 

<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.

...