How You Can Create Compressed Files
If the Loadnrun Server delivers a file with a .zip extension, this file is assumed to contain files that must be compressed. In this tutorial, you will create a 62demo\ts2zip APPNAME.
To create a compressed archive of files
1. Create a new directory called 62demo\ts2zip:
"%II_W4GLAPPS_DIR%\eclient\62demo\ts2zip"
2. In the ts2zip directory, add the image files and resources needed to run this application:
• install4gl.txt
• orascm.ini
• ts2_or62_images.zip
• ts2_or62_resources.zip
• version.txt
The contents of the ts2_or62_images.zip archive are as follows:
• ts2_or62_images.zip\RDObjects.img
• ts2_or62_images.zip\tpo_objects.img
• ts2_or62_images.zip\ts2.img
The contents of the ts2_or62_resources.zip archive are as follows:
• ts2_or62_resources.zip\TS2 User Guide.pdf
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,12590,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%" ts2zip http://hostname/openroad/ 62demo
the application is downloaded from the Loadnrun Server location:
"%II_W4GLAPPS_DIR%\eclient\62demo\ts2zip"
to the Loadnrun Client eclientcache location:
"%APPDATA%\Actian\eclientcache\hostname\62demo\ts2zip"
The following command displays the run.bat script that was created in the eclientcache for hostname\62demo\ts2zip\run.bat:
"%II_LOADNRUN62_CMD%" /listrun
Example output:
===========================================================================================
Loadnrun62: Tue 03/11/2014 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\62demo\ts2zip\run.bat
===========================================================================================
The contents of hostname\62demo\ts2\run.bat is as follows:
@ECHO OFF
::
:: File Generated by Loadnrun on 11-mar-2014 17:05:30
::
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,12590,0
SET II_ECLIENT_SUFFIX=62demo
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%\syswow64
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_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 ts2zip without checking the Loadnrun Server.
The original install4gl.txt file is downloaded to the Loadnrun eclientcache under the following name: hostname\62demo\ts2zip\ts2zip.config. This file is identical with the install4gl.txt file located on the Loadnrun Server.