create installation package

Post

Posted
Rating:
Item has a rating of 5 (Liked by AGMain5082)
#1 (In Topic #2075)
Avatar
Enthusiast
Yogi is in the usergroup ‘Enthusiast’
Hi folks,

I always thought the easiest way was to provide the source code.

But now I realize that this may not be the case, especially if someone does not have
the version of Gambas installed that was used to program the app.

I thought that if I created a Debian .deb installation package, there would be no more problems -
the dependencies would be recognized and installed. Is that the case?

If someone doesn't have Gambas installed yet, they only need the runtime and not the full system.
My main system is Ubuntu 24.04 for programming with always latest Gambas (3.21.4 at the moment)
If someone (like me) has installed GambOS in Virtualbox, I have Gambas 3.19 and it doesn't install the .deb
created under Ubuntu because it doesn't meet the version requirements.

Isn't there an easier solution for distributing an Gambas App - with or without full Gambas installed?

Kind regards,
Yogi


Online now: No Back to the top

Post

Posted
Rating:
Item has a rating of 5 (Liked by AGMain5082)
#2
Avatar
Administrator
gbWilly is in the usergroup ‘unknown’
gbWilly is in the usergroup ‘Blogger’
gbWilly is in the usergroup ‘GambOS Developer’

Yogi said

Hi folks,

I always thought the easiest way was to provide the source code.

But now I realize that this may not be the case, especially if someone does not have
the version of Gambas installed that was used to program the app.

I thought that if I created a Debian .deb installation package, there would be no more problems -
the dependencies would be recognized and installed. Is that the case?

If someone doesn't have Gambas installed yet, they only need the runtime and not the full system.
My main system is Ubuntu 24.04 for programming with always latest Gambas (3.21.4 at the moment)
If someone (like me) has installed GambOS in Virtualbox, I have Gambas 3.19 and it doesn't install the .deb
created under Ubuntu because it doesn't meet the version requirements.

Isn't there an easier solution for distributing an Gambas App - with or without full Gambas installed?


You create a package of an application created in Gambas 3.21.4 and packaged in Gambas 3.21.4
To install that package on a target syste, this system needs a source entry to a repository holding Gambas 3.21.0 OR higher, that's all.
The .deb package has all the info to install what is required to make it work. No IDE needs to be installed on the target.

If you expect that Gambas 3.19.6 (on GambOS) can handle Gambas 3.21.4 code (created in the future with new instructions in there) you are very wrong good sir.

What does work is take the source code to a GambOS system with an IDE, open it, compile it and remove futuristic code Gambas 3.19 doesn't know.
Now create a package with Gambas 3.19.6. This package will install on 3.19 OR higher, thus also on your 3.21.4. system.

Having the latest and greatest comes with its perks but also a lot of disadvantages. I always stay a few version behind as my applications need to run 24/7 in real worlds scenarios.
You ever read the mailinglist on the trouble caused by the latest release, nice for hobby, but unpractical in real worlds scenarios. I'm on 3.19.6 now for maybe over a year, so not going anywhere for the time being.
And i'm very picky on what version to choose, if they introduce to many new implementations, replacing old onces, I rather wait for a next series.

And if you distribute using .debs and people have Gambas installed from official Debian or Ubuntu repos, you might be up for unpleasant surprises installing your GambOS or OSB gambas created packages onto those systems, because they messed up how Gambas should be packaged causing incompatibilities.

I advise you to read GambOS Background Guide 1, chapter 2 for some more background on package management in general. And open an .deb package for once, with an archive manager and next open the DEBIAN/control file. You will see all dependencies required for your application, inclusing the minimal required version (see screen below, control file of GambOS Assistant, from within the .deb -> an archive)

post.png

Packaged in 3.19.6, so depends on >= 3.19, simple as that…

Enjoy..


 

gbWilly
- Gambas Dutch translator
- Gambas wiki content contributor
- Gambas debian/ubuntu package recipe contributor
- GambOS, a distro for learning Gambas and more…
- Gambas3 Debian/Ubuntu repositories


… there is always a Catch if things go wrong!
Online now: Yes Back to the top

Post

Posted
Rating:
#3
Guru
Poly is in the usergroup ‘Guru’
Poly is in the usergroup ‘GambOS Contributor’
Wow, the thing with the packages is now an open secret.  :ninja:  ;)
One more question, gbWilly .

If I only use old code with a higher Gambas version, will it also work with older Gambas versions?
In other words, will the package I created with this higher Gambas version also work with older Gambas versions?
Or has the code changed so much that it can no longer be compiled on old systems?
Online now: No Back to the top

Post

Posted
Rating:
#4
Avatar
Administrator
gbWilly is in the usergroup ‘unknown’
gbWilly is in the usergroup ‘Blogger’
gbWilly is in the usergroup ‘GambOS Developer’

Poly said

If I only use old code with a higher Gambas version, will it also work with older Gambas versions?
Yes, it should…

Poly said

In other words, will the package I created with this higher Gambas version also work with older Gambas versions?
…but not if you create the .deb package with in the higher version as it will make it depend on that version and not install on the lower version (see DEBIAN/control file in package).
If you would create an executable it should work if target systen has all proper dependecies installed (see Gambas  Learning Guides Book 1 - 7.6.1. Creating a Gambas executable for details on that)

Poly said

Or has the code changed so much that it can no longer be compiled on old systems?
In all above cases you will need to ensure that you have the proper byte code version set in the project properties.

post.png

So, in short, yes, if you know what you do..:ninja: :lol:
But isn't that always the case O_o

gbWilly
- Gambas Dutch translator
- Gambas wiki content contributor
- Gambas debian/ubuntu package recipe contributor
- GambOS, a distro for learning Gambas and more…
- Gambas3 Debian/Ubuntu repositories


… there is always a Catch if things go wrong!
Online now: Yes Back to the top
1 guest and 1 member have just viewed this: gbWilly.