Gambas - Programming and Distribution (Page 2 of 2)

Article by jonjermey (3,172 pts ) , published Apr 19, 2009

Packaging and distribution

At this stage we have a working Gambas project file, but the only people who can use it are those who already have Gambas installed. That leaves out a lot of users! To make your program more portable for distribution, there are two steps you can carry out:

1. Make an executable file

2. Package the file for distribution as a .deb

To make an executable file, go to the Project menu and select "Make Executable." Within a few seconds this will create a file called XXX.gambas, where XXX is your project name, inside your project directory. This can be copied and distributed to anyone who has a runtime version of Gambas installed, which includes by default most of the major Linux distributions. A second option, "Project/Make Source Archive' will just bundle together all the files associated with the program into a single compressed .gz file.

To make the application more portable still, it can be bundled into an installation package. "Project/Make Installation Package" gives the user the option of making installation packages for any or all of the major distros: Debian, Fedora, Mandriva, OpenSUSE, and of course Ubuntu. A wizard then takes the user through the necessary steps: the creator's name and email address are added, the appropriate group is chosen for repository storage, and a default Applications menu category and position is specified for each distro package. Gambas then compiles the necessary files into a distributable which can be uploaded to a repository.

Packaging and distribution

Making an installation packageChoosing an installation menu for Ubuntu

What next?

Now you know how to do simple Gambas programming, what next? There are any number of easy projects you can cut your teeth on. Unfortunately Gambas support on the web is a little sparse, and the built-in help is little more than a list of commands, but a Google search for 'Visual Basic' will bring up many tutorials and books that you should be able to adapt to Gambas relatively easily. Later, when you want to extend your skills, here are some topics to look into:

  • Saving and opening text files
  • Graphics -- using Gambas to make patterns and designs in a drawing area
  • Connecting with and modifying a mySQL database
  • Control groups and arrays: connecting one piece of code with many different controls
  • Multimedia: using Gambas to create sound, music and video players
  • Games: from simple text games with random numbers and a timer through to complex movements and designs.

The sky is the limit!