{
 "app_id": "io.github.theforceengine.tfe",
 "source_url": "https://raw.githubusercontent.com/flathub/io.github.theforceengine.tfe/master/io.github.theforceengine.tfe.yml",
 "runtime": "org.freedesktop.Platform",
 "runtime_version": "25.08",
 "sdk": "org.freedesktop.Sdk",
 "finish_args": [
  "--share=ipc",
  "--socket=fallback-x11",
  "--socket=pulseaudio",
  "--socket=wayland",
  "--device=all",
  "--filesystem=~/.local/share/Steam/steamapps/common/Dark Forces/Game:ro",
  "--filesystem=~/.var/app/com.valvesoftware.Steam/.local/share/Steam/steamapps/common/Dark Forces/Game:ro",
  "--filesystem=~/snap/steam/common/.local/share/Steam/steamapps/common/Dark Forces/Game:ro"
 ],
 "module_count": 7,
 "fetched_at": "2026-09-17T16:12:21.936178+00:00",
 "manifest": {
  "id": "io.github.theforceengine.tfe",
  "runtime": "org.freedesktop.Platform",
  "runtime-version": "25.08",
  "sdk": "org.freedesktop.Sdk",
  "command": "io.github.theforceengine.tfe.sh",
  "cleanup": [
   "include",
   "lib/cmake/*",
   "share/rtmidi/*"
  ],
  "cleanup-commands": [
   "rm -rvf \"$FLATPAK_DEST/share/metainfo/$FLATPAK_ID.Mod.AdjustableHud.metainfo.xml\" \"$FLATPAK_DEST/include\" \"$FLATPAK_DEST/lib/\"*'.a' \"$FLATPAK_DEST/lib/pkgconfig\""
  ],
  "finish-args": [
   "--device=all",
   "--share=ipc",
   "--socket=wayland",
   "--socket=fallback-x11",
   "--socket=pulseaudio",
   "--filesystem=~/.local/share/Steam/steamapps/common/Dark Forces/Game:ro",
   "--filesystem=~/.var/app/com.valvesoftware.Steam/.local/share/Steam/steamapps/common/Dark Forces/Game:ro",
   "--filesystem=~/snap/steam/common/.local/share/Steam/steamapps/common/Dark Forces/Game:ro"
  ],
  "add-extensions": {
   "io.github.theforceengine.tfe.Mod": {
    "directory": "share/TheForceEngine/Mods",
    "merge-dirs": ".",
    "no-autodownload": true,
    "autodelete": false,
    "bundle": false,
    "subdirectories": true
   },
   "io.github.theforceengine.tfe.Mod.AdjustableHud": {
    "directory": "share/TheForceEngine/Mods",
    "no-autodownload": false,
    "autodelete": true,
    "bundle": true,
    "subdirectories": false
   }
  },
  "modules": [
   {
    "name": "tfe",
    "buildsystem": "cmake-ninja",
    "config-opts": [
     "-DCMAKE_BUILD_TYPE=RelWithDebInfo",
     "-DENABLE_EDITOR=ON"
    ],
    "builddir": true,
    "modules": [
     "shared-modules/glu/glu-9.json",
     {
      "name": "rtmidi",
      "buildsystem": "cmake-ninja",
      "sources": [
       {
        "type": "archive",
        "url": "https://github.com/thestk/rtmidi/archive/refs/tags/6.0.0.tar.gz",
        "sha256": "ef7bcda27fee6936b651c29ebe9544c74959d0b1583b716ce80a1c6fea7617f0",
        "x-checker-data": {
         "type": "anitya",
         "project-id": 4220,
         "url-template": "https://github.com/thestk/rtmidi/archive/refs/tags/$version.tar.gz"
        }
       }
      ]
     },
     "shared-modules/SDL2/SDL2_image.json"
    ],
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/TheForceEngine/TheForceEngine.git",
      "x-checker-data": {
       "type": "json",
       "url": "https://api.github.com/repos/TheForceEngine/TheForceEngine/releases/latest",
       "tag-query": ".tag_name"
      },
      "tag": "v1.22.420",
      "commit": "cc25205cc94c36a396f6f50295772f6ec83069a2"
     },
     {
      "type": "patch",
      "paths": [
       "io.github.theforceengine.tfe.redirect-user-data.patch",
       "io.github.theforceengine.tfe.game-data-detection.patch",
       "io.github.theforceengine.tfe.fix-localarchives.patch",
       "io.github.theforceengine.tfe.fix-tempdir.patch"
      ]
     },
     {
      "type": "file",
      "path": "io.github.theforceengine.tfe.releases.xml"
     }
    ],
    "post-install": [
     "install -Dvm 0644 -t \"$FLATPAK_DEST/share/metainfo/releases\" \"$FLATPAK_BUILDER_BUILDDIR/$FLATPAK_ID.releases.xml\""
    ]
   },
   {
    "name": "AdjustableHud",
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/TheForceEngine/TheForceEngine.git",
      "x-checker-data": {
       "type": "json",
       "url": "https://api.github.com/repos/TheForceEngine/TheForceEngine/releases/latest",
       "tag-query": ".tag_name"
      },
      "tag": "v1.22.420",
      "commit": "cc25205cc94c36a396f6f50295772f6ec83069a2"
     }
    ],
    "buildsystem": "simple",
    "build-commands": [
     "install -Dvm 0644 -t \"$FLATPAK_DEST/share/TheForceEngine/Mods/share/metainfo\" \"TheForceEngine/$FLATPAK_ID.Mod.AdjustableHud.metainfo.xml\"",
     "appstreamcli compose --prefix=/ --origin=\"$FLATPAK_ID.Mod.AdjustableHud\" --result-root=\"$FLATPAK_DEST/share/TheForceEngine/Mods\" --data-dir=\"$FLATPAK_DEST/share/TheForceEngine/Mods/share/app-info/xmls\" --icons-dir=\"$FLATPAK_DEST/share/TheForceEngine/Mods/share/app-info/icons/flatpak\" --components=\"$FLATPAK_ID.Mod.AdjustableHud\" \"$FLATPAK_DEST/share/TheForceEngine/Mods\""
    ]
   },
   {
    "name": "debug",
    "sources": [
     {
      "type": "file",
      "path": "io.github.theforceengine.tfe.Debug.metainfo.xml"
     },
     {
      "type": "file",
      "url": "https://sourceware.org/gdb/images/archer.svg",
      "sha256": "0b395702ca5d13ef32f7b9643b24a0c968ad193f45c22601ac3049b0575273ff",
      "dest-filename": "io.github.theforceengine.tfe.Debug.svg"
     }
    ],
    "buildsystem": "simple",
    "build-commands": [
     "install -Dvm 0644 -t \"$FLATPAK_DEST/lib/debug/share/metainfo\" \"$FLATPAK_ID.Debug.metainfo.xml\"",
     "install -Dvm 0644 -t \"$FLATPAK_DEST/lib/debug/share/icons/hicolor/scalable/apps\" \"$FLATPAK_ID.Debug.svg\"",
     "appstreamcli compose --prefix=/ --origin=\"$FLATPAK_ID.Debug\" --result-root=\"$FLATPAK_DEST/lib/debug\" --data-dir=\"$FLATPAK_DEST/lib/debug/share/app-info/xmls\" --icons-dir=\"$FLATPAK_DEST/lib/debug/share/app-info/icons/flatpak\" --components=\"$FLATPAK_ID.Debug\" \"$FLATPAK_DEST/lib/debug\""
    ]
   },
   {
    "name": "launch_script",
    "sources": [
     {
      "type": "file",
      "path": "io.github.theforceengine.tfe.sh"
     }
    ],
    "buildsystem": "simple",
    "build-commands": [
     "install -Dm 0755 \"$FLATPAK_ID.sh\" -t \"$FLATPAK_DEST/bin\"",
     "desktop-file-edit --set-key=Exec --set-value=\"$FLATPAK_ID.sh\" \"$FLATPAK_DEST/share/applications/$FLATPAK_ID.desktop\""
    ]
   }
  ]
 }
}