AppImage
Bundle a Linux binary into a single self-contained .AppImage with linuxdeploy
Anodizer can bundle a built Linux binary plus its desktop integration into a
single self-contained, runnable .AppImage using
linuxdeploy's appimage
output plugin.
Classification
Packager — creates .AppImage files from Linux binaries. Not a publisher;
linuxdeploy must be on PATH. One .AppImage is produced per matching Linux
target, so a multi-arch build yields distinct, non-colliding outputs.
Minimal config
appimages:
- desktop: contrib/MyApp.desktop
icon: contrib/myapp.pngFull config reference
appimages:
- id: helix # optional; unique identifier
ids: [helix-bin] # optional; filter by build IDs
filename: "" # optional; output filename template
name: "" # optional; APP name + AppDir basename
desktop: contrib/Helix.desktop # required; .desktop entry (template)
icon: contrib/helix.png # required; icon path (template)
appdir_extra: # optional; files/dirs copied into the AppDir
- src: runtime/ # src path (file or dir)
dst: usr/lib/helix/runtime # dst relative to the AppDir root
update_information: "gh-releases-zsync|helix-editor|helix|latest|helix-*.AppImage.zsync"
runtime_harvest: # optional; run the built binary to populate a dir
command: "{{ ArtifactPath }} --populate-runtime {{ HarvestDir }}"
dir: usr/lib/helix/runtime # AppDir-relative bundle destination
extra_args: [] # optional; extra linuxdeploy CLI arguments
os: ["linux"] # optional; target OS filter (AppImage is Linux-only)
arch: [] # optional; target architecture filter
skip: false # optional (alias: disable)linuxdeploy invocation
linuxdeploy is spawned as:
linuxdeploy --appdir <AppDir> -d <desktop> -i <icon> --output appimage [extra_args...]
with the env it reads set on the process:
| Env var | Source |
|---|---|
VERSION | the release version ({{ Version }}) |
ARCH | AppImage arch token (x86_64, aarch64, armhf, i686) |
APP | name (defaults to project name) |
OUTPUT | always appimage |
UPDATE_INFORMATION | update_information, set only when configured (zsync delta updates) |
AppRun is generated by linuxdeploy by default. To ship a custom AppRun
(e.g. one that sets HELIX_RUNTIME), drop it into the AppDir via
appdir_extra with dst: AppRun.
Runtime harvest
Some applications populate a runtime data directory by running their own
binary (helix runs a loader to fetch tree-sitter grammars / themes / queries).
The runtime_harvest hook models this:
runtime_harvest:
command: "{{ ArtifactPath }} --populate-runtime {{ HarvestDir }}"
dir: usr/lib/helix/runtime
-
{{ ArtifactPath }}resolves to the host-native binary's path and{{ HarvestDir }}to the absolute harvest output dir. The command is run once viash -c. -
The harvested data is architecture-independent, so it is produced once on the host-native binary and reused for every target's AppImage — no QEMU. If a pure cross build has no host-native binary, the stage emits a clear error rather than silently skipping.
-
The harvested tree is staged at
dist/.appimage-runtime/<id>/, so an archiveextra_filesglob can ship the sameruntime/in tarballs:archives: - files: - "dist/.appimage-runtime/helix/**"
Config fields
| Field | Type | Default | Description |
|---|---|---|---|
id | string | default | Unique identifier |
ids | list | all builds | Filter by build IDs |
filename | string | {project}-{version}-{arch}.AppImage | Output filename (template) |
name | string | project name | APP name + AppDir basename |
desktop | string | required | .desktop entry path (template) |
icon | string | required | Icon path (template) |
appdir_extra | list | none | Files/dirs copied into the AppDir |
update_information | string | none | zsync update metadata (UPDATE_INFORMATION) |
runtime_harvest | object | none | Host-once binary-run hook (see above) |
extra_args | list | none | Extra linuxdeploy CLI arguments |
os | list | ["linux"] | Target OS filter |
arch | list | all | Target architecture filter |
skip | string/bool | none | Skip this config (alias: disable) |
appdir_extra entries
| Field | Alias | Type | Description |
|---|---|---|---|
src | source | string | Source path (file or directory) |
dst | destination | string | Destination relative to the AppDir root |
runtime_harvest
| Field | Type | Description |
|---|---|---|
command | string | Command template run once on the host ({{ ArtifactPath }}, {{ HarvestDir }}) |
dir | string | AppDir-relative directory the harvested assets are bundled into |
Authentication
Not applicable — AppImage creation is a local build step with no external service calls.
Common gotchas
linuxdeploymust be onPATH: the stage errors if it is not found.- One
.AppImageper platform: binaries are grouped by OS + arch; each group produces one AppImage. Useos/archto restrict targets. .AppImageextension is auto-appended when a customfilenametemplate omits it.- Harvest needs a host-native binary: a pure cross build (no artifact for the host target) errors instead of silently skipping the harvest.
- Distinct configs sharing an arch must set
filename:: twoappimages:entries that differ only byidand target the same arch render the same default output name and clobber on disk — give each an explicitfilename:to disambiguate.
Republish / update behavior
Not applicable — this is a local packaging stage, not a publisher. The
resulting .AppImage is checksummed, signed, attested, and uploaded to the
release like any other artifact.
Behavior
- Groups binary artifacts by platform (os + arch), creating one
.AppImageper platform - The runtime harvest runs once on the host binary and is reused per arch
- IDs must be unique across all AppImage configs
- The
.AppImageis a release-uploadable artifact (checksum / sign / attest / release pick it up) - Skippable with
--skip appimage