{
 "app_id": "com.zquestclassic.ZQuest",
 "source_url": "https://raw.githubusercontent.com/flathub/com.zquestclassic.ZQuest/master/com.zquestclassic.ZQuest.yml",
 "runtime": "org.freedesktop.Platform",
 "runtime_version": "25.08",
 "sdk": "org.freedesktop.Sdk",
 "finish_args": [
  "--share=network",
  "--share=ipc",
  "--socket=x11",
  "--socket=wayland",
  "--socket=pulseaudio",
  "--socket=fallback-x11",
  "--device=all",
  "--filesystem=xdg-download",
  "--filesystem=xdg-documents"
 ],
 "module_count": 2,
 "fetched_at": "2026-09-17T16:09:16.288781+00:00",
 "manifest": {
  "app-id": "com.zquestclassic.ZQuest",
  "runtime": "org.freedesktop.Platform",
  "runtime-version": "25.08",
  "sdk": "org.freedesktop.Sdk",
  "sdk-extensions": [
   "org.freedesktop.Sdk.Extension.llvm21"
  ],
  "finish-args": [
   "--share=network",
   "--share=ipc",
   "--socket=wayland",
   "--socket=fallback-x11",
   "--socket=pulseaudio",
   "--filesystem=xdg-download",
   "--filesystem=xdg-documents",
   "--device=all"
  ],
  "command": "entry.sh",
  "cleanup": [
   "/bin/*png*"
  ],
  "modules": [
   {
    "name": "zquest",
    "buildsystem": "cmake",
    "builddir": true,
    "build-options": {
     "append-path": "/usr/lib/sdk/llvm21/bin",
     "prepend-ld-library-path": "/usr/lib/sdk/llvm21/lib",
     "cxxflags": "-DFMT_CONSTEVAL="
    },
    "config-opts": [
     "-D CMAKE_POLICY_VERSION_MINIMUM=3.5",
     "-D CMAKE_C_COMPILER=clang",
     "-D CMAKE_CXX_COMPILER=clang++",
     "-D RELEASE_TAG=2.55.14",
     "-D RELEASE_CHANNEL=2.55",
     "-D REPO=ZQuestClassic/ZQuestClassic",
     "-D FETCHCONTENT_SOURCE_DIR_ALLEGRO5=../deps/allegro5",
     "-D FETCHCONTENT_SOURCE_DIR_GME_EXTERNAL=../deps/gme",
     "-D FETCHCONTENT_SOURCE_DIR_ASMJIT=../deps/asmjit",
     "-D FETCHCONTENT_SOURCE_DIR_NATIVEFILEDIALOG=../deps/nfd",
     "-D FETCHCONTENT_SOURCE_DIR_JSON=../deps/json",
     "-D FETCHCONTENT_SOURCE_DIR_STDUUID=../deps/stduuid",
     "-D FETCHCONTENT_SOURCE_DIR_MINIZ=../deps/miniz",
     "-D WANT_VENDORED_ZLIB=OFF"
    ],
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/ZQuestClassic/ZQuestClassic",
      "commit": "983d539c1329847fb7f746848d4901500d835fbc",
      "tag": "2.55.14",
      "disable-shallow-clone": true
     },
     {
      "type": "git",
      "url": "https://github.com/connorjclark/allegro5",
      "tag": "7fe12cad20d57e79273af0e51dbda897d60d8dfd",
      "dest": "deps/allegro5"
     },
     {
      "type": "git",
      "url": "https://github.com/libgme/game-music-emu",
      "tag": "05a2aa29e8eae29316804fdd28ceaa96c74a1531",
      "dest": "deps/gme"
     },
     {
      "type": "git",
      "url": "https://github.com/connorjclark/asmjit",
      "tag": "6d153ad8e13984841c2c642c0fa11e60f41e54dc",
      "dest": "deps/asmjit"
     },
     {
      "type": "git",
      "url": "https://github.com/btzy/nativefiledialog-extended",
      "tag": "660493307dd6a8d7fe5fa77cb1c23cbb18ff17c3",
      "dest": "deps/nfd"
     },
     {
      "type": "git",
      "url": "https://github.com/mariusbancila/stduuid",
      "tag": "3afe7193facd5d674de709fccc44d5055e144d7a",
      "dest": "deps/stduuid"
     },
     {
      "type": "git",
      "url": "https://github.com/richgel999/miniz",
      "tag": "9ae305f6e109f8f1fbd2130458f1ee6197269b3b",
      "dest": "deps/miniz"
     },
     {
      "type": "shell",
      "commands": [
       "cd deps/stduuid && git apply ../../third_party/stduuid.patch"
      ]
     },
     {
      "type": "archive",
      "url": "https://github.com/nlohmann/json/releases/download/v3.11.3/json.tar.xz",
      "sha256": "d6c65aca6b1ed68e7a182f4757257b107ae403032760ed6ef121c9d55e81757d",
      "dest": "deps/json"
     }
    ]
   },
   {
    "name": "files",
    "buildsystem": "simple",
    "build-commands": [
     "set -ex\ninstall -Dm 644 -t /app/share/applications com.zquestclassic.ZQuest.desktop\ninstall -Dm 644 -t /app/share/metainfo com.zquestclassic.ZQuest.metainfo.xml\n\nfor s in {16,32,64,128,192,256,512}; do\n  install -p -Dm644 com.zquestclassic.ZQuest-$s.png /app/share/icons/hicolor/${s}x${s}/apps/com.zquestclassic.ZQuest.png\n  rm com.zquestclassic.ZQuest-$s.png\ndone\n\nmv entry.sh /app/bin\n"
    ],
    "sources": [
     {
      "type": "script",
      "dest-filename": "entry.sh",
      "commands": [
       "set -e\nDATA_DIR=\"${XDG_DATA_HOME:-$HOME/.local/share}/ZQuest Classic\"\nmkdir -p \"$DATA_DIR\"\necho \"Using data directory: $DATA_DIR\"\n\n# Remove old symlinks from previous implementation.\nfind \"$DATA_DIR\" -maxdepth 1 -type l -not -path \"$DATA_DIR/bin\" | while read f; do\n  echo readlink \"$f\"\n  if readlink \"$f\" | grep -q /app; then\n    mkdir -p \"$DATA_DIR/old_links_can_delete_folder\"\n    mv \"$f\" \"$DATA_DIR/old_links_can_delete_folder\"\n  fi\ndone\n\n# Recursively copy all contents of the app resources dir to the user's data dir.\ncp -rup \"/app/share/zquestclassic/\"* \"$DATA_DIR/\"\n",
       "cd \"$DATA_DIR\"\nif lspci | grep VGA | grep NVIDIA; then\n  echo \"-----------------------\"\n  echo \"NVIDIA card detected - if no window opens, be sure you are using the official\"\n  echo \"drivers from NVIDIA - use the Driver Manager https://itsfoss.com/nvidia-linux-mint/ (Linux Mint) or the\"\n  echo \"equivalent for your operating system.\"\n  echo\n  echo \"As a last resort, set the LIBGL_ALWAYS_SOFTWARE=1 environment variable (will result in high CPU)\"\n  echo \"-----------------------\"\n  # export LIBGL_ALWAYS_SOFTWARE=1\nfi\nZC_DISABLE_CHDIR=1 zlauncher\n"
      ]
     },
     {
      "type": "file",
      "path": "com.zquestclassic.ZQuest.metainfo.xml"
     },
     {
      "type": "file",
      "path": "com.zquestclassic.ZQuest.desktop"
     },
     {
      "type": "file",
      "path": "icons/com.zquestclassic.ZQuest-16.png"
     },
     {
      "type": "file",
      "path": "icons/com.zquestclassic.ZQuest-32.png"
     },
     {
      "type": "file",
      "path": "icons/com.zquestclassic.ZQuest-64.png"
     },
     {
      "type": "file",
      "path": "icons/com.zquestclassic.ZQuest-128.png"
     },
     {
      "type": "file",
      "path": "icons/com.zquestclassic.ZQuest-192.png"
     },
     {
      "type": "file",
      "path": "icons/com.zquestclassic.ZQuest-256.png"
     },
     {
      "type": "file",
      "path": "icons/com.zquestclassic.ZQuest-512.png"
     }
    ]
   }
  ]
 }
}