mirror of
https://github.com/storytold/craft-anything.git
synced 2026-11-27 16:49:24 +01:00
* feat(updates): add manual release checks and verified native updates * chore: bump version to 0.6.1 * fix(flatpak): honor the launcher version choices * fix(updates): report restart outcomes without UI process side effects * fix(i18n): translate updater controls in the complete catalogs * test: document native updater startup as UI plumbing
71 lines
3.5 KiB
YAML
71 lines
3.5 KiB
YAML
# Flatpak manifest for Craft Anything, ready for a Flathub submission.
|
|
#
|
|
# Flatpak builds run offline, so the crate sources must be vendored first. From the repo root:
|
|
#
|
|
# curl -fsSLO https://raw.githubusercontent.com/flatpak/flatpak-builder-tools/master/cargo/flatpak-cargo-generator.py
|
|
# python3 flatpak-cargo-generator.py Cargo.lock -o packaging/linux/flatpak/cargo-sources.json
|
|
# flatpak-builder --user --install --force-clean build-flatpak packaging/linux/flatpak/ai.storyteller.craft-anything.yml
|
|
# flatpak run ai.storyteller.craft-anything
|
|
#
|
|
# For Flathub, replace the `dir` source with a `git` source pinned to a release tag and commit.
|
|
# The single-file .flatpak attached to each release comes from ai.storyteller.craft-anything.bundle.yml,
|
|
# which repackages the prebuilt release binaries. Keep runtime-version and finish-args identical.
|
|
id: ai.storyteller.craft-anything
|
|
runtime: org.freedesktop.Platform
|
|
runtime-version: '26.08'
|
|
sdk: org.freedesktop.Sdk
|
|
sdk-extensions:
|
|
- org.freedesktop.Sdk.Extension.rust-stable
|
|
command: craft-anything
|
|
finish-args:
|
|
# Honor the launcher's pinned and nightly version choices before offering updates.
|
|
- --filesystem=xdg-data/ArtCraft/versions:ro
|
|
# Verified update helpers run through flatpak-spawn --host.
|
|
- --talk-name=org.freedesktop.Flatpak
|
|
# Display: Wayland first; X11 only when no Wayland compositor is running.
|
|
- --socket=wayland
|
|
- --socket=fallback-x11
|
|
# X11 shared memory (MIT-SHM). Without it the X11 fallback is slow or fails.
|
|
- --share=ipc
|
|
# GPU access for the wgpu renderer (Vulkan, or GL as a fallback).
|
|
- --device=dri
|
|
# Open dialogs go through the file-chooser portal (rfd's xdg-portal backend) and drag-and-drop
|
|
# through the document portal, so picked files work anywhere. Home is readable (never writable)
|
|
# so files passed by path (the command line, recent targets) can be inspected.
|
|
- --filesystem=home:ro
|
|
# The default folder for new projects (`default_projects_dir`), writable and made if missing;
|
|
# the rest of home stays read-only (#505).
|
|
- --filesystem=xdg-documents/Craft Anything:create
|
|
# AI backends (Anthropic, OpenAI, OpenRouter, local servers) and optional engine downloads.
|
|
- --share=network
|
|
build-options:
|
|
append-path: /usr/lib/sdk/rust-stable/bin
|
|
modules:
|
|
- name: craft-anything
|
|
buildsystem: simple
|
|
build-options:
|
|
env:
|
|
CARGO_HOME: /run/build/craft-anything/cargo
|
|
CARGO_NET_OFFLINE: 'true'
|
|
build-commands:
|
|
- cargo --offline build --release --locked -p craft-anything -p craft-anything-cli
|
|
- install -Dm755 target/release/craft-anything /app/bin/craft-anything
|
|
- install -Dm755 target/release/craft-anything-cli /app/bin/craft-anything-cli
|
|
- install -Dm644 packaging/linux/ai.storyteller.craft-anything.desktop /app/share/applications/ai.storyteller.craft-anything.desktop
|
|
- mkdir -p /app/share/icons && cp -R assets/app-icon/hicolor /app/share/icons/
|
|
- >-
|
|
version=$(awk '/^\[/{p=($0=="[workspace.package]");next} p&&$1=="version"{gsub(/[" ]/,"",$3);print $3;exit}' Cargo.toml);
|
|
install -d /app/share/metainfo;
|
|
sed -e "s/@VERSION@/$version/" -e "s/@DATE@/$(date -u +%Y-%m-%d)/"
|
|
packaging/linux/ai.storyteller.craft-anything.metainfo.xml.in > /app/share/metainfo/ai.storyteller.craft-anything.metainfo.xml
|
|
sources:
|
|
- type: dir
|
|
path: ../../..
|
|
skip:
|
|
- target
|
|
- dist
|
|
- corpus
|
|
- build-flatpak
|
|
- .flatpak-builder
|
|
- cargo-sources.json
|