From 1baa4fcb2452ed4718b0e24927dc9b48394b08a0 Mon Sep 17 00:00:00 2001 From: rtm516 Date: Sat, 14 Mar 2026 12:03:25 +0000 Subject: [PATCH] Update documentation --- COMPILE.md | 30 ++++++++++++++++-------------- CONTRIBUTING.md | 5 ----- README.md | 2 +- 3 files changed, 17 insertions(+), 20 deletions(-) diff --git a/COMPILE.md b/COMPILE.md index b62c95754..88e9d62a0 100644 --- a/COMPILE.md +++ b/COMPILE.md @@ -1,14 +1,14 @@ # Compile Instructions -## Visual Studio (`.sln`) +## Visual Studio -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: +1. Clone or download the repository +1. Open the repo folder in Visual Studio 2022+. +2. Wait for cmake to configure the project and load all assets (this may take a few minutes on the first run). +3. Right click a folder in the solution explorer and switch to the 'CMake Targets View' +4. Select platform and configuration from the dropdown. EG: `Windows - Debug` or `Windows - Release` +5. Ensure `Minecraft.Client.exe` is set as the startup item, using the dropdown on the debug targets dropdown +6. Build and run the project: - `Build > Build Solution` (or `Ctrl+Shift+B`) - Start debugging with `F5`. @@ -16,31 +16,33 @@ Configure (use your VS Community instance explicitly): +Open `Developer PowerShell for VS` and run: + ```powershell -cmake -S . -B build -G "Visual Studio 17 2022" -A x64 -DCMAKE_GENERATOR_INSTANCE="C:/Program Files/Microsoft Visual Studio/2022/Community" +cmake --preset windows64 ``` Build Debug: ```powershell -cmake --build build --config Debug --target MinecraftClient +cmake --build --preset windows64-debug --target Minecraft.Client ``` Build Release: ```powershell -cmake --build build --config Release --target MinecraftClient +cmake --build --preset windows64-release --target Minecraft.Client ``` Run executable: ```powershell -cd .\build\Debug -.\MinecraftClient.exe +cd .\build\windows64\Minecraft.Client\Debug +.\Minecraft.Client.exe ``` Notes: - The CMake build is Windows-only and x64-only. - Contributors on macOS or Linux need a Windows machine or VM to build the project. Running the game via Wine is separate from having a supported build environment. -- Post-build asset copy is automatic for `MinecraftClient` in CMake (Debug and Release variants). +- Post-build asset copy is automatic for `Minecraft.Client` in CMake (Debug and Release variants). - The game relies on relative paths (for example `Common\Media\...`), so launching from the output directory is required. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3e2fe74bf..c75279d7d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -51,8 +51,3 @@ We currently do not accept any new code into the project that was written largel # Pull Request Template We request that all PRs made for this repo use our PR template to the fullest extent possible. Completely wiping it out to write minimal information will likely get your PR closed. - -# Visual Studio -Visual Studio can directly open the `CMakeLists.txt` file in the root of the repo, just open the folder you cloned the repo into and it should automatically detect the `CMakeLists.txt` and set up the project. - -We also suggest right clicking a folder in the solution explorer and switching to the 'CMake Targets View', which is more intuitive for navigating the project. diff --git a/README.md b/README.md index ea7665eab..da1383471 100644 --- a/README.md +++ b/README.md @@ -86,7 +86,7 @@ Minecraft.Client.exe -name Steve -fullscreen ```powershell cmake --preset windows64 -cmake --build --preset windows64-release --target Minecraft.Client +cmake --build --preset windows64-debug --target Minecraft.Client ``` For more information, see [COMPILE.md](COMPILE.md).