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/