mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-08-20 09:57:09 +00:00
Update documentation
This commit is contained in:
parent
7dff5fb12b
commit
1baa4fcb24
30
COMPILE.md
30
COMPILE.md
|
|
@ -1,14 +1,14 @@
|
||||||
# Compile Instructions
|
# Compile Instructions
|
||||||
|
|
||||||
## Visual Studio (`.sln`)
|
## Visual Studio
|
||||||
|
|
||||||
1. Open `MinecraftConsoles.sln` in Visual Studio 2022.
|
1. Clone or download the repository
|
||||||
2. Set `Minecraft.Client` as the Startup Project.
|
1. Open the repo folder in Visual Studio 2022+.
|
||||||
3. Select configuration:
|
2. Wait for cmake to configure the project and load all assets (this may take a few minutes on the first run).
|
||||||
- `Debug` (recommended), or
|
3. Right click a folder in the solution explorer and switch to the 'CMake Targets View'
|
||||||
- `Release`
|
4. Select platform and configuration from the dropdown. EG: `Windows - Debug` or `Windows - Release`
|
||||||
4. Select platform: `Windows64`.
|
5. Ensure `Minecraft.Client.exe` is set as the startup item, using the dropdown on the debug targets dropdown
|
||||||
5. Build and run:
|
6. Build and run the project:
|
||||||
- `Build > Build Solution` (or `Ctrl+Shift+B`)
|
- `Build > Build Solution` (or `Ctrl+Shift+B`)
|
||||||
- Start debugging with `F5`.
|
- Start debugging with `F5`.
|
||||||
|
|
||||||
|
|
@ -16,31 +16,33 @@
|
||||||
|
|
||||||
Configure (use your VS Community instance explicitly):
|
Configure (use your VS Community instance explicitly):
|
||||||
|
|
||||||
|
Open `Developer PowerShell for VS` and run:
|
||||||
|
|
||||||
```powershell
|
```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:
|
Build Debug:
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
cmake --build build --config Debug --target MinecraftClient
|
cmake --build --preset windows64-debug --target Minecraft.Client
|
||||||
```
|
```
|
||||||
|
|
||||||
Build Release:
|
Build Release:
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
cmake --build build --config Release --target MinecraftClient
|
cmake --build --preset windows64-release --target Minecraft.Client
|
||||||
```
|
```
|
||||||
|
|
||||||
Run executable:
|
Run executable:
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
cd .\build\Debug
|
cd .\build\windows64\Minecraft.Client\Debug
|
||||||
.\MinecraftClient.exe
|
.\Minecraft.Client.exe
|
||||||
```
|
```
|
||||||
|
|
||||||
Notes:
|
Notes:
|
||||||
- The CMake build is Windows-only and x64-only.
|
- 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.
|
- 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.
|
- The game relies on relative paths (for example `Common\Media\...`), so launching from the output directory is required.
|
||||||
|
|
|
||||||
|
|
@ -51,8 +51,3 @@ We currently do not accept any new code into the project that was written largel
|
||||||
|
|
||||||
# Pull Request Template
|
# 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.
|
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.
|
|
||||||
|
|
|
||||||
|
|
@ -86,7 +86,7 @@ Minecraft.Client.exe -name Steve -fullscreen
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
cmake --preset windows64
|
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).
|
For more information, see [COMPILE.md](COMPILE.md).
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue