Previous | Contents | Next

Editing InstallOptions Scripts

The EclipseNSIS InstallOptions Editor plugin provides two editors for working with InstallOptions scripts:

Switching between editors can be accomplished using the Switch Editor Switch Editor menuitem available in the InstallOptions menu on the main menubar, or by pressing the F12 key. Changes made in an editor are reflected in the other editor after a switch.     

InstallOptions Script File Format

InstallOptions scripts are in INI file format, hence both editors are registered to work with INI files (*.ini extension). The Design Editor is designated as the default.The INI file format which is supported by EclipseNSIS is as defined in the Microsoft Windows for Workgroups Resource Kit. The primary characteristics of this format is as follows:

  1. The file consists of sections, each containing zero or more keys. Section names and keys must be defined on a single line- no line continuations are supported.
  2. Acceptable spacing characters in a line are Space (ASCII code 32) and Tab (ASCII code 9). 
  3. Lines are terminated by a CR (ASCII code 13) or LF (ASCII code 10) character. If CR+LF or LF+CR appear consecutively, they count as a single line terminator, generating one line, not two lines. A sequence consisting of CR+LF+CR+LF would however result in two lines, not one line.
  4. A Section name is enclosed in square brackets, with the opening bracket being the first non-spacing character in the line. Any leading or trailing spacing characters around the Section name inside the square brackets are discarded.
  5. Keys consist of name and a value separated by an equals sign (ASCII code 61) optionally surrounded by spacing characters which are discarded. The Key name starts with the first non-spacing character in the line.
  6. Any leading or trailing spacing characters in the Key value are discarded. If they are to be retained then the key value should be enclosed using the quote character (ASCII code 34). If the entire key value is quoted, then the quote characters are stripped from the key value. However, if any non-spacing characters exist either before or after the quote character, then the quote characters are included in the key value.
  7. Numerical key values may be specified either in decimal or hexadecimal format. Hexadecimal values should be prefixed with "0x".
  8. Comments are introduced by a semicolon character (ASCII code 59), which must be the first non-spacing character in a line. Comments terminate at the end of the line.

Additionally, CR, LF, Tab and backslash (ASCII code 92) characters can be specified in key values by escaping them with a backslash character, i.e., "\r", "\n", "\t" and "\\", respectively for the following cases:

  1. Label control type - Text key value
  2. Text control type - State key value (when MULTILINE flag is set)
  3. All control types - ValidateText key value

Previous | Contents | Next

Copyright © 2004-2010 Sunil Kamath (IcemanK).