# Flatpak manifest for ZX Next Unite. # # Local build (Linux, flatpak + flatpak-builder + the flathub remote): # flatpak-builder --force-clean --user --install-deps-from=flathub \ # --repo=repo builddir flatpak/io.github.jclauzel.ZXNextUnite.yml # flatpak build-bundle repo zx-next-unite.flatpak io.github.jclauzel.ZXNextUnite # # CI: .github/workflows/flatpak.yml builds this manifest and uploads the # .flatpak bundle as a workflow artifact (workflow_dispatch or a v* tag). # # NOTE (Flathub submission): Flathub forbids `type: dir` sources — swap the # app module's source for a git source pinned to a release tag + commit # before submitting (see flatpak/README.md). app-id: io.github.jclauzel.ZXNextUnite runtime: org.kde.Platform runtime-version: '6.8' sdk: org.kde.Sdk base: io.qt.PySide.BaseApp base-version: '6.8' command: zx-next-unite finish-args: - --share=ipc - --socket=fallback-x11 - --socket=wayland - --device=dri # Catalogue browsing, NextSync/HTTP-bridge servers (inbound TCP 2048 # included) and the hdfmonkey/emulator downloads. - --share=network # SD images, sync roots and drag-and-drop live anywhere in the user's # home; hdfmonkey (a child process) needs direct path access, so the # per-file document portal is not enough. - --filesystem=home # Route hdfg.cfg + downloads/ to the XDG data dir instead of the # (read-only) install dir — same switch the PyPI entry point flips. - --env=ZX_NEXT_UNITE_MODE=installed # Lets the app launch the user's chosen emulator on the host through # `flatpak-spawn --host` — the "Launch MAME via Flatpak" setting runs # `flatpak run org.mamedev.MAME`, which cannot exist inside the sandbox. - --talk-name=org.freedesktop.Flatpak cleanup-commands: # The PySide BaseApp ships a trim script; tolerate its absence so a # BaseApp layout change cannot break the build. - sh -c '[ -x /app/cleanup-BaseApp.sh ] && /app/cleanup-BaseApp.sh || true' modules: # The four optional extras the app detects at runtime (their Settings # toggles stay greyed out when missing): pygame-ce (retro modes + the # Alien Floyd's tab), itch-dl (the itch.io tab, incl. its CSpect+hdfmonkey # install), Flask (the NextSync HTTP bridge) and Send2Trash (recycle-bin # deletes). Vendored as pinned wheels because Flathub builds are offline; # regenerate the list with pip's --report resolver against the runtime's # Python (currently 3.12) when bumping versions. - name: python3-extras buildsystem: simple build-commands: - pip3 install --no-index --find-links="file://${PWD}" --prefix=${FLATPAK_DEST} pygame-ce itch-dl flask send2trash sources: - type: file url: https://files.pythonhosted.org/packages/88/c6/92fcd42f1ba33e1184263f25bfabf3d27c383410470f169e4b8163bf9c17/beautifulsoup4-4.15.0-py3-none-any.whl sha256: d6f88de62e1d4e38ecb1077eb9724cd0eff29d2a08ca16a401e9b9e93f117cf9 - type: file url: https://files.pythonhosted.org/packages/10/cb/f2ad4230dc2eb1a74edf38f1a38b9b52277f75bef262d8908e60d957e13c/blinker-1.9.0-py3-none-any.whl sha256: ba0efaa9080b619ff2f3459d1d500c57bddea4a6b424b60a91141db6fd2f08bc - type: file url: https://files.pythonhosted.org/packages/0b/a7/71ac2cff56fec219ed242bb11b8efb69fcc4bec75db06fb7bfe35de520e6/certifi-2026.7.22-py3-none-any.whl sha256: 62f22742b58a1a33014a2b6b706588a8d7e2a88ae7bd1a6ebe8c992928483775 - type: file url: https://files.pythonhosted.org/packages/01/c4/4fa4c8b3097a11f3c5f09a35b72ed6855fb1d332469504962ab7bafcc702/charset_normalizer-3.4.9-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl sha256: 5e226f6218febc71f6c1fc2fafb91c226f75bdc1d8fb12d66823716e891608fd only-arches: [x86_64] - type: file url: https://files.pythonhosted.org/packages/ec/96/5d9364e3342d69f3a045e1777bc47c85c383e6e9466d561b33fdb419d1f9/charset_normalizer-3.4.9-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl sha256: 9b2aff1c7b3884512b9512c3eaadd9bab39fb45042ffaaa1dd08ff2b9f8109d9 only-arches: [aarch64] - type: file url: https://files.pythonhosted.org/packages/fb/e2/79c688af8b210d232694e31e59da9f6ec747bae31c3f5946e4e9b98860d5/click-8.4.2-py3-none-any.whl sha256: e6f9f66136c816745b9d65817da91d61d957fb16e02e4dcd0552553c5a197b76 - type: file url: https://files.pythonhosted.org/packages/7f/9c/34f6962f9b9e9c71f6e5ed806e0d0ff03c9d1b0b2340088a0cf4bce09b18/flask-3.1.3-py3-none-any.whl sha256: f4bcbefc124291925f1a26446da31a5178f9483862233b23c0c96a20701f670c - type: file url: https://files.pythonhosted.org/packages/1e/5e/d4e9f1a599fb8e573b7b87160658329fbf28d19eac2718f51fc3def3aa5a/idna-3.18-py3-none-any.whl sha256: 7f952cbe720b688055e3f87de14f5c3e5fdaa8bc3928985c4077ca689de849a2 - type: file url: https://files.pythonhosted.org/packages/15/c7/d585e783e7428db6916e3ffb3f2ae78a73ebf7e63ba600cfe1a2f7fb4814/itch_dl-0.7.2-py3-none-any.whl sha256: fae05bd05cd103fcc3f7df9e593bc1e4f3c7389a36c1d7629ff2e906907e7c47 - type: file url: https://files.pythonhosted.org/packages/04/96/92447566d16df59b2a776c0fb82dbc4d9e07cd95062562af01e408583fc4/itsdangerous-2.2.0-py3-none-any.whl sha256: c6242fc49e35958c8b15141343aa660db5fc54d4f13a1db01a3f5891b98700ef - type: file url: https://files.pythonhosted.org/packages/62/a1/3d680cbfd5f4b8f15abc1d571870c5fc3e594bb582bc3b64ea099db13e56/jinja2-3.1.6-py3-none-any.whl sha256: 85ece4451f492d0c13c5dd7c13a64681a86afae63a5f347908daf103ce6d2f67 - type: file url: https://files.pythonhosted.org/packages/08/f6/af32e23e563971ffb0fb86be52bc5be5c2c118858ffc119bf6a9039b173d/lxml-6.1.1-cp312-cp312-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl sha256: ebe6af670449830d6d9b752c256a983291c766a1365ba5d5460048f9e33a7818 only-arches: [x86_64] - type: file url: https://files.pythonhosted.org/packages/29/91/317b332636bfc7bddcff828d41b3307f50043f4b237e40849c333d80fa1a/lxml-6.1.1-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl sha256: 96f2ec43df44b1f76249ee0a615334f9b5b060e1c8bd90e706dad2d14d02f383 only-arches: [aarch64] - type: file url: https://files.pythonhosted.org/packages/3c/2e/8d0c2ab90a8c1d9a24f0399058ab8519a3279d1bd4289511d74e909f060e/markupsafe-3.0.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl sha256: d6dd0be5b5b189d31db7cda48b91d7e0a9795f31430b7f271219ab30f1d3ac9d only-arches: [x86_64] - type: file url: https://files.pythonhosted.org/packages/1e/2c/799f4742efc39633a1b54a92eec4082e4f815314869865d876824c257c1e/markupsafe-3.0.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl sha256: 3a7e8ae81ae39e62a41ec302f972ba6ae23a5c5396c8e60113e9066ef893da0d only-arches: [aarch64] - type: file url: https://files.pythonhosted.org/packages/db/17/70ada4cef84eca48a995cc9e0f2f087e6190b3e4111e9c8ec3c7a8f689bd/pygame_ce-2.5.7-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl sha256: 0d8fa8822c0f4b5ae6b44ada7be9f2193fd512da1381c37fa3c5bda8971d64cb only-arches: [x86_64] - type: file url: https://files.pythonhosted.org/packages/e5/94/7f6304a31ccc7d11d4443e590cbfa6fce2bd34077575a7790d4f0a14f440/pygame_ce-2.5.7-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl sha256: 4dc989462faf2c5947881f708fa406d7ac13c1bc987c1588d630ca62ad369989 only-arches: [aarch64] - type: file url: https://files.pythonhosted.org/packages/a0/f4/c67b0b3f1b9245e8d266f0f112c500d50e5b4e83cb6f3b71b6528104182a/requests-2.34.2-py3-none-any.whl sha256: 2a0d60c172f83ac6ab31e4554906c0f3b3588d37b5cb939b1c061f4907e278e0 - type: file url: https://files.pythonhosted.org/packages/1c/78/504fdd027da3b84ff1aecd9f6957e65f35134534ccc6da8628eb71e76d3f/send2trash-2.1.0-py3-none-any.whl sha256: 0da2f112e6d6bb22de6aa6daa7e144831a4febf2a87261451c4ad849fe9a873c - type: file url: https://files.pythonhosted.org/packages/0f/2c/437fe806897c2d6cfdc3ee43a18da8bf8e568530a4ae9bac781541ca9896/soupsieve-2.9.1-py3-none-any.whl sha256: 4f4477399246b7a0c720a88ca2454b11cd6bb9ae4c9d170140786e916776c14c - type: file url: https://files.pythonhosted.org/packages/f9/1c/01bfd571a64e7f270e6bab5e33777debe0edc56759233ce84f27dec92d14/tqdm-4.70.0-py3-none-any.whl sha256: 7f585706bfddbdebf89daac705b2dfcc16890130727d3197ca62c732b4310953 - type: file url: https://files.pythonhosted.org/packages/49/d3/b8441a820a491ddfc024b0b0cf0393375b75ea13866d9c66727e54c2fc80/typing_extensions-4.16.0-py3-none-any.whl sha256: 481caa481374e813c1b176ada14e97f1f67a4539ce9cfeb3f350d78d6370c2e8 - type: file url: https://files.pythonhosted.org/packages/7f/3e/5db95bcf282c52709639744ca2a8b149baccf648e39c8cc87553df9eae0c/urllib3-2.7.0-py3-none-any.whl sha256: 9fb4c81ebbb1ce9531cce37674bbc6f1360472bc18ca9a553ede278ef7276897 - type: file url: https://files.pythonhosted.org/packages/93/8c/2e650f2afeb7ee576912636c23ddb621c91ac6a98e66dc8d29c3c69446e1/werkzeug-3.1.8-py3-none-any.whl sha256: 63a77fb8892bf28ebc3178683445222aa500e48ebad5ec77b0ad80f8726b1f50 - name: zx-next-unite buildsystem: simple build-commands: # Plain file layout (no pip): the app runs fine from a directory of # modules, and this keeps the build independent of the SDK's # setuptools vintage. ZX_NEXT_UNITE_MODE=installed (finish-args) # keeps all writable state out of the read-only /app tree. - mkdir -p /app/lib/zx-next-unite - cp *.py /app/lib/zx-next-unite/ - cp *.png /app/lib/zx-next-unite/ - cp REQUIREMENTS.txt LICENSE THIRD-PARTY-NOTICES.md /app/lib/zx-next-unite/ # The NextSync dot-command builds (pushable to the Next from the # Remote Explorer) and the .sync client sources. - cp -r nextsync /app/lib/zx-next-unite/nextsync - install -d /app/bin - | cat > /app/bin/zx-next-unite <<'LAUNCH' #!/bin/sh exec python3 /app/lib/zx-next-unite/zx-next-unite.py "$@" LAUNCH - chmod 755 /app/bin/zx-next-unite - install -Dm644 flatpak/io.github.jclauzel.ZXNextUnite.desktop -t /app/share/applications - install -Dm644 flatpak/io.github.jclauzel.ZXNextUnite.metainfo.xml -t /app/share/metainfo - install -Dm644 flatpak/icons/io.github.jclauzel.ZXNextUnite-256.png /app/share/icons/hicolor/256x256/apps/io.github.jclauzel.ZXNextUnite.png - install -Dm644 flatpak/icons/io.github.jclauzel.ZXNextUnite-128.png /app/share/icons/hicolor/128x128/apps/io.github.jclauzel.ZXNextUnite.png sources: - type: dir path: .. skip: - .git - downloads - Lib - builddir - repo - 2gb - cspect-next-2gb.zip