Skip to content

Building

G-Mr. Xiong edited this page Oct 3, 2026 · 1 revision

Building

You can produce single-file runnable builds yourself with PyInstaller.

Setup

git clone https://github.com/creaddinscart/MinecraftBotClient.git
cd MinecraftBotClient
pip install -r requirements.txt

Build for the current platform

python build.py

PyInstaller cannot cross-compile, so run the script once on each operating system you want to ship. Output:

releases/
└── 2.1.0/
    ├── windows/
    │   ├── zh/  MinecraftBotClient-zh.exe  config.zh.json  README.zh.md
    │   ├── en/  MinecraftBotClient-en.exe  config.en.json  README.en.md
    │   ├── zh.zip
    │   └── en.zip
    ├── macos/
    │   └── ...
    └── linux/
        └── ...

The script prints the size and SHA-256 of every artifact it produces, and (when the repository contains a local HTML/ folder) mirrors the result into HTML/releases/<version>/<platform>/ for the website.

Automated builds

Pushing a version tag (for example git tag v2.1.0 && git push origin v2.1.0) runs the release workflow in .github/workflows/release.yml:

  1. Builds on windows-latest and ubuntu-latest GitHub runners
  2. Commits the artifacts into releases/<version>/<platform>/
  3. Creates a GitHub release with every package attached (MBC-2.1.0-{en,zh}-{windows,macos,linux}.zip)

macOS artifacts are built locally with the same script (macOS builds match the architecture of the Python used to run it — use a universal2 or Intel Python if you need to cover older Macs).

Platform notes

Platform Notes
Windows Output is MinecraftBotClient-*.exe; an .ico is used when src/assets/icon.ico exists
macOS Output has no extension; uses src/assets/icon.icns when present; unsigned binaries can be blocked by Gatekeeper
Linux Output has no extension; chmod +x is applied automatically

Project layout

MinecraftBotClient/
├── main.py                      # Entry point
├── build.py                     # Build script
├── requirements.txt
├── src/
│   ├── i18n.py                  # Bilingual dictionary
│   ├── logger.py                # Session logging
│   ├── client/                  # Main client logic
│   ├── network/                 # Protocol, version check
│   ├── features/                # Spam manager, bot swarm
│   ├── settings/                # Config read/write
│   └── ui/                      # Console UI (Windows console + POSIX terminal)
└── releases/                    # Build artifacts

Clone this wiki locally