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.
This commit is contained in:
Dylan M. Taylor authored and GitHub committed 2026-11-06 22:48:03 -05:00
1 parent 1ae54cabc0
commit 79d87b2b54
5 files changed
+72 -10

No files matched your search

+4 -3
View File
@@ -13,9 +13,10 @@ existing `artcraft-v<version>` 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 <architecture> <rust-target>` 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
+43 -6
View File
@@ -2,13 +2,50 @@
<component type="desktop-application">
<id>ai.artcraft.app</id>
<name>ArtCraft Studio</name>
<summary>Create AI images and video</summary>
<summary>Create images and video with AI</summary>
<metadata_license>MIT</metadata_license>
<project_license>MIT OR Apache-2.0</project_license>
<description><p>ArtCraft Studio is a desktop workspace for generating AI images and video with connected AI providers.</p></description>
<launchable type="desktop-id">ai.artcraft.app.desktop</launchable>
<developer id="ai.artcraft">
<name>ArtCraft</name>
</developer>
<url type="homepage">https://getartcraft.com</url>
<developer id="ai.artcraft"><name>ArtCraft</name></developer>
<categories><category>Graphics</category><category>AudioVideo</category></categories>
<provides><binary>artcraft</binary></provides>
<url type="bugtracker">https://github.com/storytold/artcraft/issues</url>
<url type="vcs-browser">https://github.com/storytold/artcraft</url>
<url type="contact">https://discord.gg/artcraft</url>
<description>
<p>ArtCraft Studio is a creative desktop workspace for generating AI images and video with connected AI providers.</p>
<ul>
<li>Text-to-image and image-to-image creation with state-of-the-art models</li>
<li>Video generation and camera motion controls</li>
<li>Direct integration with Fal, Grok, Midjourney, Sora, and WorldLabs</li>
<li>Local task persistence with an embedded SQLite queue</li>
</ul>
</description>
<launchable type="desktop-id">ai.artcraft.app.desktop</launchable>
<categories>
<category>Graphics</category>
<category>AudioVideo</category>
</categories>
<keywords>
<keyword>ai</keyword>
<keyword>image</keyword>
<keyword>video</keyword>
<keyword>generation</keyword>
<keyword>art</keyword>
</keywords>
<branding>
<color type="primary" scheme_preference="light">#2f7bf5</color>
<color type="primary" scheme_preference="dark">#1a5bc4</color>
</branding>
<requires>
<display_length compare="ge">760</display_length>
</requires>
<supports>
<control>keyboard</control>
<control>pointing</control>
</supports>
<content_rating type="oars-1.1" />
<provides>
<binary>artcraft</binary>
</provides>
</component>
+16
View File
@@ -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 "$@"
+2 -1
View File
@@ -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
'
+7
View File
@@ -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