Jump to content
  • 0

Getting, Compiling and setting up a Mangos server


madmax

Question

Hi there,

This guide is aimed to explain how to get the source code from our git repositories and compile and run with a default config.

This guide assumes you have set-up a database and user accounts for it.

Before you can run your server you will need to of course run an extractor and put the DBC, vmaps and mmaps(if you have mmaps) in the folder with all the server core files.

First you will need to get the required files:

Getting the source code

We will use MaNGOSZero (World of Warcraft Classic) as an example.

  1. Go to the folder where you would like to download the source code
  2. Right click inside the folder selecting
    Git Bash Here
  3. Type
    This will clone into a folder called server.
  4. This is optional if you want scripts for bosses / dungeons and raids (recommended)
    Go into folder server\src\bindings
    Right click and select Git Bash Here
    Type
    This will clone into a folder called scripts
    Edit file server\src\bindings\CMakeLists.txt like below
    # add_subdirectory(universal)
    add_subdirectory(scripts)



Compiling the source code

  • Now go to server\win and open mangosdVC110.sln
  • This should load visual studio express 2012
  • Once the project has loaded go to Build menu and select configuration manager and click debug and set to release (Changing Win32 to x64 if your server supports it)
  • Go to build menu and click rebuild solution, This will take some time Antz computer took a weekend (little poke at his old system ;))
  • Once it has built you will have a message at the bottom like 12 succeeded 0 failures
  • Go to server\bin and either Win32_Release or x64_release depending on what you selected during setting the configuration manager
  • Close visual studio


This section is optional and can only be done if you downloaded the scripts source earlier

  • Go to server\src\bindings\scripts and open scriptVC110.sln
  • Once the project has loaded go to Build menu and select configuration manager and click debug and set to release (Changing Win32 to x64 if your server supports it)
  • Go to build menu and click rebuild solution


Compiled Server Files

  • Go to server\bin\Win32_Release or if you set x64 server\bin\x64_release
  • These are your core server files
    If you are missing the .conf.dist files run server\win\copyfiles.cmd and they will be located with the rest of the server core files

  • Open each .conf file with an editor (you should have notepad++ if you downloaded it earlier) and change the settings as needed.
  • Be sure to double check your database settings

  • Move the files to where they will be run from.
  • Rename ahbot.conf.dist.in to ahbot.conf
  • Rename mangosd.conf.dist.in to mangosd.conf
  • Rename realmd.conf.dist.in to realmd.conf
  • Rename mods.conf.dist.in to mods.conf


Updating the source code

I always keep a local copy of all the repositories and you will be asking now but what if the developers update the code? Its pretty simple actually...

  • Go into each folder for example server and right click (not on a file or folder) and select Git bash here
  • Type Git Pull

Thats it! It will check your local copy and download any updated files. This saves you time and bandwidth and you do not have to re-download the entire source.


Some MaNGOS recommended settings!

  • Mangosd.conf
    • LogsDir = logs
    • LogSQL = 1
    • PidFile = ./worldd.pid
    • LogLevel = 1
    • LogTime = 1
    • LogFile = Server.log
    • LogTimestamp = 1
    • LogFileLevel = 3
    • LogFilter_TransportMoves = 1
    • LogFilter_CreatureMoves = 1
    • LogFilter_VisibilityChanges = 1
    • LogFilter_Weather = 1
    • LogFilter_DbStrictedCheck = 0
    • LogFilter_Pathfinding = 1
    • LogFilter_MapsLoading = 0
    • LogFilter_EventAiDev = 1
    • LogFilter_PeriodicAffects = 0
    • LogFilter_PlayerMoves = 1
    • LogFilter_SQLText = 1
    • LogFilter_AIAndMovegens = 1
    • LogFilter_PlayerStats = 0
    • LogFilter_Damage = 1
    • LogFilter_Combat = 1
    • LogFilter_SpellCast = 1
    • WorldLogFile = World.log
    • WorldLogTimestamp = 1
    • DBErrorLogFile = DBErrors.log
    • EventAIErrorLogFile = EventAIErrors.log
    • CharLogFile = Char.log
    • CharLogTimestamp = 1
    • CharLogDump = 1
    • GmLogFile = GameMaster.log
    • GmLogTimestamp = 1
    • GmLogPerAccount = 1
    • RaLogFile = remoteAdministration.log
    • LogColors = 13 7 11 9

    [*]Realmd.conf

    • PidFile = .\realmd.pid
    • LogLevel = 2
    • LogTime = 1
    • LogFile = Realm-daemon.log
    • LogTimestamp = 1
    • LogFileLevel = 1
    • LogColors = 13 7 11 9

Link to comment
Share on other sites

17 answers to this question

Recommended Posts

Yes, there are problems getting the dependant 3rd party libraries to build

- iirc, I struggled to get ACE to compile under VS2013

This is something I getting want to resolve, however my time is limited :(

- Any help or research into this issue would be very much appreciated

Link to comment
Share on other sites

it's kind a bit outdated tutorial (at least for zero, see part with adding scripts library).

any chances to see updated tutorial? i still didn't get it how to add scripts library with current settings (i'm using the same way as is described in this tutorial).

any chances to see tutorial, how to compile eg. mmaps extractor under linux (currently, i'm not able to do so)?

Link to comment
Share on other sites

Extracting Maps, Mmaps, Vmaps

This assumes you installed git mentioned in the first post.

Maps - The basic maps used so the server knows where all characters and NPCs are.

Mmaps (Movement Maps) - Used to work out "line of sight" and to prevent NPCs from wondering through trees, buildings etc.

Vmaps (Vertex maps) - Used to prevent NPCs from "running through the air" etc.

Go to server\contrib\extractor_binary

Copy: ad.exe, ExtractResources.sh, MoveMapGen.exe, MoveMapGen.sh, offmesh.txt, vmap_assembler.exe, vmapExtractor.exe

To the World of Warcraft root folder (where wow.exe is).


Extracting Method 1

Double click ExtractResources.sh and follow the instructions.

Tip: If you would like to get your server up quickly for testing and are not worried about Mmaps then select N at the first question and when asked if to compile Mmaps simply press N then enter to skip this step. Movement maps will take several hours to complete.

Extracting Method 2

Go to the WoW folder

Right click in a blank area and select "Git Bash Here"

Type ExtractResources.sh and follow the instructions.

Tip: If you would like to get your server up quickly for testing and are not worried about Mmaps then select N at the first question and when asked if to compile Mmaps simply press N then enter to skip this step. Movement maps will take several hours to complete.

Link to comment
Share on other sites

I don't know whether you have had much more progress, but i'd be interested in you trying out the Rel19 version of MangosZero.

- The VS solution files are back, but with VS2013 compatibility !

- This version is currently in final testing before being released, so any feedback would be appreciated.

Link to comment
Share on other sites

Hi All,

Just joined the forums and am really interested in what you guys are doing here.

Just for info - trying to build on Win 7 x64, using full blow visual studio 2012 as the c compiler

I'm a microsoft centric web monkey so much more familiar with Javascript and c# than c++, and never used Cmake before and I'm struggling with step 1.

I have the source code, fire up cmake and get an error:

Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the

system variable OPENSSL_ROOT_DIR (missing: OPENSSL_LIBRARIES)

I've read shed loads of stuff, grabbed the pre-built dependencies from http://gnuwin32.sourceforge.net, and tried pointing them to where OpenSSL is installed, but no luck.

Can some one give me a few pointers.....

I'm happy to make notes of my build experiences and post them here as an update to the old walkthrough, or just as extra info if a propper walk through is half way through

Thanks

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