Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Registration has been disabled as I did not want to build a community, but just a place to release and or share content made by me and friends. If you encounter any problems with the site, or content please reach out to me via discord: privatedonut

Compiling Trinity Core 3.3.5a on Windows: A Complete Tutorial

PrivateDonut

Administrator
Staff member
Joined
Jun 14, 2024
Messages
19

Introduction​

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.

Software Requirements​

Step 1: Installing the software​

Git:

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.

Screen-Shot-2023-01-13-at-2.47.41-PM-1024x570.png

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.

MySQL

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.

Screen-Shot-2023-01-13-at-2.59.53-PM-1024x769.png

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.

Screen-Shot-2023-01-13-at-3.02.59-PM-1024x774.png

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:

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.

Boost 1.73.0:

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.

cMake:

Installing cMake is easy, no extra steps required. Simply click and install it.

OpenSSL

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.”

Screen-Shot-2023-01-13-at-3.31.27-PM.png

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.

Screen-Shot-2023-01-13-at-3.45.12-PM-1024x852.png

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

Screen-Shot-2023-01-13-at-3.50.20-PM.png

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”

Screen-Shot-2023-01-13-at-3.52.33-PM-1024x534.png

Once it opens Visual Studio, we will need to change the build type to “release” as shown in the image provided.

Screen-Shot-2023-01-13-at-3.53.40-PM-1024x193.png

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:

Screen-Shot-2023-01-13-at-4.02.35-PM-1024x38.png

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.

libmysql.dll:

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.

C:\Program Files\OpenSSL-Win64\bin
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).

  • mapextractor
  • vmap4extractor
  • vmap4assembler
  • mmaps_generator
Screen-Shot-2023-01-13-at-7.54.15-PM-1024x458.png

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.

Screen-Shot-2023-01-13-at-7.56.15-PM-1024x512.png

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.

Screen-Shot-2023-01-13-at-7.59.21-PM-1024x542.png

Once the data has been successfully extracted, you will need to copy the following folders over to your Build->Bin->Release folder.

  • Maps
  • vMaps
  • mMaps
  • DBC
  • Cameras
Screen-Shot-2023-01-13-at-8.48.36-PM-1024x522.png

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):

Screen-Shot-2023-01-13-at-8.21.06-PM-1024x723.png

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.

SQL:
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;
Screen-Shot-2023-01-13-at-8.37.11-PM-1024x648.png
Screen-Shot-2023-01-13-at-8.38.28-PM-1024x614.png

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:

Screen-Shot-2023-01-13-at-8.54.05-PM-1024x254.png

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:

Screen-Shot-2023-01-13-at-8.56.59-PM-1024x520.png

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

Screen-Shot-2023-01-13-at-9.02.20-PM-1024x538.png

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!
 
Back
Top