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

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

What visual studio version do you have installed?

Link to comment
Share on other sites

Thanks for the note, I just have updated the links.

Personally, I would not recommend to stay at the binary packages included into the repo (win/ folder content). The mentioned OpenSSL is updated regularly every two-three months for security issues.

Link to comment
Share on other sites

I can't find 'vmap-assembler.exe'.

Ignore it, copy the tools/ folder content to the client root folder and copy the ace.dll in addition (the dependence was added recently), then run ExtractResources.sh under "git bash" as described.

Another possible issue is about Debug build of extractors. I would recommend to build the Release configuration and use optimized tool binaries from build/Release, since they run few times faster. Some time ago, the mmap extractor had been prevented from running if on Debug build. I did not follow the topic and cannot say, how it looks like now. Using Debug build for mmap extractor is a bad idea anyway.

Link to comment
Share on other sites

I'm having a problem when I'm launching mangosd.exe. realmd.exe is running properly as far as I can tell, but when I try to run mangosd it say 'Could not connect to MySQL database at 127.0.0.1: unknown database 'mangos' '

Presumably I've messed something up while running InstallDatabases.bat, so that it can't locate the database. What should I do?

Link to comment
Share on other sites

You can find database names here. The names `mangos0` and `character0` are used for Zero. Modify your mangosd.conf file substituting these names for `mangos` and `characters` at the end of line here:

WorldDatabaseInfo            = "127.0.0.1;3306;mangos;mangos;mangos"
CharacterDatabaseInfo        = "127.0.0.1;3306;mangos;mangos;characters"

To the DB devs: the consistency of the names in all *CreateDB.sql and in the install script needs to be checked and fixed: `characters0` and `character0` are present now.

Link to comment
Share on other sites

Goodevening,

After trying this for 4 hours :-) I'm pretty sure I'm doing something wrong. having reinstalled all the programs +10 times .. and still can't get this to work 100 % ..

I have gotten to the building.

But there I get an error ( 36 times ):

Severity Code Description Project File Line Suppression State

Error C1083 Cannot open include file: 'mysql.h': No such file or directory (compiling source file E:\Zserver classic\server\src\modules\Eluna\ElunaEventMgr.cpp) LuaEngine e:\zserver classic\server\src\shared\database\Field.h 29

Been trying to installing different MYSQL servers ... this is from a 5.6 server. but for some strange reason you can't install that one you need to unzip it :-s pretty sure that there is a mistake from me

But I really can't find it ...

when I do the Cmake thingie it goes in the red and I need to show him where the Mysql is installed.

I think thats what he means: "MYSQL_INCLUDE_DIR-NOTFOUND" and also "MYSQL_LIBRARY-NOTFOUND"

so I set them to : "C:/Program Files (x86)/mysql-5.6.30-win32" and also " C:/Program Files (x86)/mysql-5.6.30-win32/lib/libmysql.lib "

Then the red screen goes away and I can generate. but when I build from there I get the error C1083 ( like mentionned at the start of the post )

anyone has an idea what I'm doing wrong? Thanks for checking as I'm out of ideas :S

Thanks in advance.

GRts

Phang

Link to comment
Share on other sites

MySQL made the installation a mess now, long gone are the 30MB msi installers so you will now need to have their latest MySQL Community Installer installed. After that, start this Installer and choose from the MySQL server versions, remember 5.7 versions are not recommended so download and install version 5.6.25 (or their latest 5.6.xx version) with the option when given to "install MySQL headers and libraries", then you should have a correct and working MySQL install and CMake or EasyBuilder will reflect the changes and let you build the SLNs...

Link to comment
Share on other sites

Thanks for the help will try it again. but yesterday I couldn't chose 5.6.25 .. it went directly to the freaking 5.7 ...

I'll just uninstall the mysql and screw around untill I get the correct Mysql installed :)

edit 1: tryed it again and I can get a 5.5 or a 5.7 installed but not a 5.6 .. when I try to downgrade from 5.7 to a 5.6 that isn't working either ... will try to upgrade from a 5.5 to a 5.6 and see what happens then ;-)

Link to comment
Share on other sites

At least for MangosTwo the supported compilers are VS2012 update4 or vs2013 update5, any VS lower will result on errors...

Thanks for the help will try it again. but yesterday I couldn't chose 5.6.25 .. it went directly to the freaking 5.7 ...

I'll just uninstall the mysql and screw around untill I get the correct Mysql installed :)

edit 1: tryed it again and I can get a 5.5 or a 5.7 installed but not a 5.6 .. when I try to downgrade from 5.7 to a 5.6 that isn't working either ... will try to upgrade from a 5.5 to a 5.6 and see what happens then ;-)

Are you using the MySQL Installer??? because you should be able to chose the latest 5.6.x version from it, just put on "filters" show all versions not only the "currents ones"...

Link to comment
Share on other sites

and back to part 1 .. still gives me the errors when compiling. I have installed Mysql 5.6 ....

but Cmake can't seem to find it and when I specify the path It keeps giving me the errors :-s

If you run easybuild (in the win folder of the server repo) and perform a check, does it find MySQL ?

Link to comment
Share on other sites

Hi there, when going through the install instructions. The links to OpenSSL no longer work.

However after visiting the main page they do have Win32 OpenSSL v1.0.2g available. as well as the 64 bit version. Will these work since the v1.0.2f are unavailable?

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