In this tutorial, we will be showing you how to compile Trinity Core 3.3.5a(WOTLK) on windows server 2022, but this will work on any windows version above windows 7.
- Git v2.39.0
- Visual Studio 2019
- VS 2019 (any edition) no longer includes the C++ compiler as part of the default installation. You will need to include it during the installation process as shown in this picture: image here
- MySQL Installer 8.0.31
- Boost 1.73.0 – Important Information About Installation
- CMake 3.25.1
- OpenSSL 1.1.1s
Step 1: Installing the software
Installing Git is very simple for this tutorial, simply just keep clicking next until you get to the end of the installation questions and install it.
Visual Studio 2019:
Installing visual studio 2019 is also simple, but we have to make sure to check to install desktop c++ during the installation process since this is a requirement to compile trinity core.
Once done installing, you do not need to sign in, simply click “not now, maybe later” and choose the theme you want before clicking Start Visual Studio. You can exit out of Visual Studio after that, as it isn’t needed right now.
Installing MySQL is easy, when you first open the installer it’ll ask you to upgrade simply click yes. During the next screen, we will only need to install Server only.
After that, click next until you reach this screen:
You will need to make a MySQL root password, remember what you set as this will be useful later on.
Anything after setting the MySQL password, you can just click next until you reach the last page and then click execute and finish. We have now installed MySQL.
HeidiSQL is simple to install, just open the installer and click next and complete the install. This isn’t required at the moment but is a very useful database client for future use.
I made a entire tutorial on how to install boost you can view it here: Downloading and Installing Boost 1.73.0. Remember for this tutorial, you will need boost 64bit since all the tools we have downloaded is for 64bit.
Installing cMake is easy, no extra steps required. Simply click and install it.
Installing OpenSSL is easy, no extra steps required. Simply click and install it.
We now have all the tools required to compile, let’s move onto the next step.
Step 2: Cloning Trinity Core 3.3.5a.
To clone the source from GitHub, we will use the Git Bash tool on your desktop. Begin by right-clicking on an empty space on your desktop and selecting “Git Bash Here.”
After the menu appears, enter or copy the following line into the window:
git clone -b 3.3.5 https://github.com/TrinityCore/TrinityCore.git
Step 3: Prepare The Source
Before moving forward, open the cMake program that was installed earlier in this tutorial. Also, create a new folder on the desktop called “Build.” Once you have created the new folder and opened cMake, you will need to select the source code and the new build folder as shown in the image provided.
After selecting the two folders, click the “Generate” button at the bottom. It will bring up a window to select the compiler, you will need to select Visual Studio 16 2019
As long as you followed the steps to this point, there should be no errors during the cmake process.
Step 3: Compiling
You can now close out of the cmake program, and open the build folder on your desktop and click “ALL_BUILD”
Once it opens Visual Studio, we will need to change the build type to “release” as shown in the image provided.
Now we are ready to compile, simply push F5 or right click “Solution ‘Trinity Core” and click build. If you followed along the tutorial, you should have no errors once the compiling is done and should see:
Assuming you succeeded with compiling with no errors, congratulations you successfully compiled trinity core! Your new compiled files can be found in your Build Folder Build->Bin->Release.
Step 4: Getting Required Files & Renaming Configuration Files
We will need to grab a few files from the programs at installed at the start of this tutorial. Remember these files will need to be placed in your Build->Bin->Release folder.
We will need to copy the libmysql.dll file from the location below. Remember to only copy this file, and not cut/delete it from the original folder.
C:\Program Files\MySQL\MySQL Server 8.0\lib
You will need to place this file inside your Build directory on the desktop Build->Bin->Release.
libssl-1_1-x64.dll & libcrypto-1_1-x64.dll
We will need to copy these two files from the location below. Remember to only copy these files and do not delete them from the original folder.
You will need to place this files inside your Build directory on your desktop Build->Bin->Release.
Rename Configuration Files
We will now need to rename the configuration files, you may find these located inside your Release folder Build->Bin->Release.
Rename the authserver.conf.dist file to authserver.conf
Rename the worldserver.conf.dist file to worldserver.conf
Step 5: Extracting Data From Game Client
We will need to extract the data from our WoW 3.3.5a game client, these files are required to successfully start your worldserver.
You will need to copy the following files from your Build->Bin->Release into your WoW 3.3.5a client(This is where your wow.exe and data folder is stored).
Next, navigate to your TrinityCore folder (the one you obtained from GitHub, not your build folder) and go to the “TrinityCore/contrib” subdirectory. Copy the extractor.bat from there and paste it into your WoW 3.3.5a client folder.
Once all the necessary files are in your WoW 3.3.5a game client folder, run the extractor.bat and select option 4 to extract all data (maps, vmaps, dbc, and mmaps). This process may take a few hours, but the duration may vary depending on your computer’s resources.
Once the data has been successfully extracted, you will need to copy the following folders over to your Build->Bin->Release folder.
Step 5: Populating The Database Automatically
We will now proceed to populate the databases. This is a process that TrinityCore performs to set up the databases and apply all the latest database fixes automatically.
Setting Up Your Database User
We will setup a database user to manage your database setup
Let’s go ahead and connect to our MySQL Server using HeidiSQL(We installed this earlier):
Once connected, we’ll create our new user and databases(Auth, World And Characters).
Running Query To Create Databases And User
We will need to run the queries below to our MySQL server to create the username trinity, and the databases Auth, World And Characters.
CREATE USER 'trinity'@'localhost' IDENTIFIED BY 'trinity' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0; GRANT USAGE ON * . * TO 'trinity'@'localhost'; CREATE DATABASE `world` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; CREATE DATABASE `characters` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; CREATE DATABASE `auth` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; GRANT ALL PRIVILEGES ON `world` . * TO 'trinity'@'localhost' WITH GRANT OPTION; GRANT ALL PRIVILEGES ON `characters` . * TO 'trinity'@'localhost' WITH GRANT OPTION; GRANT ALL PRIVILEGES ON `auth` . * TO 'trinity'@'localhost' WITH GRANT OPTION;
We can now close HeidiSQL.
Downloading Database From Github
We will now need to download the database from Github, this will allow us to setup our database automatically. So head on over to:
We are looking for the latest TDB 335.XXXX like shown in the picture below:
Please note: The name might be different from the time you’re following this tutorial, so make sure to look for the latest one at that using the link above.
Once you locate the latest release for 3.3.5, click on it and download the TDB_World_Database. Once you have the latest 3.3.5 database downloaded, we will need to copy that over to our Build->Bin->Release folder as shown below:
Now we have all the files required to successfully start our server. Simply start the authserver.exe and worldserver.exe.
Once you open the worldserver.exe, it will detect the database has not been setup yet and will try to auto-populate it using the data we provided during this tutorial. Give it a few minutes to execute the SQL files into the database and all the fixes
Congratulations, you have reached the end of our tutorial on compiling Trinity Core 3.3.5a on Windows. If you need any help feel free to reach out!
My aim in creating these tutorials is to help newcomers learn the fundamentals of working with WoW Emulation. Thank you for taking the time to read my tutorial, and I sincerely hope you find it helpful.
If you have any questions or comments, please don't hesitate to contact me on Discord: PrivateDonut#0001