Setting environment variables in FGLPROFILE (mobile)
When executing applications on mobile devices, you can configure environment settings with FGLPROFILE entries. Setting an environment variable with an FGLPROFILE entry is equivalent to setting the environment variable before running the fglrun VM process on a server.
FGLPROFILE environment variables settings can be used to define DBDATE and DBFORMAT, if the default regional settings on the mobile must be ignored for date and numeric value formatting. Note that defining DBMONEY will have no effect, because DBFORMAT is defined automatically by the GMI or GMA front-end component before starting the VM component. Since DBFORMAT takes precedence over DBMONEY, setting DBMONEY in FGLPROFILE is pointless.
The syntax is:
mobile.environment.env_name = "env_value"
where:
- env_name is the name of the environment variable to be set.
- env_value is the value for the env_name environment variable.
For example:
mobile.environment.MY_ENV_VAR = "my value"
The value specified in a mobile.environment
entry can contain
$NAME
placeholders, that will be replaced by the actual value of
the NAME
environment variable. The
NAME
environment variable will typically be set by the front-end
component, before starting the runtime system component, for example to define FGLDIR and FGLAPPDIR values.
If the environment variable contains directory or file paths, use the UNIX path notation with /
slashes as directory
name separator, and the :
colon as path separator.
This example defines the FGLIMAGEPATH environment variable for the mobile app, using FGLAPPDIR and FGLDIR predefined environment variables:
mobile.environment.FGLIMAGEPATH = "$FGLAPPDIR/myimages:$FGLAPPDIR/icons/myimage2font.txt:$FGLDIR/lib/image2font.txt"
mobile.environment
entries,
as these are only read when executing on mobile devices.