Packaging Linux AppImages
AppImages are a trivial way to package your game and its dependencies (including dynamically-linked libraries) into a single Linux executable.
Read their tutorial to learn how.
Linux's open source package managers are generally brilliant. However, the distribution of opaque, all-inclusive packages for your games can be a bit of a hassle.
This is because for every version of every Linux distribution on which you want your game to run, you either need to:
- Have a full set of compatible shared object libraries available (preferably via the package manager), or
- Statically link all of those libraries into your game's executable, which is a pain because of the difficulty generally involved in procuring statically linkable versions of Allegro and its addons' dependencies.
In Windows, you'd generally distribute the (slightly less coupled) DLLs with your game. On Mac,
.app bundles - which are mostly opaque, and include every
.dylib a binary requires - are commonplace.
The latter approach can be taken on Linux with AppImages. These are entirely self-contained executables which can easily be packaged to include every dependency your game requires.
Dynamic linking is fine when used with AppImages. In fact, the AppImage packaging tools are able to discern precisely which
.sos your game pulls in when it runs on your machine, and bundles those with it.
We might add our own tutorial for these in time, but for the moment, read theirs.
Proper package managers for self-contained bundle formats are also appearing. Here, we'll argue against using them (at least in their current state).
No cross-distribution standard has yet emerged, with Fedora and Ubuntu warring with their FlatPaks and Snaps respectively. Both of these formats allow for relatively easy bundling of specific libraries with their dependent binaries, and include some other pretty cool features such as sandboxing.
Each format has its own package manager, which is, predictably, only installed as standard on the distribution that favours it. This means that unfortunately - half the time - you'll be asking your users to install another package manager to access your game anyway. Thus we've introduced preconditions for installation, and so are almost back to square one.