Packaging for GWA
Genero Web Application (GWA) is a Genero application running entirely in the browser.
To understand Genero Web Application basics, go to Genero Web applications in the Genero Business Development Language User Guide.
Package for a GWA application
Creating a package for a mobile platform follows the general packaging procedure.
- Navigate to your packages group.
- Right-click the packages group and click New Package.
- Click Genero Web Application.
| Directory | Contents |
|---|---|
| Binaries | Binary files, such as the compiled modules (.42m files). |
| Config | Configuration files. By default, this node includes fglprofile to provide the database driver and source information. |
| Database | Database files. By default, this node includes db files, because SQLite is the supported database. |
| Images | Image files. By default, this node includes .png, .jpg, and .ttf files, as well as the image2font.txt file. |
| Resources | Application resource files, such as action defaults (.4ad) and style files (.4st). |
| Webcomponents | Web component files. |
To define the title used by a GWA application, navigate to the Properties window and within the Package section specify the Label.
For more information, go to Package node properties.
GWA package QR code access and host configuration limitations
By default, GST uses the network host name configured at the operating system level when
generating QR codes for GWA packages. This allows scanning the QR code with a mobile device to
access the published package. However, browser based execution of GWA packages is subject to
limitations. Running a GWA package without a certificate is only permitted on
localhost, which prevents access from external devices.
--cert-file "<path to .crt file>" and
--cert-key "<path to .pem file>"Launch and debug a GWA package
To launch a GWA application, right-click on the GWA package node, select Deploy and then Launch. The Genero Application Server (GAS) launches the application.
To debug an application, choose one of the following options:
- Right-click on the GWA package node, select Deploy and then Debug.
- Right-click on the GWA package node, select Deploy and copy the URL from the Output window. In the toolbar select , enter the URL and click Debug.
Show deployed URLs
The Show deployed URLs context menu item provides direct access to deployed application URLs for GWA packages.
- Right click on the GWA package.
- Select Show deployed URLs.
Upon execution, Genero Studio (GST) starts the Genero Application Server (GAS) if it is not already running. It then queries the GAS to retrieve the list of deployed applications associated with the selected package. The associated URLs appear in the Output panel.
GWAUSERDIR
Genero Studio packages a Genero Web Application (GWA) by copying all files from the
directory specified in the GWAUSERDIR environment variable into the
gwa directory, located inside the application's distribution folder. For example,
you can use the GWAUSERDIR variable to set up a manifest file and favicon to use in your GWA
package.
GWAUSERDIR is a Genero Studio-specific environment variable. For more
information on Genero Studio-specific environment variables, go to Genero Studio-specific environment variables.
Web application manifest file
A web application manifest file is a JSON file that contains important information about your Genero Web Application (GWA). The manifest file for a GWA is named gwa.webmanifest and is located in the programdir/gwa directory of your project. This file allows you to customize various aspects of your web application, including:
- Icons: Change the icons that represent your application.
- Screenshots: Add screenshots to showcase your application.
- Application title: Modify the title displayed for your application.
For more information on the web application manifest file, go to Web application manifest file in the Genero Business Development Language User Guide.
PhoneDemo
The PhoneDemo_Web_App is part of the package nodes within the PhoneDemo. This provides an example of a GWA package node. For instructions on building, deploying and launching the PhoneDemo as a Genero Web Application, go to GWA (in GST) Quick Start.