The only windows compiler supported for now is MSVC 15 (Visual Studio Community 2017).
When downloading dependencies (such as OpenSSL, Boost) you must get the version corresponding to the compiler version (x86 or x64) you will use, else the linking will fail.
-
Get Git, and clone the repository (https://github.com/TrinityTBC/core.git).
-
Install CMake
-
Install OpenSSL 1.0.x note the directory to which you install it. Caution, do not use the 'Light' version. OpenSSL 1.1 is also supported.
-
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. -
Run
cmake-gui
and indicate the repository as the source directory, and a directory of your choice to hold the compiled artifacts. -
Install MySQL, as instructed in the "Setting Up The DB" section below.
-
Click Configure, then tweak the variables that appear.
In particular, you should make sure that the
SSL_EAY_*
andLIB_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 MySQL 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 namedMYSQL_ADD_INCLUDE_PATH
. -
Click Generate, and select your compiler.
-
Open the
TrinityTBC.sln
solution generated in the build directory. -
Right-click the
INSTALL
project, then clickbuild
.
Follow these steps after compiling the core.
-
Copy
libmysql.dll
from your mysql directory (for exampleC:\Program Files\MySQL\MySQL Server 5.7\lib
) to your burning crusade install directory. (This dependency should be removed) -
Copy
src/tools/map_extractor/<configuration>/mapextractor.exe
from 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 namedmaps
anddbc
. -
Run
vmap4extractor.exe
in the game directory. This will create a directory namedBuildings
. -
Create a directory named
vmaps
, then runvmap4assembler.exe Buildings vmaps
in the game directory. -
Create a directory named
mmaps
, then runmmaps_generator.exe
in the game directory. -
Move the directories
maps
,dbc
,vmaps
andmmaps
from your game directory to your server install location. This was the value of theCMAKE_INSTALL_PREFIX
variable inside CMake. If you're not sure, you can re-runcmake-gui
to check. You can delete theBuildings
directory.
-
Download the last world database here, extract it to your CMAKE_INSTALL_PREFIX directory.
-
You may follow the instructions here. Just use the world you just downloaded instead.
-
Copy to your CMAKE_INSTALL_PREFIX directory :
libeay32.dll
from the OpenSSL install directory.libmysql.dll
from your mariadb directory (for exampleC:\Program Files\MySQL\MySQL Server 5.7\lib
)
-
Rename
authserver.conf.dist
from your server install directory toauthserver.conf
. -
Rename
worldserver.conf.dist
from your server install directory toworldserver.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.
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.
Just start the executables in the CMAKE_INSTALL_PREFIX folder you specified before.