Skip to content

Compiling on Windows (vcpkg)

Daniel Speichert edited this page Sep 25, 2018 · 28 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 Git Bash or Powershell:

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

3. Download the source code

git clone --recursive https://github.com/otland/forgottenserver.git

4. Install libraries

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

  • For 64-bit (x64) build:

    vcpkg install boost-iostreams:x64-windows boost-asio:x64-windows boost-system:x64-windows boost-variant:x64-windows boost-lockfree:x64-windows luajit:x64-windows libmariadb:x64-windows pugixml:x64-windows mpir:x64-windows cryptopp:x64-windows
    
  • For 32-bit (Win32) build:

    vcpkg install boost-iostreams:x86-windows boost-asio:x86-windows boost-system:x86-windows boost-variant:x86-windows boost-lockfree:x86-windows luajit:x86-windows libmariadb:x86-windows pugixml:x86-windows mpir:x86-windows cryptopp:x86-windows
    

5. Build

  1. Open vc14/theforgottenserver.vcxproj. This should launch Visual Studio.

  2. Choose build configuration from the drop downs (Debug or Release and Win32 or x64). For best performance choose Release & x64.

  3. To start compiling press F7.

Clone this wiki locally