The gsform command

The gsform tool is used at the command line to compile and import forms, convert .4fd files, extract localized strings, and keep a copy of the .per file created during compilation.

The Genero Studio form definition file (.4fd) can also be compiled from the operating system command line, using the tool gsform, which is located in the GSTDIR/bin directory. The gsform tool executable file should not be moved to another directory.

Use gsform if you want to:

  • compile a 4fd file from the command line
  • import a per file into Genero Studio Form Designer format
  • convert 4fd files in the old Genero Studio format to the new 4fd format
  • extract localized strings
  • keep a copy of the per file created during compilation

gsform Syntax

gsform [options] file1[4fd] file2[4fd] ...

where fileN is a Genero Studio form file, with or without the extension being specified.

  • You can specify a single command, with or without options. Not all options work with all commands.
  • You can specify options without any commands.
  • You can omit commands and options completely. To compile a form, for example, you can simply enter: gsform formname.
Table 1. gsform - Help and version information
Option Description
-h Display help.
-V Display version information.
Examples:
  • gsform -h shows help.
  • gsform -V displays the version.
Table 2. gsform - Commands
Option Description
-m Extracts localized messages.

See theLocalized Strings topic in the Genero Business Development Language User Guide for more information.

-c Converts old format .4fd files to new format.

Old format filename.4fd files are backed up as filename.bak; new format files are saved as filename.4fd. If the backup fails, the conversion is aborted.

-clean Cleans orphan settings.
-import Imports a .per file as a Genero Studio .4fd file.
Examples:
  • gsform -m myfile.4fd extracts localized messages.
  • gsform -c myfile.4fd converts the form file to a new format.
  • gsform -clean myfile.4fd cleans to orphan settings.
  • gsform -import myfile.per imports a .per file.
Table 3. gsform options
Option Parameter Description
-keep   Keep the intermediate .per file. By default, intermediate .per files are deleted.

The compilation process uses temporary .per files. This option avoids the temporary files deletion so that the file can be read. This can be useful in cases where there are unexpected (internal) errors.

Important: Form Designer and gsform do not allow compilation when .per files and .4fd files with the same file name are present in the same directory.
-dbname DBNAME Specify the database to use for form compilation.

If your form file uses a database, it is strongly recommended that you provide the database name using this option to reduce computation time.

-i   Ignore and overwrite existing .per file.
-importTextAsLabel   Convert text strings into labels during a text form import.
-saveWCSettings   Save WebComponent settings files during text form import.
-M   Display all compilation messages.

See the Compiling Programs topic of the Genero Business Development Language User Guide for additional information.

-W WARNINGS Display warning messages.

Adding the parameter all displays all messages.

-wcDir WEBCOMPONENTS_DIR Specify the WebComponents directory path.
-ag-templatePath   Specify which Application Generator template directory used to load the Application Generator settings (file types, properties).
-translate LOCALE Specify the translation file.
Examples:
  • gsform -M -W all myfile.4fd compiles with warnings and errors displayed in the output.
  • gsform -keep myfile.4fd keeps the .per file generated during the form file compilation.