Build Genero archive

Build a Genero Archive for deployment of applications and services.

Before you begin:

Run the script file envcomp in the Genero BDL installation directory to make sure that your FGLDIR and PATH are set correctly to run compiler and runtime system tools.

  1. At the command line of the directory where you build the archive, create two subdirectories, one called app and one called service.
    Note:

    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

  2. Copy or move your compiled application files (42m and 42f) to these subdirectories.

    The archive directory now contains the compiled application files in the app directory, and the compiled service files in the service directory.

  3. With a text editor, create the MANIFEST file.
    In it 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>
    
  4. With a text editor, create the application and service configuration files (xcf).
    This example shows a sample application configuration file, helloapp.xcf. Save it to the app directory.
    <?xml version="1.0"?>
    <APPLICATION Parent="defaultgwc">
        <RESOURCE Id="log.console.categories">ERROR WARNING INFO SESSION VM</RESOURCE>
        <EXECUTION>
          <PATH>$(res.deployment.path)/app</PATH>
          <MODULE>helloapp.42m</MODULE>
          <ACCESS_CONTROL>
            <ALLOW_FROM>$(res.access.control)</ALLOW_FROM>
          </ACCESS_CONTROL>
        </EXECUTION>
        <AUTO_LOGOUT>
          <TIMEOUT>20</TIMEOUT>
        </AUTO_LOGOUT>
    </APPLICATION>
    
    The example shows a sample application service configuration file, helloservice.xcf. Save it to the service directory:
    <?xml version="1.0"?>
    <APPLICATION Parent="ws.default">
      <EXECUTION>
        <PATH>$(res.deployment.path)/service</PATH>
        <MODULE>helloservice.42m</MODULE>
      </EXECUTION>
    </APPLICATION>
    
  5. Build the Genero Archive file (gar) using the fglgar tool.
    At the command line of the archive directory type the command:
    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.