{
 "app_id": "com.github.microsoft.winfile",
 "source_url": "https://raw.githubusercontent.com/kowalski7cc/com.github.microsoft.winfile/master/com.github.microsoft.winfile.yaml",
 "runtime": "org.freedesktop.Platform",
 "runtime_version": "25.08",
 "sdk": "org.freedesktop.Sdk",
 "finish_args": [
  "--share=ipc",
  "--socket=fallback-x11",
  "--socket=wayland",
  "--device=dri",
  "--filesystem=host"
 ],
 "module_count": 1,
 "fetched_at": "2026-09-17T17:41:46.042665+00:00",
 "manifest": {
  "app-id": "com.github.microsoft.winfile",
  "sdk": "org.freedesktop.Sdk",
  "runtime": "org.freedesktop.Platform",
  "base": "org.winehq.Wine",
  "base-version": "wow64-25.08",
  "runtime-version": "25.08",
  "finish-args": [
   "--share=ipc",
   "--socket=fallback-x11",
   "--socket=wayland",
   "--device=dri",
   "--filesystem=host"
  ],
  "sdk-extensions": [
   "org.freedesktop.Sdk.Extension.mingw-w64"
  ],
  "command": "winfile",
  "modules": [
   {
    "name": "winfile",
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/microsoft/winfile.git",
      "tag": "v10.4.0.0",
      "commit": "63ec2cc425c666fe37193085b0528f8f63986e4d"
     },
     {
      "type": "file",
      "path": "winfile"
     },
     {
      "type": "file",
      "path": "com.github.microsoft.winfile.desktop"
     },
     {
      "type": "file",
      "path": "com.github.microsoft.winfile.metainfo.xml"
     }
    ],
    "buildsystem": "simple",
    "build-options": {
     "env": {
      "C_INCLUDE_PATH": "/usr/lib/sdk/mingw-w64/x86_64-w64-mingw32/include"
     },
     "append-path": "/usr/lib/sdk/mingw-w64/bin",
     "append-ld-library-path": "/usr/lib/sdk/mingw-w64/lib",
     "cflags": "-Wno-incompatible-pointer-types"
    },
    "build-commands": [
     "winemaker --lower-uppercase -I/usr/include/wine/windows .",
     "sed -i 's/static bDLLFail = FALSE;/static int bDLLFail = FALSE;/' src/wfdlgs2.c",
     "sed -i 's/#include \"resize.h\"/#include \"Resize.h\"/g' src/lang/*.dlg",
     "make CC=\"x86_64-w64-mingw32-gcc\" CXX=\"x86_64-w64-mingw32-g++\" WINDRES=\"x86_64-w64-mingw32-windres\" -j$(nproc) CFLAGS=\"-Wno-incompatible-pointer-types -DUNICODE -DFASTMOVE -DSTRSAFE_NO_DEPRECATE -DWINVER=0x0600\" LDFLAGS=\"-static -static-libgcc -static-libstdc++\"",
     "install -Dm755 winfile.exe $FLATPAK_DEST/share/winfile/winfile.exe",
     "install -Dm755 winfile $FLATPAK_DEST/bin/winfile",
     "install -Dm644 winfile256.png $FLATPAK_DEST/share/icons/hicolor/256x256/apps/com.github.microsoft.winfile.png",
     "install -Dm644 com.github.microsoft.winfile.desktop $FLATPAK_DEST/share/applications/com.github.microsoft.winfile.desktop",
     "install -Dm644 com.github.microsoft.winfile.metainfo.xml -t $FLATPAK_DEST/share/metainfo/"
    ]
   }
  ]
 }
}