Versions Compared

Key

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

...

<pack>

Attributes

Attribute

Usage

name

defines the pack name

required

takes yes or no and specifies whether the pack must be installed (yes) or is optional (no)

os

optional. Lets you make the pack targeted to a specific operating system, for instance unix, mac and so on

preselected

optional. Lets you choose whether the pack is selected for installation by default or not. Possible values are yes and no. A pack which is not preselected needs to be explicitly selected by the user during installation to get installed

loose

can be used so that the files are not located in the installer Jar. The possible values are true or false, the default being false. The author of this feature needed to put his application on a CD so that the users could run it directly from this media. However, he also wanted to offer them the possibility to install the software localy. Enabling this feature will make IzPack take the files on disk instead of from the installer. Please make sure that your relative files paths are correct!

id

this attribute is used to give a unique id to the pack to be used for internationalization via packsLang.xml file

packImgId

this attribute is used to reference a unique resource that represents the pack's image for the ImgPacksPanel. The resource should be defined in the <resources> element of the installation XML using the same value for the id attribute of the <res> element.

condition

an id of a condition which has to be fullfilled to install this package

hidden

takes true or false and specifies whether the pack shall be shown in the packs panel. The size of a hidden pack will be used to calculate the required space, but the pack itself won't be shown. A hidden pack can be preselected or selected conditionally. For the latter, you have to specify a condition. The default for this attribute is false.

size

optional. Specifies the size of the pack, in bytes. If not specified, the size will default to the sum of all file lengths in the pack. Since 5.0

installGroupsoptional. A comma separated list of groups, see InstallationGroupPanel for using them.

...

Attribute

Description

Required

Values
(Default)

targetfile

the file to parse, could be something like $INSTALL_PATH/bin/launch-script.sh A slash will be changed to the system dependant path separator (e.g. to a backslash on Windows) only if no backslash masks the slash.

yes

 

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.
    Example of a variable definition in a text file in plain style: ${MY_VAR} or $MY_VAR.
  • javaprop - use for Java properties file.
  • java - use in Java source files.
  • xml - use for XML files.
  • shell - use for shell scripts.
    Example of a variable definition in a shell script%MY_VAR or %{MY_VAR}.
  • at
    Example: @MY_VAR.
  • ant - use in Ant files, where the plain style for IzPack conflicts with the syntax of Ant property substitutions.
    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

 

...

Attribute

Description

Required

Values
(Default)

targetfile

the file to run, could be something like $INSTALL_PATH/bin/launch-script.sh Slashes are handled special (see attribute targetfile of tag <parsable>).

yes

A previously added pack 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

...

This tag can also be specified in order to pass additional data related to a file tag for customizing.

Attribute

Description

<key>key

key to identify the data

<value>value

value which can be used by a custom action

...

Attributes

Attribute

Description

file

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

...

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:

Attribute

Description

dir

Relative base directory during compile-time for the refpackset

includes

Pattern of files in <refpack> format that have to be included

...