Linux app id: ai.storyteller.solidcraft, with an end-of-life rebase from the old id (#619)
The Flatpak app id, desktop/metainfo/MIME file names, icon name and the window's Wayland app_id / X11 class are now ai.storyteller.solidcraft, the id the ArtCraft launcher expects. Existing Flatpak installs move over: the Pages repo marks app/ai.storyteller.solvecraft end-of-life with a rebase to the new id, so flatpak update offers the switch and Flatpak carries ~/.var/app along. A new install next to the old one copies settings and autosaves on first launch through a read-only grant on the old data folder. The metainfo declares <replaces>/<provides>, the desktop entry X-Flatpak-RenamedFrom, and AppImages drop the menu entry an older AppImage installed. deb/rpm upgrades remove the old-named files. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
bcbfa50eac
commit
e67cc0c747
21 files changed
+194
-68
No files matched your search
+4
-4
@@ -37,10 +37,10 @@ export DIST
|
||||
|
||||
export SOLIDCRAFT_BUILD_DATE="${SOLIDCRAFT_BUILD_DATE:-${SOLVECRAFT_BUILD_DATE:-$(date -u +%Y-%m-%d)}}"
|
||||
export CARGO_TARGET_DIR="${CARGO_TARGET_DIR:-$ROOT/target}"
|
||||
# Compatibility shim, see docs/compatibility.md: the reverse-DNS id (Flatpak app id, desktop,
|
||||
# metainfo and MIME file names, icon name, Wayland app_id) keeps its pre-rename value so Flatpak
|
||||
# installs keep updating and desktop integration keeps working.
|
||||
APP_ID=ai.storyteller.solvecraft
|
||||
# The reverse-DNS id: Flatpak app id, desktop, metainfo and MIME file names, icon name and the
|
||||
# window's Wayland app_id / X11 class. Releases before 0.8 used ai.storyteller.solvecraft; the
|
||||
# Flatpak repository rebases that id to this one (packaging/flatpak-site.sh, docs/compatibility.md).
|
||||
APP_ID=ai.storyteller.solidcraft
|
||||
export APP_ID
|
||||
|
||||
# Emit a GitHub Actions warning (plain stderr outside Actions).
|
||||
|
||||
@@ -5,8 +5,10 @@ set -euo pipefail
|
||||
|
||||
site="${1:?site directory required}"
|
||||
tag="${RELEASE_TAG:-}"
|
||||
# Compatibility shim (docs/compatibility.md): the Flatpak app id keeps its pre-rename value.
|
||||
app_id=ai.storyteller.solvecraft
|
||||
app_id=ai.storyteller.solidcraft
|
||||
# Compatibility shim (docs/compatibility.md): releases before 0.8 used this app id. Its refs stay
|
||||
# in the repository, marked end-of-life with a rebase to $app_id.
|
||||
legacy_id=ai.storyteller.solvecraft
|
||||
if [ -z "$tag" ]; then
|
||||
tag="$(gh api "repos/$GITHUB_REPOSITORY/releases?per_page=100" \
|
||||
--jq '[.[] | select(.draft == false and .prerelease == false)][0].tag_name // empty')"
|
||||
@@ -50,6 +52,18 @@ for arch in x86_64 aarch64; do
|
||||
ostree --repo="$validation_repo" refs | grep -Fxq "app/$app_id/$arch/stable"
|
||||
flatpak build-import-bundle "$repo_dir" "$bundles/$asset"
|
||||
done
|
||||
# `flatpak update` then offers existing installs of the old id the move to the new one, and
|
||||
# Flatpak moves their ~/.var/app data folder along. The mark is a new commit on the old ref (the
|
||||
# same app, so a skipped update changes nothing); it is made once and mirrored by later runs.
|
||||
for arch in x86_64 aarch64; do
|
||||
legacy_ref="app/$legacy_id/$arch/stable"
|
||||
ostree --repo="$repo_dir" rev-parse "$legacy_ref" >/dev/null 2>&1 || continue
|
||||
if ! ostree --repo="$repo_dir" show --print-metadata-key=ostree.endoflife-rebase "$legacy_ref" >/dev/null 2>&1; then
|
||||
flatpak build-commit-from --no-update-summary --end-of-life-rebase="$legacy_id=$app_id" \
|
||||
--src-ref="$legacy_ref" "$repo_dir" "$legacy_ref"
|
||||
fi
|
||||
test "$(ostree --repo="$repo_dir" show --print-metadata-key=ostree.endoflife-rebase "$legacy_ref")" = "'app/$app_id/$arch/stable'"
|
||||
done
|
||||
flatpak build-update-repo --title="SolidCraft" --comment='Official SolidCraft releases' \
|
||||
--description='Official Flatpak repository for SolidCraft' \
|
||||
--homepage="https://github.com/$GITHUB_REPOSITORY" --default-branch=stable "$repo_dir"
|
||||
|
||||
+12
-3
@@ -3,7 +3,7 @@
|
||||
# Adapted from PhotoCraft's AppRun (storytold/photocraft, Apache-2.0; see ATTRIBUTION.md).
|
||||
#
|
||||
# On Wayland the compositor resolves a window's dock icon by taking the window's
|
||||
# app_id (ai.storyteller.solvecraft, kept as a compatibility shim) and looking up an installed .desktop file.
|
||||
# app_id (ai.storyteller.solidcraft) and looking up an installed .desktop file.
|
||||
# An AppImage installs nothing, so every AppImage run would otherwise show the
|
||||
# generic "Wayland" icon. Best-effort desktop integration: on first run
|
||||
# (and whenever the AppImage's path changes) install the .desktop entry and the
|
||||
@@ -14,8 +14,9 @@
|
||||
set -u
|
||||
|
||||
APPDIR="$(dirname "$(readlink -f "$0")")"
|
||||
# Compatibility shim (docs/compatibility.md): the pre-rename reverse-DNS id.
|
||||
DESK_ID=ai.storyteller.solvecraft
|
||||
DESK_ID=ai.storyteller.solidcraft
|
||||
# Compatibility shim (docs/compatibility.md): the desktop id of releases before 0.8.
|
||||
OLD_DESK_ID=ai.storyteller.solvecraft
|
||||
|
||||
integrate() {
|
||||
case "${SOLIDCRAFT_NO_DESKTOP_INTEGRATION:-${SOLVECRAFT_NO_DESKTOP_INTEGRATION:-}}" in
|
||||
@@ -59,6 +60,14 @@ integrate() {
|
||||
return 0
|
||||
fi
|
||||
|
||||
# An entry and icons that an AppImage before 0.8 installed under the old id would show a
|
||||
# second menu entry; remove them (only an entry this script wrote: it points Exec at a path).
|
||||
old="$apps/$OLD_DESK_ID.desktop"
|
||||
if [ -f "$old" ] && grep -q "^Icon=$OLD_DESK_ID\$" "$old" && grep -q '^Exec="' "$old"; then
|
||||
rm -f "$old" "$data"/icons/hicolor/*/apps/"$OLD_DESK_ID".png 2>/dev/null
|
||||
command -v update-desktop-database >/dev/null 2>&1 && update-desktop-database "$apps" >/dev/null 2>&1
|
||||
fi
|
||||
|
||||
# Icons: per-file compare so an unchanged install costs a handful of cmp calls.
|
||||
src_icons="$APPDIR/usr/share/icons/hicolor"
|
||||
[ -d "$src_icons" ] || return 0
|
||||
|
||||
+4
-2
@@ -5,10 +5,12 @@ GenericName=3D CAD
|
||||
Comment=Parametric 3D CAD: sketch, constrain, extrude, and change a parameter to rebuild
|
||||
Exec=solidcraft %f
|
||||
TryExec=solidcraft
|
||||
Icon=ai.storyteller.solvecraft
|
||||
Icon=ai.storyteller.solidcraft
|
||||
Terminal=false
|
||||
StartupNotify=true
|
||||
StartupWMClass=solidcraft
|
||||
StartupWMClass=ai.storyteller.solidcraft
|
||||
Categories=Graphics;3DGraphics;Engineering;
|
||||
Keywords=cad;3d;parametric;sketch;step;stl;modelling;modeling;
|
||||
MimeType=application/x-solidcraft;model/step;model/iges;model/stl;model/3mf;
|
||||
# Releases before 0.8 used this desktop id; launchers keep pinned entries across the rename.
|
||||
X-Flatpak-RenamedFrom=ai.storyteller.solvecraft.desktop;
|
||||
+9
-3
@@ -2,7 +2,7 @@
|
||||
<!-- AppStream metadata (software centres, Flathub). Template: package.sh substitutes @VERSION@
|
||||
and @DATE@ from Cargo.toml and the build date. -->
|
||||
<component type="desktop-application">
|
||||
<id>ai.storyteller.solvecraft</id>
|
||||
<id>ai.storyteller.solidcraft</id>
|
||||
<metadata_license>CC0-1.0</metadata_license>
|
||||
<project_license>MIT OR Apache-2.0</project_license>
|
||||
<name>SolidCraft</name>
|
||||
@@ -24,8 +24,8 @@
|
||||
<li>Every action is a command, scriptable from a CLI, a JSON control channel and an MCP server</li>
|
||||
</ul>
|
||||
</description>
|
||||
<launchable type="desktop-id">ai.storyteller.solvecraft.desktop</launchable>
|
||||
<icon type="stock">ai.storyteller.solvecraft</icon>
|
||||
<launchable type="desktop-id">ai.storyteller.solidcraft.desktop</launchable>
|
||||
<icon type="stock">ai.storyteller.solidcraft</icon>
|
||||
<url type="homepage">https://bherbruck.github.io/solidcraft/</url>
|
||||
<url type="bugtracker">https://github.com/bherbruck/solidcraft/issues</url>
|
||||
<url type="help">https://bherbruck.github.io/solidcraft/</url>
|
||||
@@ -56,7 +56,13 @@
|
||||
<binary>solidcraft</binary>
|
||||
<binary>solidcraft-cli</binary>
|
||||
<mediatype>application/x-solidcraft</mediatype>
|
||||
<!-- The desktop id of releases before 0.8 (docs/compatibility.md). -->
|
||||
<id>ai.storyteller.solvecraft.desktop</id>
|
||||
</provides>
|
||||
<!-- Releases before 0.8 used the app id ai.storyteller.solvecraft (docs/compatibility.md). -->
|
||||
<replaces>
|
||||
<id>ai.storyteller.solvecraft</id>
|
||||
</replaces>
|
||||
<content_rating type="oars-1.1"/>
|
||||
<releases>
|
||||
<release version="@VERSION@" date="@DATE@"/>
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
|
||||
<mime-type type="application/x-solidcraft">
|
||||
<comment>SolidCraft design</comment>
|
||||
<icon name="ai.storyteller.solvecraft"/>
|
||||
<icon name="ai.storyteller.solidcraft"/>
|
||||
<sub-class-of type="application/json"/>
|
||||
<glob pattern="*.solidcraft"/>
|
||||
<!-- Compatibility shim (docs/compatibility.md): designs saved before the rename. -->
|
||||
@@ -12,7 +12,7 @@
|
||||
# installed per-user from Flathub. Unless --no-test, the bundle is installed per-user, the CLI
|
||||
# is checked, and the desktop creates/measures a box on headless X11 and Wayland. The desktop
|
||||
# check also needs python3, dbus-x11, xvfb, xauth and weston; no screenshots are produced.
|
||||
# Manifest: packaging/linux/flatpak/ai.storyteller.solvecraft.bundle.yml.
|
||||
# Manifest: packaging/linux/flatpak/ai.storyteller.solidcraft.bundle.yml.
|
||||
# Adapted from PhotoCraft's (storytold/photocraft, Apache-2.0; see ATTRIBUTION.md).
|
||||
set -euo pipefail
|
||||
# shellcheck source=../env.sh
|
||||
|
||||
@@ -19,7 +19,7 @@ import tempfile
|
||||
import time
|
||||
import zlib
|
||||
|
||||
APP_ID = "ai.storyteller.solvecraft"
|
||||
APP_ID = "ai.storyteller.solidcraft"
|
||||
MAX_PIXELS = 16_000_000
|
||||
MAX_PNG_BYTES = 70_000_000
|
||||
SANDBOX_PROBE = r'''
|
||||
|
||||
+12
-7
@@ -7,9 +7,10 @@
|
||||
# during the build, and the same binaries as the AppImage/deb/rpm. The binaries need glibc >= 2.35
|
||||
# and load X11, Wayland, xkbcommon and Vulkan at runtime; the freedesktop runtime has all of
|
||||
# them, and the GPU driver comes from its org.freedesktop.Platform.GL extension.
|
||||
# Compatibility shim, see docs/compatibility.md: the Flatpak app id keeps its pre-rename value.
|
||||
# A new id would be a different app to Flatpak, and existing installs would stop updating.
|
||||
id: ai.storyteller.solvecraft
|
||||
# Releases before 0.8 used the id ai.storyteller.solvecraft. The Flatpak repository marks that
|
||||
# id end-of-life with a rebase to this one, so `flatpak update` moves existing installs over
|
||||
# (packaging/flatpak-site.sh, docs/compatibility.md).
|
||||
id: ai.storyteller.solidcraft
|
||||
runtime: org.freedesktop.Platform
|
||||
runtime-version: '26.08'
|
||||
sdk: org.freedesktop.Sdk
|
||||
@@ -26,8 +27,12 @@ finish-args:
|
||||
# files work anywhere without broad filesystem access. Documents is granted so files passed by
|
||||
# path (the command line, recent designs) work in the usual place.
|
||||
- --filesystem=xdg-documents
|
||||
# Compatibility shim (docs/compatibility.md): settings and autosaves of releases before 0.8,
|
||||
# kept under the old app id, read once on first launch when this app was installed next to
|
||||
# the old one instead of replacing it through `flatpak update`.
|
||||
- --filesystem=~/.var/app/ai.storyteller.solvecraft:ro
|
||||
# Deliberately not granted: network (the optional --control server listens on 127.0.0.1 in
|
||||
# the sandbox; `flatpak override --user --share=network ai.storyteller.solvecraft` exposes it to
|
||||
# the sandbox; `flatpak override --user --share=network ai.storyteller.solidcraft` exposes it to
|
||||
# host agents) and home/host filesystem access.
|
||||
modules:
|
||||
- name: solidcraft
|
||||
@@ -37,10 +42,10 @@ modules:
|
||||
- install -Dm755 bin/solidcraft-cli /app/bin/solidcraft-cli
|
||||
# The old CLI name, forwarding to solidcraft-cli (compatibility shim, docs/compatibility.md).
|
||||
- install -Dm755 bin/solvecraft-cli /app/bin/solvecraft-cli
|
||||
- install -Dm644 share/applications/ai.storyteller.solvecraft.desktop /app/share/applications/ai.storyteller.solvecraft.desktop
|
||||
- install -Dm644 share/mime/packages/ai.storyteller.solvecraft.xml /app/share/mime/packages/ai.storyteller.solvecraft.xml
|
||||
- install -Dm644 share/applications/ai.storyteller.solidcraft.desktop /app/share/applications/ai.storyteller.solidcraft.desktop
|
||||
- install -Dm644 share/mime/packages/ai.storyteller.solidcraft.xml /app/share/mime/packages/ai.storyteller.solidcraft.xml
|
||||
# Already has the release's version and date substituted by package.sh.
|
||||
- install -Dm644 share/metainfo/ai.storyteller.solvecraft.metainfo.xml /app/share/metainfo/ai.storyteller.solvecraft.metainfo.xml
|
||||
- install -Dm644 share/metainfo/ai.storyteller.solidcraft.metainfo.xml /app/share/metainfo/ai.storyteller.solidcraft.metainfo.xml
|
||||
- mkdir -p /app/share/icons /app/share/doc && cp -R share/icons/hicolor /app/share/icons/ && cp -R share/doc/solidcraft /app/share/doc/
|
||||
sources:
|
||||
- type: dir
|
||||
@@ -28,7 +28,7 @@ contact: https://github.com/bherbruck/solidcraft/issues
|
||||
website: https://bherbruck.github.io/solidcraft/
|
||||
source-code: https://github.com/bherbruck/solidcraft
|
||||
issues: https://github.com/bherbruck/solidcraft/issues
|
||||
icon: stage/share/icons/hicolor/512x512/apps/ai.storyteller.solvecraft.png
|
||||
icon: stage/share/icons/hicolor/512x512/apps/ai.storyteller.solidcraft.png
|
||||
base: core24
|
||||
grade: stable
|
||||
confinement: strict
|
||||
@@ -41,10 +41,10 @@ platforms:
|
||||
apps:
|
||||
solidcraft:
|
||||
command: usr/bin/solidcraft
|
||||
desktop: usr/share/applications/ai.storyteller.solvecraft.desktop
|
||||
# Ties the snap to the AppStream id (ai.storyteller.solvecraft, a compatibility shim kept by
|
||||
# every package; see docs/compatibility.md) so software centres treat it as the same app.
|
||||
common-id: ai.storyteller.solvecraft
|
||||
desktop: usr/share/applications/ai.storyteller.solidcraft.desktop
|
||||
# Ties the snap to the AppStream id (ai.storyteller.solidcraft, the same in every package) so
|
||||
# software centres treat it as the same app.
|
||||
common-id: ai.storyteller.solidcraft
|
||||
extensions: [gnome]
|
||||
plugs:
|
||||
- desktop
|
||||
@@ -77,5 +77,5 @@ parts:
|
||||
override-prime: |
|
||||
craftctl default
|
||||
# Point the menu entry at the packaged icon (the hicolor name isn't on the host's path).
|
||||
sed -i 's|^Icon=.*|Icon=${SNAP}/usr/share/icons/hicolor/256x256/apps/ai.storyteller.solvecraft.png|' \
|
||||
usr/share/applications/ai.storyteller.solvecraft.desktop
|
||||
sed -i 's|^Icon=.*|Icon=${SNAP}/usr/share/icons/hicolor/256x256/apps/ai.storyteller.solidcraft.png|' \
|
||||
usr/share/applications/ai.storyteller.solidcraft.desktop
|
||||
@@ -13,8 +13,7 @@ set -euo pipefail
|
||||
# shellcheck source=../env.sh
|
||||
. "$(dirname "${BASH_SOURCE[0]}")/../env.sh"
|
||||
HERE="$ROOT/packaging/macos"
|
||||
# macOS has no Flatpak-style update channel keyed by this id, so it follows the new name
|
||||
# (the Linux reverse-DNS APP_ID stays as a compatibility shim; docs/compatibility.md).
|
||||
# The same reverse-DNS id as the Linux APP_ID.
|
||||
MACOS_BUNDLE_ID=ai.storyteller.solidcraft
|
||||
|
||||
ARCH=universal
|
||||
|
||||
Reference in new issue
Block a user