How You Can Set Up a New Application Name (APPNAME)
In this tutorial section, you will set up a new timesheet application named ts2 under the 62demo host suffix.
The ts2 application is an example of an OpenROAD Server application that is used internally at Actian Corporation. It is not available for distribution but is used only as an example of how to deploy a user application. You can use tst2 to model the deployment of your application.
To create the ts2 application
1. Create a new directory named 62demo\ts2. For example:
"%II_W4GLAPPS_DIR%\eclient\62demo\ts2"
2. In the ts2 directory, add the image files and resources needed to run this application:
• orascm.ini
• RDObjects.img
• tpo_objects.img
• TS2 User Guide.pdf
• ts2.img
• version.txt
3. Create a file called install4gl.txt in this directory and add the following contents.
Start all directives in column 1 of the file. The following is indented for clarity purposes only.
//
// The following control statements must not start on line 1.
//
4GLVERSION =6,20,14001,0
IMAGEFILE =ts2.img
CMDFLAGS =-Tyes,min -gversion.txt
//
// 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]
// 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 for run.bat
//
ENVIRONMENT=PATH=%II_ECLIENT_APPDIR%bin;%II_LOADNRUN62_ROOT%\bin;%PATH%
//
// Force the use of the Loadnrun 6.2 client runtime for run.bat
//
ENVIRONMENT=PATH=%II_ECLIENT_APPDIR%bin;%II_LOADNRUN62_ROOT%\bin;%PATH%
//
// Environment for Application
//
ENVIRONMENT=II_LIBU3GL=%II_ECLIENT_SYSTEM%\user32.dll
ENVIRONMENT=TS_ALIAS=renma01
The only resource in the directory that is referenced directly is ts2.img. All other resources are downloaded automatically.
When the following command is issued by the Loadnrun 6.2 Client:
"%II_LOADNRUN62_CMD%" ts2 http://hostname/openroad/ 62demo
the application is downloaded from the Loadnrun Server location:
"%II_W4GLAPPS_DIR%\eclient\62demo\ts2"
to the Loadnrun Client eclientcache location and is launched:
"%APPDATA%\Actian\eclientcache\hostname\62demo\ts2"
The following command displays the run.bat script that was created in the eclientcache for hostname\62demo\ts2\run.bat:
"%II_LOADNRUN62_CMD%" /listrun
Example output:
=========================================================================================
Loadnrun62: Tue 03/11/2014 14:22:06.02: List of run.bat scripts in "%APPDATA%\Actian\eclientcache"
-----------------------------------------------------------------------------------------
"%APPDATA%" = "C:\Users\username.ACTIAN\AppData\Roaming"
-----------------------------------------------------------------------------------------
C:\Users\username.ACTIAN\AppData\Roaming\Actian\eclientcache\hostname\62demo\ts2\run.bat
=========================================================================================
The contents of hostname\62demo\ts2\run.bat is as follows:
@ECHO OFF
::
:: File Generated by Loadnrun on 11-mar-2014 14:21:46
::
SETLOCAL
SET II_ECLIENT_ROOT=C:\Users\username.ACTIAN\AppData\Roaming\Actian\eclientcache\hostname\62demo\
SET LOADNRUN_CLIENT_ROOT=C:\Program Files (x86)\Actian\OpenROAD\Loadnrun62\
SET II_ECLIENT_RUNMODE=2
SET II_ECLIENT_URL=http://hostname/openroad/
SET II_ECLIENT_VERSION=
SET II_ECLIENT_4GLVERSION=6,20,14001,0
SET II_ECLIENT_SUFFIX=62demo
SET II_ECLIENT_APPDIR=%II_ECLIENT_ROOT%ts2
SET II_ECLIENT_LIBDIR=%II_ECLIENT_ROOT%lib
SET II_W4GLAPPS_SYS=%II_ECLIENT_ROOT%lib
SET II_W4GLAPPS_DIR=%II_ECLIENT_ROOT%ts2
SET II_LOG=%II_ECLIENT_ROOT%ts2
SET PATH=%II_ECLIENT_ROOT%ts2;%LOADNRUN_CLIENT_ROOT%bin;%PATH%
SET II_LOADNRUN=TRUE
CD "C:\Users\username.ACTIAN\AppData\Roaming\Actian\eclientcache\hostname\62demo\ts2\"
SET PATH=%II_ECLIENT_APPDIR%bin;%II_LOADNRUN62_ROOT%\bin;%PATH%
SET II_LIBU3GL=%II_ECLIENT_SYSTEM%\user32.dll
SET TS_ALIAS=renma01
w4glapp.exe loadnrun ts2.img -Tyes,min -gversion.txt
ENDLOCAL
You also may use this script to launch ts2 without checking the Loadnrun Server.
The original install4gl.txt file is downloaded to the Loadnrun eclientcache under the following name: hostname\62demo\ts2\ts2.config. This file is identical with the install4gl.txt file located on the Loadnrun Server.