Use a script to set the environment

Specify a command script for the application to launch the application.

Alternatively to the ENVIRONMENT_VARIABLE elements, you can use the DVM element to define a command that will set the environment and launch the application.

On Linux®/UNIX™ platforms, use the DVM element to define a shell command that will execute a shell script defined with the MODULE element:

<APPLICATION Id="kiosk" Parent="defaultgwc"> 
  <EXECUTION> 
    <PATH>/home/f4gl/gep/configfiles/officestoredemo</PATH> 
    <DVM>/bin/sh</DVM> 
    <MODULE>gdc-kiosk.sh</MODULE> 
  </EXECUTION>
</APPLICATION>
  1. PATH element defines where the script is stored.
  2. DVM element defines the command to execute the shell script defined in MODULE.
  3. MODULE element defines the shell script file.

On Windows® platforms, use the DVM element to define a .BAT command file, including environment settings and program execution:

<APPLICATION Id="myprog" Parent="defaultgdc">
  <EXECUTION>
    <PATH>$(res.fgldir)/demo</PATH>
    <DVM>c:\myprog\launch.bat</DVM>
  </EXECUTION>
</APPLICATION>
  1. PATH element defines where the script is stored.
  2. DVM element defines the BAT command to be executed.