diff options
| author | daoge <3523206925@qq.com> | 2026-03-03 03:04:10 +0800 |
|---|---|---|
| committer | daoge_cmd <3523206925@qq.com> | 2026-03-03 03:10:29 +0800 |
| commit | bdc8fb5dfa9a111c230d7da5c3790fdb884e818d (patch) | |
| tree | 1d4f5bc2587a9a0c3bc1c3e294ca33c8726f44ab /COMPILE.md | |
| parent | b3feddfef372618c8a9d7a0abcaf18cfad866c18 (diff) | |
docs: update README.md
Diffstat (limited to 'COMPILE.md')
| -rw-r--r-- | COMPILE.md | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/COMPILE.md b/COMPILE.md new file mode 100644 index 00000000..8947cecb --- /dev/null +++ b/COMPILE.md @@ -0,0 +1,45 @@ +# Compile Instructions + +## Visual Studio (`.sln`) + +1. Open `MinecraftConsoles.sln` in Visual Studio 2022. +2. Set `Minecraft.Client` as the Startup Project. +3. Select configuration: + - `Debug` (recommended), or + - `Release` +4. Select platform: `Windows64`. +5. Build and run: + - `Build > Build Solution` (or `Ctrl+Shift+B`) + - Start debugging with `F5`. + +## CMake (Windows x64) + +Configure (use your VS Community instance explicitly): + +```powershell +cmake -S . -B build -G "Visual Studio 17 2022" -A x64 -DCMAKE_GENERATOR_INSTANCE="C:/Program Files/Microsoft Visual Studio/2022/Community" +``` + +Build Debug: + +```powershell +cmake --build build --config Debug --target MinecraftClient +``` + +Build Release: + +```powershell +cmake --build build --config Release --target MinecraftClient +``` + +Run executable: + +```powershell +cd .\build\Debug +.\MinecraftClient.exe +``` + +Notes: +- The CMake build is Windows-only and x64-only. +- Post-build asset copy is automatic for `MinecraftClient` in CMake (Debug and Release variants). +- The game relies on relative paths (for example `Common\Media\...`), so launching from the output directory is required. |
