-
Notifications
You must be signed in to change notification settings - Fork 7
Compiling on Windows (CMake)
To compile on Windows, you will need to download and install the following software:
- Git
- Visual Studio 2022 Community (compiler and english language pack)
- vcpkg (package manager)
Make sure to follow the full installation of vcpkg
by referring to the Official Quickstart. Execute the following in Powershell:
To open Powershell, navigate to your desired directory (e.g., C:\
) and choose Open PowerShell window here (Shift + Right-click).
Then, proceed with configuring vcpkg:
git clone https://github.com/microsoft/vcpkg
cd vcpkg
.\bootstrap-vcpkg.bat
.\vcpkg integrate install
Execute the following command in Powershell with Administrator permissions to set the vcpkg environment variable:
[System.Environment]::SetEnvironmentVariable('VCPKG_ROOT','C:\vcpkg', [System.EnvironmentVariableTarget]::Machine)
Run the following command to clone the source code:
cd C:\
git clone --recursive https://github.com/jprzimba/crystalserver.git
-
Open Visual Studio. In the Get started section, select Open a local folder and open the server's main folder.
-
Wait for Visual Studio to load the project. It will automatically install the required libraries and generate the CMake cache. (Be patient, as the first cache generation may take a few minutes).
-
Once the CMake cache is successfully generated, you can compile the server by going to the Build menu and selecting Build All.