Adding or renaming a single file
The <singlefile>
Element
The <singlefile>
tag is a nested element to the <pack> element and allows a single file to be added to that pack.
The difference to <file>
is that this tag allows the file to be renamed, therefore it has a target attribute instead of targetdir
.
Attributes
Attribute | Description | Required | Values |
---|---|---|---|
| the file location (relative path). It may contain previously defined static variables (see | yes | |
| the destination file name, could be something like | yes | |
| can optionally specify a target operating system (unix, windows, mac) - this means that the file will only be installed on its target operating system | no | "unix" | "windows" | "mac" |
| Whether to overwrite existing files. | no | "true" | "false" | "asktrue" | "askfalse" | "update" |
overrideRenameTo | Globmapper to rename a conflicting file to. This works similar like the <globmapper> in File Name Mappers, whereby the mapper's from attribute is set to | no | String - valid globmapper target expression |
blockable | For Windows only, ignored on non-Windows systems: Pending file operations are introduced during the installation in two phases:
Note:
| no |
|
| an id of a condition which has to be fullfilled to install this file |
Nested Elements
The following nested elements can be used in the <singlefile> tag:
<os>
Limit the installation of this file to conditions depending on the target OS, see OS Restrictions.
<additionaldata>
This tag can also be specified in order to pass additional data related to a file tag for customizing.
Attribute | Description |
---|---|
| key to identify the data |
| 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 you might use 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.
<pack200>
The <pack200> element adds Java bytecode compression to this file.
Make sure to apply it only to a JAR file or similar file containing Java bytecode.
See Compressing pack files for more information how to cutomize this feature.
Since: IzPack 5.1