Update documentation

This commit is contained in:
rtm516 2026-03-14 12:03:25 +00:00
parent 7dff5fb12b
commit 1baa4fcb24
No known key found for this signature in database
GPG key ID: 331715B8B007C67A
3 changed files with 17 additions and 20 deletions

View file

@ -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.

View file

@ -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.

View file

@ -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).