12.9 fcompile
This is the Aubit4GL tool to create a form binary from a .per form file.e.g.
Usage:
fcompile customer
Note: Omit the .per form suffix
will create a file with suffix .afr.
12.9.1 Builtin Forms
It is possible to build the compiled binary form into an Aubit4GL program. This allows you to distribute binaries without the need to bundle the .afr file with it. It also allows the file to run in an environment where the variables are incompatible with the environment where the forms were originally compiled.
The process to build in the form(s) is as follows:
-
Set the environment:
A4GL_PACKER=PACKED
A4GL_FORMTYPE=GENERIC
-
Use fcompile -c <form> to generate a .c file
-
Inside the .4gl code, before displaying the form use the statement:
CALL form_is_compiled( form, “MEMPACKED”, “GENERIC”)
-
Compile the .c formfile with the program code. e.g.
4glpc progr.4gl form.afr.c -o prog.4ae
You can (as of Version 1.2) create an xml version of a .per file by using the -xml option:
fcompile -xml customer
will create customer.per.xml
This option is intended for use with the new GUI Visual Display clients such as theVentas VDC program.
It is not strictly necessary to use the -xml option as Aubit4GL will convert a .afr file on the fly to xml for transmission to the XML front ends.