FGLPROFILE files selection
When multiple FGLPROFILE files can be selected, the runtime system applies an order of precedence.
There are three levels of FGLPROFILE configuration files, and these files are loaded in the following order:
- 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 configuration file FGLDIR/etc/fglprofile, as it can be overwritten by a new installation.
- 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.
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.If the value of
fglrun.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.Make sure that the directory used for
fglrun.defaults
is not the same directory where program files are located: If a directory contains the files "myprog.42m" and "myprog", an "fglrun myprog" command will try to load the "myprog" configuration file, instead of the "myprog.42m" file and produce the error -6202.
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.