<executable>
- mark file as executable and optionally execute it
...
The permission changes (Unix) and/or execution happens before afterpack listeners are executed.
Attributes
Attribute | Description | Required | Values |
---|---|---|---|
| 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: | no | File path |
|
| no | "bin" | "jar" |
| 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 |
| Specifies at which stage when to launch the executable:
| no | "never" | "postinstall" | "uninstall" |
| specifies what to do when an error occurs:
| no | "ask" | "abort" | "warn" | "ignore" |
| Whether the file will be kept after execution | no | "true" | "false" |
| Limits this action on a particular OS family, works like for | no | No recommended to use any longer, use the nested |
| ID of a condition which has to be fulfilled to execute this file | no | A valid condition ID |
Nested Elements
- <os> - restrict parsing depending on the target operating system, see the OS Restriction element
- <args>
Pass one or more arguments with nested <arg> tags (one<arg>
tag per argument) to the executable
Attributes: value - the argument value
Example:
<args><arg value="-version"/></args>
Slashes get special handling (see attribute targetfile of tag<parsable>
.
Code Block | ||||
---|---|---|---|---|
| ||||
<pack name="core" required="yes"> ... <file targetdir="$INSTALL_PATH" src="projectNotification.bat" /> <executable targetfile="$INSTALL_PATH/projectNotification.bat" type="bin" stage="postinstall" failure ="warn" keep="true" > <os family="windows" /> <args> <arg value="-version"/> </args> </executable> ... </pack> |
Slashes get special handling (see attribute targetfile
of tag <parsable>
.)
If you need to preserve a slash in front of an argument you will need to quote the slash.
Code Block |
---|
<os family="windows" />
<args>
<arg value="\/arg"/>
</args> |
Executing Multiple Files
One or more <fileset>
tags can be used to specify multiple files executable at once. The <fileset>
which can be used here does not have all of the attributes and nested tags of a Pack FileSet. Only the attributes targetdir
, includes
and excludes
and the children <include>
and <exclude>
are allowed. The children <include>
and <exclude>
only can have the attribute name
.
...