Files
amethyst/desktopApp/packaging/flatpak/com.vitorpamplona.amethyst.Desktop.yml
Claude 7e78204336 feat: ship a Flatpak bundle of the desktop app on release CI
The linux-portable release leg now wraps the createReleaseDistributable
tree it already builds into a single-file Flatpak bundle and attaches it
to the GH Release as amethyst-desktop-<version>-linux-x64.flatpak.

Packaging fixes to the existing (previously unwired) Flathub manifest:
- add the missing 512x512 icon (copy of desktopApp icon.png) and install
  it under hicolor/512x512 instead of the never-present 256px path
- drop the openjdk module + sdk-extension: the jpackage tree bundles its
  own trimmed JRE, so /app/jre was pure bloat
- grant --socket=x11 instead of wayland/fallback-x11: Compose Desktop
  renders via AWT/skiko (X11-only on Linux, XWayland on Wayland), so
  fallback-x11 left the app socketless on Wayland sessions

CI wiring:
- install flatpak tooling + the freedesktop runtime/sdk (version greped
  from the manifest so the pin can't drift), retried like other fetches
- inject the AppStream <release> entry for the tagged version at build
  time (the checked-in metainfo deliberately carries none)
- flatpak-builder with --disable-rofiles-fuse (GH runners) and a
  --state-dir under desktopApp/build so the repo tree stays clean
- collect via the existing asset-name.sh contract (new flatpak ext)

Verified end-to-end locally: built the bundle from the manifest with a
stubbed jpackage tree, installed it, and ran the exported command inside
the sandbox (freedesktop 24.08, args forwarded through the wrapper).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GYfNxhPZC3WRrn82Dm2Cb4
2026-07-14 14:06:37 +00:00

78 lines
2.7 KiB
YAML

# Flathub manifest for Amethyst Desktop.
#
# Pattern based on flathub/com.jetpackduba.Gitnuro (Kotlin Compose Desktop).
# Submission to Flathub is a separate operation — see
# desktopApp/packaging/flatpak/README.md for the workflow.
app-id: com.vitorpamplona.amethyst.Desktop
runtime: org.freedesktop.Platform
runtime-version: '24.08'
sdk: org.freedesktop.Sdk
command: amethyst-desktop
add-extensions:
org.freedesktop.Platform.ffmpeg-full:
directory: lib/ffmpeg
version: '24.08'
add-ld-path: .
autodownload: true
autodelete: false
cleanup-commands:
- mkdir -p /app/lib/ffmpeg
finish-args:
- --share=network
- --share=ipc
# Compose Desktop renders through AWT/skiko, which is X11-only on Linux
# (runs under XWayland on Wayland sessions). fallback-x11 + wayland would
# leave the app without a usable display socket on Wayland sessions, so
# grant x11 unconditionally.
- --socket=x11
- --socket=pulseaudio
- --device=dri
- --filesystem=xdg-download
- --filesystem=xdg-pictures
- --talk-name=org.freedesktop.Notifications
- --talk-name=org.freedesktop.secrets
# GStreamer plugin/cache paths (org.freedesktop.Platform exposes them by default).
- --env=GST_PLUGIN_SYSTEM_PATH=/usr/lib/x86_64-linux-gnu/gstreamer-1.0
# No openjdk module / sdk-extension: the jpackage tree copied below already
# bundles its own trimmed JRE under Amethyst/lib/runtime/, so installing a
# second JRE at /app/jre would only bloat the bundle.
modules:
- name: amethyst-desktop
buildsystem: simple
build-commands:
# Drop the jpackage-emitted self-contained tree into /app/lib/Amethyst.
# Wrapper at /app/bin/amethyst-desktop forwards args.
- mkdir -p /app/lib/Amethyst
- cp -r ./Amethyst/* /app/lib/Amethyst/
- install -Dm755 amethyst-desktop.sh /app/bin/amethyst-desktop
- install -Dm644 com.vitorpamplona.amethyst.Desktop.metainfo.xml -t /app/share/metainfo/
- install -Dm644 com.vitorpamplona.amethyst.Desktop.desktop -t /app/share/applications/
- install -Dm644 icons/512/com.vitorpamplona.amethyst.Desktop.png -t /app/share/icons/hicolor/512x512/apps/
sources:
# Built artifact from `./gradlew :desktopApp:createReleaseDistributable`.
# Path matches Compose Multiplatform 1.11's output layout.
- type: dir
path: ../../build/compose/binaries/main-release/app
dest: ./
- type: script
dest-filename: amethyst-desktop.sh
commands:
- "#!/bin/sh"
- exec /app/lib/Amethyst/bin/Amethyst "$@"
- type: file
path: com.vitorpamplona.amethyst.Desktop.metainfo.xml
- type: file
path: com.vitorpamplona.amethyst.Desktop.desktop
- type: dir
path: icons
dest: icons