{
 "app_id": "org.upbge.UPBGE",
 "source_url": "https://raw.githubusercontent.com/flathub/org.upbge.UPBGE/master/org.upbge.UPBGE.yml",
 "runtime": "org.freedesktop.Platform",
 "runtime_version": "24.08",
 "sdk": "org.freedesktop.Sdk",
 "finish_args": [
  "--share=network",
  "--share=ipc",
  "--socket=x11",
  "--socket=wayland",
  "--socket=pulseaudio",
  "--socket=fallback-x11",
  "--device=dri",
  "--filesystem=/run/spnav.sock:ro",
  "--filesystem=host"
 ],
 "module_count": 3,
 "fetched_at": "2026-09-17T16:16:52.152066+00:00",
 "manifest": {
  "id": "org.upbge.UPBGE",
  "runtime": "org.freedesktop.Platform",
  "runtime-version": "24.08",
  "sdk": "org.freedesktop.Sdk",
  "command": "blender",
  "finish-args": [
   "--share=ipc",
   "--socket=wayland",
   "--socket=fallback-x11",
   "--socket=pulseaudio",
   "--device=dri",
   "--share=network",
   "--filesystem=host",
   "--filesystem=/run/spnav.sock:ro",
   "--env=SPNAV_SOCKET=/run/spnav.sock",
   "--env=TMP_DIR=/tmp",
   "--env=TMP=/tmp"
  ],
  "add-extensions": {
   "org.upbge.UPBGE.Codecs": {
    "directory": "lib/codecs",
    "add-ld-path": "lib",
    "bundle": true,
    "autodelete": true
   },
   "org.freedesktop.Platform.ffmpeg-full": {
    "directory": "lib/ffmpeg",
    "version": "23.08",
    "add-ld-path": "."
   }
  },
  "cleanup-commands": [
   "mkdir -p /app/lib/ffmpeg"
  ],
  "modules": [
   "shared-modules/libdecor/libdecor-0.2.0.json",
   {
    "name": "x264",
    "config-opts": [
     "--prefix=/app/lib/codecs",
     "--enable-lto",
     "--enable-pic",
     "--enable-shared",
     "--disable-cli"
    ],
    "sources": [
     {
      "type": "git",
      "url": "https://code.videolan.org/videolan/x264.git",
      "commit": "31e19f92f00c7003fa115047ce50978bc98c3a0d"
     }
    ],
    "cleanup": [
     "/lib/codecs/include",
     "/lib/codecs/lib/pkgconfig"
    ]
   },
   {
    "name": "upbge",
    "buildsystem": "simple",
    "build-commands": [
     "mv upbge*linux* /app/blender",
     "install -Dm755 blender.sh /app/bin/blender",
     "install -Dm644 /app/blender/$FLATPAK_ID.desktop /app/share/applications/$FLATPAK_ID.desktop",
     "install -Dm644 /app/blender/$FLATPAK_ID.svg /app/share/icons/hicolor/scalable/apps/$FLATPAK_ID.svg",
     "install -Dm644 /app/blender/$FLATPAK_ID-symbolic.svg /app/share/icons/hicolor/symbolic/apps/$FLATPAK_ID-symbolic.svg",
     "cd /app/blender/*.*/datafiles && mv locale /app/share/locale && ln -sf /app/share/locale locale",
     "install -Dm644 $FLATPAK_ID.metainfo.xml /app/share/metainfo/$FLATPAK_ID.metainfo.xml"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://github.com/UPBGE/upbge/releases/download/v0.44/upbge-0.44-linux-x86_64.tar.xz",
      "sha256": "cb23e1003dc3ec10847eb7ac4380eba9cd5de6a53b944d6231f46841534afd5f",
      "strip-components": 0
     },
     {
      "type": "script",
      "commands": [
       "cd /app/blender",
       "exec ./blender \"$@\""
      ],
      "dest-filename": "blender.sh"
     },
     {
      "type": "file",
      "url": "https://raw.githubusercontent.com/UPBGE/upbge/ba7c145f5a4a83f1d3fb7b23f1741b0fe1ac3f83/release/freedesktop/org.upbge.UPBGE.metainfo.xml",
      "sha256": "ef4c0c8f4cd098f30241fb6de76496cf0cf43f7a7ef7e1b8be9fb1b45a64516d"
     }
    ]
   }
  ]
 }
}