isCOBOL Evolve : SDK User's Guide : Utilities : ISUPDATER (Update Facility) : Distribution of a COBOL application through the Update Facility and isws files
Distribution of a COBOL application through the Update Facility and isws files
The information in this chapter is applicable to thin client environments where the client machines are Windows.
To deploy the application through the Update Facility of isCOBOL Server, the isCOBOL Client must be installed on the client machines.
Install either isCOBOL_yyyy_R_n_Windows_arc.exe (it requires Java installed on the machine) or isCOBOL_yyyy_R_n_THIN_Windows_arc.ext (it doesn’t require Java on the machine as it installs its own JVM) where where yyyy is the year, R is the release number, n is the build number, arc is the system architecture and ext is either "exe" or "msi".
When prompted, choose to associate the isws extension to the isCOBOL Client:
The isws files are property files that include the isUpdater configuration. See Client Configuration (isupdater.properties) for the list of properties that you could include in this kind of file. The isws files could be passed to isUpdater via the -c option. The installer creates an association between the isws extension and the command:
isupdater -c %1
Below we describe how to set up the deployment of a COBOL application through the Update Facility and isws files, using the isCOBOL Server as HTTP server for the download of the application.
What to do server side
The user should gather the platform-dependent components from the corresponding isCOBOL setups and place them in specific folders on the server machine. Also the COBOL application items (classes, configuration and icons) should be gathered in a dedicated folder.
Here is a suggestion: create the following subfolders in the isCOBOL installation directory (that we assume as /home/veryant/isCOBOL2020R2):
Directory
What to copy inside
libWin32
Content of the lib folder of isCOBOL for Windows 32 bit
libWin64
Content of the lib folder of isCOBOL for Windows 64 bit
binWin32
Content of the bin folder of isCOBOL for Windows 32 bit
binWin64
Content of the bin folder of isCOBOL for Windows 64 bit
myApp
Items of the COBOL application, described later
The isCOBOL Server must be started with the option –hs in order to activate the HTTP Server feature, e.g.
iscserver –hs
Create a file named swupdater.properties in the isCOBOL Server’s working directory and put the following entries into it:
swupdater.version.iscobol=###
swupdater.lib.win.32.iscobol=/home/veryant/isCOBOL2020R2/libWin32
swupdater.lib.win.64.iscobol=/home/veryant/isCOBOL2020R2/libWin64
swupdater.version.iscobolNative=###
swupdater.lib.win.32.iscobolNative=/home/veryant/isCOBOL2020R2/binWin32
swupdater.lib.win.64.iscobolNative=/home/veryant/isCOBOL2020R2/binWin64
swupdater.version.myApp=1
swupdater.lib.myApp=/home/veryant/isCOBOL2020R2/myApp
Where ### il the build number of the isCOBOL Server. For example, for “release 2020 R2 build#1023.5-20200911-30388” you would use “1023.5”.
If you use third party jar libraries that need to be installed along with your COBOL application, copy them to the isCOBOL lib folder.
Put the following items in the myApp subfolder:
The class files of your COBOL programs,
The icons (bmp, jpeg, gif and png) used by your programs,
A file named myApp.properties that contains
o a valid runtime license,
o a code-prefix setting that points the folder C:\myApp (e.g. iscobol.code_prefix=C:\\myApp),
o the configuration of your COBOL application (e.g. keystrokes and file-prefix).
If you have custom native libraries that should be installed along with your application, copy them to the proper “bin<Platform>” folder (e.g. if you have a library named mylib.dll for both Windows 32 bit and Windows 64 bit, copy the 32 bit version to binWin32 and copy the 64 bit version to binWin64).
What to do client side
Create a file with isws extension, e.g. myapp.isws, and put the following entries into it:
swupdater.site=http://serverNameOrIp:10996
swupdater.version.iscobol=###
swupdater.directory.iscobol=C:/Users/UserName/Veryant/isCOBOL THIN2020R2/lib
swupdater.directory.clean.iscobol=true
swupdater.version.iscobolNative=###
swupdater.directory.iscobolNative=C:/Users/UserName/Veryant/isCOBOL THIN2020R2/bin
swupdater.directory.clean.iscobolNative=true
swupdater.version.myApp=0
swupdater.directory.myApp=C:/myApp
swupdater.directory.clean.myApp=true
swupdater.mainclass=com.iscobol.invoke.Isrun –c C:/myApp/myApp.properties MYPROG
Where ### il the build number of the runtime installed by isCOBOL THIN. For example, for “release 2020 R2 build#1023.4-20200827-30295” you would use “1023.4”.
MYPROG is the name of the program that you wish to execute. The class of this program must be found in the myApp folder discussed above.
The above snippet assumes that isCOBOL THIN was installed in the default location proposed by the setup wizard.
Note that swupdater.version.myApp in this file has a lower value of the corresponding property in the swupdater.properties file on the server. This is necessary to trigger the download of the COBOL Application (myApp) from the server machine to the local machine. After the first launch, swupdater.version.myApp is updated and its value matches the value server side. If you change the content of the myApp folder on the server, increase the value of swupdater.version.myApp in swupdater.properties on the server machine to trigger a new download of the myApp folder.
Double clicking on myapp.isws will trigger the program execution. It also will update the local copy of the isCOBOL runtime if necessary.
The file myapp.isws could be distributed via internet in the form of a file to be downloaded and executed.