Versions Compared

Key

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

The <file> element

...

Attribute

Description

key

key to identify the data

value

value which can be used by a custom action

;<additionaldata> is an element which may provide additional information as key-value pairs to certain custom actions. The particular key-value pairs will depend on the particular custom action.

 Currently, there are two built-in custom actions consuming such data, ChmodCompilerListener and ChmodInstallerListener, where relevant keys are

  • permission.dir,
  • permission.file

with integer values interpreted as permissions like in the Unix chmod:

If value begins with "0" -> octal number,

otherwise is is a decimal number representing some permission.

These permissions are applied to the appropriate files either during the compilation of the package or while installing them later, depending on whether the consumer implements a CompilerListener or InstallerListener.

<archivefileset>

In case the unpack attribute is set to "true", one or more nested <archivefileset> element can be added to define include and exclude path patterns similar to the <fileset> element nested to a <pack>. In difference to the latter one, an <archivefileset> does not allow to define a targetdir and its dir attribute is optional (defaults to the root directory of the archive contents). Furthermore the dir attribute of an <archivefileset> does not allow refer to an absolute path, but just to an relational one against the archive root.


Example usage:

Code Block
languagexml
titleExample usage
<pack name="Oracle JRE" required="yes" id="pack.oracle.jre">
    <description>Oracle JRE</description>
    <file src="plain/jre-8u121-windows-x64.tar.gz" targetdir="${INSTALL_PATH}" unpack="true" override="true">
        <archivefileset dir="jre1.8.0_121" />
    </file>
</pack>

This part extracts the contents of the original Oracle JRE archive as received from the download site, but without the root directory jre1.8.0_121 from the archive to an installation folder of your choice, which can be referred to as %JAVA_HOME%.


An <archivefileset> does not allow the targetdir attribute to be defined. The target dir for that filter operation is taken from the targetdir attribute of the embedding <file> tag.

Since: IzPack 5.1