Build Genero archive
Build a Genero Archive for deployment of applications and services.
Once you have created your application and service, the goal of this quick start is to create a Genero Archive (gar) file to deploy your application with the following steps.
Steps
-
Start the command line interface and set the environment for your Genero BDL using
envcomp.
- On Linux®/macOS™, change to your Genero BDL installation directory and run
the script, for example:
cd /opt/fourjs/fgl ./envcomp
- On Windows®, change to your Genero
BDL installation directory and run the bat file, for example:
cd "c:\program files\fourjs\fgl" envcomp.bat
- On Linux®/macOS™, change to your Genero BDL installation directory and run
the script, for example:
-
Create a new directory for the archive (you can name it "myArchive").
mkdir myArchive
-
Navigate to myArchive and create two subdirectories, one called
app and one called service.
Important:
All your files must be included under one directory. This example shows a valid organization of files. There is no requirement for this other than that all your application files, along with your application configuration (xcf), and MANIFEST file, must sit under one directory.
mkdir app
mkdir service
-
Copy or move your compiled application files (42m and
42f) to these subdirectories.
- Copy helloapp.42m and helloapp.42f to the app directory.
- Copy helloservice.42m to the service directory.
-
With a text editor, create the application and service configuration files
(xcf).
-
Copy the configuration shown in the example and save it to helloapp.xcf in
the app directory.
<?xml version="1.0"?> <APPLICATION Parent="defaultgwc"> <RESOURCE Id="log.console.categories">ERROR WARNING INFO</RESOURCE> <EXECUTION> <PATH>$(res.deployment.path)/app</PATH> <MODULE>helloapp.42m</MODULE> <ACCESS_CONTROL> <ALLOW_FROM>$(res.access.control)</ALLOW_FROM> </ACCESS_CONTROL> </EXECUTION> </APPLICATION>
-
Copy the configuration shown in the example and save it to
helloservice.xcf in the service directory.
<?xml version="1.0"?> <APPLICATION Parent="ws.default"> <EXECUTION> <PATH>$(res.deployment.path)/service</PATH> <MODULE>helloservice.42m</MODULE> </EXECUTION> </APPLICATION>
-
Copy the configuration shown in the example and save it to helloapp.xcf in
the app directory.
-
With a text editor, create the MANIFEST file, and save it with the name
"MANIFEST" (without extension) in the root of your archive directory.
In the MANIFEST, list the application and service xcf file located in the archive directory, as shown in the example:
<MANIFEST> <APPLICATION xcf='app/helloapp.xcf'/> <SERVICE xcf='service/helloservice.xcf'/> </MANIFEST>
Figure 1 shows a valid organization of the archive directory. -
Build the Genero Archive file (gar) using the fglgar
tool.
Change to your archive directory and type the command:
cd myArchive fglgar gar --output ../hello.gar
The hello.gar is created in the parent directory of the archive directory. The gar file is ready to be deployed in a war file.