We need you!

Icon

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

Skip to end of metadata
Go to start of metadata

Dynamic Installer Requirements - <dynamicinstallerrequirements>

Introduced in IzPack 5.0, the <dynamicinstallerrequirements>  element is used to enhance the "classic" installer requirement checking that IzPack does at the beginning of an installation process. This stops the installation unless a certain condition is met.

With the dynamicinstallerrequirements element, you can check a certain set of conditions on each panel change, using a panel data validator to check if the required conditions are met.

Common Example

The installer requirement is actively checked on changing from each panel the DynamicInstallerRequirementValidator is assigned to.

If a condition applies, a messagebox is shown with the appropriate content from translation. Depending on the value of severity attribute the installation might be continued or is aborted:

  • "ERROR"
    The messagebox is shown and the installation aborts.
  • "WARNING"
    The messagebox is shown and the installation can continue after the OK button is pressed.

A more detailed example:

On each panel with a DynamicInstallerRequirementValidator assigned will be evaluated according to the requirements given as nested elements in <dynamicinstallerrequirements>.

<installerrequirement> - Attributes

AttributeDescriptionDefaultRequired
severity
Icon

Please see the note in the code above about severity vs status.

The severity the validator should apply in case of the condition gets true.

Possible values: "WARNING" | "ERROR"

  •  "WARNING"
    Shows a warning message but does not abort.
  • "ERROR"
    Shows a message and aborts the installation.
noneyes
condition
A valid condition ID defined within the <conditions/> element.noneyes
messageid
A valid message ID from the appropriate translation file. If it can't be found the mentioned ID itself is displayed instead of the translated text.noneyes

 

Installer Expiration - <expiresdate>

In addition to <dynamicinstallerrequirements>, the entire installer can easily expire on a specified date.  This is configured with the expiresdate info element.

The value of expiresdate is a date formatted as "YYYY-MM-DD".  If expiresdate is not specified, the installer will not expire.  If expiresdate is specified incorrectly, installation compilation will fail with a relevant message.  If expiresdate is correctly specified and the system date is on or later than the specified date, the installer will expire with a brief message.

  • No labels

3 Comments

  1. How do you specify the "brief message"?

  2. You can't.  It's hardcoded like the other checkers (JavaVersionChecker, JDKChecker, LockFileChecker).

  3. BTW, this feature is introduced by IZPACK-1219. See my comments there.