Since there's currently no tutorial in full for compiling and setting up a MaNGOS server on Windows, I'm brushing off the old dev21 build guide and updating it to be relatively current. If something needs to be changed, let me know and I'll do so.
1. INSTALLING DEPENDENCIES
NOTE : Always use 64-bit version of dependencies where possible. There is no reason to compile and run the server in 32-bit mode unless you are restricted by OS or hardware.
- Install MySQL Community Server : MySQL :: Download MySQL Installer
- Install GitExtensions : Download Git Extensions from SourceForge.net
-
Install OpenSSL : http://slproweb.com/products/Win32OpenSSL.html
- Download and install the FULL SSL version (not the one tagged Light)
- I would recommend installing both 32 and 64 bit OpenSSL libraries, this prevents future issues if you want to compile either 32 or 64 bit.
- If either of these say you are missing C++ redistributable packages, follow the prompts and install accordingly.
-
Install CMake : https://cmake.org/download/
- Get the latest Binary distribution for your platform
2. DOWNLOADING THE SOURCES
For the sake of this tutorial we will be using Mangos Zero, but the same steps apply for One and Two. Change the GitHub links below accordingly.
Create a folder named "Source" anywhere on your computer. This is the folder we will use to download the server and the database.
Right click on the "Source" folder and click "Git Bash Here".
Once the command prompt window opens, type in the following command and hit enter :
git clone https://github.com/mangoszero/server --recursive --depth=1
This clones t he source as well as the submodules into the folder "Source/server". Once this is done, keep the command line window open and type the below command and hit enter :
git clone https://github.com/mangoszero/database --recursive --depth=1
You should now have the database cloned to "Source/database", and you can close the command line window.
3. GENERATING THE BUILD FILES
To generate the build files, which is what we will use to compile the server itself, open the CMake software you have previously installed on step 1.
You now have two fields you need to fill in. Specifically :
- "Where is the source code : " In this field, you point to the "Source/server" folder you created earlier. (See below for example).
- "Where to build the binaries : " For this tutorial, we will use the same "Source" folder, however specify a new folder within "Source" and call it "build". (See below for example).
After you have filled in both of these fields, hit "Configure".
This will also prompt you which compiler to use! Make sure you select the correct compiler !
If you for some reason change any of the default values after configuration, you need to click "Configure" again BEFORE going to the next step.
Once configuration is done, hit "Generate".
If this finished without any errors, proceed to the next step. If you did however receive any errors, most likely you are missing one of the dependencies, have pointed to the wrong folders or selected the wrong compiler. Usually the error message you receive will make enough sense for you to isolate the issue. If not, make a new thread and provide the full output showing the error.
4. BUILDING THE CORE
Once the build files are generated, either click the Open Project button next to Generate, or go to your "Source/build" folder and open the file MaNGOS.sln. This will open Visual Studio and you build your server like normal. I would recommend to compile the core in Debug mode (default) as that will provide you with crash dumps should the core crash for whatever reason, making it easier for us to help you debug.
Once the core is done compiling, the server binaries, tools etc is located inside the "Source/build/bin/" folder, under either Debug or Release, depending on your choice.
Copy the following files to wherever you want to run the server from. For the sake of this tutorial, make a new folder somewhere on your computer and call it "Server".
- lua_scripts folder
- ace.dll
- ahbot.conf.dist
- libmysql.dll
- mangosd.conf.dist
- mangosd.exe
- realmd.conf.dist
- realmd.exe
If you compiled in Debug mode, also copy the following files to the "Server" folder.
- ace.pdb
- mangosd.pdb
- realmd.pdb
If the core built successfully, move to the next step. If you have any compile errors, please post a full log displaying the error messages. Warnings can be ignored for now.
4. EXTRACTING GAME DATA
NOTE: Tools should ALWAYS be compiled under Release mode, unless you are told otherwise during support. Debug tools will take A LONG TIME. You have been warned.
Inside the "Source/build/bin/" and either Release or Debug folder there will be a folder named "Tools". Enter this folder and copy the following files:
- ExtractResources.sh
- make_vmaps.bat
- map-extractor.exe
- mmap_exclude.txt
- MoveMapGen.sh
- movemap-generator.exe
- offemsh.txt
- vmap-assembler.exe
- vmap-extractor.exe
Paste these into your WoW directory and run ExtractResources.sh. Follow the prompts to extract.
This can take a LONG time depending on your computer.
Once this is complete, copy the following folders to your "Server" folder.
- dbc
- maps
- mmaps
- vmaps
6. INSTALLING THE DATABASE
Enter the database folder located at "Source/database"
Run InstallDatabases.bat and follow the on screen prompts to install the base database. Do mind, this database is the base database and will require you to run updates accordingly.
The updates can be found in the separate folders inside "Source/database", specifically "Character", "Realm" and "World".
The server will always notify you when you run the server files from the "Server" folder whether your database is up to date or not.
If updates are required, apply them using your preferred SQL tool, like sqlyog, heidisql etc.
NOTE : It is not a problem if runnign server with a higher DB content version.
7. INSTALLING THE SERVER
Once all the above steps are complete, you are ready to configure your server and start playing !
Go to your "Server" folder copy and and rename the following files :
- ahbot.conf.dist -> ahbot.conf (This file is optional, depending if you want to use the AH bot or not!)
- mangosd.conf.dist -> mangosd.conf
- realmd.conf.dist -> realmd.conf
Open mangosd.conf and edit lines 66, 67 and 68 to reflect your database information.
Open realmd.conf and edit line 110 to reflect your database information.
All other edits to the config files are completely optional.
At this point your server should be completely operational for a local test. If you have any other questions or require further support, please feel free to create a new thread for your specific issues on teh appropriate section (not on commenting this post).
Recommended Comments
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now