Initial O3DE Flatpak packaging + Gitea CI

Repackage the official O3DE Linux .deb as a Flatpak and publish it as a
static OSTree repo on the 'pages' branch for install via flatpak remote.

- org.o3de.O3DE.yaml: flatpak-builder manifest (extracts the .deb into /app)
- o3de-wrapper.sh: launcher that locates the versioned o3de binary at runtime
- desktop + AppStream metadata under the app-id
- scripts/: live version resolver and local build helper
- .gitea/workflows/build-flatpak.yml: daily check -> build -> publish -> tag

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-15 09:29:55 +02:00
commit 5421db2960
10 changed files with 518 additions and 0 deletions
+41
View File
@@ -0,0 +1,41 @@
#!/usr/bin/env bash
# Build the O3DE Flatpak locally (for testing the manifest before relying on CI).
#
# Requires: flatpak, flatpak-builder, curl, and the Flathub remote.
# Note: O3DE is large (~15-18 GB installed); expect a multi-GB download and a
# build that needs a lot of free disk space.
set -euo pipefail
cd "$(dirname "$0")/.."
eval "$(scripts/get-latest-version.sh)"
echo ">> Latest O3DE: ${version} (${deb_file})"
if [ ! -f o3de.deb ]; then
echo ">> Downloading ${deb_url}"
curl -fL --progress-bar -o o3de.deb "${deb_url}"
fi
if [ -n "${sha256:-}" ]; then
echo ">> Verifying checksum"
echo "${sha256} o3de.deb" | sha256sum -c -
else
echo ">> No checksum published; skipping verification" >&2
fi
# Make sure the runtime/SDK are available (no-op if already installed).
flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak install --user -y flathub org.freedesktop.Platform//24.08 org.freedesktop.Sdk//24.08 || true
echo ">> Building"
flatpak-builder --user --force-clean --install-deps-from=flathub \
--repo=repo build-dir org.o3de.O3DE.yaml
cat <<EOF
>> Done.
Test run without installing:
flatpak-builder --run build-dir org.o3de.O3DE.yaml o3de-wrapper.sh
Or install from the local repo:
flatpak remote-add --user --no-gpg-verify o3de-local repo
flatpak install --user o3de-local org.o3de.O3DE
EOF
+35
View File
@@ -0,0 +1,35 @@
#!/usr/bin/env bash
# Resolve the latest official O3DE Linux .deb.
#
# Prints shell-eval-able key=value lines:
# version=26.05.0
# deb_url=https://o3debinaries.org/main/Latest/Linux/o3de_2605_0.deb
# deb_file=o3de_2605_0.deb
# sha256=<hex or empty>
#
# Usage: eval "$(scripts/get-latest-version.sh)"
set -euo pipefail
INDEX="https://o3debinaries.org/download/linux.html"
# The download index links to the current stable .deb under main/Latest.
DEB_URL=$(curl -fsSL "$INDEX" \
| grep -oE 'https://o3debinaries\.org/main/Latest/Linux/o3de_[0-9_]+\.deb' \
| head -n1 || true)
if [ -z "${DEB_URL}" ]; then
echo "error: could not find an o3de_*.deb link on ${INDEX}" >&2
exit 1
fi
DEB_FILE=$(basename "$DEB_URL") # e.g. o3de_2605_0.deb
RAW=${DEB_FILE#o3de_}; RAW=${RAW%.deb} # e.g. 2605_0
# 2605_0 -> 26.05.0 (YYMM_patch -> YY.MM.patch)
VERSION=$(printf '%s' "$RAW" | sed -E 's/^([0-9]{2})([0-9]{2})_([0-9]+)$/\1.\2.\3/')
SHA256=$(curl -fsSL "${DEB_URL}.sha256" 2>/dev/null | awk 'NR==1{print $1}' || true)
echo "version=${VERSION}"
echo "deb_url=${DEB_URL}"
echo "deb_file=${DEB_FILE}"
echo "sha256=${SHA256}"