[TrinityCore] How to compile a fresh 3.3.5 core for Windows

Bogi

Verified Member
29
2014
0
TUTORIAL

How to compile a fresh TrinityCore 3.3.5 on Windows

Step one: let me tell you what you are going to need to to this. Download:

GitExtensionsNewest VersionDownload
Visual C++ 2012 Desktop EditionNewest VersionDownload
CMakeWin32 InstallerDownload
OpenSSLWin32 InstallerDownload
MySQL 5.5.9 portable serverBy JeutieDownload
NET Framework 4.5Newest VersionDownload
HeidiSQLNewest VersionDownload
dll files By me Download
World Database Latest Version Download

Step two: is to make a new folder and name it whatever you want. For this tutorial we will be using a directory named "Trinity" and it will be located on Desktop.
1. Enter your Trinity folder and make 2 new folders in it. Name them for example "Source" and "Build"
2. Right-click on the Source folder, then navigate to "Git Extensions" and in the sub-menu chose the option "Clone"
3. A window will popup and you will need to enter some things there. In the first field called "Repository to clone" enter the following:

Code:
https://github.com/TrinityCore/TrinityCore.git

In the next field called "Destination" enter the path of your Source folder that you had created. Usually its already set, but if it isn't or for some reason you want to chose another directory you can simply edit the destination folder where all the files will be cloned. For us that would be:

Code:
C:\Users\BoGi\Desktop\Trinity\Source\

The third filed is a sub-directory that you can delete so it stays empty, because we don't need it.
Next will be to chose the "Branch". Since the "Master" branch has been removed a while ago and renamed to 3.3.5, we will chose "3.3.5" branch.
Make sure that the "Personal Repository" is checked.
After you have done all that it should look something like this:
Cuk1Eq5.png

5. Click "Clone" and wait for the source file to get cloned. After its finished you should have a screen like this:
iUHdPex.png

Step three: Open CMake and in the field named "Where is the source code" browse your source folder that we just cloned, so for us that would be:

Code:
C:\Users\BoGi\Desktop\Trinity\Source\

And in the field called "Where to build binaries" chose the folder called "Build" that we made earlier. For us that path looks like this:

Code:
C:\Users\BoGi\Desktop\Trinity\Build\

After doing that click on the button that says "Configure". Another window will popup. In the field named "Specify the generator for the project" select "Visual Studio 12 2013" because that is the studio we downloaded earlier. Below you will see 4 options to chose from. By default it should be the 1st one called "Use default native compilers". Now you are done. Click Finish, and wait for the compile to end. After its done you should see something like this:

CxtJmFQ.png

If you don't know much and this is your first time, I highly suggest that you don't touch anything. Just click on Configure again. That shouldn't take more than a few seconds. After you see the following message "Configuring done" and all the red area is gone, click on "Generate". After this is done, you'll have a message saying: "Generating done". You may now close CMake.

Step four: Now open your Build folder, which is a sub-folder of our main folder called "Trinity". Find the file named "ALL_BUILD". Open it (with Visual Studio). When its opened, look on center top you will see 2 boxes. In one says "Debug" and in the one right of it says "Win32". In the drop-down menu, instead of Debug chose "Release". Then go to VIEW -> OUTPUT (or press ALT+2). We need the output dialog to see if there are any errors when the build is done. Now on your top-right side of the screen in the "Solution Explorer" area you'll see something called "ALL_BUILD". Right-click it and press Build. This is going to take awhile so be patient. After its done, you will see a message that says something like this:

Code:
========== Build: 14 completed, 0 failed, 0 up-to-date, 1 skipped ==========

Step five: Now go to your Release folder. For us it is in:

Code:
C:\Users\BoGi\Desktop\Trinity\Build\bin\Release

In that folder you will find the following files:

Code:
worldserver.conf.dist
worldserver.exe
authserver.conf.dist
authserver.exe

You will need also the following files in order to later start the server successfully.

Code:
ACE.dll
libeay32.dll
libmySQL.dll
ssleay32.dll

These files are provided in the Zip file that is provided above named "dll files". Extract the content of the Zip file into your Release path. For us that will be:

Code:
C:\Users\BoGi\Desktop\Trinity\Build\bin\Release

Now you will have to rename the "worldserver.conf.dist" to "worldserver.conf" and "authserver.conf.dist" to "authserver.conf". We are going to open authserver.conf with Notepad++ for example (regular Notepad is also good). In the file try to find the following part: "LoginDatabaseInfo = "127.0.0.1;3306;trinity;trinity;auth" and change the 'trinity;trinity' to 'root;ascent'. Now open worldserver.conf and fin the part where it says:
Code:
"LoginDatabaseInfo     = "127.0.0.1;3306;trinity;trinity;auth"
WorldDatabaseInfo     = "127.0.0.1;3306;trinity;trinity;world"
CharacterDatabaseInfo = "127.0.0.1;3306;trinity;trinity;characters""

and change them to be like:
Code:
LoginDatabaseInfo     = "127.0.0.1;3306;root;ascent;auth"
WorldDatabaseInfo     = "127.0.0.1;3306;root;ascent;world"
CharacterDatabaseInfo = "127.0.0.1;3306;root;ascent;characters"

Step six: Extract the MySQL 5.5.9 portable server to your bin directory. For us it is:

Code:
C:\Users\BoGi\Desktop\Trinity\Build\bin\

Now open your _Server folder and launch MySQL. Open HeidiSQL and for the username type "root" and password "ascent". After you are logged in, right-click on the connection and in the drop-down menu chose Create New -> Database. Name it "auth" and click okay. Repeat this 2 more times, but just change the name of the Database. So the second one will be "characters" and the last one "world". After you've done that, click ones on the auth database then File -> Load SQL File, and navigate to your Source directory\sql\base. In our situation it is:

Code:
C:\Users\BoGi\Desktop\Trinity\Source\sql\base

And select "auth_database.sql" and click the blue arrow that says execute. Do the same for characters database as well, just chose characters_database.sql. For the world database, you will want to extract the "TDB_full_335.57_XXX_XX_XX" somewhere. I suggest to extract it in your Trinity folder. Now do the same thing as before. Select the world in HeidiSQL then File -> Load SQL File and navigate to where you extracted your world database. After this is finished,leave the world selected and do again File -> Load SQL file, but this time you will want to navigate to your Source\sql\updates\world\and just load and execute all 4 files.

Step seve: You are almost finished! Navigate to your Release folder, start "autserver.exe" then start "worldserver.exe" and your server should be working now! To add an admin account type the following in your worldserver console:

Code:
account create NAME PASSWORD
example: account create admin admin
after that just type:
Code:
account set gmlevel NAME 3 -1
example: account set gmlevel admin 3 -1

This tutorial is uniquely written by me.
All the images are made by me as well as the text.
I authorize EmuCoach to use this tutorial as they wish.
Bogi​
 
Last edited:

cliffsmits

Senior User
Superior Member
262
2014
31
Location
netherlands
a great tutorial Bogi

this is for the people that have trouble with Boost cmake

How to install and setup Boost
Hello, in this tutorial we will be going through the installation and setup process of the Boost library.


Links
Download the binaries though.
Boost 32bit 1.56.0 exe Download



MAKE SURE

CMake is closed.
The Boost version you downloaded is the latest version that TC supports.


NOT RECOMMENDED

It is not recommended to edit your CMake source to bypass the System Variable addition. It can have conflicts if that same file was edited by TC team (or other team) and you'd have to deal with that. It is best to add the System Variable because it is a one time edit whilst the CMake edit can be a burden.



I'M GETTING ERRORS

Make sure TrinityCore supports your boost version. If you go to "TCSOURCE/cmake/macros/FindBoost.cmake" and on this line (line numbers will be inconsistent overtime if they update this file) you can find the latest version of Boost TC supports. Right now it is 1.56.0. Other additional versions are optional to download, but it is best to stay updated.
-----------------------------------------------------
If you're getting these errors:

Could not find the following static Boost libraries:
boost_system
boost_thread
boost_program_options
Read below:
If you downloaded your Boost source from http://sourceforge.net/projects/boost/files/boost/ and you're using Windows, delete that folder and download the 32bit binaries. Assuming http://sourceforge.net/projects/boost/files/boost/ is for setting up boost without the libs already included. Downloading the 32bit executable already has the libs included in "lib32-msvc-12.0".
-----------------------------------------------------
Make sure the folder boost is in is accessible
Make sure you're linking the variable path to the boost directory only and not a folder inside of boost. For example: "C:\boost_1_56_0" is a correct path, incorrect: "C:\boost_1_56_0\boost". Just make sure the folder you're setting the path to has the actual boost files inside of it.
Make sure CMake was closed during the new system variable addition. Else, restart the program.



Installing Boost

Find the drive you want to install Boost files in. Mine will be in C:\ drive. Here's what it should look like after extraction


Setting up Boost PATH

Again, make sure CMake is closed. If CMake is not closed after you add the new System Variable it will need to be restarted for CMake to reload the data again -- it's best to keep it closed until we're done. Another side note, you DO NOT need to restart your PC.

For Windows 7 (and if Windows 8 is the same) users, here's how to set up the System Variable in your Environment Variables:
For Windows XP, follow this link to access the Environment Variables: http://support.microsoft.com/kb/310519
For Windows Vista, follow this link to access the Environment Variables: http://support.microsoft.com/kb/931715

For the operating systems I did not list you will need to find and do them yourself as I'm not familiar with it.

Computer -> System Properties -> Advanced System Settings -> Environment Variables -> New System Variable -> Variable Name: BOOST_ROOT, Variable value: Your/Boost/Path.

Go to Computer and click System Properties or open your Control Panel, click System and Security -> System:

Computer -> System Properties


Control Panel -> System and Security -> System

After that, click on Advanced System Settings:

Once you've done that the System Properties window will appear, and on the bottom of the System Properties window you should see "Environment Variables."

Click Environment Variables. After you have that done the Environment Variables window will appear. You should be looking at System Variables.



Under System Variables click "New." It should now have prompt you with the "New System Variable Window"

Variable Name: BOOST_ROOT
Variable Value: PATH_TO_YOUR_BOOST_DIRECTORY

Here is what mine looks like (remember I extracted mine into my C:\ drive):

Click OK and you're done!
 
Last edited:

joeandkelly7411

Trial Member
3
2015
0
I had some issues with cmake, I'm a noob. It was unable to find some lib, problem was I installed 64-bit version of mysql. Anyways, I got that fixed finally and I am currently building with visual studios. After that's complete I'll let ya know where i am. I am going to try to use xammp instead of the portable server. If you have and suggestions or tips for that I would appreciate it.
 

joeandkelly7411

Trial Member
3
2015
0
"navigate to your Source\sql\updates\world\and just load and execute all 4 files"
Any idea why I would have a LOT more then 4 files there? I went ahead and executed all of them. I had somewhere around 20.
 

ExO

Admin
5,094
2014
1,454
"navigate to your Source\sql\updates\world\and just load and execute all 4 files"
Any idea why I would have a LOT more then 4 files there? I went ahead and executed all of them. I had somewhere around 20.

Well that's just because there were maybe 4 sql updates while he checked, but trinitycore has updated their database and therefor there have been more sql-updates included.
 

Omen

Verified Member
5
2016
0
Hey, i have this error when i try and configure the source & build with Cmake "CMake Error: The source directory "C:/Users/???/Desktop/trinity/source" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI."
 

Omen

Verified Member
5
2016
0
sorry for the necro + double post, and possibly breaking your second page?
i have solved the issue... somehow.. but now i'm getting this error
CMake Error at CMakeLists.txt:10 (find_package):
By not providing "FindPCL.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "PCL", but
CMake did not find one.

Could not find a package configuration file provided by "PCL" (requested
version 1.2) with any of the following names:

PCLConfig.cmake
pcl-config.cmake

Add the installation prefix of "PCL" to CMAKE_PREFIX_PATH or set "PCL_DIR"
to a directory containing one of the above files. If "PCL" provides a
separate development package or SDK, be sure it has been installed.
 

ExO

Admin
5,094
2014
1,454
sorry for the necro + double post, and possibly breaking your second page?
i have solved the issue... somehow.. but now i'm getting this error
CMake Error at CMakeLists.txt:10 (find_package):
By not providing "FindPCL.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "PCL", but
CMake did not find one.

Could not find a package configuration file provided by "PCL" (requested
version 1.2) with any of the following names:

PCLConfig.cmake
pcl-config.cmake

Add the installation prefix of "PCL" to CMAKE_PREFIX_PATH or set "PCL_DIR"
to a directory containing one of the above files. If "PCL" provides a
separate development package or SDK, be sure it has been installed.

The page issues has been fixed, thanks for the notify.
Before we go on; Are you using Windows 10?
 

Omen

Verified Member
5
2016
0
The page issues has been fixed, thanks for the notify.
Before we go on; Are you using Windows 10?
I'm using windows 8. I decided to go through the process again, and it seemed to work.. Now I am really stuck with this error

Detected 32-bit platform
CMake Error at cmake/compiler/msvc/settings.cmake:7 (message):
MSVC: TrinityCore requires version 18.0 (MSVC 2013) to build but found
17.0.50727.1 #I think this is the problem here, but i tried clearing cache and using a later version of visual studio, but it just puts me back to my first error i orginally posted.
Call Stack (most recent call first):
cmake/platform/win/settings.cmake:17 (include)
cmake/macros/CheckPlatform.cmake:13 (include)
CMakeLists.txt:51 (include)


Configuring incomplete, errors occurred!
See also "C:/Users/???/Desktop/3.3.5 trinity/Build/CMakeFiles/CMakeOutput.log".

Then why I try to generate, it just comes up with this
http://imgur.com/D0T1e3r
 
Last edited:

Omen

Verified Member
5
2016
0
The page issues has been fixed, thanks for the notify.
Before we go on; Are you using Windows 10?
hey, dont forget about me xD
Managed to solve previous issues, now i'm stuck with this

CMake Error: File C:/Users/Max/Desktop/REAL 3.3.5/Source/revision_data.h.in.cmake does not exist.
CMake Error at cmake/genrev.cmake:71 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
CMakeLists.txt:77 (include)

I have set system environment variables, downloaded 64bit and 32bit versions of boost, downloaded a prior version of cmake but this error...
 

Omen

Verified Member
5
2016
0
The page issues has been fixed, thanks for the notify.
Before we go on; Are you using Windows 10?

Can you help me out with this error? i have got cmake to find boost 1_57_0 but now i'm getting this error :

CMake Error at cmake/macros/FindBoost.cmake:1115 (message):
Unable to find the requested Boost libraries.

Boost version: 1.57.0

Boost include path: C:/boost_1_57_0

Could not find the following static Boost libraries:

boost_system
boost_thread
boost_program_options

No Boost libraries were found. You may need to set BOOST_LIBRARYDIR to the
directory containing Boost libraries or BOOST_ROOT to the location of
Boost.
Call Stack (most recent call first):
cmake/macros/ConfigureBoost.cmake:28 (find_package)
CMakeLists.txt:60 (include)

In environment variables I made 2 new variables in user and system

BOOST_LIBRARYDIR
C:\boost_1_57_0\lib64-msvc-12.0

but it's still not finding these goddamn libs

I'm compiling with msvc 2015, do i need to find a lib with msvc 15 compatiable?

**********UPDATE*************
Well, I figured out the problem, I was cloning another core, not trinity. If anyone has this problem I highly suggest copy and pasting the trinity configureboost.cmake and findboost.cmake files replacing your old ones.

Many thanks.. or well.. me pointlessly posting my errors with no reply. anyway, thankyou :)
 
Last edited:

shadowslayde

Trial Member
1
2016
0
It looks like the world database @ trinitycore has been offline. Does anyone know if this has been offline for a while?
 
Top