Dokumentaro de Gambaso
Compilation & Installation
Components
Documents
Indekso de Lingvo
Language Overviews
LeguMin
Lexicon
Registro

How To Package your Project

Author: Steffen Ploetz

Prepare the creation of installation packages

After your project can be started in the Gambas IDE and works to your satisfaction and also if you want to make it available to other users, the next steps should be:
  • You need to make sure that your project can be easily installed in other environments. To do this, the project folder must not contain any spaces, because the project folder will later determine the name of the installation package. For example, you should change the folder ~/Projects/Gambas/GB Dia to ~/Projects/Gambas/GB-Dia.

  • You can internationalize your project. (see: How To Translate A Gambas Project)

  • You can test your project locally. To do this, compile your project in the Gamnas IDE. First you should check the settings in the Project | Configure executable menu. You can then create an executable program directly from this dialog or via the Project | Make executable menu. If you have created the executable program from your project in a folder of your choice, for example ~/Projects/Gambas/GB-Dia, you can open a terminal and start the program in this directory with ./GB-Dia.gambas.

Now it's time to actually create the installation packages (you can also test your installation packages locally as soon as they have been created).

Creation of installation packages

Gambas3 can make installation packages for various target distro's out of the box.

At the time of writing, the latest version is Gambas Version 3.19.1. Most of the installation packages, that can be made, consists of multiple files. (Older Gambas versions behave different. Version 3.18.0, for example, only creates one file per target distro and can't create installation package targeting AppImage.)

Let's have a look at two samples, Archlinux / Manjaro ... and OpenSUSE:

Target distro: Archlinux / Manjaro ... Target distro: OpenSUSE Description
gb-dia-0.1.0-1-any.pkg.tar.zst / gb-dia-0.1.0-1.src.tar.gz gb-dia-0.1.0-1.suse.noarch.rpm / gb-dia-0.1.0-1.suse.src.rpm Program installation package / Source code installation package
gb-dia-gtk-0.1.0-1-any.pkg.tar.zst / gb-dia-gtk-0.1.0-1.src.tar.gz gb-dia-gtk-0.1.0-1.suse.noarch.rpm / gb-dia-gtk-0.1.0-1.suse.src.rpm GTK2 program package metadata / GTK2 source code package metadata
gb-dia-gtk3-0.1.0-1-any.pkg.tar.zst / gb-dia-gtk3-0.1.0-1.src.tar.gz gb-dia-gtk3-0.1.0-1.suse.noarch.rpm / gb-dia-gtk3-0.1.0-1.suse.src.rpm GTK3 program package metadata / GTK3 source code package metadata
gb-dia-qt4-0.1.0-1-any.pkg.tar.zst / gb-dia-qt4-0.1.0-1.src.tar.gz gb-dia-qt4-0.1.0-1.suse.noarch.rpm / gb-dia-qt4-0.1.0-1.suse.src.rpm QT4 program package metadata / QT4 source code package metadata
gb-dia-qt5-0.1.0-1-any.pkg.tar.zst / gb-dia-qt5-0.1.0-1.src.tar.gz gb-dia-qt5-0.1.0-1.suse.noarch.rpm / gb-dia-qt5-0.1.0-1.suse.src.rpm QT5 program package metadata / QT5 source code package metadata

In summary up to 10 files (e.g. 10 files for Archlinux, Fedora, OpenSUSE, but only one file Autotools and Slackware) are created per target distro.

I recommend creating the installation packages in several runs, distro by distro, into different target folders. The following table contains an overview of all supported target distributions and a selection of distributions including the installation packages, that can be created on them.

Distro Target: Archlinux / Manjaro ... Target: Debian Target: Mageria Target: OpenSUSE Target: Ubuntu / Kubuntu / Mint ... Target: Autotools Target: Fedora / RedHat / CentOS Target: Slackware Target: AppImage (requires Gambas 3.19.0 at least)
Create on: Manjaro 23.1.4 native support needs debhelper needs rpm-tools, can be found in Add/remove Software needs rpm-tools, can be found in Add/remove Software needs debhelper needs autoconf, can be found in Add/remove Software needs rpm-tools, can be found in Add/remove Software native support needs appimage-builder
Create on: Debian 12 needs makepkg, can be found in Synaptic Package Manager but doesn't run through native support native support native support native support native support native support native support -
Create on: Ubuntu Version 22.04 - native support native support, but doesn't run through native support native support native support, but doesn't run through native support native support -
Create on: OpenSUSE Leap 15.5 - - native support, but doesn't run through native support - native support, but doesn't run through native support native support -

The creation of installation packages can be started with the Project | Make installation package ... menu. This pops up the Make installation package wizard. The wizard consists of 10 pages.

  • Package informationen (vendor, maintainer, description, license)

  • Changelog

  • Target distribution

  • Package group (package groups are usually used to facilitate installation and to bundle installation packages that depend on or belong to each other)

  • Menu entry (in which start menu entry can the application be found after installation)

  • Desktop configuration file

  • Extra dependencies

  • Extra files

  • Destination directory

  • Creation log

It is impressive how easy it can be to create installation packages. I tested the Archlinunx installation package and called it from Add/Remove Software and it worked immediately.


Page revisions


How To Package your Project by: Steffen Ploetz - April 13th, 2024