midi-harbor/specs/017-appimage/tasks.md
James Coleman d11a525008 feat(release): publish an AppImage for each Linux architecture
- Releases now include Midi-Harbor-<version>-<x86_64|aarch64>.AppImage, built from the same binary as the packages and listed in checksums.txt, for distributions without a .deb or .rpm. Opened with no arguments it shows the window, and the daemon it registers runs under the systemd user unit like a package install.
- service install run from an AppImage registers the .AppImage file instead of the executable inside the runtime's temporary mount, which is gone once the process exits. The file is used only when the running executable is inside APPDIR, so a program started from another AppImage, whose APPIMAGE it inherits, still registers itself.
- The AppImage carries only the Avahi client libraries from the Debian 12 sysroot, with their LGPL-2.1 license, found through the binary's RUNPATH rather than LD_LIBRARY_PATH; glibc 2.35 or newer, ALSA, D-Bus and libxkbcommon come from the host, as for the packages.
- Its AppRun starts the binary as midi-harbor, so on X11 the window's class matches the desktop entry instead of the AppImage's file name.
- Building it needs the cross image's new patchelf, file, appimagetool 1.9.1 and type2 runtime 20251108, pinned by checksum, and a sysroot rebuilt to carry Avahi's license; the script stops and names make build-sysroot when that license is missing.
2026-09-29 14:35:51 -05:00

1.6 KiB

Tasks: AppImage

Tasks by their numbers in the project-wide sequence, which continues across every spec.

  • T246 Register the AppImage file rather than the executable inside its mount, per FR-I01 and FR-I04 — done: ServiceSpec::for_current_executable takes APPIMAGE when the running executable is under APPDIR, so another AppImage's inherited variables are ignored; and the unit's ExecStop stops the daemon alone and waits for it, since stopping the whole unit at once unmounted the AppImage under the daemon and killed it with SIGBUS (R-104). Unit tested in crates/service/src/lib.rs against the variables the AppImage runtime sets, and in crates/service/src/systemd.rs for the ExecStop.
  • T247 Build and publish an AppImage for each Linux architecture, per FR-I02 and FR-I03 — done: packaging/linux/appimage.sh, run by GoReleaser after each full Linux build, bundles the Avahi client libraries and their license from the sysroot, sets the binary's RUNPATH, and packs it with appimagetool and the pinned runtime, which the cross image now carries; the release and checksums include dist/*.AppImage. Checked on Arch Linux and Ubuntu 22.04 (R-104); not unit tested, since it is a build script.
  • T248 Name the window on Linux so taskbars pair it with its desktop entry — done: the window's title is set to "Midi Harbor" at start, the desktop entry's StartupWMClass is midi-harbor, and the AppImage's AppRun runs the binary as midi-harbor, since the pinned libcosmic leaves the X11 class to argv[0] (R-104). Checked in XFCE on X11; not unit tested, since it is window-system wiring.