Deploy an application

When you have your application configured correctly and running on the GAS, you are now ready to package the files required to deploy it as an application.

This topic provides you with steps to configure and deploy an application that you can test on your own machine.
For the purposes of this quick start, you can use the configuration files created for the HelloWorld.xcf application, see Configure an application.
  1. Update the application configuration file <PATH> element as follows:
    <PATH>$(res.deployment.path)</PATH>
  2. Create a new directory where you will archive the application's source files (you can name it, for example, "helloworld_deploy").
  3. Copy all the HelloWorld application source files from $GSTDIR/samples to the archive directory.
    Note: If you are deploying resources (e.g. images or Web components) with your application, these need to go in dedicated directories in the archive. For details about building an archive with public resources, please see Quick start: Genero Archive.
  4. Copy the updated application configuration file (e.g. HelloWorld.xcf) to the directory with the application source files.
  5. In the same directory, create a MANIFEST file ( see The MANIFEST file) and save it with the name "MANIFEST" (without extension).
    <MANIFEST>
      <DESCRIPTION></DESCRIPTION>
      <APPLICATION xcf="HelloWorld.xcf"/>
    </MANIFEST>
  6. Create an archive (gar) file to deploy your application by performing the following steps:
    1. From the command line, navigate to the directory that contains the application source files AND the MANIFEST file.
    2. Enter the command: fglgar --gar.

      A Genero archive file (gar) is created in your current directory that has the same name as the directory. See The fglgar command.

Deploy your application on your machine

About this task:

Once you have configured your application for deployment and created an archive for it in the steps above, you can now deploy your application locally on your machine to test it as described in the next steps.

  1. Deploy your (gar) file locally on your machine.

    To deploy an archive named HelloWorld_deploy.gar:

    gasadmin --deploy-archive HelloWorld_deploy
    A subdirectory is created in your $(res.deployment.path) directory identified by the archive name and the date and time deployed,, e.g. HelloWorld_deploy-20150423-130838. All the files contained in archive (gar) are placed in the directory.
  2. Enable your deployed application locally on your GAS.

    To list all deployed archives:

    gasadmin --list-archives

    To enable the archive, reference it by its archive name:

    gasadmin --enable-archive HelloWorld_deploy

    This enables the application by copying its configuration file (e.g. HelloWorld.xcf) to your $(res.appdata.path) directory.

Run the deployed application

About this task:

Once you have deployed your application on your machine in the steps above, you can now run your application locally to test it as described in the next steps.

  1. Start the standalone dispatcher from the command line by typing httpdispatch.
  2. In a browser enter the address of your deployed application, e.g. http://localhost:6394/ua/r/HelloWorld The Genero Application Server responds, and you should see your application displayed and be able to interact with it. You have successfully deployed an application.