Versions Compared

Key

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

...

Attribute

Description

Required

Values
(Default)

targetfilethe file to parse, could be something like

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/binconf/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
(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.
    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)

targetfilethe file to run, could be something like

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 Slashes are handled special (see attribute targetfile of tag <parsable>).

yes

A previously added pack file

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

...

Code Block
xml
xml
<langpack>
    <str id="myApplication" txt="Main Application"/>
    <str id="myApplication.description" txt="A description of my main application"/>
</langpack>

Example

Code Block
languagexml
<pack name="Core files" required="yes" id="pack.core" condition="Install">
  <description>Core files</description>
  <fileset dir="@{staging.dir}" override="true">
    <exclude name="*.zip" />
    <exclude name="conf/*.properties" />
    <exclude name="conf/*.xml" />
  </fileset>
  <fileset dir="@{staging.dir}/config_files" targetdir="${INSTALL_PATH}/conf" override="true" overrideRenameTo="*.configbak">
    <include name="*.properties" />
    <include name="*.xml" />
    <exclude name="special.xml" />
  </fileset>
  <parsable encoding="UTF-8">
    <fileset targetdir="${INSTALL_PATH}/conf">
      <include name="wrapper.conf" />
    </fileset>
  </parsable>
  <parsable>
    <fileset>
      <include name="**/*.bat" />
      <include name="**/*.cmd" />
    </fileset>
  </parsable>
  <parsable type="shell">
    <fileset>
      <include name="**/*.sh" />
    </fileset>
  </parsable>
  <executable>
    <fileset>
      <include name="**/*.sh" />
    </fileset>
  </executable>
</pack>

 

The dir attribute should no longer been parsed in <fileset> nested to <executable>, <parsable> at all.