Manuals >Installation and Customization Guide >Customizing the IC-CAP Environment
Print version of this Book (PDF file)
prevnext

Configuration File Format

Configuration variables are defined using standard assignment syntax:

<variable>=<value>

where variable is the configuration variable name and value is the string that is assigned to the variable. This value can be a directory, search path, numeric value, or other value defined by the program. For example, the location of the preferences could be set by:

PREFERENCES_DIR={$ICCAP_ROOT}/de/defaults

where $ICCAP_ROOT is an environment variable representing the complete installation path.

Note the following details about file format, illustrated in the accompanying example:

    • Any line starting with # is a comment line and is ignored
    • Blank lines are ignored
    • Blank spaces to the left or right of the equal sign are ignored
    • Empty assignments are acceptable (as shown by env_var_2)

Example

#
# This is a sample configuration file
#
env_var_1 = first_value
env_var_1a = value-1a
#
env_var_2 =
env_var_3 = 17
env_var_4 = $SYSTEM/%HOME/ex4
env_var_4a = {$ICCAP_ROOT}/de/defaults/{%env_var_1a}.ex4a

References to environment variables $name and IC-CAP configuration variables %name can appear in any order; they are resolved inside each IC-CAP program. A reference to an environment variable or configuration variable name may be enclosed in braces { } when their use is not followed by a punctuation character. The braces are not included in an expanded value.

Configuration Variable Description

IC-CAP configuration variables are identified by a case-insensitive string of 1 to 31 alphanumeric characters (an underscore is allowed). Variables that are longer than 31 characters are automatically truncated when the configuration file is read. When a variable is set from a configuration file, the line

<variable>=<value>

is parsed and variable is set to the value.

A configuration variable can contain a reference. A reference may be enclosed in braces and the text is preceded by either a $ or % (see Table 11). For example,

PREFERENCES_DIR={$ICCAP_ROOT}/de/defaults

assigns the string $ICCAP_ROOT/de/defaults to the configuration variable PREFERENCES_DIR, and $ICCAP_ROOT is defined in a start-up file.

Table 11 IC-CAP Configuration Variables
Configuration variable
Description
$name
The configuration variable is replaced by the text string assigned to name in the environment.
%name
The configuration variable is replaced by the text string assigned to name in the IC-CAP configuration file.


Certain IC-CAP variables have a pre-defined meaning in a given program. All of the special IC-CAP configuration variables that are recognized are given in the shipped {$ICCAP_ROOT}/config/<app-name>.cfg file.

Most IC-CAP configuration variables are assigned a single value. This text can represent a number, string, file, or path as in the following examples.

STATUS_DISP = 0 
EESTATUS_LOG_FILE = Off
HPEESOF_KEY = $ICCAP_ROOT/licenses/hpeesof.key
PREFERENCES_DIR={$ICCAP_ROOT}/de/defaults

Note that when the file is outside of a project configuration, it is necessary to include the full path with the filename to ensure that the file is found.

Some IC-CAP configuration variables accept a path assignment. A path is a list of one or more directories, where each directory is separated by a colon.

variable=directory:directory: ....

These variables can represent search paths or load paths, depending on the variable and the program. Ordering of the list is significant. When treated as a search path, the list is only scanned until the item needed is found. For loading, the entire list is sequentially examined with the last directory usually taking precedence.

The documentation for each specific variable indicates the type of value allowed. Some variables may have a limited type, such as a range of numbers or list of specific strings.

Configuration Variable Expansion

Configuration variable expansion refers to the process of replacing all references and variables that make up the configuration variable with their text equivalents until the complete value of the configuration variable is known. (There are no limits to the levels of referencing you can use.) Note that this expansion is done internally by the program; the file that contains the variable assignments is not modified.

For example, assume that the system environment variable ICCAP_ROOT is set to opt/iccap/mysite and the following two lines exist in a configuration file.

MY_LIB    = {$ICCAP_ROOT}/lib/iccap
ICCAP_LIB = {%MY_LIB}/rf1

After expansion within IC-CAP:

MY_LIB = /opt/iccap/mysite/lib/iccap
ICCAP_LIB = /opt/iccap/mysite/lib/iccap/rf1

As in the system environment, you may redefine and add your own IC-CAP variables in any IC-CAP configuration files to help manage system- and user-specific configurations.


prevnext