How You Can Access Images Over the Network
You can configure the Loadnrun Server install4gl.txt file to deliver image files over the network by overriding the II_W4GLAPPS_DIR and specifying a UNC location.
In this example, you will create a 11demo\ts2unc APPNAME that will demonstrate this technique.
To configure the install4gl.txt file to access images over the network
1. Create a new directory called 11demo\ts2unc:
"%II_W4GLAPPS_DIR%\eclient\11demo\ts2unc"
2. In the ts2unc directory, add the image files and resources needed to run this application:
• install4gl.txt
• orascm.ini
• TS2 User Guide.pdf
• 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 =11,10,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_LOADNRUN11_ROOT%\ (if launched using LOADNRUN11.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 11.1 client runtime for run.bat
//
ENVIRONMENT=PATH=%II_ECLIENT_APPDIR%bin;%II_LOADNRUN11_ROOT%\bin;%PATH%
//
// Force the use of the Loadnrun 11.1 client runtime for run.bat
//
ENVIRONMENT=PATH=%II_ECLIENT_APPDIR%bin;%II_LOADNRUN11_ROOT%\bin;%PATH%
//
// Environment for Application
//
ENVIRONMENT=II_LIBU3GL=%II_ECLIENT_SYSTEM%\user32.dll
ENVIRONMENT=TS_ALIAS=renma01
ENVIRONMENT=II_W4GLAPPS_DIR=\\hostname\ts2\images\or11
The UNC directory \\hostname\ts2\images\or11 contains the following 4GL image files:
• dao_services.img
• is_dao.img
• is_gc.img
• messagebox.img
• orasconnectionmanager.img
• rdobjects.img
• rdscd.img
• tpo_objects.img
• ts2.img
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 11.1 Client:
"%II_LOADNRUN62_CMD%" ts2unc http://hostname/openroad/ 11demo
the application is downloaded from the Loadnrun Server location:
"%II_W4GLAPPS_DIR%\eclient\11demo\ts2unc"
to the Loadnrun Client eclientcache location and is launched:
"%APPDATA%\Actian\eclientcache\hostname\11demo\ts2unc"
The following command displays the run.bat script that was created in the eclientcache for hostname\11demo\ts2\run.bat:
"%II_LOADNRUN11_CMD%" /listrun
Example output:
===========================================================================================
Loadnrun11: Tue 03/11/2020 17:06:25.43: 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\11demo\ts2unc\run.bat
===========================================================================================
The contents of hostname\11demo\ts2unc\run.bat is as follows:
@ECHO OFF
::
:: File Generated by Loadnrun on 11-mar-2020 17:05:30
::
SETLOCAL
SET II_ECLIENT_ROOT=C:\Users\username\AppData\Roaming\Actian\eclientcache\hostname\11demo\
SET LOADNRUN_CLIENT_ROOT=C:\Program Files\Actian\OpenROAD\Loadnrun11\
SET II_ECLIENT_RUNMODE=2
SET II_ECLIENT_URL=http://hostname/openroad/
SET II_ECLIENT_VERSION=
SET II_ECLIENT_4GLVERSION=11,10,12590,0
SET II_ECLIENT_SUFFIX=11demo
SET II_ECLIENT_APPDIR=%II_ECLIENT_ROOT%ts2zip
SET II_ECLIENT_LIBDIR=%II_ECLIENT_ROOT%lib
SET II_W4GLAPPS_SYS=%II_ECLIENT_ROOT%lib
SET II_W4GLAPPS_DIR=%II_ECLIENT_ROOT%ts2zip
SET II_LOG=%II_ECLIENT_ROOT%ts2zip
SET II_ECLIENT_SYSTEM=%windir%\system32
SET PATH=%II_ECLIENT_ROOT%ts2zip;%LOADNRUN_CLIENT_ROOT%bin;%PATH%
SET II_LOADNRUN=TRUE
CD "C:\Users\username.ACTIAN\AppData\Roaming\Actian\eclientcache\hostname\62demo\ts2zip\"
SET PATH=%II_ECLIENT_APPDIR%bin;%II_LOADNRUN11_ROOT%\bin;%PATH%
SET II_LIBU3GL=%II_ECLIENT_SYSTEM%\user32.dll
SET TS_ALIAS=renma01
SET II_W4GLAPPS_DIR=\\hostname\ts2\images\or11
w4glapp.exe loadnrun ts2.img -Tyes,min -gversion.txt
ENDLOCAL
You also may use this script to launch ts2zip without checking the Loadnrun Server.
The original install4gl.txt file is downloaded to the Loadnrun eclientcache under the following name: hostname\11demo\ts2unc\ts2unc.config. This file is identical with the install4gl.txt file located on the Loadnrun Server.