Helper tools

Tools that may help you work with Genero Web Applications in development.

Warning:

These tools are experimental, their function, syntax/name, and usage may change in future versions.

gwarun

The gwarun tool runs a GWA program in the browser on your desktop.

Syntax

gwarun [ options ] module_name[.42m]
  1. options are described in Table 1.
  2. module_name is the name of the program module which the command is to run.

Options

Table 1. gwarun options
Option Short option Description
--version -V Displays version information.
--help -h Displays options for the tool.
--debug -d Starts in debug mode. Debugs the program via fgldb.
--title name -t

Title for the web application

--use-gas -g

Use GAS in FGLASDIR to run the program. FGLASDIR needs to be set.

--iframe -i

Test the application in an iframe.

--popup -p

Test the application in a popup.

--proxy-gas -o

QA mode for proxying

Usage

To run gwarun, you need to have it in your PATH (see Install Genero Web Application).

The gwarun command line tool can be used in development to run and test GWA programs in the browser on your desktop.

Example

Copy this program and save as test.4gl.
MAIN
  MENU
    COMMAND 'exit'
       EXIT MENU
  END MENU
END MAIN
Run these commands to compile and run the program:
fglcomp test
gwarun test
gwarun calls gwabuildtool, so you do not need to call it explicitly. A gwa_dist directory is created for the package and gwasrv is called to serve the application. The program displays in your default desktop browser.
To specify a different browser to the default one, use the BROWSER environment variable and set it to either "chrome","firefox","safari" , "edge", or "none". Setting BROWSER to "none" does not invoke a particular browser, instead a message appears on the command line:
Copy the following URL into your browser: http://localhost:9102/d/r/index.html
You can open any browser to input this URL: Chrome in incognito mode, the mobile SafariĀ® browser from an IOSĀ® simulator, and so on.

In production, you need to deploy your GWA applications to a GAS for access via a web server.

gwasrv

The gwasrv is a mini web server written in Genero that allows you to run applications generated by gwabuildtool in the browser on your desktop.

Syntax

gwasrv homepage 
  1. homepage is the name of the main HTML page of your application. Typically, this is index.html

Usage

To run gwasrv, you need to have it in your PATH (see Install Genero Web Application).

The gwasrv command line tool can be used in development to serve and test GWA applications generated by gwabuildtool in the browser on your desktop.

In production, you need to deploy your GWA applications to a GAS for access via a web server.

Example

Run these commands to run a GWA application in the default output directory, gwa_dist:
cd gwa_dist
gwasrv index.html
The default browser opens with an address like http://localhost:9101/d/r/gwa_dist/index.html and serves the Genero application now running in the browser.
To specify a different browser to the default one, use the BROWSER environment variable and set it to either "chrome","firefox","safari" , "edge", or "none". Setting BROWSER to "none" does not invoke a particular browser, instead a message appears on the command line:
Copy the following URL into your browser: http://localhost:9102/d/r/index.html
You can open any browser to input this URL: Chrome in incognito mode, the mobile Safari browser from an IOS simulator, and so on.