If you only want to test a Gambas project, or if you want to run a Gambas script, then start all required Gambas programs (e. g. compiler, archiver and interpreter) in one console. The following sections provide an overview of the syntax and semantics of the individual program calls. The following chapters describe how to use the programs in a sample project.
The program' gbi3' gives you an overview of the components in the installation directory or generates files with a description of selected components in relation to the used classes as well as their properties, methods and events.
Syntax: [sudo] gbi3 [options] [components]
Option | Description |
---|---|
-r or –root <gb-install-index> | path to the Gambas installation directory |
-V or –version | Display the program version |
-L or –license | display of the program license |
-h or –help | Display of the program help |
Table 5.0.2.1.1.1: informer
So you use the program' gbi3' to display all components in the Gambas installation directory. If you don't have Gambas installed in the default installation directory, you have to specify the path; otherwise you can omit it and start it with $ sudo gbi3/:
hans@linux:~$ sudo gbi3 -r /usr/local # Default path for the Gambas version 3.3.4 gb gb.cairo gb.chart gb.complex … gb.xml.xslt hans@linux:~$
The following call generates 2 files that contain a class overview of the selected component as well as an overview of the properties, methods and events of the classes:
hans@linux:~$ sudo gbi3 -v gb.media Running myself for component gb.media LD_PRELOAD=/usr/local/lib/gambas3/gb.media.so Analyzing component gb.media Loading native component: /usr/local/lib/gambas3/gb.media.so wrote /usr/local/share/gambas3/info/gb.media.info wrote /usr/local/share/gambas3/info/gb.media.list hans@linux:~$
Displaying the contents of the 2 text files: The file component. list contains a class overview, you can use reads (end with q) or gedit under Gnome instead of cat.
hans@linux:~$ cat /usr/local/share/gambas3/info/gb.media.list
The file componenten. info contains an overview of the properties, methods and events of the classes in a specific format.
hans@linux:~$ cat /usr/local/share/gambas3/info/gb.media.info
Syntax: gbc3 [options] [<project directory>]
Option | Description |
---|---|
-g | Debugging information will be added |
-v or –verbose | The program documents internal processes |
-a | Re-compile everything again |
-w | Display warnings |
-t or –translate | Output of translation files |
-p or –public-control | Set all components to 'public' |
-m or –public-module | Set module symbols to 'public' (default) |
-s or –swap | exchanges the endianess of the compilation. |
-r or –root <directory> | Gambas installation directory |
-e or –translate-errors | Display of the error messages at the time of translating |
-x or –exec | Defines the preprocessor constant 'Exec'; http://gambasdoc.org/help/lang/.if?v3 |
-V or –version | Display the program version |
-L or –license | Advertisement of program license |
-h or –help | Display of the program help |
Table 5.0.2.2.2.1: Compiler
Note:The Endianess or Byte order specifies how the individual bytes of a multibyte data type are arranged. In Little-Endian, the least significant byte is at the smallest memory location, in Big-Endian, the least significant byte is at the highest.
Original:' A compiled file is a binary representation of a class, that contains every information useful to the interpreter: functions transformed to byte code, constants, variable definition, debugging information, etc'.
The Archiver' gba3' generates an executable file from a Gambas project or extracts a special file from an executable Gambas file if the -x option is set. The created archive contains all files, i. e. the executable program and all data files.
The archive is marked as a script in the magic header (“Shebang”) #! /usr/bin/ gbx3, so Linux calls it as such in the background with the interpreter to run it. Of course, the interpreter and all necessary components must be installed to run a Gambas program.
Syntax: gba3 [options] [<project directory>] gba3 -x <archive-path> <file>
Option | Description |
---|---|
-o -output=ARCHIV | Archive path[<project directory>/<project name>. gambas] |
-v or –verbose | The program documents internal processes |
-s or –swap | Swapping the Endiness |
-V or –version | Display the program version |
-L or –license | display of the program license |
-h or –help | Display of the program help |
-x or –extract=ARCHIV | Archive path |
Table 5.0.2.3.3.1: Archiver
The program' gbx3' executes a Gambas program or evaluates a Gambas expression if the -e option is used.
Syntax: gbx3 [options] [<project-file>] [-- <list of arguments: arg_1 arg_2 … arg_k>]
Option | Description |
---|---|
-g | The debugging mode is executed |
-p <path> | Profiling and debugging mode are activated |
-V or –version | Display the program version |
-L or –license | display of the program license |
-h or –help | Display of the program help |
-H od –httpd | (since revision 5209) Execute through an embedded HTTP server. The program interprets it as a CGI script and loads the gb. httpd component. |
-e | Evaluation of a Gambas expression |
The program' gbs3' first compiles a Gambas script and then executes it.
Syntax: gbs3 [options] [<path_to_the_script-file>]
Option | Description |
---|---|
-c or –nocache | force recompilation of the script and ignore cached compilations. |
-v or –verbose | The program documents internal processes |
-V or –version | Display the program version |
-L or –license | display of the program license |
-h or –help | Display of the program help |
Table 5.0.2.5.5.1: Scripter
The program' gbw3' compiles a Gambas server page script and executes it on the web server.
Syntax: gbx3 [options] [<url: server-page-file>]
Option | Description |
---|---|
-c or –nocache | force recompilation of the script and ignore the cache. |
-v or –verbose | The program documents internal processes |
-V or –version | Display the program version |
-L or –license | display of the program license |
-h or –help | Display of the program help |
Table 5.0.2.6.6.1: Web Page Scripter