Skip to content

Installation

asdfmonster261 edited this page May 3, 2026 · 5 revisions

Installation

Requirements

  • Python 3.10+
  • PySide6 ≥ 6.5.0 (GUI only; CLI works without it)
  • crcmod ≥ 1.7 (C-accelerated CRC32C; auto-installed by pip install -e .)
  • Linux or Windows x64 build host (outputs are Windows executables either way)
  • On Linux: xz and zstd CLIs (for repack compression; already present on most distros)
  • On Windows: nothing extra — xz.exe and zstd.exe are bundled in engines/win-x64/
  • MinGW-w64 cross-compiler (only needed to rebuild stubs or engines from source)

Install

git clone https://github.com/asdfmonster261/patchforge
cd patchforge
pip install -e .

For Steam archive mode (downloads, polling, BBCode posts), add the optional archive extra:

pip install -e ".[archive]"

The archive extra pulls in steam[client], gevent, py7zr, requests-toolbelt, origamibot, discord-webhook, privatebinapi, qrcode, and zstandard. Patch-mode and repack-mode work without it.

The repository ships with prebuilt engine binaries for both platforms:

  • engines/linux-x64/{hdiffz, hpatchz, jdiff, jptch} — statically linked, run on any x86-64 Linux.
  • engines/win-x64/{hdiffz.exe, hpatchz.exe, jdiff.exe, jptch.exe} — built with MinGW-w64, depend only on KERNEL32.dll and msvcrt.dll.
  • engines/win-x64/{xz.exe, liblzma.dll, zstd.exe} — vendored from the official tukaani-project/xz and facebook/zstd Windows releases so repack mode works on Windows without any system-level install.

PatchForge picks the right subdirectory at runtime via sys.platform, so no manual configuration is required when switching hosts.

Verify

patchforge --help

Optional: shell tab-completion

PatchForge's CLI works with argcomplete for bash/zsh/fish subcommand and choice-list completion. The CLI auto-detects argcomplete at runtime — install it once and register the completer in your shell rc:

pip install argcomplete
eval "$(register-python-argcomplete patchforge)"

If argcomplete isn't installed, the CLI continues to work normally with no completion.

Clone this wiki locally