Skip to content

Packaging Linux AppImages

Doug Thompson edited this page Feb 14, 2019 · 20 revisions


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.

But why?

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:

  1. Have a full set of compatible shared object libraries available (preferably via the package manager), or
  2. 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.

Linux-compatible bundles

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.