Versions Compared

Key

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

...

This element allows you to define variables to be used in the variables substitution system. Some variables are built-in, such as $INSTALL_PATH (which is the installation path chosen by the user).

To define variables, you place  <variable> elements inside a <variables> or <dynamicvariables> element which are in turn children of the <installation> element.

If you define a variable named VERSION you need to type $VERSION in the files to parse. The variable substitutor will then replace it with the value that you specified in the  <variables> or <dynamicvariables> element with the name VERSION.

Each <variable> tag takes the following attributes :

  • name : the variable name
  • value : the variable value

Note that variable names are case-sensitive.

Here's a sample <variables> section :


 

Code Block
languagehtml/xml
<variables>
  <variable name="app-version" value="1.4"/>
  <variable name="released-on" value="08/03/2002"/>
</variables>

Types of Variables

...

The following variables are built-in and have values set by IzPack  depending on the target system or information supplied by the user during the installation.

  • $INSTALL$APP_PATHNAME: the installation path on the target system, as chosen by the user$INSTALL_DRIVE: the drive letter part of the installation path on the target system, applies to Windows systems only.application name
  • $APP_URL: the application URL
  • $APP_VER: the application version
  • $APPLICATIONS_DEFAULT_ROOT: the default path for applications$JAVA
  • $CANONICAL_HOST_HOME: the JavaTM virtual machine home pathNAME: the fully qualified host name of the local machine including domain.
  • $CLASS_PATH: the Class Path used mainly for Java Applications
  • $USER$FILE_HOMESEPARATOR: the user's home directory path$USERfile separator on the installation system
  • $HOST_NAME: the user name
  • $APP_NAME: the application name
  • $APP_URL: the application URL
  • $APP_VER: the application versionhost name of the local machine without domain.
  • $INSTALL_DRIVE: the drive letter part of the installation path on the target system, applies to Windows systems only.
  • $INSTALLER_MODE: the installer mode used by the user i.e. auto, console or gui (available since 5.2.2)
  • $INSTALL_PATH: the installation path on the target system, as chosen by the user
  • $ISO2_LANG: the ISO2 language code of the selected langpack.
  • $ISO3_LANG: the ISO3 language code of the selected langpack.
  • $IP_ADDRESS: the IP Address of the local machine.
  • $HOST$JAVA_NAMEHOME: the HostName of the local machine.$FILE_SEPARATOR: the file separator on the installation systemJavaTM virtual machine home path
  • $TargetPanel.dir.<platform>
    For setting <platform>, see also: Use Cases.
    the fully qualified target installation directory for the target platform. IzPack choses the most closely matching directory according to the current platform..
  • $USER_HOME: the user's home directory path
  • $USER_NAME: the user name

The following variables are defined but can have values redefined by the installation procedure: 

...

Code Block
languagexml
titleExample 2
<conditions>
  <condition type="variable" id="isFeatureEnabled">
    <name>SYSTEM_feature_Enabled</name>
    <value>true</value>
  </condition>
</conditions>

...