Server Reference Guide : F. Contents of the 62demo Application Directories : Launcher Application
 
Share this page          
Launcher Application
Launcher is an example of a Loadnrun application that you can use to launch applications hosted by the Loadnrun Server. This application can be installed on the Loadnrun Server and is typically placed under the Loadnrun eClient host directory in the launcher subdirectory.
This application has 10 pre-defined buttons that you can customize to launch a Loadnrun hosted application. The customization is done by defining environment variables in the install4gl.txt control file for the eClient application.
The following describes the install4gl.txt control statements.
4GLVERSION=-1,-1,-1,-1
Specifies the version number associated with the launcher eclient. Set this to a specific version string to control when the eclientcache will be updated with a new version.
The value of this parameter follows this format:
major_version,minor_version,major_build,minor_build
Examples:
4GLVERSION =5,11,5104,0
4GLVERSION =6,00,13557,0
4GLVERSION =6,20,12558,0
4GLVERSION =-1,-1,-1,-1

Each of the previous parameters is defined as a number value between -1 and 32767. If the value contains -1.-1.-1.-1, this indicates that the version on the Loadnrun Server must be downloaded each time the loadnrunXX.bat script is invoked.
IMAGEFILE=launcher.img
Specifies the name of the application. The Launcher frame is contained in the Loadnrun 4GL application.
CMDFLAGS=-Tyes
Specifies the command flags used to start the launcher application on the client. To display the trace window for diagnostic purposes, change the definition of the trace flag to -Tyes.
ENVIRONMENT=LOADNRUN_ROOT_DEFAULT=II_LOADNRUN51_ROOT
Specifies the name of the environment variable that is resolved to obtain the installation location of the version of Loadnrun being used:
ENVIRONMENT=LOADNRUN_ROOT_DEFAULT=II_LOADNRUN51_ROOT
ENVIRONMENT=LOADNRUN_ROOT_DEFAULT=II_LOADNRUN60_ROOT
ENVIRONMENT=LOADNRUN_ROOT_DEFAULT=II_LOADNRUN62_ROOT

Specify which version of Loadnrun (5.1, 6.0, or 6.2) that will be used by the eClient applications hosted by the Loadnrun Server.
ENVIRONMENT=LAUNCHER_GATEWAY_DEFAULT=http://localhost/Gatekeeper2/OpenROADGatekeeper.ashx
Specifies the default gatekeeper URL that applies by default if an explicit URL is not specified in each APPNAME section. This value must be customized to a site-specific value:
ENVIRONMENT=LAUNCHER_GATEWAY_DEFAULT=II_LOADNRUN51_GATEWAY
ENVIRONMENT=LAUNCHER_GATEWAY_DEFAULT=II_LOADNRUN60_GATEWAY
ENVIRONMENT=LAUNCHER_GATEWAY_DEFAULT=II_LOADNRUN62_GATEWAY
ENVIRONMENT=LAUNCHER_SERVER_SUFFIX_DEFAULT=XX
(Optional) Specifies the default SERVER SUFFIX value. If multiple versions of Loadnrun are being used, we recommend that you set this parameter to a non-empty value.
This value is set to 51, 60, or 62, based on the version of Loadnrun being used.
ENVIRONMENT=LAUNCHER_WINDOW_TITLE=Simple Loadnrun %LAUNCHER_SERVER_SUFFIX_DEFAULT% Application Launcher
Specifies the window title that the Launcher displays. This parameter differentiates between different versions of Launcher when they are used.
The parameters in the following section are used to define the characteristics of APPNAME1.
ENVIRONMENT=LAUNCHER_APPNAME1=
Specifies the APPNAME of Loadnrun eClient with the subdirectory on the host of the Loadnrun Server where the files install4gl.txt and the files associated with the eClient are located.
If this value is not specified, then the button associated with the application is made invisible.
ENVIRONMENT=LAUNCHER_APPNAME1_SERVER_SUFFIX=
Specifies the Server Suffix for APPNAME1. If this is not specified, the value of ENVIRONMENT=LAUNCHER_SERVER_SUFFIX_DEFAULT= is used.
This is optional if a default has been supplied.
ENVIRONMENT=LAUNCHER_APPNAME1_GATEWAY=
Specifies the Gateway URL for APPNAME1. If this is not specified, the value of ENVIRONMENT=LAUNCHER_SERVER_SUFFIX_DEFAULT= is used.
This is optional if a default has been supplied.
ENVIRONMENT=LAUNCHER_APPNAME1_TITLE=
Specifies the text placed on the button that launches the application.
The previous four install4gl.txt directives maybe repeated for APPNAME2 through APPNAME10.
Forcing the use of Loadnrun Client 6.2 runtime
The following directive forces the use of the Loadnrun 6.2 Client runtime if the application is launched by the Loadnrun60.bat or Loadnrun51.bat script:
ENVIRONMENT=PATH=%II_ECLIENT_APPDIR%bin;%II_LOADNRUN62_ROOT%\bin;%PATH%
Contents of the subdirectory
install4gl.txt
Launcher.img
Contents of Launcher\install4gl.txt
//
//  The following control statements must not start on line 1.
//
4GLVERSION =6,20,14001,0
IMAGEFILE  =launcher.img
CMDFLAGS   =-Tyes
//
//  The following environment variables are set by the run.bat that is generated
//  by Loadnrun when an application is downloaded from the server
//
//    Environment Variable       Value
//    --------------------       -----
//    II_ECLIENT_ROOT            %APPDATA%\Actian\eclientcache\[HOSTSYSTEM]\[HOSTSUFFIX]\
//    LOADNRUN_CLIENT_ROOT       %II_LOADNRUN51_ROOT%\  (if launched using LOADNRUN51.bat)
//    LOADNRUN_CLIENT_ROOT       %II_LOADNRUN60_ROOT%\  (if launched using LOADNRUN60.bat)
//    LOADNRUN_CLIENT_ROOT       %II_LOADNRUN62_ROOT%\  (if launched using LOADNRUN62.bat)
//    II_ECLIENT_RUNMODE         2
//    II_ECLIENT_URL             [HOSTSYSTEMURL]
//    II_ECLIENT_VERSION
//    II_ECLIENT_4GLVERSION      [INSTALL4GLVERSION]
//    II_ECLIENT_SUFFIX          [HOSTSUFFIX]
//    II_ECLIENT_APPDIR          %II_ECLIENT_ROOT%[APPNAME]
//    II_ECLIENT_LIBDIR          %II_ECLIENT_ROOT%lib
//    II_W4GLAPPS_SYS            %II_ECLIENT_ROOT%lib
//    II_W4GLAPPS_DIR            %II_ECLIENT_ROOT%[APPNAME]
//    II_LOG                     %II_ECLIENT_ROOT%[APPNAME]
//    II_ECLIENT_SYSTEM          %windir%\syswow64     (on 64-bit systems)
//    II_ECLIENT_SYSTEM          %windir%\system32     (on 32-bit systems)
//    PATH                       %II_ECLIENT_ROOT%qt;%LOADNRUN_CLIENT_ROOT%bin;%PATH%
//    II_LOADNRUN                TRUE
//
//  where the following are defined
//
//    String Name                String Value Description
//    -----------                ------------------------
//    [HOSTSYSTEMURL]            This is the URL that is passed when Loadnrun is invoked on
//                               the Client
//    [HOSTSYSTEM]               This is the system name that is hosting the [HOSTSYSTEMURL]
//    [HOSTSUFFIX]               This is the suffix that is passed when Loadnrun is invoked
//                               on the client
//    [INSTALL4GLVERSION]        This is the value of the 4GLVERSION directive located in
//                               the install4gl.txt
//    [APPNAME]                  This is the application name passed when Loadnrun is invoked
//                               on the Client
//
//  An example of the command that will be invoked is as follows
//
//    loadnrun62.bat [APPNAME] [HOSTSYSTEMURL] [HOSTSUFFIX]
//
//  The following ENVIRONMENT directives will be used to append SET statements in
//  the run.bat that will be generated by Loadnrun. These can override any environment
//  variables generated in run.bat prior to the launch of the application.
//
//  Force the use of the Loadnrun 6.2 client runtime
//
ENVIRONMENT=PATH=%II_ECLIENT_APPDIR%bin;%II_LOADNRUN62_ROOT%\bin;%PATH%
//
//  Environment for Application
//
ENVIRONMENT=LOADNRUN_ROOT_DEFAULT=II_LOADNRUN62_ROOT
ENVIRONMENT=LAUNCHER_GATEWAY_DEFAULT=%II_ECLIENT_URL%
ENVIRONMENT=LAUNCHER_SERVER_SUFFIX_DEFAULT=%II_ECLIENT_SUFFIX%
ENVIRONMENT=LAUNCHER_WINDOW_TITLE=Simple Loadnrun (%LAUNCHER_SERVER_SUFFIX_DEFAULT%) Application Launcher
//
//  Make sure that the following variables are initialized to NULL
//  in case the Launcher app is used to start another Launcher instance
//  This will prevent leakage of APPNAME values
//
ENVIRONMENT=LAUNCHER_APPNAME1=
ENVIRONMENT=LAUNCHER_APPNAME2=
ENVIRONMENT=LAUNCHER_APPNAME3=
ENVIRONMENT=LAUNCHER_APPNAME4=
ENVIRONMENT=LAUNCHER_APPNAME5=
ENVIRONMENT=LAUNCHER_APPNAME6=
ENVIRONMENT=LAUNCHER_APPNAME7=
ENVIRONMENT=LAUNCHER_APPNAME8=
ENVIRONMENT=LAUNCHER_APPNAME9=
ENVIRONMENT=LAUNCHER_APPNAME10=
//
//  APPNAME1=httptest
//
ENVIRONMENT=LAUNCHER_APPNAME1=httptest
ENVIRONMENT=LAUNCHER_APPNAME1_TITLE=HTTP Test Demo (%LAUNCHER_SERVER_SUFFIX_DEFAULT%)
//
//  APPNAME2=comtestclient
//
ENVIRONMENT=LAUNCHER_APPNAME2=comtestclient
ENVIRONMENT=LAUNCHER_APPNAME2_TITLE=Comtest Client demo (%LAUNCHER_SERVER_SUFFIX_DEFAULT%)
//
//  APPNAME3=Jigfall
//
ENVIRONMENT=LAUNCHER_APPNAME3=Jigfall
ENVIRONMENT=LAUNCHER_APPNAME3_TITLE=Jigfall Demo (%LAUNCHER_SERVER_SUFFIX_DEFAULT%)
//
//  APPNAME4=minesweeper
//
ENVIRONMENT=LAUNCHER_APPNAME4=Minesweeper
ENVIRONMENT=LAUNCHER_APPNAME4_TITLE=Minesweeper Demo (%LAUNCHER_SERVER_SUFFIX_DEFAULT%)
//
//  APPNAME5=Intertask1
//
ENVIRONMENT=LAUNCHER_APPNAME5_GATEWAY=%LAUNCHER_GATEWAY_DEFAULT%
ENVIRONMENT=LAUNCHER_APPNAME5_SERVER_SUFFIX=%LAUNCHER_SERVER_SUFFIX_DEFAULT%
ENVIRONMENT=LAUNCHER_APPNAME5=Intertask1
ENVIRONMENT=LAUNCHER_APPNAME5_TITLE=Intertask1 (%LAUNCHER_APPNAME5_SERVER_SUFFIX%)
//
//  APPNAME6=Intertask2
//
ENVIRONMENT=LAUNCHER_APPNAME6_GATEWAY=%LAUNCHER_GATEWAY_DEFAULT%
ENVIRONMENT=LAUNCHER_APPNAME6_SERVER_SUFFIX=%LAUNCHER_SERVER_SUFFIX_DEFAULT%
ENVIRONMENT=LAUNCHER_APPNAME6=Intertask2
ENVIRONMENT=LAUNCHER_APPNAME6_TITLE=Intertask2 (%LAUNCHER_APPNAME6_SERVER_SUFFIX%)
//
//  APPNAME7=connect_example2
//
ENVIRONMENT=LAUNCHER_APPNAME7_GATEWAY=%LAUNCHER_GATEWAY_DEFAULT%
ENVIRONMENT=LAUNCHER_APPNAME7_SERVER_SUFFIX=%LAUNCHER_SERVER_SUFFIX_DEFAULT%
ENVIRONMENT=LAUNCHER_APPNAME7=connect_example2
ENVIRONMENT=LAUNCHER_APPNAME7_TITLE=connect_example2 (%LAUNCHER_APPNAME7_SERVER_SUFFIX%)
//
//  APPNAME8=qt
//
ENVIRONMENT=LAUNCHER_APPNAME8_GATEWAY=%LAUNCHER_GATEWAY_DEFAULT%
ENVIRONMENT=LAUNCHER_APPNAME8_SERVER_SUFFIX=%LAUNCHER_SERVER_SUFFIX_DEFAULT%
ENVIRONMENT=LAUNCHER_APPNAME8=qt
ENVIRONMENT=LAUNCHER_APPNAME8_TITLE=Query Tool (%LAUNCHER_APPNAME8_SERVER_SUFFIX%)