Skip to content

Compilling on Windows (Visual Studio Solution)

Majesty edited this page Jul 12, 2023 · 17 revisions

Microsoft Visual Studio 2022 with Solution

1. Download/install the required software

To compile on Windows, you will need to download and install:

2. Set up vcpkg

Make sure to follow full installation of vcpkg, per 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 you can safely 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 permission to set vcpkg environment variable:

[System.Environment]::SetEnvironmentVariable('VCPKG_ROOT','C:\vcpkg', [System.EnvironmentVariableTarget]::Machine)

3. Download the source code

cd C:\
git clone --recursive https://github.com/opentibiabr/canary.git

4. Install libraries

Choose one set of libraries, depending on the target platform and execute the following in Powershell:

  • For 64-bit (x64) build:
.\vcpkg install --triplet x64-windows asio pugixml spdlog curl jsoncpp protobuf parallel-hashmap magic-enum mio luajit libmariadb mpir abseil
  • For 32-bit (x86) build:
.\vcpkg install asio pugixml spdlog curl jsoncpp protobuf parallel-hashmap magic-enum mio luajit libmariadb mpir abseil

5. Build

  1. Open vcproj\canary.sln. This should launch Visual Studio.

  2. Choose build configuration from the drop downs (Release and x64).

  3. To start compiling go to the menu Build and choose Build Solution.