Skip to content
This repository has been archived by the owner on May 20, 2023. It is now read-only.

Compiling on Windows

Majesty edited this page Nov 18, 2021 · 5 revisions

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 cmd or Powershell:

To open Powershell navigate to your desired directory and choose Open PowerShell window here (shift + right click).

If you prefer cmd (command prompt) click on your Start windows button or just use the windows key on your keyboard and search for cmd then navigate to your desired directory using cd e.g. you want to have your vcpkg folder on root of your C drive:

cd C:\

Then you can safely proceed with configuring vcpkg:

git clone https://github.com/Microsoft/vcpkg
cd vcpkg
.\bootstrap-vcpkg.bat

3. Download the source code

git clone --recursive https://github.com/opentibiabr/otservbr-global.git

4. Install libraries

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

  .\vcpkg --triplet x64-windows install boost-asio boost-filesystem boost-iostreams boost-lockfree boost-system boost-variant cryptopp curl jsoncpp libmariadb luajit mpir pugixml spdlog
  • Make libraries available to Visual Studio:

    .\vcpkg integrate install
    

5. Build

  1. Open Visual Studio. In "Get started", select "Open a local folder" and open the server main folder.

  2. Wait for the Visual Studio to load. It will automatically generate the cmake cache, make sure you have all libs installed in vcpkg, as it will check them during the first installation of cmake (Be patient, the first cache may take a few minutes).

  3. After the cmake cache is successfully generated, you can compile the server by going to the menu Build and choose Build All.