Versions Compared

Key

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

...

<singlefile> - Adding/renaming a Single Pack File

See Pack SingleFile Adding or renaming a single file for more details.

<file> - Adding a Set Of Files

See Pack File Adding or unpacking a single file to a target directory for more details.

<fileset> - Adding a Set Of Files With Filtering

See Pack Fileset for more details.

<description> - Adding a Description

...

$INSTALL_PATH is treated as the base path for include/exclude patterns with relative paths.

...

<parsable> - Mark Text Files For Parsing / Substituting Variables

Pack files marked <parsable> are parsed after copying them to the target system and substitute IzPack variables. Those variables can be defined in a syntax according to their file format, the default for plain files is ${<variable_name>} or $variable_name.

Files must be first added to the pack using <singlefile>, <file> or <fileset> before they can be marked parsable.

Attributes

Attribute

Description

Required

Values
(Default)

targetfile

Relative or absolute target path of a pack file added before, where variables should be resolved in place.

May contain IzPack variables resolved during installation.

Example: $INSTALL_PATH/conf/app.properties

(required, if no nested fileset is used) 

File path

type

Specifies the text file type:

  • plain - use for plain text files, where the variable definition syntax cannot conflict with the original file's syntax.
    Prefix: $ or ${, Suffix: } (or empty)
    Example of a variable definition in a text file in plain style: ${MY_VAR} or $MY_VAR.
  • javaprop - use for Java properties file, to choose the right default encoding "ISO-8859-1" and to replace escapes in the right manner.
  • java - use in Java source files, to replace escapes in the right manner.
  • xml - use for XML files, to choose the right default encoding "UTF-8".
  • shell - use for shell scripts.
    Prefix: % or %{, Suffix:} (or empty)
    Example of a variable definition in a shell script%MY_VAR or %{MY_VAR}.
  • at
    Prefix: @
    Example: @MY_VAR.
  • ant - use in Ant files, where the plain style for IzPack conflicts with the syntax of Ant property substitutions.
    Prefix: @, Suffix: @
    Example: @MY_VAR@

no

"plain" | "javaprop" (Properties) | "xml" | "java" | "shell" | "at" | "ant" (Ant buildfile)
("plain")

encoding

The file encoding

no

A valid Java encoding string
("ISO-8859-1" for type="javaprop",
"UTF-8" for type="xml", otherwise the Java default charset is assumed as encoding)

os

Limits this action on a particular OS, works like for <file>

no

 

condition

Limits this action on a particular condition with the specified ID which has to be fulfilled

no

 

Nested Elements
  • <os> - restrict parsing depending on the target operating system, see the OS Restriction element
  • One or more <fileset> tags can be used to mark multiple files parsable at once. The <fileset> which can be used here has not the full number of attributes and nested tags like a Pack FileSet.
    <parsable> marks files parsable, which have been added using the <singlefile><file> or <fileset> tags before nested against the <pack> definition. There is no access to the filesystem for a <parsable> fileset, but just to files that are packed into the installer before.
    There can be filesets defined here without any attribute, but just one or more includes (targetDir defaults to "${INSTALL_PATH}" in that case.
    See the example below. 

See Marking files for variable replacement for more details.

<executable> - mark file as executable and optionally execute it

The <executable> tag is a very useful thing if you need to execute something during the installation process. It can also be used to set the executable flag on Unix-like systems.

Files must be first added to the pack using <singlefile><file> or <fileset> before they can be marked executable.

Attributes

Attribute

Description

Required

Values
(Default)

targetfile

Relative or absolute target path of a pack file added before, which should reeceive executable permissions or which should be executed.

May contain IzPack variables resolved during installation.

Example: $INSTALL_PATH/bin/launch-script.sh

no
(required, if no nested fileset is used) 

File path

type

bin or jar (the default is bin)

no

"bin" | "jar"
("bin")

class

If the executable is a jar file, this is the class to run for a Java program

no

A valid Java class within the jar file

stage

Specifies at which stage when to launch the executable:

  • never
    will never launch it (useful to set the +x flag on Unix)
  • postinstall
    just after the installation is done
  • uninstall
    when the application is uninstalled. The executable is executed before any files are deleted.

no

"never" | "postinstall" | "uninstall"
("never")

failure

specifies what to do when an error occurs:

  • ask (default) will ask the user what to do
  • abort will abort the installation process
  • warn will just tell the user that something is wrong
  • ignore don't tell the user, just continue

no

"ask" | "abort" | "warn" | "ignore"
("ask")

os

specifies the operating system, works like for <file>

no

 

keep

Whether the file will be kept after execution

no

"true" | "false"
("false")

condition

ID of a condition which has to be fulfilled to execute this file

no

A valid condition ID

Nested Elements

...

See Marking files for execution  for more details.

<refpack>

The <refpack> takes only one attribute file, which contains the relative path (from the installation compiler) to an externally defined packs-definition. This external packs definition is a regular IzPack installation XML. However the only elements that are used from that XML file are the <packs> and the <resources> elements.

This enables a model in which a single developer is responsible for maintaining the packs and resources (e.g. separate packsLang.xml_xyz files providing internationalization; see Internationalization of the PacksPanel) related to the development-package assigned to him. The main install XML references these xml-files to avoid synchronization efforts between the central installation XML and the developer-maintained installer XMLs.

Attributes

Attribute

Description

file

Relative path during compile-time to an externally defined packs-definition

<refpackset>

The <refpackset> tag can be used in situations were there is no predefined set of <refpack> files, but a given directory should be scanned for <refpack> files to be included instead. This element takes the following parameters:

...