Skip to content

Native Linux build (AppImage, x86_64) -- GitHub Actions#4990

Open
DoubyCz wants to merge 1 commit into
dkfans:masterfrom
DoubyCz:linux-appimage-build
Open

Native Linux build (AppImage, x86_64) -- GitHub Actions#4990
DoubyCz wants to merge 1 commit into
dkfans:masterfrom
DoubyCz:linux-appimage-build

Conversation

@DoubyCz

@DoubyCz DoubyCz commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

This adds a GitHub Actions workflow that builds and publishes a portable KeeperFX AppImage for x86_64 Linux - a single file that Linux players can download and run directly, with no dependencies to install.

#4962 got the native Linux build compiling cleanly on modern toolchains. This PR takes that working build and packages it into a downloadable, ready-to-run AppImage.

You can test AppImages in forked repo:

Proposed changes:

  • .github/workflows/linux-appimage.yml - the workflow.
  • dist/linux/build-appimage.sh - the build itself. It runs inside a Debian 12 container (glibc 2.36 + ffmpeg 5.1) so the resulting AppImage works across a wide range of distros (Ubuntu, Fedora, Mint, Debian, Arch, ...).
  • dist/linux/AppRun + dist/linux/keeperfx.desktop - the launcher and desktop entry.

How the AppImage works:

  • It bundles the engine, a modern SDL2, ffmpeg and all the other libraries, plus the freely-redistributable KeeperFX data.
  • It never contains the original Dungeon Keeper files (copyright EA/Bullfrog). On first launch AppRun sets up a game folder and tells the user which original files to copy in - same requirement as on Windows.

A couple of things I was careful about:

  • SDL2 is built from a pinned release tag (Debian 12's own 2.26 has broken Wayland fullscreen), so the builds are reproducible rather than tracking a moving branch.
  • The bundled free-data version follows the tree's version.mk, so the data always matches the engine that gets built, and the download is verified against the sha256 the release publishes.

Enabling the workflow:
Merging this is inert on its own: the workflow only triggers on a manual run or an appimage-* tag, never on a normal push or pull request, so nothing runs and nothing changes until you choose to. There are two ways to produce an AppImage, both starting the Debian 12 build described above:

  • Actions tab -> "Build Linux AppImage" -> "Run workflow": builds from the branch you pick and uploads the AppImage as a build artifact (nothing is published).
  • Push a tag like appimage-v1.4.0: builds from that tag and also publishes the AppImage as a GitHub Release.

The Release step needs "Read and write permissions" under Settings -> Actions -> General; the artifact-only path doesn't. This is spelled out in the workflow header too.

I've tested the whole thing end to end against current master: it produces a working KeeperFX-1.4.0 AppImage that starts up with the bundled SDL and only stops (as expected) once it starts looking for the original game data.

One known issue, deliberately left out of this PR:
On some multi-monitor setups the startup splash/legal screens can come up undersized in a corner instead of filling the screen. I'm aware of it and have a small engine-side fix ready, but I'd rather send that as its own separate PR so this one stays purely about the AppImage packaging - I didn't want to mix an engine behavior change into the build tooling.

Open to any feedback.

image

Adds a mechanism to produce a portable KeeperFX AppImage for x86_64 Linux via
GitHub Actions. The build runs in a Debian 12 container (glibc 2.36 + ffmpeg 5.1)
for broad distro compatibility, builds a pinned modern SDL2 from source (Debian 12
ships 2.26 with broken Wayland fullscreen), compiles the native engine via
linux.mk, bundles all libraries with linuxdeploy and the freely-redistributable
KeeperFX data, and packages it with appimagetool.

Robustness:
- SDL2 pinned to a fixed release tag (reproducible; not the rolling branch).
- Bundled free-data version defaults to this tree's version.mk, so data always
  matches the engine; a tree ahead of any release fails early with a clear hint
  to set KFX_DATA_VERSION.
- Downloaded data is verified against the sha256 digest from the GitHub release
  API (mismatch fails the build).

The AppImage never contains the original Dungeon Keeper files (copyright
EA/Bullfrog); the user supplies those at runtime via the AppRun launcher, which
also deploys the bundled free data into the game folder on first launch.

Triggering (documented in the workflow header): 'workflow_dispatch' uploads a
build artifact; pushing an 'appimage-*' tag also publishes a GitHub Release. The
release step needs 'Read and write permissions' under the repo's Actions settings.
@DoubyCz DoubyCz changed the title AppImage: build and release a portable Linux executable using GitHub Actions Native Linux build (AppImage): using GitHub Actions Jul 7, 2026
@DoubyCz DoubyCz changed the title Native Linux build (AppImage): using GitHub Actions Native Linux build (AppImage, x86_64) -- GitHub Actions Jul 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant