Versions Compared

Key

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

...

IzPack Maven Plugin

Release 5.0 of IzPack introduces a new implementation of the izpack-maven-plugin currently found at http://izpack.codehaus.org/izpack-maven-plugin/. In contrast to the documentation there, an explicit dependency to the izpack-standalone-compiler is no longer needed.

Please note that also the configuration parameters and their default values have drastically changed, so in case you want to port your current maven build script you should consult the mojo class from the source tree for the current paramaters until a new Maven Plugin site has been published.

IzPack XML-Schemas

Info

Since 5.0.0-beta11

Release 5.0 of IzPack provides an XML-Schema for each of the IzPack xml configuration files.

Specification of the schemas is required starting from 5.0.7; using them may require existing configuration files to be re-ordered.

The schemas are located in the izpack-dist/src/main/resources/schema/5.0/ directory.

On completion these will be published to the izpack.org website, under http://izpack.org/schema/5.0/.

To add schema validation, use the following declarations:

Installation:

<izpack:installation version="5.0"
                     xmlns:izpack="http://izpack.org/schema/installation"
                     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                     xsi:schemaLocation="http://izpack.org/schema/installation http://izpack.org/schema/5.0/izpack-installation-5.0.xsd">

Conditions:

<izpack:conditions version="5.0"
                   xmlns:izpack="http://izpack.org/schema/conditions"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xsi:schemaLocation="http://izpack.org/schema/conditions http://izpack.org/schema/5.0/izpack-conditions-5.0.xsd">

Langpack:

<izpack:langpack version="5.0"
                 xmlns:izpack="http://izpack.org/schema/langpack"
                 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                 xsi:schemaLocation="http://izpack.org/schema/langpack http://izpack.org/schema/5.0/izpack-langpack-5.0.xsd">

Registry:

<izpack:registry version="5.0"
                 xmlns:izpack="http://izpack.org/schema/registry"
                 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                 xsi:schemaLocation="http://izpack.org/schema/registry http://izpack.org/schema/5.0/izpack-registry-5.0.xsd">

Shortcuts:

<izpack:shortcuts version="5.0"
                  xmlns:izpack="http://izpack.org/schema/shortcuts"
                  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                  xsi:schemaLocation="http://izpack.org/schema/shortcuts http://izpack.org/schema/5.0/izpack-shortcuts-5.0.xsd">

Ant Actions:

<izpack:antactions version="5.0"
                   xmlns:izpack="http://izpack.org/schema/antactions"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xsi:schemaLocation="http://izpack.org/schema/antactions http://izpack.org/schema/5.0/izpack-antactions-5.0.xsd">

BSF Actions:

<izpack:bsfactions version="5.0"
                   xmlns:izpack="http://izpack.org/schema/bsfactions"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xsi:schemaLocation="http://izpack.org/schema/bsfactions http://izpack.org/schema/5.0/izpack-bsfactions-5.0.xsd">

Icons:

<izpack:icons version="5.0"
              xmlns:izpack="http://izpack.org/schema/icons"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:schemaLocation="http://izpack.org/schema/icons http://izpack.org/schema/5.0/izpack-icons-5.0.xsd">

Configuration Actions:

<izpack:configurationactions version="5.0"
                             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                             xmlns:izpack="http://izpack.org/schema/configurationactions"
                             xsi:schemaLocation="http://izpack.org/schema/configurationactions http://izpack.org/schema/5.0/izpack-configurationactions-5.0.xsd">

User Input

<izpack:userinput version="5.0"
                  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                  xmlns:izpack="http://izpack.org/schema/userinput"
                  xsi:schemaLocation="http://izpack.org/schema/userinput http://izpack.org/schema/5.0/izpack-userinput-5.0.xsd">

Processing

<izpack:processing version="5.0" 
                   xmlns:izpack="http://izpack.org/schema/processing"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xsi:schemaLocation="http://izpack.org/schema/processing http://izpack.org/schema/5.0/izpack-processing-5.0.xsd">

Compilation

<izpack:compilation version="5.0" 
                   xmlns:izpack="http://izpack.org/schema/compilation"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xsi:schemaLocation="http://izpack.org/schema/compilation http://izpack.org/schema/5.0/izpack-compilation-5.0.xsd">

Upgrading Installation Descriptors (install.xml)

IzPack installation files try to preserve backwards compatibility as much as possible yet version 5.0 introduced some incompatible changes - mostly for consistency:

Native elements 

...

The <native> elements must now be contained in

...

<natives> wrapping element under 5.0. See the section on Native Libraries.

Warning
titleAvoid using the <natives> element with 4.3

The IzPack installer will silently ignore the <native> tags contained inside a <natives> element but does not throw an error when you use your 5.0 installer file with version 4.3.x.

Panel action param elements

...

Info

Since 5.0.0-beta11

...

The

...

optional <param>

...

 element in a

...

panel <action>

...

 element now

...

uses name

...

 and value attributes instead of key and value

...

 child elements. The following examples illustrate the change between the two versions.

Code Block
languagehtml/xml
titleUsing RegistryWriterAction under IzPack 4.3.x
<panel classname="TargetPanel" id="target.win">
  <os family="windows" />
  <actions>
    <action stage="preactivate" classname="com.opentext.installer.actions.RegistryReaderAction">
      <param>
        <key>ConfigurationFile</key>
        <value>RegistryReaderConfiguration.xml</value>
      </param>
    </action>
  </actions>
</panel>


Code Block
languagehtml/xml
titleUsing RegistryWriterAction under IzPack 5.0
<panel classname="TargetPanel" id="target.win">
  <os family="windows" />
  <actions>
    <action stage="preactivate" classname="com.opentext.installer.actions.RegistryReaderAction">
      <param name="ConfigurationFile" value="RegistryReaderConfiguration.xml"/>
    </action>
  </actions>
</panel>

See the section on Panel Actions.

Panel configuration param elements

...

Info

Since 5.0.0-beta11

...


The optional 
<configuration>

...

 section in

...

<panel>

...

 element permits

...

nested <param>

...

 elements. Previously, the <param>

...

 element was specified using child elements <key>

...

 and <value>. This has now been changed to name

...

 and value

...

 attributes -

...

see Panel action param elements, above, and the Panels

...

 section.

LateShortcutInstallListener 

...

Info

Since 5.0.0-beta11

...

Change To packselection ConditionDue to refactoring and improvement to the internal workings of IzPack, LateShortcutInstallListener

...

 is no longer available. Instead, use the

...

new <lateShortcutInstall/>

...

 option in shortcutSpec.xml.

...

...

 for details. 

Info

Since 5.0.0-beta11

In 4.3.x, the packselection condition erroneously required that a packid element be provided indicating the pack id.

E.g.:

   <condition type="packselection" id="packselection1">
        <packid>myPackId</pack>
   </condition>

The packid actually refers to the localisation identifier of the pack, which is optional, and non-unique. It should refer to the pack name attribute.

To better reflect this, and to force those upgrading to use the correct attribute,the <packid> element has been changed to <name> E.g.

   <condition type="packselection" id="packselection1">
        <name>Core</name>
   </condition>

See IZPACK-799 for more details.

CompilePanel.Spec.xml

Info

Since 5.0.0-beta11

The misspelt packdepency element has been renamed to packdependency.

Default installation directories in TargetPanel.dir.*

IZPACK-798 changed TargetPanel.dir.* etc to be variables, rather than resources.

In 4.3.5, the default directory displayed in TargetPanel may be configured in a text file named:

  • TargetPanel.dir.<os name>
  • TargetPanel.dir

In the <os name> form, the os name

...

has been one of:

  • System.getProperty("os.name").replace(' ', '_')
  • "windows"
  • "mac"
  • "unix"

For 4.3.6, IZPACK-798 changed the above to use variables instead of text files, following the same naming convention.
For 5.0

...

  • Platform.getSymbolicName(), if the current platform has one, E.g. TargetPanel.dir.windows_7
  • Platform.getName() E.g., TargetPanel.dir.windows
  • The parent platform, if there is no directory specified for getSymbolicName() or getName(). E.g. if current platform is FEDORA_LINUX and there is no TargetPanel.dir.fedora_linux, fall back to TargetPanel.dir.linux. Failing that, fall back to TargetPanel.dir.unix

If no variable is specified for the current platform, it would use TargetPanel.dir.

...

,  the Platform class is used to determine the appropriate variable (see IZPACK-829).

...

For a more details, see Setting Default Installation Directories.

UserInputPanel

The panel.id attribute is necessary to have here, for example:

Code Block
languagehtml/xml
title

...

install.xml
<panels>
    ...
  <panel classname="UserInputPanel" id="

...

container.installation.

...

selection.panel"/>
  <panel classname="UserInputPanel" id="new.container.path.selection.panel" condition="new.container"/>
  <panel classname="UserInputPanel" id="existing.container.path.selection.panel" condition="existing.container"/>
    ...
</panels>

The userInputSpec.xml must also contain the panel.id attribute and referred panel IDs from the installation descriptors must exist in the user input panel definitions.

Example:

Code Block
languagehtml/xml
title

...

<variable name="TargetPanel.dir.windows" value="C:/MyApp"/>
<variable name="TargetPanel.dir.unix" value="/usr/local/myapp"/> 

This uses the following variable search order to determine the default directory to display:

  1. TargetPanel.dir.<platform symbolic name> e.g. TargetPanel.dir.windows_7
  2. TargetPanel.dir.<platform name> e.g. TargetPanel.dir.windows
  3. TargetPanel.dir.<parent platform> e.g. given platform "FEDORA_LINUX" looks for TargetPanel.dir.linux, followed by TargetPanel.dir.unix
  4. TargetPanel.dir
  5. DEFAULT_INSTALL_PATH
  6. SYSTEM_user_dir corresponds to the system property "user.dir"

Available platforms can be found in the class Platforms. The names are the lowercase versions of those defined.
Allowed names include:

  • aix
  • debian_linux
  • fedora_linux
  • freebsd
  • hp_ux
  • linux
  • mac
  • mac_osx
  • mandrake_linux
  • mandriva_linux
  • os_2
  • red_hat_linux
  • sunos
  • sunos_x86
  • sunos_sparc
  • suse_linux
  • unix
  • ubuntu_linux
  • windows
  • windows_7
  • windows_xp
  • windows_2003
  • windows_vista

Differences from 4.3.5

In 4.3.5, resources were used rather than variables. Resources were searched for with the following names

  • "TargetPanel.dir." + lower case version of System.getProperty("os.name"), with any spaces replace with underscores
  • "TargetPanel.dir." + <platform> where platform is one of ("windows", "macosx", "unix")
  • "TargetPanel.dir"

Upgrading customizations

Prepare to detect some internal refactorings when providing customizations: e.g. the class com.izforge.izpack.util.AbstractUIProcessHandler can now be found under com.izforge.izpack.api.handler.AbstractUIProcessHandler

Note

As of 5.0.0-beta11 (not yet released), this class has moved again to com.izforge.izpack.panels.process.AbstractUIProcessHandler.

Using the IzPack Maven Plugin

Release 5.0 of IzPack introduces a new implementation of the izpack-maven-plugin currently found at http://izpack.codehaus.org/izpack-maven-plugin/. In contrast to the documentation there, an explicit dependency to the izpack-standalone-compiler is no longer needed.

...

userInputSpec.xml
<userinput>
  <panel id="container.installation.selection.panel">
    ...
  </panel>

  <panel id="new.container.path.selection.panel">
    ...
  </panel>

  <panel id="existing.container.path.selection.panel">
    ...
  </panel>
  ...
</userinput>

The panel.order attribute has been removed from the userInputSpec.xml, since it has been ambigous, see IZPACK-885.

The field validator packages have changed, so obsolete validation classes no longer work. This manifests as validation always failing.

Example: com.izforge.izpack.util.NotEmptyValidator should become com.izforge.izpack.panels.userinput.validator.PortValidator.

Overriding Common Panel Translations

The following changes affect the usage of headline translations in all types of panels:

  • Custom translations have to in a resource  CustomLangPack.xml_<ISO3> (renamed from  CustomLangpack.xml_<ISO3>)
  • There are two possibilities of translation keys which can be used in the following lookup priority:
    1. If a panel ID is defined: <panelId>.<subKey>
    2. <Fully_qualified_panel_classname>.<subkey>
  • The  order attribute of <panel> is no longer read (ignored) and can't therefore used as part of the translation key any longer.

Example 1:

Code Block
languagehtml/xml
titleinstall.xml
<resources>
  <res id="CustomLangPack.xml_eng" src="i18n/CustomLangPack.xml_eng"/>
</resources>
 
<panels>
  <panel classname="TargetPanel"/>
</panels>


Code Block
languagehtml/xml
titleCustomLangPack.xml_eng
<langpack>
  <str id="com.izforge.izpack.panels.target.TargetPanel.headline" txt="Please select the installation directory"/>
</langpack>

Example 2:

Code Block
languagehtml/xml
titleinstall.xml
<resources>
  <res id="CustomLangPack.xml_eng" src="i18n/CustomLangPack.xml_eng"/>
</resources>
 
<panels>
  <panel classname="TargetPanel" id="target.panel"/>
</panels>


Code Block
languagehtml/xml
titleCustomLangPack.xml_eng
<langpack>
  <str id="target.panel.headline" txt="Please select the installation directory"/>
</langpack>