Skip to content

Building from Source

YouDontNeedToKnow edited this page Sep 3, 2026 · 2 revisions

Building XGDTool from Source

This guide covers building all three targets (XGDTool-GUI, XGDTool-CLI, and XGDTool-Android) from source on Windows and Linux.


🛠️ Prerequisites

Windows Desktop (GUI & CLI)

  • OS: Windows 10 / 11 (x64)
  • Compiler: Visual Studio 2022 (with "Desktop development with C++" workload)
  • Build System: CMake 3.22+ and Ninja or MSBuild
  • Package Manager: vcpkg
  • Dependencies:
    • wxwidgets (for GUI)
    • zstd, lz4, openssl, curl, nlohmann-json

Android (APK)

  • Android Studio: Iguana (2023.2+) / Ladybug or newer
  • JDK: OpenJDK 17 or higher
  • Android SDK: Build-tools 34.0.0, SDK Platform 34
  • Android NDK: r27 LTS (27.2.12479018) or newer
  • Gradle: 8.7+ (included via Gradle Wrapper gradlew)

🖥️ Building on Windows

Clone the repository and submodules recursively:

git clone --recursive https://github.com/Ashnar2602/XGDTool.git
cd XGDTool

1. Build Full Desktop GUI (XGDTool-GUI.exe)

cmake -B build -S .
cmake --build build --config Release -j
  • Executable output: build/Release/XGDTool.exe (or XGDTool-GUI.exe).

2. Build Lean Command-Line Executable (XGDTool-CLI.exe)

cmake -B build_cli -S . -DBUILD_CLI_ONLY=ON
cmake --build build_cli --config Release -j
  • Executable output: build_cli/Release/XGDTool.exe (or XGDTool-CLI.exe).

📱 Building Android APK

Open PowerShell or terminal in the android/ directory:

cd android
.\gradlew.bat assembleRelease
  • Release APK output: android/app/build/outputs/apk/release/app-release.apk.
  • To install directly to a connected device via ADB:
adb install -r android/app/build/outputs/apk/release/app-release.apk

🔧 Submodule & Patch Integrity Notes

  • ZArchive Multithreading: external/ZArchive is maintained as a git submodule. The parallel multi-core compression engine is applied via cmake/zarchive_multithread.patch automatically during CMake configuration.
  • Auto-generated Headers: src/Executable/AttachXbe.h is generated automatically during CMake configuration from the submodule external/Repackinator. Do not edit this file manually.

Clone this wiki locally