Feature/update flatpak 2.4 (#13799)

* update flatpak to reflect recent deps changes as well as upgrade runtime to 50

* support building from worktree
This commit is contained in:
SoftFever
2026-05-22 23:52:36 +08:00
committed by GitHub
parent 6f6fc6ddfe
commit 6f29c28267
6 changed files with 32 additions and 14 deletions

View File

@@ -142,7 +142,7 @@ jobs:
flatpak:
name: "Flatpak"
container:
image: ghcr.io/flathub-infra/flatpak-github-actions:gnome-49
image: ghcr.io/flathub-infra/flatpak-github-actions:gnome-50
options: --privileged
volumes:
- /usr/local/lib/android:/usr/local/lib/android

View File

@@ -199,22 +199,22 @@ echo -e "${GREEN}All required dependencies found${NC}"
# Install runtime and SDK if requested
if [[ "$INSTALL_RUNTIME" == true ]]; then
echo -e "${YELLOW}Installing GNOME runtime and SDK...${NC}"
flatpak install --user -y flathub org.gnome.Platform//49
flatpak install --user -y flathub org.gnome.Sdk//49
flatpak install --user -y flathub org.gnome.Platform//50
flatpak install --user -y flathub org.gnome.Sdk//50
fi
# Check if required runtime is available
if ! flatpak info --user org.gnome.Platform//49 &> /dev/null; then
echo -e "${RED}Error: GNOME Platform 49 runtime is not installed.${NC}"
if ! flatpak info --user org.gnome.Platform//50 &> /dev/null; then
echo -e "${RED}Error: GNOME Platform 50 runtime is not installed.${NC}"
echo "Run with -i flag to install it automatically, or install manually:"
echo "flatpak install --user flathub org.gnome.Platform//49"
echo "flatpak install --user flathub org.gnome.Platform//50"
exit 1
fi
if ! flatpak info --user org.gnome.Sdk//49 &> /dev/null; then
echo -e "${RED}Error: GNOME SDK 49 is not installed.${NC}"
if ! flatpak info --user org.gnome.Sdk//50 &> /dev/null; then
echo -e "${RED}Error: GNOME SDK 50 is not installed.${NC}"
echo "Run with -i flag to install it automatically, or install manually:"
echo "flatpak install --user flathub org.gnome.Sdk//49"
echo "flatpak install --user flathub org.gnome.Sdk//50"
exit 1
fi

View File

@@ -22,7 +22,7 @@ ARCH="$(uname -m)"
NO_DEBUG_INFO=false
FORCE_PULL=false
FORCE_CLEAN=true
CONTAINER_IMAGE="ghcr.io/flathub-infra/flatpak-github-actions:gnome-49"
CONTAINER_IMAGE="ghcr.io/flathub-infra/flatpak-github-actions:gnome-50"
normalize_arch() {
case "$1" in
@@ -142,6 +142,16 @@ fi
DOCKER_RUN_ARGS=(run --rm -i --privileged)
# When building from a git worktree, $PROJECT_ROOT/.git is a file pointing to the
# main repo's git dir (outside $PROJECT_ROOT). The git commands and flatpak-builder
# inside the container need that path to resolve, so bind-mount the common git dir
# read-only at its original absolute path. No-op for a normal clone.
GIT_COMMON_DIR="$(git -C "$PROJECT_ROOT" rev-parse --path-format=absolute --git-common-dir 2>/dev/null || true)"
if [ -n "$GIT_COMMON_DIR" ] && [ "$GIT_COMMON_DIR" != "$PROJECT_ROOT/.git" ]; then
echo " Git worktree detected; mounting common git dir read-only: $GIT_COMMON_DIR"
DOCKER_RUN_ARGS+=(-v "$GIT_COMMON_DIR":"$GIT_COMMON_DIR":ro)
fi
# Pass build parameters as env vars so the inner script doesn't need
# variable expansion from the outer shell (avoids quoting issues).
echo "=== Starting Flatpak build inside container ==="
@@ -175,8 +185,8 @@ 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 \
org.gnome.Sdk//49 \
org.gnome.Platform//50 \
org.gnome.Sdk//50 \
org.freedesktop.Sdk.Extension.llvm21//25.08 || true
install_end=$(date +%s)

View File

@@ -45,6 +45,12 @@
<color type="primary" scheme_preference="dark">#00695C</color>
</branding>
<releases>
<release version="2.4.0-dev" date="2026-05-22" type="development">
<url type="details">https://github.com/OrcaSlicer/OrcaSlicer/releases/tag/nightly-builds</url>
<description>
<p>See the release page for detailed changelog.</p>
</description>
</release>
<release version="2.3.2" date="2025-03-23">
<url type="details">https://github.com/OrcaSlicer/OrcaSlicer/releases/tag/v2.3.2</url>
<description>

View File

@@ -1,6 +1,6 @@
app-id: com.orcaslicer.OrcaSlicer
runtime: org.gnome.Platform
runtime-version: "49"
runtime-version: "50"
sdk: org.gnome.Sdk
sdk-extensions:
- org.freedesktop.Sdk.Extension.llvm21
@@ -115,7 +115,9 @@ modules:
- -DwxUSE_ZLIB=sys
- -DwxUSE_LIBJPEG=sys
- -DwxUSE_LIBTIFF=OFF
- -DwxUSE_LIBWEBP=builtin
- -DwxUSE_EXPAT=sys
- -DwxUSE_NANOSVG=OFF
- -DCMAKE_EXE_LINKER_FLAGS=-fuse-ld=lld
- -DCMAKE_SHARED_LINKER_FLAGS=-fuse-ld=lld
- -DCMAKE_MODULE_LINKER_FLAGS=-fuse-ld=lld

View File

@@ -3,7 +3,7 @@
sudo apt update
sudo apt install build-essential flatpak flatpak-builder gnome-software-plugin-flatpak -y
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak install flathub org.gnome.Platform//48 org.gnome.Sdk//48
flatpak install flathub org.gnome.Platform//50 org.gnome.Sdk//50 org.freedesktop.Sdk.Extension.llvm21//25.08
##