Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Completed all attribute descriptions

...

All of the above variants of reading a dynamic variable value from a configuration file can be also applied if that configuration files is packaged as an entry into a ZIP or JAR file.

Using a dynamic variable assignment from a certain entry of a configuration file packed into an archive is recognized by using the attributes jarfile or zipfile in the variable definition.

Specific attributes:

  • jarfile
    The jar file path to read from.
  • zipfile
    The zip file path to read from.
  • type := "options" | "ini" | "xml" (optional, defaults to "options")
    The archived file's type.
  • section
    The INI section to lookup the entry in, is evaluated only if type = "ini".
  • key
    The INI, option or property entry key to read the value for.

Example:

Code Block
langxml
titleAssigning a dynamic variable from an configuration entry in a JAR/ZIP file
<dynamicvariables>

    <variable name="previous.version" jarfile="${INSTALL_PATH}/${INSTALL_SUBPATH}/libs/config.jar"
              entry="release.properties" type="options"
              key="release.version"
              checkonce="false" ignorefailure="true">
    </variable>

    <variable name="other.stuff" zipfile="${INSTALL_PATH}/${INSTALL_SUBPATH}/libs/misc.zip"
              entry="app.ini" type="ini"
              section="Global Settings" key="AUTOSTART"
              checkonce="true" ignorefailure="true">
    </variable>

</dynamicvariables>

...

Dynamic variable values can be also gathered from Windows registry data.

Using a dynamic variable assignment from a registry entry is recognized by using the attribute regkey in the variable definition.

Specific attributes:

  • key
    The registry entry key to find the registry value to read from.
  • value
    The registry value to read from.

Example:

Code Block
langxml
titleAssigning a dynamic variable value from the Windows registry
<dynamicvariables>
    <variable name="RegistryReadTest" checkonce="true"
              regkey="HKLM\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment"
              regvalue="Path"/>
</dynamicvariables>

...