Extending IzPack

Overview

Generally, an IzPack installation procedure is separated into several steps:

  • Parameter Collection
    In this phase target system-specific information is collected needed for the installation process. Typically this is done by typing all needed data into one or more panels, if a GUI is used, or automatically by reading the data from a config file. Normally, there is nothing changed on the system unless all needed data is obtained. This phase means actually involving a number of input panels.
  • Actions
    If all needed information is collected the action phase executes. During this step the state of the locale machine will be changed, e.g. files will be copied to the installation destination or some shortcuts will be registered. Each of this subsequent steps are denoted as actions. IzPack comes with a number of common actions, for example "file copying", "parsing" or "executing", which can be directly used from the installation description. For special purposes there come custom action into the game, which handle specific installation issues, as handling database scripts, launching shell and Ant scripts or merging and  updating the application's configuration according to the choices a user made.
  • Reporting
    The reporting phase, is normally represented by a panel that reports the result state of an installation.

An IzPack installer can be customized by a developer in two different manners:

  • Custom Panels
    There can be own panels imported as classes, which provide certain actions, if the action should be manipulated by or simply visible to the user.
  • Custom Action Listeners
    There can be invisible custom actions imported as classes, which provide certain actions based on a description, which a custom action itself usually imports from an IzPack resource. A custom action is called directly from the InstallPanel, which launches the installation itself, either before or after installing one or all packs, or even in rare depending on several single file actions. Custom Actions can be also used during uninstalling.