Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: operation is "remove" instead of "delete" - at least the xsd and the source-code does work this way

Configuration Install Actions - ConfigurationInstallerListener

...

  • option and property files
  • INI files
  • XML files
  • Windows registry entries.

ConfigurationListener is useful for software updates and merges option (properties), INI and XML files from a previous installation to those files with the same path coming with a new version of your software. It does a three-way merge - patching an original file against a new file resulting in a target file. For using in-place patches you must ensure the previously installed files are automatically renamed when installing the new files coming with an update installer, before ConfigurationListener starts. This can be achieved by using the overrideRenameTo attribute for installed files or file sets, see Packs.

Configuration actions are defined in an IzPack resource ConfigurationActionsSpec.xml, which has to be necessarily defined when the ConfigurationInstallerListener is used. 

Configuration actions can be only used during installation, not for reverting configurations when uninstalling.

...

Attribute

Description

Required

Allowed Values
(Default)

section

The entry INI section to lookup a key within.

no
(required if configurable attribute type = "ini"

 

key

The entry key to deal with.
In case the key ends with a dot ('.'), the key is automatically assumed as a autonumbered value. Example key = "key." would match all keys "key.0", "key.1", ...). The operation below applies on each of those keys unless a limitation by lookup by value isn't done (attribute lookupType).

yes

 

value

configurable/type="option": The entry value to set or to lookup for.
configurable/type="ini": The entry value to set.
configurable/type="registry" - The registry value (not data, but for looking up the right data, in terms of Microsoft)

no
(required if attribute lookupType is set)

 

dataconfigurable/type="registry": The registry data.
This attribute is allowed just for registry entries.
no
(required if configurable/type is "registry" and a value should be set)
 

lookupType

The lookup type used if the entry should be looked up by value. Setting this attributes automatically activates lookup by value in the original file (the file to patch to). The "value" attribute must be set with the plain or regular expression to lookup by value.
"plain" means looking up the plain value according to value, "regexp" means treating value as a Java regular expression.

This applies currently just for values of configurable/type="options".

no

"plain" | "regexp"
("plain")

operation

The operation to apply on the entry value: "+" or "=" (default) for all datatypes; "-" for date and int only), "keep" to keep the single value from the patch file for the according key, or "deleteremove" for deleting the matching key-value pair completely.

no

"+" | "=" | "-" | "keep" | "deleteremove"
("=")

dataType

The data type the entry value should be treated as for certain operations.

no

"int" | "date" | "string"
("string")

unit

The unit of the value to be applied to "date" +/- operations.

no

"millisecond" | "second" | "minute" | "hour" | "day" | "week" | "month" | "year"
("day")

default

Initial value to set for a property if it is not already defined in the property file. For type "date", an additional keyword is allowed: "now"

no

 

pattern

For "int" and "date" type only. If present, the value will be parsed and formatted accordingly.

no

 

...