{
 "app_id": "io.github.CorkHQ.Corky",
 "source_url": "https://raw.githubusercontent.com/CorkHQ/Corky/main/io.github.CorkHQ.Corky.yaml",
 "runtime": "org.freedesktop.Platform",
 "runtime_version": "23.08",
 "sdk": "org.freedesktop.Sdk",
 "finish_args": [
  "--share=network",
  "--socket=x11",
  "--share=ipc",
  "--allow=devel",
  "--socket=pulseaudio",
  "--allow=multiarch",
  "--device=all",
  "--env=PATH=/app/bin:/app/utils/bin:/usr/bin:/usr/lib/extensions/vulkan/MangoHud/bin/:/usr/bin:/usr/lib/extensions/vulkan/OBSVkCapture/bin/:/usr/lib/extensions/vulkan/gamescope/bin/",
  "--env=WINEDLLPATH=/app/dlls/lib32:/app/dlls/lib"
 ],
 "module_count": 22,
 "fetched_at": "2026-09-17T16:24:55.332898+00:00",
 "manifest": {
  "app-id": "io.github.CorkHQ.Corky",
  "runtime": "org.freedesktop.Platform",
  "runtime-version": "23.08",
  "x-gl-version": "1.4",
  "x-gl-versions": "23.08;23.08extra;1.4",
  "sdk": "org.freedesktop.Sdk",
  "sdk-extensions": [
   "org.freedesktop.Sdk.Compat.i386",
   "org.freedesktop.Sdk.Extension.toolchain-i386",
   "org.freedesktop.Sdk.Extension.mingw-w64"
  ],
  "command": "cork",
  "cleanup": [
   "*.a",
   "*.la",
   "/share/doc",
   "/share/man",
   "/bin/function_grep.pl",
   "/bin/widl",
   "/bin/winecpp",
   "/bin/winedump",
   "/bin/wineg++",
   "/bin/winegcc",
   "/bin/winemaker",
   "/bin/wmc",
   "/bin/wrc",
   "/include/wine",
   "/lib/wine/*.def",
   "/lib32/wine/*.def"
  ],
  "cleanup-commands": [
   "mkdir -p /app/share/steam/compatibilitytools.d"
  ],
  "finish-args": [
   "--share=network",
   "--socket=x11",
   "--share=ipc",
   "--allow=devel",
   "--socket=pulseaudio",
   "--allow=multiarch",
   "--device=all",
   "--env=PATH=/app/bin:/app/utils/bin:/usr/bin:/usr/lib/extensions/vulkan/MangoHud/bin/:/usr/bin:/usr/lib/extensions/vulkan/OBSVkCapture/bin/:/usr/lib/extensions/vulkan/gamescope/bin/",
   "--env=WINEDLLPATH=/app/dlls/lib32:/app/dlls/lib"
  ],
  "add-extensions": {
   "org.freedesktop.Platform.Compat.i386": {
    "directory": "lib/i386-linux-gnu",
    "version": "23.08"
   },
   "org.freedesktop.Platform.GL32": {
    "directory": "lib/i386-linux-gnu/GL",
    "version": "1.4",
    "versions": "23.08;1.4",
    "subdirectories": true,
    "no-autodownload": true,
    "autodelete": false,
    "add-ld-path": "lib",
    "merge-dirs": "vulkan/icd.d;glvnd/egl_vendor.d;OpenCL/vendors;lib/dri;lib/d3d;vulkan/explicit_layer.d;vulkan/implicit_layer.d",
    "download-if": "active-gl-driver",
    "enable-if": "active-gl-driver"
   },
   "com.valvesoftware.Steam.CompatibilityTool": {
    "subdirectories": true,
    "directory": "share/steam/compatibilitytools.d",
    "version": "stable",
    "versions": "stable;beta;test",
    "no-autodownload": true,
    "autodelete": false
   },
   "org.winehq.Wine.gecko": {
    "directory": "share/wine/gecko"
   },
   "org.winehq.Wine.mono": {
    "directory": "share/wine/mono"
   }
  },
  "x-compat-i386-opts": {
   "prepend-pkg-config-path": "/app/lib32/pkgconfig:/usr/lib/i386-linux-gnu/pkgconfig",
   "ldflags": "-L/app/lib32 -Wl,-rpath-link=/app/lib32 -Wl,-z,relro,-z,now -Wl,--as-needed",
   "ldflags-override": true,
   "append-path": "/usr/lib/sdk/toolchain-i386/bin",
   "env": {
    "CC": "ccache i686-unknown-linux-gnu-gcc",
    "CXX": "ccache i686-unknown-linux-gnu-g++"
   },
   "libdir": "/app/lib32"
  },
  "build-options": {
   "append-path": "/usr/lib/sdk/mingw-w64/bin",
   "cflags": "-O2 -pipe -march=sandybridge -mtune=generic -mfpmath=sse -fwrapv -fno-strict-aliasing -mcmodel=small -fvect-cost-model=cheap",
   "cflags-override": true,
   "cxxflags": "-O2 -pipe -march=sandybridge -mtune=generic -mfpmath=sse -fwrapv -fno-strict-aliasing -mcmodel=small -fvect-cost-model=cheap",
   "cxxflags-override": true
  },
  "modules": [
   {
    "name": "bundle-setup",
    "buildsystem": "simple",
    "build-commands": [
     "mkdir -p ${FLATPAK_DEST}/dlls",
     "mkdir /app/dlls/lib -p",
     "mkdir /app/dlls/lib32 -p",
     "mkdir -p /app/lib/i386-linux-gnu",
     "mkdir -p /app/lib/debug/lib/i386-linux-gnu",
     "mkdir -p /app/lib/i386-linux-gnu/GL",
     "install -Dm644 ld.so.conf /app/etc/ld.so.conf"
    ],
    "sources": [
     {
      "type": "inline",
      "dest-filename": "ld.so.conf",
      "contents": "/app/lib32\n/app/lib/i386-linux-gnu\n"
     }
    ]
   },
   {
    "name": "libusb",
    "sources": [
     {
      "type": "archive",
      "url": "https://github.com/libusb/libusb/releases/download/v1.0.26/libusb-1.0.26.tar.bz2",
      "sha256": "12ce7a61fc9854d1d2a1ffe095f7b5fac19ddba095c259e6067a46500381b5a5",
      "x-checker-data": {
       "type": "json",
       "url": "https://api.github.com/repos/libusb/libusb/releases/latest",
       "tag-query": ".tag_name",
       "version-query": "$tag | sub(\"^[vV]\"; \"\")",
       "timestamp-query": ".published_at",
       "url-query": ".assets[] | select(.name==\"libusb-\\($version).tar.bz2\") | .browser_download_url"
      }
     }
    ],
    "modules": [
     {
      "name": "eudev",
      "cleanup": [
       "/bin",
       "/sbin",
       "/lib*/udev"
      ],
      "post-install": [
       "udevadm hwdb --update --usr"
      ],
      "sources": [
       {
        "type": "archive",
        "url": "https://github.com/eudev-project/eudev/releases/download/v3.2.14/eudev-3.2.14.tar.gz",
        "sha256": "8da4319102f24abbf7fff5ce9c416af848df163b29590e666d334cc1927f006f",
        "x-checker-data": {
         "type": "json",
         "url": "https://api.github.com/repos/gentoo/eudev/releases/latest",
         "tag-query": ".tag_name",
         "version-query": "$tag | sub(\"^[vV]\"; \"\")",
         "timestamp-query": ".published_at",
         "url-query": ".assets[] | select(.name==\"eudev-\\($version).tar.gz\") | .browser_download_url"
        }
       }
      ]
     }
    ]
   },
   {
    "name": "vkd3d",
    "sources": [
     {
      "type": "archive",
      "url": "https://dl.winehq.org/vkd3d/source/vkd3d-1.8.tar.xz",
      "sha256": "e0cec19cc9535715c72ec3a16cdec29dc14d5ccec73526387b5843cf75628ac5"
     }
    ],
    "modules": [
     {
      "name": "spirv-deps",
      "buildsystem": "cmake-ninja",
      "builddir": true,
      "config-opts": [
       "-DSPIRV_SKIP_EXECUTABLES=ON"
      ],
      "cleanup": [
       "/bin"
      ],
      "sources": [
       {
        "type": "git",
        "url": "https://github.com/KhronosGroup/SPIRV-Headers.git",
        "tag": "sdk-1.3.261.1",
        "commit": "124a9665e464ef98b8b718d572d5f329311061eb",
        "x-checker-data": {
         "type": "git",
         "tag-pattern": "^sdk-([\\d.]+)$"
        }
       }
      ]
     }
    ]
   },
   {
    "name": "libdrm",
    "buildsystem": "meson",
    "config-opts": [
     "-Dintel=disabled",
     "-Dradeon=disabled",
     "-Damdgpu=enabled",
     "-Dnouveau=disabled",
     "-Dvmwgfx=disabled",
     "-Dcairo-tests=disabled",
     "-Dtests=false",
     "--default-library=static"
    ],
    "sources": [
     {
      "type": "git",
      "url": "https://gitlab.freedesktop.org/mesa/drm.git",
      "commit": "02a41cf302a69f0cd94aae96ec01d98b9398076e",
      "tag": "libdrm-2.4.118"
     }
    ]
   },
   {
    "name": "wine",
    "build-options": {
     "arch": {
      "x86_64": {
       "config-opts": [
        "--enable-win64",
        "--with-mingw=ccache x86_64-w64-mingw32-gcc"
       ],
       "libdir": "/app/lib"
      }
     },
     "env": {
      "LIBDIR": "lib"
     }
    },
    "config-opts": [
     "--disable-win16",
     "--disable-tests",
     "--with-x",
     "--with-pulse",
     "--with-dbus",
     "--without-oss"
    ],
    "make-install-args": [
     "LDCONFIG=/bin/true",
     "UPDATE_DESKTOP_DATABASE=/bin/true",
     "INSTALL_PROGRAM_FLAGS=-s"
    ],
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/ValveSoftware/wine.git",
      "commit": "26425af97506e119f76d636ecc95d647e91afa83"
     },
     {
      "type": "patch",
      "paths": [
       "patches/wine/de-steamify-80.patch"
      ]
     },
     {
      "type": "patch",
      "paths": [
       "patches/wine/loader-prefer-winedllpath.patch"
      ]
     },
     {
      "type": "shell",
      "commands": [
       "autoreconf -fiv"
      ]
     },
     {
      "type": "shell",
      "commands": [
       "tools/make_requests",
       "dlls/winevulkan/make_vulkan --verbose --xml vk.xml"
      ]
     }
    ]
   },
   {
    "name": "wine64to32",
    "buildsystem": "simple",
    "build-commands": [
     "ln -s /app/bin/wine64 /app/bin/wine"
    ]
   },
   {
    "name": "wine-mono",
    "buildsystem": "simple",
    "build-commands": [
     "mkdir -p ${FLATPAK_DEST}/share/wine/mono/",
     "cp -a wine-mono-* ${FLATPAK_DEST}/share/wine/mono/"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://dl.winehq.org/wine/wine-mono/8.1.0/wine-mono-8.1.0-x86.tar.xz",
      "strip-components": 0,
      "sha256": "4e3e8a40729e4c9e3e9e651cebe4f1aed8f9a4d22e991e6cd24608687f0eedd4"
     }
    ]
   },
   {
    "name": "nlohmann-json",
    "buildsystem": "cmake-ninja",
    "config-opts": [
     "-DCMAKE_BUILD_TYPE=Release",
     "-DJSON_BuildTests=OFF"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://github.com/nlohmann/json/archive/v3.11.2.tar.gz",
      "sha256": "d69f9deb6a75e2580465c6c4c5111b89c4dc2fa94e3a85fcd2ffcd9a143d9273"
     }
    ]
   },
   {
    "name": "libzip",
    "buildsystem": "cmake-ninja",
    "config-opts": [
     "-DCMAKE_BUILD_TYPE=RelWithDebInfo"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://github.com/nih-at/libzip/archive/v1.10.1.tar.gz",
      "sha256": "d56d857d1c3ad4a7f3a4c01a51c6a6e5530e35ab93503f62276e8ba2b306186a"
     }
    ]
   },
   {
    "name": "libzippp",
    "buildsystem": "cmake-ninja",
    "config-opts": [
     "-DCMAKE_BUILD_TYPE=Release"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://github.com/ctabin/libzippp/archive/refs/tags/libzippp-v7.0-1.10.1.tar.gz",
      "sha256": "67d6808406b4fc255016ede52c7b5105e2d0e43899a3331de9ed86da5dea07a1"
     }
    ]
   },
   {
    "name": "tomlplusplus",
    "buildsystem": "cmake-ninja",
    "config-opts": [
     "-DCMAKE_BUILD_TYPE=Release"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://github.com/marzer/tomlplusplus/archive/refs/tags/v3.4.0.tar.gz",
      "sha256": "8517f65938a4faae9ccf8ebb36631a38c1cadfb5efa85d9a72e15b9e97d25155"
     }
    ]
   },
   {
    "name": "platform_folders",
    "buildsystem": "cmake-ninja",
    "config-opts": [
     "-DCMAKE_BUILD_TYPE=Release"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://github.com/sago007/PlatformFolders/archive/refs/tags/4.2.0.tar.gz",
      "sha256": "31bb0f64a27315aec8994f226332aaafe9888d00bb69a2ff2dff9912e2f4ccf4"
     }
    ]
   },
   {
    "name": "cpr",
    "buildsystem": "cmake-ninja",
    "config-opts": [
     "-DCMAKE_BUILD_TYPE=Release",
     "-DCPR_USE_SYSTEM_CURL=ON"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://github.com/libcpr/cpr/archive/refs/tags/1.10.5.tar.gz",
      "sha256": "c8590568996cea918d7cf7ec6845d954b9b95ab2c4980b365f582a665dea08d8"
     }
    ]
   },
   {
    "name": "boost",
    "buildsystem": "simple",
    "build-commands": [
     "./bootstrap.sh --prefix=/app --with-libraries=headers,system,log,program_options",
     "./b2 install variant=release link=shared runtime-link=shared cxxflags=\"$CXXFLAGS\" linkflags=\"$LDFLAGS\" -j $FLATPAK_BUILDER_N_JOBS"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://boostorg.jfrog.io/artifactory/main/release/1.83.0/source/boost_1_83_0.tar.bz2",
      "sha256": "6478edfe2f3305127cffe8caf73ea0176c53769f4bf1585be237eb30798c3b8e",
      "x-checker-data": {
       "type": "html",
       "url": "https://www.boost.org/feed/downloads.rss",
       "version-pattern": "<item><title>Version ([\\d\\.]+)<\\/title>",
       "url-template": "https://boostorg.jfrog.io/artifactory/main/release/${version}/source/boost_${major}_${minor}_${patch}.tar.bz2"
      }
     }
    ]
   },
   "shared-modules/lua5.4/lua-5.4.json",
   {
    "name": "sol2",
    "buildsystem": "cmake-ninja",
    "config-opts": [
     "-DCMAKE_BUILD_TYPE=Release",
     "-DSOL2_BUILD_LUA=false"
    ],
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/ThePhD/sol2.git",
      "commit": "9c882a28fdb6f4ad79a53a4191b43ce48a661175"
     }
    ]
   },
   {
    "name": "cork",
    "buildsystem": "cmake-ninja",
    "config-opts": [
     "-DCMAKE_BUILD_TYPE=Release",
     "-DCORK_VENDOR_PATH=/app/cork",
     "-DLUA_LIBRARIES=$FLATPAK_DEST/lib/liblua.so",
     "-DLUA_INCLUDE_DIR=$FLATPAK_DEST/include"
    ],
    "post-install": [
     "mv -v /app/share/applications/roblox-player.desktop /app/share/applications/${FLATPAK_ID}.robloxplayer.desktop",
     "mv -v /app/share/applications/roblox-studio.desktop /app/share/applications/${FLATPAK_ID}.robloxstudio.desktop",
     "desktop-file-edit /app/share/applications/${FLATPAK_ID}.robloxplayer.desktop --set-icon=${FLATPAK_ID}.robloxplayer",
     "desktop-file-edit /app/share/applications/${FLATPAK_ID}.robloxstudio.desktop --set-icon=${FLATPAK_ID}.robloxstudio",
     "cp -v /app/share/icons/hicolor/scalable/apps/cork.svg -T /app/share/icons/hicolor/scalable/apps/${FLATPAK_ID}.svg",
     "cp -v /app/share/icons/hicolor/scalable/apps/roblox-player.svg -T /app/share/icons/hicolor/scalable/apps/${FLATPAK_ID}.robloxplayer.svg",
     "cp -v /app/share/icons/hicolor/scalable/apps/roblox-studio.svg -T /app/share/icons/hicolor/scalable/apps/${FLATPAK_ID}.robloxstudio.svg"
    ],
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/CorkHQ/Cork.git",
      "commit": "053ab7d1f2194d086cb47437793fc21f109ba4b1"
     }
    ]
   },
   {
    "name": "vendor",
    "buildsystem": "simple",
    "build-commands": [
     "mkdir /app/cork",
     "cp settings.toml /app/cork"
    ],
    "sources": [
     {
      "type": "file",
      "path": "vendor/settings.toml"
     }
    ]
   },
   {
    "name": "plugins",
    "buildsystem": "simple",
    "build-commands": [
     "mkdir /app/cork/plugins",
     "cp -r RendererSwitcher /app/cork/plugins",
     "cp -r VendorDXVK /app/cork/plugins"
    ],
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/CorkHQ/Plugins.git",
      "commit": "07dba3cc80d25d25ba814b9aef05d7bfb73edd26"
     }
    ]
   },
   {
    "name": "dxvk",
    "buildsystem": "meson",
    "build-options": {
     "config-opts": [
      "--cross-file=../build-win64.txt",
      "--cross-file=../dxvk-ccache-win64.txt",
      "--libdir=lib",
      "--bindir=/app/cork/plugins/VendorDXVK/bin64"
     ],
     "env": {
      "SUFFIX": ""
     },
     "ldflags": "",
     "ldflags-override": true
    },
    "config-opts": [
     "--buildtype=release",
     "--strip",
     "-Denable_dxgi=true",
     "-Denable_d3d9=true",
     "-Denable_d3d10=true",
     "-Denable_d3d11=true"
    ],
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/doitsujin/dxvk.git",
      "commit": "1b31aa5dbca0749d0737cff02043acb061332fb6"
     },
     {
      "type": "file",
      "path": "dxvk-ccache-win64.txt"
     }
    ]
   }
  ]
 }
}