Packaging for GWA
Genero Web Application (GWA) is a Genero application running entirely in the browser.
With a GWA, you do not need a runtime system (fglrun) process on the server side. In fact, there is no other software server side except a web server. A GWA is by default a progressive web app (PWA); meaning once loaded from a web server, it can continue to run offline without any connection to the internet.
A GWA has certain similarities with Genero Mobile for Android™(GMA) and Genero Mobile for iOS (GMI) applications; the main difference is that the Genero runtime is not compiled into native code, instead the runtime system is compiled to WebAssembly modules (wasm) for execution on the web at native speed.
Another noticeable difference between GMA/GMI and GWA, is that a GWA emulates a file system in the browser, whereas in a GMA/GMI application the file systems of Android/IOS® can be used.
For information on configuring Genero Studio with GWA, go to Configure for GWA.
For further information on GWA, 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.
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.
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 GST 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 information on the PhoneDemo, go to Genero mobile app demos.