Jump to content
  • 0

Rel21+ Temporary Compile Guide


Foereaper

Question

Hey there, as we are transitioning from the old build system currently being used on half the cores and the old releases to a new system, we have yet to fully update the compile guides, so excuse the mess. I will do a short "tutorial" for you, and possibly make a temporary guide. This is for Windows only, however the essence is exactly the same for Linux users.

1. Installing dependencies.

  • Install MySQL Community Server - MySQL :: Download MySQL Installer
    • Depending on which architecture you want to use for Mangos (32 bit or 64 bit) the only real difference is which version of MySQL you install. You cannot in theory have both 32 and 64 bit version of Mangos installed at the same time. For now I would recommend 32 bit. If you have already installed 64 bit, you need to make sure that your compiler (Visual Studio) supports 64 bit compilation. If not, reinstall either 32 bit MySQL or install a version of Visual Studio that supports 64 bit compilation.
    • Note that the current RC version of MySQL (5.7) is NOT supported at this time. Use 5.6.

    [*]Install GitExtensions - Download Git Extensions from SourceForge.net

    [*]Install OpenSSL 32 bit - http://slproweb.com/download/Win32OpenSSL-1_0_2h.exe

    [*]Install OpenSSL 64 bit - http://slproweb.com/download/Win64OpenSSL-1_0_2h.exe

    • If either of these say you are missing C++ redistributable packages, follow the prompts and install accordingly.
    • 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.

    [*]Install CMake - http://www.cmake.org/files/v3.3/cmake-3.3.1-win32-x86.exe

2. Downloading the source.

Since we now use a new build system, this works slightly different than the older versions of Mangos. However it is very straight forward once you get used to the said system. For the sake of this tutorial we will be using the develop21 branch, which is the latest development version of Mangos. It should be stable enough to use on a daily basis.

  • 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 -b develop21 --recursive

  • This clones the 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 -b develop21 --recursive

  • 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 CMake.
  • 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).

4uRZCo5.png

  • After you have filled in both of these boxes, 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 depencencies, 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, 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 debug for you.
  • Once the core is doen compiling, the server binaries, tools etc is located inside the "Source/build/bin/Debug" folder.
  • 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.

5. Extracting game data.

  • Inside the "Source/build/bin/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. When prompted if all data should be extracted, hit "y" and enter.

    [*]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 for develop21 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.

7. Configuring the server.

  • Once all the above steps are complete, you are ready to configure your server and start playing!
  • Go to your "Server" folder 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. If you have any other questions or require further support, please feel free to create a new thread for your specific issues. Please, if you see anyone else with issues regarding the wiki, link them this post. The wikis will be updated once all the cores run the new build system.

Link to comment
Share on other sites

Recommended Posts

Thanks antz!

I seem to be running into some issue with the db when trying to run realmd. I've tried with both 32 and 64 bit MySQL servers. And I've also tried running the update SQL scripts provided in the project folder for realm.

The output log message I get from realmd is:

2016-03-18 21:24:43 21000 [realm-daemon]
2016-03-18 21:24:43 <Ctrl-C> to stop.

2016-03-18 21:24:43 Using configuration file realmd.conf.
2016-03-18 21:24:43 Login Database total connections: 2
2016-03-18 21:24:43 MySQL client library: 5.6.28
2016-03-18 21:24:43 MySQL server ver: 5.6.28-log 
2016-03-18 21:24:43 MySQL client library: 5.6.28
2016-03-18 21:24:43 MySQL server ver: 5.6.28-log 
2016-03-18 21:24:43 ERROR:SQL: SELECT version, structure, content, description FROM db_version ORDER BY version DESC, structure DESC, content DESC LIMIT 1
2016-03-18 21:24:43 ERROR:query ERROR: Table 'realmd.db_version' doesn't exist
2016-03-18 21:24:43 ERROR:The table `db_version` in your [Realmd] database is missing or corrupt.
2016-03-18 21:24:43 ERROR:
2016-03-18 21:24:43 ERROR:  [A] You have database Version: MaNGOS can not verify your database version or its existence!
2016-03-18 21:24:43 ERROR:
2016-03-18 21:24:43 ERROR:  [b] You need database Version: 21
2016-03-18 21:24:43 ERROR:                      Structure: 1
2016-03-18 21:24:43 ERROR:                        Content: 2
2016-03-18 21:24:43 ERROR:                    Description: dbdocs update
2016-03-18 21:24:43 ERROR:
2016-03-18 21:24:43 ERROR:Please verify your database location or your database integrity.

The one thing that gets me here is the the table name it shows in the log that it can't seem to locate is named realmd.db_version.

Shouldn't the name should be: realmd_db_version?

Thanks for any help on this.

**Edit

Everything seems to be going fine now. I had pulled the wrong version from repo. was on 20 instead of r21.

Thanks for the help H0zen!

Link to comment
Share on other sites

there is no vmap-assembler included. So.. how to generate vmaps then? :/

Exactly as described in the guide above: with either ExtractResources.sh or make_vmaps.bat. None of the scripts refers to vmap-assembler.exe, so you do not need the binary. On the other hand, README.txt in the build/tools/ folder refers to the binary, as well as the manual.

Link to comment
Share on other sites

./mangosd

FATAL ERROR: Used MySQL library isn't thread-safe.

old mysql?

Issue discussed here. Mysql is not old, but rather is built without threading/shared libs (or maybe another critical option; never have built it manually) support. Either rebuild it manually with thread support, or use better pre-built package. I doubt that such extreme solution as changing the whole OS is needed.

Link to comment
Share on other sites

Issue discussed here. Mysql is not old, but rather is built without threading/shared libs (or maybe another critical option; never have built it manually) support. Either rebuild it manually with thread support, or use better pre-built package. I doubt that such extreme solution as changing the whole OS is needed.

You're absolutely correct, further reading today cleared that up as well, just upgraded everything to MariaDB which, according to them, is thread safe...

Thanks for the response and help!

Link to comment
Share on other sites

Hi, I started on this guide, after trying the first guide to compile [Mangos Zero] GETTING & COMPILING A MANGOS SERVER (Rel21)

but I run in to the "same error"" everytime. (Note: I have followed the guide to the letter) and have installed all programs etc.

but get this error when I press "generate":

The C compiler identification is unknown

The CXX compiler identification is unknown

CMake Error at CMakeLists.txt:20 (project):

No CMAKE_C_COMPILER could be found.

and when I followed prev. guide I got similar error with CMAKE.

any ideas what im doing wrong? :S

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use