From 98fc27f4cf82705b9e70d5b1f03f072b2665e178 Mon Sep 17 00:00:00 2001 From: RustyRaptor Date: Fri, 30 Oct 2026 17:35:13 -0600 Subject: [PATCH] feat(appimage): self-contained AppImage built in a Debian 13 container Bundles Qt 6.8, LayerShellQt v6.4.5 and the Wayland EGL client plugins (rpath-patched; linuxdeploy-plugin-qt skips them). CI builds it on every push and attaches it, with a .zsync for delta updates, to v* releases. Drop LayerShell.Window.activateOnShow, which LayerShellQt < 6.5 lacks. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_013UzjWSBjtVZ2zi8fJxS2hH --- .github/workflows/appimage.yml | 42 +++++++++++++++++++++++++++++ .gitignore | 1 + README.md | 17 ++++++++++++ docs/PLAN.md | 3 +++ mise.toml | 8 ++++++ packaging/appimage/Containerfile | 32 +++++++++++++++++++++++ packaging/appimage/build.sh | 45 ++++++++++++++++++++++++++++++++ ui/main.qml | 1 - 8 files changed, 148 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/appimage.yml create mode 100644 packaging/appimage/Containerfile create mode 100755 packaging/appimage/build.sh diff --git a/.github/workflows/appimage.yml b/.github/workflows/appimage.yml new file mode 100644 index 0000000..1a8626e --- /dev/null +++ b/.github/workflows/appimage.yml @@ -0,0 +1,42 @@ +name: appimage + +on: + push: + branches: [main] + tags: ['v*'] + workflow_dispatch: + +permissions: + contents: write + +jobs: + appimage: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: actions/setup-go@v5 + with: + go-version-file: go.mod + - name: Build daemon + run: go build -trimpath -ldflags "-s -w" -o bin/deckhudd ./cmd/deckhudd + env: + CGO_ENABLED: "0" + - name: Build AppImage + run: | + podman build -t deckhud-appimage packaging/appimage + podman run --rm -e VERSION="$(git describe --tags --always)" \ + -v "$PWD:/src/deckhud:Z" deckhud-appimage /src/deckhud/packaging/appimage/build.sh + - uses: actions/upload-artifact@v4 + with: + name: deckhud-appimage + path: build-appimage/deckhud-*.AppImage* + - name: Publish release + if: startsWith(github.ref, 'refs/tags/v') + env: + GH_TOKEN: ${{ github.token }} + run: | + gh release create "$GITHUB_REF_NAME" build-appimage/deckhud-*.AppImage* \ + --title "deckhud ${GITHUB_REF_NAME#v}" --generate-notes \ + || gh release upload "$GITHUB_REF_NAME" build-appimage/deckhud-*.AppImage* --clobber diff --git a/.gitignore b/.gitignore index 6493d2c..7cbd553 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ /.flatpak-builder/ /build-flatpak/ /.flatpak-repo/ +/build-appimage/ diff --git a/README.md b/README.md index d85e964..9fadde9 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,23 @@ mise run build ## Install +### AppImage (recommended) + +Download `deckhud-*-x86_64.AppImage` from [Releases](https://github.com/RustyRaptor/deckhud/releases), +then: + +```sh +chmod +x deckhud-*-x86_64.AppImage +./deckhud-*-x86_64.AppImage # run the HUD +./deckhud-*-x86_64.AppImage autostart on # start it with Plasma (XDG autostart entry) +./deckhud-*-x86_64.AppImage peek # toggle the cheat sheet +``` + +It bundles its own Qt, so it only needs a Plasma 6 Wayland session with glibc 2.41 or newer +(SteamOS, Arch, Fedora 42+, Debian 13+, …). [Gear Lever](https://flathub.org/apps/it.mijorus.gearlever) +can integrate it and apply updates (the release ships a `.zsync` file). +Build it yourself with `mise run appimage` (needs podman). + ### Flatpak Build and install locally: see [packaging/flatpak](packaging/flatpak/README.md). Not on Flathub (see that page for why). diff --git a/docs/PLAN.md b/docs/PLAN.md index b7c10a9..77253d3 100644 --- a/docs/PLAN.md +++ b/docs/PLAN.md @@ -16,6 +16,9 @@ controllers, desktops and X11 are non-goals for v1. ## Progress log +- **2026-10-30 (AppImage):** self-contained AppImage built in a Debian 13 container (bundled Qt 6.8 + + LayerShellQt v6.4.5), XDG autostart, CI artifact on every push and release asset on `v*` tags. + Dropped `LayerShell.Window.activateOnShow` (absent before LayerShellQt 6.5). - **2026-10-30 (later):** M7 cheat sheet (engine snapshot, QML `LayerSheet`, `deckhudd peek`), accent via the XDG settings portal (Kirigami didn't follow slideshow accents), Flatpak packaging verified ([spike](research/flatpak-spike.md)), MIT licence, `v0.1.0` tag. Flathub submission dropped: its policy forbids AI-assisted manifests/submissions. - **2026-10-30:** M1–M6 core landed (parser, config model, HID, engine, daemon, overlay). Still needs hand-checking on the Deck: back-button bit mapping, radial geometry and fire behaviour, long/double-press timing, click-through. diff --git a/mise.toml b/mise.toml index 70ff813..4647ae4 100644 --- a/mise.toml +++ b/mise.toml @@ -43,3 +43,11 @@ run = [ "rm -rf ~/.local/share/deckhud", "systemctl --user daemon-reload", ] + +[tasks.appimage] +description = "Build the AppImage in a podman container (needs podman)" +depends = ["build"] +run = [ + "podman build -t deckhud-appimage packaging/appimage", + "podman run --rm -e VERSION=$(git describe --tags --always) -v $PWD:/src/deckhud:Z deckhud-appimage /src/deckhud/packaging/appimage/build.sh", +] diff --git a/packaging/appimage/Containerfile b/packaging/appimage/Containerfile new file mode 100644 index 0000000..6ca98a3 --- /dev/null +++ b/packaging/appimage/Containerfile @@ -0,0 +1,32 @@ +# Build environment for the deckhud AppImage. Debian 13 sets the glibc floor +# (2.41), which covers SteamOS and current Plasma 6 distributions. +FROM docker.io/library/debian:trixie + +RUN apt-get update && apt-get install -y --no-install-recommends \ + build-essential cmake ninja-build git ca-certificates curl file patchelf \ + qmake6 qt6-base-dev qt6-base-private-dev qt6-declarative-dev \ + qt6-wayland qt6-wayland-dev qt6-wayland-private-dev qt6-websockets-dev \ + qml6-module-qtquick qml6-module-qtquick-shapes qml6-module-qtquick-window \ + qml6-module-qtwebsockets qml6-module-qtqml-workerscript \ + libwayland-dev wayland-protocols libxkbcommon-dev \ + && rm -rf /var/lib/apt/lists/* + +# LayerShellQt isn't packaged in Debian 13. v6.4.5 is the newest release that +# builds against Qt 6.8; it wants ECM >= 6.14 (Debian has 6.13). +RUN git clone --depth 1 --branch v6.14.0 https://invent.kde.org/frameworks/extra-cmake-modules.git /src/ecm \ + && cmake -S /src/ecm -B /src/ecm/build -G Ninja -DBUILD_TESTING=OFF -DCMAKE_INSTALL_PREFIX=/usr \ + && cmake --build /src/ecm/build && cmake --install /src/ecm/build \ + && git clone --depth 1 --branch v6.4.5 https://invent.kde.org/plasma/layer-shell-qt.git /src/lsq \ + && cmake -S /src/lsq -B /src/lsq/build -G Ninja -DBUILD_TESTING=OFF -DCMAKE_INSTALL_PREFIX=/usr \ + -DKDE_INSTALL_USE_QT_SYS_PATHS=ON \ + && cmake --build /src/lsq/build && cmake --install /src/lsq/build \ + && rm -rf /src + +RUN curl -fsSLo /usr/local/bin/linuxdeploy \ + https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage \ + && curl -fsSLo /usr/local/bin/linuxdeploy-plugin-qt \ + https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage \ + && chmod +x /usr/local/bin/linuxdeploy /usr/local/bin/linuxdeploy-plugin-qt + +# No FUSE in containers: let the tool AppImages extract themselves. +ENV APPIMAGE_EXTRACT_AND_RUN=1 diff --git a/packaging/appimage/build.sh b/packaging/appimage/build.sh new file mode 100755 index 0000000..33eace0 --- /dev/null +++ b/packaging/appimage/build.sh @@ -0,0 +1,45 @@ +#!/usr/bin/env bash +# Runs inside the packaging/appimage container with the repo at /src/deckhud +# and a prebuilt static bin/deckhudd. Produces deckhud--x86_64.AppImage. +set -euo pipefail +cd /src/deckhud +version=${VERSION:-dev} +out=build-appimage +rm -rf "$out" && mkdir -p "$out" +appdir=$PWD/$out/AppDir + +cmake -S launcher -B "$out/launcher" -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr +cmake --build "$out/launcher" +DESTDIR=$appdir cmake --install "$out/launcher" + +install -Dm755 bin/deckhudd "$appdir/usr/bin/deckhudd" +install -Dm644 -t "$appdir/usr/share/deckhud/ui" ui/main.qml +install -Dm644 -t "$appdir/usr/share/deckhud/ui/components" ui/components/*.qml +install -Dm644 data/io.github.RustyRaptor.deckhud.metainfo.xml \ + "$appdir/usr/share/metainfo/io.github.RustyRaptor.deckhud.appdata.xml" + +# linuxdeploy-plugin-qt skips the Wayland client buffer plugins; without them +# Qt Quick falls back to software buffers. Copy them in so their deps resolve. +qtplugins=$(qmake6 -query QT_INSTALL_PLUGINS) +mkdir -p "$appdir/usr/plugins" +cp -r "$qtplugins/wayland-graphics-integration-client" "$appdir/usr/plugins/" + +export QMAKE=/usr/bin/qmake6 +export QML_SOURCES_PATHS=$appdir/usr/share/deckhud/ui # installed UI only, not ui/tests +export EXTRA_QT_MODULES="waylandclient" +export EXTRA_PLATFORM_PLUGINS="libqwayland-egl.so;libqwayland-generic.so" +export LDAI_OUTPUT="deckhud-$version-x86_64.AppImage" +export LDAI_UPDATE_INFORMATION="gh-releases-zsync|RustyRaptor|deckhud|latest|deckhud-*x86_64.AppImage.zsync" + +cd "$out" +linuxdeploy --appdir "$appdir" \ + --executable "$appdir/usr/bin/deckhud-ui" \ + --desktop-file ../data/io.github.RustyRaptor.deckhud.desktop \ + --icon-file ../data/io.github.RustyRaptor.deckhud.svg \ + --plugin qt +# The copied plugins keep Debian's library path; point them at the bundle. +for so in "$appdir"/usr/plugins/wayland-graphics-integration-client/*.so; do + patchelf --set-rpath '$ORIGIN/../../lib' "$so" +done +linuxdeploy --appdir "$appdir" --output appimage +ls -la ./*.AppImage diff --git a/ui/main.qml b/ui/main.qml index 7eec5c7..24a28cd 100644 --- a/ui/main.qml +++ b/ui/main.qml @@ -20,7 +20,6 @@ Window { | LayerShell.Window.AnchorLeft | LayerShell.Window.AnchorRight LayerShell.Window.keyboardInteractivity: LayerShell.Window.KeyboardInteractivityNone LayerShell.Window.exclusionZone: -1 - LayerShell.Window.activateOnShow: false Hud { id: hud