f4d2dddd02
On first launch O3DE pip-installs its 'o3de' CLI with 'pip install -e'
(editable), which writes an egg-info next to the source under read-only
/app and fails ([Errno 30] Read-only file system), leaving the venv broken
("unable to install O3DE's built-in Python").
- Patch cmake/LYPython.cmake at build time to force a normal (non-editable)
install, which builds in a temp dir and lands in the writable ~/.o3de venv.
- Drop the build-time get_python "bake": the venv is per-user (keyed to
$HOME), so it can only be created at runtime; baking under a throwaway
build HOME did nothing. Speeds up CI; removes cmake/python3 build deps and
the network build-arg.
- Add a real launcher icon (org.o3de.O3DE.png).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
67 lines
3.2 KiB
YAML
67 lines
3.2 KiB
YAML
# flatpak-builder manifest for repackaging the official O3DE Linux .deb as a Flatpak.
|
|
#
|
|
# The workflow (and scripts/build.sh) download the latest o3de_*.deb to ./o3de.deb
|
|
# next to this manifest before building, so the manifest itself never needs editing
|
|
# when a new version drops.
|
|
#
|
|
# Why the SDK is the runtime (not just the sdk): O3DE compiles game-project code at
|
|
# runtime and ships only a *build toolchain* dependency list (clang/ninja/cmake/
|
|
# pkg-config + -dev libs). Those live in org.freedesktop.Sdk, so we run against it.
|
|
id: org.o3de.O3DE
|
|
runtime: org.freedesktop.Sdk
|
|
runtime-version: '24.08'
|
|
sdk: org.freedesktop.Sdk
|
|
command: o3de-wrapper.sh
|
|
|
|
finish-args:
|
|
- --share=ipc
|
|
- --share=network # Project Manager fetches gems/templates; engine downloads assets
|
|
- --socket=x11 # O3DE's bundled Qt only ships the xcb plugin, so X11/XWayland is required
|
|
- --socket=wayland
|
|
- --socket=pulseaudio
|
|
- --device=dri # GPU access for the renderer
|
|
- --device=all # broader device access (input devices, additional GPUs)
|
|
- --filesystem=home # O3DE stores projects and ~/.o3de in the user's home
|
|
- --talk-name=org.freedesktop.Notifications
|
|
- --env=QT_QPA_PLATFORM=xcb # O3DE's bundled Qt is most reliable under XWayland/X11
|
|
|
|
modules:
|
|
- name: o3de
|
|
buildsystem: simple
|
|
build-commands:
|
|
# The .deb is an `ar` archive containing data.tar.{gz,xz,zst}.
|
|
- ar x o3de.deb
|
|
- mkdir -p data
|
|
- tar -C data -xf data.tar.*
|
|
# The payload installs entirely under /opt/O3DE/<version>/. (The /usr branch
|
|
# is kept for robustness in case a future release adds desktop glue there.)
|
|
- 'if [ -d data/opt ]; then mkdir -p "${FLATPAK_DEST}/opt"; cp -a data/opt/. "${FLATPAK_DEST}/opt/"; fi'
|
|
- 'if [ -d data/usr ]; then cp -a data/usr/. "${FLATPAK_DEST}/"; fi'
|
|
# On first launch O3DE pip-installs its 'o3de' CLI editable ('pip install
|
|
# -e'), which writes an egg-info into read-only /app and fails. Force a
|
|
# normal install (built in a temp dir, lands in the writable ~/.o3de venv).
|
|
- |
|
|
set -e
|
|
LYPYTHON=$(find "${FLATPAK_DEST}/opt/O3DE" -path '*/cmake/LYPython.cmake' | head -n1)
|
|
if [ -n "$LYPYTHON" ] && grep -q 'set(_pip_install_mode_args "-e")' "$LYPYTHON"; then
|
|
sed -i 's/set(_pip_install_mode_args "-e")/set(_pip_install_mode_args "")/' "$LYPYTHON"
|
|
else
|
|
echo "::warning:: editable-install line not found in LYPython.cmake"
|
|
fi
|
|
# Launcher + AppStream + desktop entry under the Flatpak app-id.
|
|
- install -Dm755 o3de-wrapper.sh "${FLATPAK_DEST}/bin/o3de-wrapper.sh"
|
|
- install -Dm644 org.o3de.O3DE.desktop "${FLATPAK_DEST}/share/applications/org.o3de.O3DE.desktop"
|
|
- install -Dm644 org.o3de.O3DE.metainfo.xml "${FLATPAK_DEST}/share/metainfo/org.o3de.O3DE.metainfo.xml"
|
|
- install -Dm644 org.o3de.O3DE.png "${FLATPAK_DEST}/share/icons/hicolor/256x256/apps/org.o3de.O3DE.png"
|
|
sources:
|
|
- type: file
|
|
path: o3de.deb
|
|
- type: file
|
|
path: o3de-wrapper.sh
|
|
- type: file
|
|
path: org.o3de.O3DE.desktop
|
|
- type: file
|
|
path: org.o3de.O3DE.metainfo.xml
|
|
- type: file
|
|
path: org.o3de.O3DE.png
|