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.

Dynamic Installer Requirements - <dynamicinstallerrequirements>

This feature was introduced in IzPack 5.0.

The main goal was to enhance the "classic" installer requirement of IzPack, which has been checked at the early beginning of an installation process to stop it, unless a certain condition is met. With this enhancement, you will be able to check a certain set of installer requirements on each panel change, using a panel data validator for dynamic installer requirements.

Example:

Code Block
<condition type="variable" id="isNew">
  <name>previous.version</name>
  <value>XX.XX.XX</value>
</condition>
<condition type="not" id="isUpgrade">
  <condition type="ref" refid="isNew"/>
</condition>
...
<dynamicinstallerrequirements>
  <installerrequirement condition="isUpgrade" severity="warning" messageid="not.an.upgrade.warning.message"/>
</dynamicinstallerrequirements>
...
<panels>
  <panel classname="HelloPanel"/>
  <panel classname="TargetPanel">
    <validator classname="DynamicInstallerRequirementValidator"/>
  </panel>
  <panel classname="PacksPanel"/>
  <panel classname="InstallPanel"/>
  <panel classname="FinishPanel"/>
</panels>

Each panel the DynamicInstallerRequirementValidator is assigned to will be evaluated according to the requirements given as nested elements in <dynamicinstallerrequirements>.

installerrequirement attributes:

  • condition - the ID of an externally defined condition to evaluate for the particular requirement
  • severity - "warning" (shows a warning message but does not abort) | "error" (shows a message and aborts the installation)
  • messageid - the message ID from a translated resource for the local language