Set environment with fglprofile

Configure environment settings with FGLPROFILE entries.

The GWA behaves similarly to the GMA/GMI when it comes to setting the environment. For more information, go to Setting environment variables in FGLPROFILE (mobile).

Setting environment variables for your app must be done in an fglprofile file, which should be located in the programdir directory, alongside the main program module. The GWA app reads the default fglprofile provided in $FGLDIR/etc/fglprofile. However, if gwabuildtool detects a custom fglprofile in the programdir, it ensures that the runtime locates and uses this custom version.

The two main environment variables you may have to set for GWA are FGLLDPATH and FGLIMAGEPATH:
  1. If you have to set FGLLDPATH because some 42m files are located on subdirectories, you must create a fglprofile with an entry called mobile.environment.FGLLDPATH
  2. You can also set other environment variables such as FGLIMAGEPATH

    In this example, environments for FGLLDPATH and FGLIMAGEPATH are set. "$FGLAPPDIR" refers to the virtual file system /app directory in memory.

    For a portable variant of your GWA application, set these environment variables as shown:
    #portable variant which works also for GMI/GMA
    mobile.environment.FGLLDPATH  = "$FGLAPPDIR/dbsync"
    mobile.environment.FGLIMAGEPATH="$FGLAPPDIR/image_dir:$FGLDIR/lib/image2font.txt"
    For a non-portable variant, or for GWA specific, set the environment variables as shown:
    # non portable: GWA specific
    mobile.environment.FGLLDPATH  = "/app/dbsync"
    mobile.environment.FGLIMAGEPATH  = "/app/image_dir:/fgl/lib/image2font.txt"
For more details about fglprofile settings, go to Understanding FGLPROFILE.