From 79d87b2b54b5b27223fa428bd0acd06bdd7abaf5 Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Fri, 6 Nov 2026 22:48:03 -0500 Subject: [PATCH] fix(flatpak): persist data directory, keep accelerated rendering, and enrich metainfo (#2761) ## Summary Transfers verified improvements and reviewer feedback from the FlatPark package review to ArtCraft's first-party Flatpak build: - **Data Persistence:** Adds `--persist=Artcraft` to `finish-args` in `flatpak.yml` so user settings, credentials, provider tokens, and local task SQLite queue stored in `~/Artcraft` persist in `~/.var/app/ai.artcraft.app/Artcraft` across launches instead of being discarded on exit. - **Accelerated Rendering:** Adds `artcraft-wrapper` setting `WEBKIT_DISABLE_DMABUF_RENDERER="${WEBKIT_DISABLE_DMABUF_RENDERER:-0}"` and `WEBKIT_DISABLE_COMPOSITING_MODE="${WEBKIT_DISABLE_COMPOSITING_MODE:-0}"`. Keeping WebKitGTK's accelerated rendering path enabled prevents rendering glitches on `org.gnome.Platform//51` while preserving user override capability. - **Dependency Checking:** Updates the Flatpak build runtime verification to inspect the real binary (`/app/bin/artcraft.real`). - **Enriched AppStream Metainfo:** Updates `ai.artcraft.app.metainfo.xml` with CC0-1.0 metadata license, bugtracker/vcs-browser/contact URLs, bulleted feature description, search keywords, branding colors, hardware display requirements, input controls, and OARS-1.1 content rating. ## Verification - `actionlint .github/workflows/*.yml` passed. - `shellcheck packaging/linux/*.sh packaging/linux/artcraft-wrapper` passed. - `xmllint --noout packaging/linux/ai.artcraft.app.metainfo.xml` passed. - `appstreamcli validate packaging/linux/ai.artcraft.app.metainfo.xml` passed with 0 errors and 0 info notices. --- packaging/linux/README.md | 7 +-- packaging/linux/ai.artcraft.app.metainfo.xml | 49 +++++++++++++++++--- packaging/linux/artcraft-wrapper | 16 +++++++ packaging/linux/flatpak.sh | 3 +- packaging/linux/flatpak.yml | 7 +++ 5 files changed, 72 insertions(+), 10 deletions(-) create mode 100755 packaging/linux/artcraft-wrapper diff --git a/packaging/linux/README.md b/packaging/linux/README.md index 2c52f8920c..04cf27c925 100644 --- a/packaging/linux/README.md +++ b/packaging/linux/README.md @@ -13,9 +13,10 @@ existing `artcraft-v` draft, retaining Windows and macOS assets. The ve Native AppImages also include zsync delta-update metadata. Flatpak uses native Ubuntu 24.04 runners and GNOME 51 for GTK3/WebKitGTK 4.1. Its build checks -for missing ELF dependencies inside the sandbox. RISC-V packages require Ubuntu 24.04-era -libraries; x86_64 and ARM64 use Ubuntu 22.04 as their build baseline. The suite does not publish -RISC-V AppImages, Arch packages or Flatpaks. +for missing ELF dependencies inside the sandbox, grants `--persist=Artcraft` so settings and task +data survive restarts, and provides a launcher wrapper keeping WebKitGTK's accelerated rendering +path enabled. RISC-V packages require Ubuntu 24.04-era libraries; x86_64 and ARM64 use Ubuntu 22.04 +as their build baseline. The suite does not publish RISC-V AppImages, Arch packages or Flatpaks. `package.sh ` normalizes Tauri's DEB/RPM/AppImage filenames and extracts the DEB's `/usr` tree into the suite's `bin/` and `share/` tarball layout. Shared Craft diff --git a/packaging/linux/ai.artcraft.app.metainfo.xml b/packaging/linux/ai.artcraft.app.metainfo.xml index affa90da6c..603e89c8ef 100644 --- a/packaging/linux/ai.artcraft.app.metainfo.xml +++ b/packaging/linux/ai.artcraft.app.metainfo.xml @@ -2,13 +2,50 @@ ai.artcraft.app ArtCraft Studio - Create AI images and video + Create images and video with AI MIT MIT OR Apache-2.0 -

ArtCraft Studio is a desktop workspace for generating AI images and video with connected AI providers.

- ai.artcraft.app.desktop + + ArtCraft + https://getartcraft.com - ArtCraft - GraphicsAudioVideo - artcraft + https://github.com/storytold/artcraft/issues + https://github.com/storytold/artcraft + https://discord.gg/artcraft + +

ArtCraft Studio is a creative desktop workspace for generating AI images and video with connected AI providers.

+
    +
  • Text-to-image and image-to-image creation with state-of-the-art models
  • +
  • Video generation and camera motion controls
  • +
  • Direct integration with Fal, Grok, Midjourney, Sora, and WorldLabs
  • +
  • Local task persistence with an embedded SQLite queue
  • +
+
+ ai.artcraft.app.desktop + + Graphics + AudioVideo + + + ai + image + video + generation + art + + + #2f7bf5 + #1a5bc4 + + + 760 + + + keyboard + pointing + + + + artcraft +
diff --git a/packaging/linux/artcraft-wrapper b/packaging/linux/artcraft-wrapper new file mode 100755 index 0000000000..2d2bb3de00 --- /dev/null +++ b/packaging/linux/artcraft-wrapper @@ -0,0 +1,16 @@ +#!/bin/sh +set -eu + +# ArtCraft Studio is a Tauri (WebKitGTK) desktop app. +# +# Keep WebKitGTK's accelerated path on, the opposite of the older recipe of +# disabling the DMABUF renderer. On org.gnome.Platform//51 the unaccelerated +# path draws this window wrong. +# +# ${VAR:-0} rather than plain assignment, so a user whose driver does need the +# unaccelerated path can take it back: +# flatpak override --user --env=WEBKIT_DISABLE_DMABUF_RENDERER=1 ai.artcraft.app +export WEBKIT_DISABLE_DMABUF_RENDERER="${WEBKIT_DISABLE_DMABUF_RENDERER:-0}" +export WEBKIT_DISABLE_COMPOSITING_MODE="${WEBKIT_DISABLE_COMPOSITING_MODE:-0}" + +exec /app/bin/artcraft.real "$@" diff --git a/packaging/linux/flatpak.sh b/packaging/linux/flatpak.sh index 82a856bfea..905efc0a19 100755 --- a/packaging/linux/flatpak.sh +++ b/packaging/linux/flatpak.sh @@ -8,6 +8,7 @@ trap 'rm -rf "$work"' EXIT mkdir -p "$work/stage" dist/release tar -xzf "dist/linux/$base.tar.gz" --strip-components=1 -C "$work/stage" cp packaging/linux/flatpak.yml "$work/manifest.yml" +cp packaging/linux/artcraft-wrapper "$work/artcraft-wrapper" flatpak remote-add --user --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo sign=() keys=() @@ -21,7 +22,7 @@ flatpak-builder --user --install-deps-from=flathub --disable-rofiles-fuse --forc # Fail on missing WebKitGTK or other runtime libraries rather than shipping an unloadable binary. # shellcheck disable=SC2016 # Expand these variables inside the Flatpak runtime shell. flatpak build --runtime "$work/build" sh -c ' - dependencies=$(ldd /app/bin/artcraft) || exit 1 + dependencies=$(ldd /app/bin/artcraft.real) || exit 1 printf "%s\n" "$dependencies" case "$dependencies" in *"not found"*) exit 1 ;; esac ' diff --git a/packaging/linux/flatpak.yml b/packaging/linux/flatpak.yml index f1b4581269..705aa5d345 100644 --- a/packaging/linux/flatpak.yml +++ b/packaging/linux/flatpak.yml @@ -13,6 +13,9 @@ finish-args: - --filesystem=xdg-pictures - --filesystem=xdg-videos - --filesystem=xdg-download + # The app hardcodes its data to ~/Artcraft (settings, credentials, state). + # Persist it under ~/.var/app/ai.artcraft.app/Artcraft so data survives exits. + - --persist=Artcraft modules: - name: artcraft buildsystem: simple @@ -20,6 +23,10 @@ modules: - cp -a . /app/ - install -Dm644 /app/share/icons/hicolor/128x128/apps/artcraft.png /app/share/icons/hicolor/128x128/apps/ai.artcraft.app.png - sed -i 's/^Icon=.*/Icon=ai.artcraft.app/' /app/share/applications/ai.artcraft.app.desktop + - mv /app/bin/artcraft /app/bin/artcraft.real + - install -Dm755 artcraft-wrapper /app/bin/artcraft sources: - type: dir path: stage + - type: file + path: artcraft-wrapper