How sjoblomj/mpqdraft works
MPQDraft has two user workflows: configure and launch a locally patched game, or create a distributable self-executing MPQ (SEMPQ). Users enter through the GUI or CLI; both workflows use supported-game and plugin concepts, while the patching runtime injects into the target and loads archives and modules. SEMPQ creation packages a stub, patcher, plugins, and mod data. The README documents the product modes and options; several frontend and runtime implementation files were not sampled, so some workflow links are shown as unverified rather than asserted.
Main entry points: patchwizard.cpp Patch wizard · Patcher.cpp Patcher DLL · PatcherApi.h Patcher contract · MPQDraft.cpp Application entry
Components 20
User interfaces
- Application entry
src/app/MPQDraft.cpp - CLI commands
src/app/cli/CommandParser.cpp - CLI execution
src/app/cli/MPQDraftCLI.cpp - GUI windows
src/app/gui/mainwindow.cpp - Patch wizard
src/app/gui/patchwizard.cpp - SEMPQ wizard
src/app/gui/sempqwizard.cpp - Plugin configuration
src/app/gui/pluginpage.cpp
Game and plugin setup
- Supported games
src/core/GameData.cpp - Game detection
src/core/GameDetection.cpp - Plugin lifecycle
src/core/PluginManager.cpp
Patching runtime
- Patcher contract
src/core/PatcherApi.h - Patcher DLL
src/dll/Patcher.cpp - DLL initialization
src/dll/MPQDraftDLL.cpp - Process injection
src/common/QInjectDLL.cpp - API hooks
src/common/QHookAPI.cpp
SEMPQ creation
- SEMPQ parameters
src/app/gui/helpers/sempqparamsbuilder.cpp - SEMPQ packaging
src/sempq/SEMPQCreator.cpp - Executable stub
src/sempq/stub/MPQStub.cpp - Embedded file system
src/common/QResource.cpp
Other components
- Mod user
Connections 22
- Mod user → Application entry: starts
- Application entry → CLI commands: selects CLI
src/app/MPQDraft.cpp - Application entry → GUI windows: selects GUI
src/app/MPQDraft.cpp - CLI commands → CLI execution: dispatches commands
- CLI execution → Patcher contract: starts patch
- GUI windows → Patch wizard: opens patch flow
- Patch wizard → Supported games: uses game data
src/app/gui/patchwizard.cpp - Patch wizard → Game detection: uses detection
src/app/gui/patchwizard.cpp - Patch wizard → Plugin lifecycle: manages plugins
src/app/gui/patchwizard.cpp - Patch wizard → Patcher contract: starts patch
src/app/gui/patchwizard.cpp - Plugin configuration → Plugin lifecycle: uses plugin manager
- Patcher contract → Patcher DLL: calls DLL
src/core/PatcherApi.h - Patcher DLL → Process injection: uses injection
src/dll/Patcher.cpp - Patcher DLL → API hooks: uses hooks
- DLL initialization → Patcher DLL: uses patcher
- GUI windows → SEMPQ wizard: opens creator
- SEMPQ wizard → SEMPQ parameters: builds parameters
src/app/gui/helpers/sempqparamsbuilder.cpp - SEMPQ wizard → Plugin lifecycle: selects plugins
src/app/gui/sempqwizard.cpp - SEMPQ parameters → SEMPQ packaging: supplies parameters
src/app/gui/helpers/sempqparamsbuilder.cpp - SEMPQ packaging → Embedded file system: writes embedded files
src/sempq/SEMPQCreator.cpp - SEMPQ packaging → Executable stub: packages stub data
- Executable stub → Patcher contract: invokes patcher
src/sempq/stub/MPQStub.cpp