FGLPROFILE files selection
When multiple FGLPROFILE files can be selected, the runtime system applies an order of precedence.
There are three levels to specifying an FGLPROFILE configuration file, and these files are loaded in the following order:
- First, the runtime system reads the default configuration file provided in $FGLDIR/etc/fglprofile. This file contains all
supported entries, identifies the possible values for an entry, and documents default values.Important: Do not modify the default FGLPROFILE configuration file, as it can be overwritten by a new installation.
- Then, if the FGLPROFILE environment
variable is set, the runtime system reads entries from the files specified by this environment
variable. A list of files can be provided with FGLPROFILE. Files must be separated by the operating
system specific path separator. Note: On mobile devices, you must deploy a file with the name "
fglprofile
" in the appdir directory. See FGLPROFILE for mobile apps for more details. - After loading and merging the two previous levels, the runtime system checks whether the
fglrun.defaults
entry is set. This entry defines the program-specific profile directory. If this directory contains a file with the same name as the current program (without a .42r or .42m extension), the runtime system reads the entries from that file.Note: If the value offglrun.defaults
starts with$envvar
, the specified environment variable is expanded to its value in order to build the path. For example, if the value is"$MYVAR/standard"
, and MYVAR contains /opt/app/config, and the program name is custinfo.42m (or custinfo.42r), the runtime system will try to read the file /opt/app/config/standard/custinfo.
The runtime system merges the different configuration files found at the three levels: If the same entry is defined in several files, the last loaded entry wins.
This means that the order of precedence is:
- Program-specific configuration file (if
fglrun.defaults
is defined in one of the other levels). - Configuration files defined by the FGLPROFILE environment variable, or appdir/fglprofile, for mobile applications.
- The default configuration file $FGLDIR/etc/fglprofile.