Gambas Documentation
Application Repository
Code Snippets
Compilation & Installation
Components
Controls pictures
Deprecated components
Developer Documentation
Development Environment Documentation
Documents
Error Messages
Gambas Playground
How To's
How To Change the Tab Order of GUI Controls
How To Contribute
How to Create and Open a ".gmail.txt" Archive
How to deal with Git and Gitlab concerning your Project
How to deal with Git and Gitlab for Gambas
How To Deal With Subversion for Gambas
How To Display a Chinese Character
How To Draw with gb.Cairo
How To Enter Data With gb.db.form
How To Get Gambas Web Started (1)
How To Get Started
How To Interface Gambas With External Libraries
How To make a chart with the gb.chart component
How to make a report with Gambas
How To Make KDE Run Gambas Executables Automatically
How To Open, Debug & Compile The IDE
How To Open a MySQL connection and use it
How To Open a SQLite connection and use it
How To Open a Unix ODBC connection and use it
How To Package Gambas
How To Package your Project
How To Print
How to Run Gambas and Gambas Apps on Windows using WSL
How To Run Gambas On Windows using Cygwin
How To Translate A Gambas Project
How To Translate Gambas
How To Translate The Gambas IDE (deprecated)
How To Use Parallel Port
Language Index
Language Overviews
Last Changes
Lexicon
README
Search the wiki
To Do
Topics
Tutorials
Wiki License
Wiki Manual

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