Create a program directory
To build a GWA application, you must create a directory.
In the directory referred to as the programdir, copy your compiled program files (such as .42m, .42f, fglprofile, and so on) and resource files (including images, database files, and web components) required by the Genero Web application.
In the following tree view, you can see the expected structure of this program directory. This directory may have a structure similar to that described for mobile applications in Directory structure for GMA apps.
programdir/
|-- main.42m --
|-- *.42m |
|-- *.42f |
|-- fglprofile |
| ... |Program files
|-- *.42s |
|-- ... other resource files/dirs ... |
|-- gwa |
| |-- gwa.webmanifest |Customized files
| |-- index_tpl.html |
| |-- locales |
| |-- de/ |
| |-- *.42s |Local files
| |-- fr/ |
| |-- *.42s |
|-- webcomponents |
| |-- component-type |
| |-- component-type.html |
| |-- other-web-comp-resource |
| ... --
Within the programdir directory, you should include the following essential files:
Program main module
You can specify the desired module as the main entry point by using the gwabuildtool --main-module command during the application build process.
fglprofile
The GWA app reads the default fglprofile provided in $FGLDIR/etc/fglprofile. If using a custom fglprofile file for you GWA app, it must be located in the root of the programdir directory, beside the main program module. For details on what environment variables you may need to set for your GWA application, go to Set environment with fglprofile.
Web Application Manifest
Every GWA application must include a web application manifest file when deployed. If the
gwabuildtool
does not find
programdir/gwa/gwa.webmanifest, it creates a default
manifest file with Genero icons in the distribution directory. When you are using a customized
manifest file, it must be named gwa.webmanifest and be located in the
programdir/gwa directory of your project. For more details,
go to gwa.webmanifest file.
Language directories for localized strings
For each language supported by your application, a directory must exist under programdir/gwa, with a name including the locale codes.
For more details on setting locale and customizing translation text, go to Internationalize your app.