We need you!


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

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

IzPack offers the possibility to set a list of default installation directories depending on the target installation platform. When the compiled installer is executed IzPack chooses the one matching the assigned platform.

This can be achieved by explicitly setting variables with the prefix: TargetPanel.dir. IzPack recognizes this as built-in variable which can be user-modified.

For example, change the resources to variables:

Default path definition in IzPack 4.x


Default path definition in IzPack 5.x

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

The DEFAULT_INSTALL_PATH variable is initialised to <PARENT_DIRECTORY>/$APP_NAME where <PARENT_DIRECTORY> is determined by:

OSParent Directory
WindowsProgramFiles environment variable
Mac OSX/Applications
Others/usr/local/ if writeable, or System.getProperty("user.home") if not

Differences from 4.3.6

The range of values the variable can have has been significantly enhanced, as per IZPACK-829.

Differences between 4.3.5 and 4.3.6

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", "mac", "unix")
  • "TargetPanel.dir"

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

  • No labels