We need you!

Icon

The IzPack documentation needs work, and you are invited to edit it!

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 12 Next »

Resources

Several panels, such as the license panel, the information and the shortcut panel, require additional data to perform their task.

This data is supplied in the form of resources.

The manual's panel description page lists any resources that the panel needs.

The <resources> element is a child of the <installation> element

Currently, no checks are made to ensure resources needed by any panel have been included.

Here is an example of specifying two resources:

The <resources> contains the <res> elements that identify each resource. The following attributes may be specified:

  • id is the identifier of the resource The panels documentation lists the ids to be used
  • src is the path in your staging area to the resource
  • parse (optional, yes or no with the default being no) specifies whether the resource will be parsed at compilation time. Parsing will replace variables in text / xml / properties files.
  • parsexml (optional, valid values: true|false, default: false)
    If set true, the resource will not be added to the installer "as is", but it is parsed as XML and the result of this parsing is added as valid XML file to the installer.
    One use case for this is if there are used <xi:xinclude /> elements in the referred resources, which must be resolved at compile time and replaced by the included XML code, in case the href attribute <xi:xinclude/> is no longer valid at installation time.
  • type specifies the parsing mode to adapt to specific file formats: plain (default), java, shell, at, ant, javaprop, xml.

Please note that in general a resource id is unique.

If you define multiple resources with the same id, the later definition will overwrite the previous definition. This can happen if a resource is defined in a referenced pack-file.

However there is an exception for packsLang.xml_xyz files (see internationalization of the PacksPanel).

If multiple packsLang-files were defined, all files will be merged into a single temporary file. This allows refpack files to provide their own internationalization-information.

 

The following sample shows a <resources> element in an installation file. It specifies resources required for 2 of the panels.

Sample IzPack installation description with resources
  • No labels