update flatpak app id and add migration code (#12879)

* update flatpak app id and add migration code

* tweak some text
This commit is contained in:
SoftFever
2026-03-22 23:49:23 +08:00
committed by GitHub
parent 4f87e52379
commit 73be083ac5
14 changed files with 93 additions and 70 deletions

View File

@@ -98,8 +98,8 @@ echo " ccache: enabled"
echo ""
# ---------- prepare manifest ----------
MANIFEST_SRC="scripts/flatpak/io.github.orcaslicer.OrcaSlicer.yml"
MANIFEST_DOCKER="scripts/flatpak/io.github.orcaslicer.OrcaSlicer.docker.yml"
MANIFEST_SRC="scripts/flatpak/com.orcaslicer.OrcaSlicer.yml"
MANIFEST_DOCKER="scripts/flatpak/com.orcaslicer.OrcaSlicer.docker.yml"
# Ensure cleanup on exit (success or failure)
trap 'rm -f "$PROJECT_ROOT/$MANIFEST_DOCKER"' EXIT
@@ -167,6 +167,12 @@ format_duration() {
overall_start=$(date +%s)
install_start=$overall_start
# The workspace and .flatpak-builder cache are bind-mounted from the host.
# Git inside the container may reject cached source repos as unsafe due to
# ownership mismatch, which breaks flatpak-builder when it reuses git sources.
git config --global --add safe.directory /src
git config --global --add safe.directory '/src/.flatpak-builder/git/*'
# Install required SDK extensions (not pre-installed in the container image)
flatpak install -y --noninteractive --arch="$BUILD_ARCH" flathub \
org.gnome.Platform//49 \
@@ -185,7 +191,7 @@ flatpak-builder $FORCE_CLEAN_FLAG \
--arch="$BUILD_ARCH" \
--repo=flatpak-repo \
flatpak-build \
scripts/flatpak/io.github.orcaslicer.OrcaSlicer.docker.yml
scripts/flatpak/com.orcaslicer.OrcaSlicer.docker.yml
builder_end=$(date +%s)
builder_duration=$((builder_end - builder_start))
@@ -194,7 +200,7 @@ flatpak build-bundle \
--arch="$BUILD_ARCH" \
flatpak-repo \
"$BUNDLE_NAME" \
io.github.orcaslicer.OrcaSlicer
com.orcaslicer.OrcaSlicer
bundle_end=$(date +%s)
bundle_duration=$((bundle_end - bundle_start))

View File

@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop">
<id>io.github.orcaslicer.OrcaSlicer</id>
<launchable type="desktop-id">io.github.orcaslicer.OrcaSlicer.desktop</launchable>
<id>com.orcaslicer.OrcaSlicer</id>
<launchable type="desktop-id">com.orcaslicer.OrcaSlicer.desktop</launchable>
<provides>
<id>io.github.orcaslicer.OrcaSlicer.desktop</id>
<id>com.orcaslicer.OrcaSlicer.desktop</id>
</provides>
<name>OrcaSlicer</name>
<summary>Get even more perfect prints!</summary>
<developer id="io.github.orcaslicer">
<developer id="com.orcaslicer">
<name>SoftFever</name>
</developer>
<url type="homepage">https://www.orcaslicer.com</url>

View File

@@ -1,4 +1,4 @@
app-id: io.github.orcaslicer.OrcaSlicer
app-id: com.orcaslicer.OrcaSlicer
runtime: org.gnome.Platform
runtime-version: "49"
sdk: org.gnome.Sdk
@@ -24,9 +24,11 @@ finish-args:
- --filesystem=/run/media
- --filesystem=/media
- --filesystem=/run/spnav.sock:ro
# Allow read-only access to OrcaSlicer's legacy config and cache directories (if they exist) for migration purposes.
- --filesystem=~/.var/app/io.github.orcaslicer.OrcaSlicer:ro
# Allow OrcaSlicer to own and talk to instance-check D-Bus names (InstanceCheck.cpp)
- --talk-name=com.softfever3d.orca-slicer.InstanceCheck.*
- --own-name=com.softfever3d.orca-slicer.InstanceCheck.*
- --talk-name=com.orcaslicer.OrcaSlicer.InstanceCheck.*
- --own-name=com.orcaslicer.OrcaSlicer.InstanceCheck.*
- --system-talk-name=org.freedesktop.UDisks2
- --env=SPNAV_SOCKET=/run/spnav.sock
@@ -367,7 +369,7 @@ modules:
# AppData metainfo for GNOME Software & Co.
- type: file
path: io.github.orcaslicer.OrcaSlicer.metainfo.xml
path: com.orcaslicer.OrcaSlicer.metainfo.xml
# Startup script
- type: file

View File

@@ -9,7 +9,7 @@ flatpak install flathub org.gnome.Platform//48 org.gnome.Sdk//48
##
# in OrcaSlicer folder, run following command to build Orca
# # First time build
# flatpak-builder --state-dir=.flatpak-builder --keep-build-dirs --user --force-clean build-dir scripts/flatpak/io.github.orcaslicer.OrcaSlicer.yml
# flatpak-builder --state-dir=.flatpak-builder --keep-build-dirs --user --force-clean build-dir scripts/flatpak/com.orcaslicer.OrcaSlicer.yml
# # Subsequent builds (only rebuilding OrcaSlicer)
# flatpak-builder --state-dir=.flatpak-builder --keep-build-dirs --user build-dir scripts/flatpak/io.github.orcaslicer.OrcaSlicer.yml --build-only=OrcaSlicer
# flatpak-builder --state-dir=.flatpak-builder --keep-build-dirs --user build-dir scripts/flatpak/com.orcaslicer.OrcaSlicer.yml --build-only=OrcaSlicer