-
Notifications
You must be signed in to change notification settings - Fork 156
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:
cd C:\
git clone https://github.com/microsoft/vcpkg
cd vcpkg
.\bootstrap-vcpkg.bat
.\vcpkg integrate installExecute 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/zimbadev/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, goto the top and check Local Mahine, windows-release and crystalserver.exe (bin\crystalserver.exe), then you can compile the server by going to the Build menu and selecting Build All.
1.Goto project folder find the folder vcproj and open file crystalserver.sln.
- Wait for Visual Studio to load the project. On the right side, in the Solution Explorer, right-click on crystalserver and click on Build or Build All.