Skip to content

Latest commit

 

History

History
180 lines (119 loc) · 7.14 KB

install_win.md

File metadata and controls

180 lines (119 loc) · 7.14 KB

Install on Windows

Compiling The Server

The only windows compiler supported for now is MSVC 15 (Visual Studio Community 2017).

When downloading dependencies (such as OpenSSL, Boost or MariaDB) you must get the version corresponding to the compiler version (x86 or x64) you will use, else the linking will fail.

  1. Get Git, and clone the repository (https://github.com/ValorenWoW/sunstrider-core.git).

  2. Install CMake

  3. Install OpenSSL 1.0.x note the directory to which you install it. Caution, do not use the 'Light' version. OpenSSL 1.1 is NOT supported!

  4. Install Boost 1.62 or higher. Get the windows prebuilt binaries corresponding to your MSVC compiler. Set the environment variable (not a CMake variable) BOOST_ROOT to wherever you installed Boost for CMake to find Boost location.

  5. Run cmake-gui and indicate the repository as the source directory, and a directory of your choice to hold the compiled artifacts.

  6. Install MariaDB, as instructed in the "Setting Up The DB" section below.

  7. Click Configure, then tweak the variables that appear.

    In particular, you should make sure that the SSL_EAY_* and LIB_EAY_* variables point to the right version of OpenSSL (usually the one you installed at step 3). If CMake has trouble finding OpenSSL, you can also define the OPENSSL_ROOT_DIR entry in cmake then configure again.

    Set CMAKE_INSTALL_PREFIX to the location where you want the server to be installed. This is where the "INSTALL" project generated by CMake will install the binaries. Note that this location is important if you want to use dynamic (reloadable) script libraries.

    If you installed MariaDB in an unusual way (e.g. by unzipping binaries or compiling manually), indicate the location of the MySQL dynamic libraries in a new variable named MYSQL_ADD_LIBRARIES_PATH; and the location of the MySQL headers in a new variabled named MYSQL_ADD_INCLUDE_PATH.

  8. Click Generate, and select your compiler.

  9. Open the Sunstrider.sln solution generated in the build directory.

  10. Right-click the INSTALL project, then click build.

Extracting maps, vmaps and dbc

You can skip this step by downloading the already extracted data folders and extracting them into your <install dir>/data folder.

Otherwise, if those files were missing, outdated, if if you want to do it by yourself, follow these steps after compiling the core.

  • Copy libmysql.dll from your mariadb directory (for example C:\Program Files\MariaDB 10.1\lib) to your burning crusade install directory. (This dependency should be removed)

  • Copy src/tools/map_extractor/<configuration>/mapextractor.exefrom the build directory to your burning crusade install directory.

  • Copy src/tools/mmaps_generator/<configuration>/mmaps_generator.exe from the build directory to your burning crusade install directory.

  • Copy src/tools/vmap4_extractor/<configuration>/vmap4extractor.exe from the build directory to your burning crusade install directory.

  • Copy src/tools/vmap4_assembler/<configuration>/vmap4assembler.exe from the build directory to your burning crusade install directory.

  • Run mapextractor.exe in the game directory. This will create two directories named maps and dbc.

  • Run vmap4extractor.exe in the game directory. This will create a directory named Buildings.

  • Create a directory named vmaps, then run vmap4assembler.exe Buildings vmaps in the game directory.

  • Create a directory named mmaps, then run mmaps_generator.exe in the game directory.

  • Move the directories maps, dbc, vmaps and mmaps from your game directory to your server install location. This was the value of the CMAKE_INSTALL_PREFIX variable inside CMake. If you're not sure, you can re-run cmake-gui to check. You can delete the Buildings directory.

Setting Up The DB

  1. Download MariaDB (10.1 series) and install it. Be sure to note down your root password, and the port you select if it not the default. If you don't already have an SQL client, you can install HeidiSQL when proposed to do so.
    /!\ Only 10.1 series or lower are supported at the moment.

  2. Download the last world database here, extract it to your CMAKE_INSTALL_PREFIX directory.

  3. You may follow the instructions here. Just use the world you just downloaded instead.

Install and Configure the Server

  • Copy to your CMAKE_INSTALL_PREFIX directory :

    • libeay32.dll from the OpenSSL install directory.
    • libmysql.dll from your mariadb directory (for example C:\Program Files\MariaDB 10.1\lib)
  • Rename authserver.conf.dist from your server install directory to authserver.conf.

  • Rename worldserver.conf.dist from your server install directory to worldserver.conf.

  • Update authserver.conf options:

    • LoginDatabaseInfo: See info in conf file
  • Update worldserver.conf options:

    • LoginDatabaseInfo: See info in conf file
    • WorldDatabaseInfo: See info in conf file
    • CharacterDatabaseInfo: See info in conf file
    • LogsDatabaseInfo: See info in conf file
    • MySQLExecutable: See info in conf file
    • DataDir: Set this your data folder you just filled last step.
    • LogsDir*: Because you'll probably want logs. See info in conf file.

Local realmlist entries are already configured in database for BC and LK, so you don't need to add one yourself for development. If you need to, just look at the structure of the realmlist table in the auth database.

Some dummy accounts are already in the database, from test1 to test5. The password are the usernames.

Running the Server

Running From Visual Studio

I highly suggest:

  • Changing the "Working Directory" option for the worldserver project in Visual Studio to your binaries folder. (= your CMAKE_INSTALL folder)
  • Setting up the worldserver as the StartUp Project

From there you can use the INSTALL project to compile and just start the debugger with the big "Local Windows Debugger" button with without hassle.

Running From Windows

Just start the executables in the CMAKE_INSTALL_PREFIX folder you specified before.