GBS3(1)

๐Ÿ“ฆ
version 3.22.2 ยท 3 versions
, in arch rolling, debian trixie, fedora 43, fedora 44, ubuntu questing, ubuntu resolute, ubuntu stonking

๐Ÿ’… GBS3 โ€” bestie, it's the GAMBAS Scripter โœจ

okay so welcome to gbs3, aka the GAMBAS Scripter, from section 1 of your manual. sit down, grab a strawberry ๐Ÿ“, and let me tell you everything about this icon.


โœจ NAME โœจ

gbs3 โ€” the GAMBAS Scripter. that's it, that's the name, no cap. ๐Ÿ‘‘


๐ŸŒธ SYNOPSIS ๐ŸŒธ

here's how you actually call her:

gbs3 [options] [--] [<script file> | <project directory> | -]
gbs3 --convert-project <source project directory> <destination script directory>
gbs3 --convert-script <script file> [<Destination where project directory is created>]
gbs3 [-p | --plugin] <script file> [<Destination directory where plugin is created>]

like. look at that range. she does everything. ๐Ÿฆ‹


๐Ÿ’– DESCRIPTION ๐Ÿ’–

so Gambas is a free development environment built on a Basic interpreter with object extensions โ€” think a lil mashup of Java(tm) and Visual Basic(tm). and with Gambas you can:

  • quickly design your program GUI with Qt or GTK+ ๐ŸŽ€
  • access database systems like MySQL, PostgreSQL, SQlite or ODBC databases ๐Ÿ’พ
  • pilot applications with DBus โœจ
  • translate your program into many languages ๐ŸŒˆ
  • create GStreamer, OpenGL or SDL applications ๐ŸŒธ
  • and so on... literally the list does not end bestie

and gbs3? she's the interpreter that lets you compile and execute a Gambas script. main character energy fr fr.

she can also be used to convert a Gambas project to a script, or a script back to a project. versatile queen. ๐Ÿ‘‘


๐Ÿ‘‘ OPTIONS ๐Ÿ‘‘

every single one, no skips, periodt:

  • -b, --buildonly โ€” process and compile the script, but do not execute it. build only, no running, she's just getting ready ๐Ÿ’…
  • -c, --nocache โ€” force the script compilation and do not check the cache. we're doing this fresh, no shortcuts โœจ
  • --convert-project โ€” convert a Gambas project into an executable Gambas script file ๐Ÿฆ‹
  • --convert-script โ€” convert a Gambas script file into a Gambas project ๐ŸŽ€
  • -e โ€” execute the source code provided by the command line, using ':' as separator ๐ŸŒธ
  • -f, --fast โ€” use just-in-time compiler, zoom zoom ๐Ÿ”ฅ
  • -g, --debug โ€” add debugging information to the application ๐Ÿ›
  • -h, --help โ€” display help and exit, your bestie when you're lost ๐Ÿซถ
  • -l, --list โ€” display a list of available Components or Libraries. use -l component or -l library ๐Ÿ‘€
  • -L, --license โ€” display license ๐Ÿ“œ
  • -p, --plugin โ€” generate a plugin executable that can be loaded by other scripts ๐Ÿงš
  • -S, --strict โ€” fail if 'Public' or 'Sub' are defined without a 'main' function; otherwise create main() ๐Ÿ’€
  • -t, --trace โ€” turn on tracing option during execution ๐Ÿ”
  • -T, --terse โ€” only print a very terse error report on compile errors. short and to the point, she's not doing paragraphs ๐Ÿ˜ญ
  • -u, --use โ€” load component or libraries, like this: 'comp1,comp2,lib1...' ๐Ÿ’œ
  • -v, --verbose โ€” be verbose ๐Ÿ—ฃ๏ธ
  • -V, --version โ€” display version โญ
  • -w, --warnings โ€” display warnings during compilation โš ๏ธ

๐ŸŒˆ PROJECT CONVERSION ๐ŸŒˆ

so gbs3 can convert a Gambas project into an executable script file using the --convert-project option. here's the tea:

the input project directory is used to create the script, and that script gets written to the output script directory. the script is created and named the same as the originating project. cute, right?

gbs3 MyProjectDirectory DestinationScriptDirectory

๐ŸŽ€ SCRIPT CONVERSION ๐ŸŽ€

and she can go the other way too โ€” convert a script file to a full Gambas project using the --convert-script option. ๐Ÿ’–

the input script gets translated into a project with the same basename as the script, and it's created in the specified directory.

and if you don't specify an output directory? then the environment variable PWD is used as the location to create the Gambas project. iykyk.
gbs3 MyScript.gbs ~/Projects

that created the project 'MyScript' directory inside the user's 'Projects' directory. slay. โœจ


๐Ÿงš PLUGINS ๐Ÿงš

okay this part is lowkey the coolest. gbs3 can create plugins that can be used by other scripts or Gambas applications, after being built with the --plugin or -p option. ๐Ÿฆ‹

plugins get created in a user-selected directory, and they are also executed and cached in this directory โ€” unlike a normal script, where executables are created in the temp directory and executed from there. this is what lets plugins persist after the scripter exits. she stays. ๐Ÿ‘‘

and if no output destination is specified, then the plugin is created in the ~/.local/lib/gambas directory, and may be loaded from there using the component.load() function. ๐Ÿซถ

gbs3 MyPluginScript [Plugin Destination Directory]

โญ EXAMPLE โญ

here's a lil something to get you going:

#!/usr/bin/env gbs3
for i as integer = 0 to 10
  print i;;
next

yes bestie, that's a shebang and a loop, and yes it's iconic ๐ŸŒธ


๐ŸŒธ AVAILABILITY ๐ŸŒธ

the latest version of Gambas can always be obtained from gambas.sourceforge.net, and documentation about the language lives at http://gambaswiki.org/wiki. go get her ๐Ÿ’…


๐Ÿ› REPORTING BUGS ๐Ÿ›

found a bug? report it to http://gambaswiki.org/bugtracker. be nice about it, the devs are doing their best ๐Ÿซถ


Copyrightยฉ Benoรฎt Minisini <benoit.minisini@gambas-basic.org>;

This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

like fr fr, no warranty at all, so don't come for anyone if it breaks ๐Ÿ˜ญ

and that's the whole page bestie, every last detail preserved, nothing skipped, we ate and left no crumbs ๐Ÿ’–โœจ

this was the gbs3 manual page, section 1, from August 2024 โ€” GBS3(1). mwah, go compile something cute ๐ŸŽ€๐Ÿฆ‹๐Ÿ’œ