compile manaserv from source
Compilation of the Mana server
Here is how to set up a Mana server on a Linux/Unix system.
Be sure to get all the needed dependencies and corresponding headers((Headers are files used by developers ending with .h. They're obtained by installing the corresponding <package-name>-dev or -devel package files.)) before trying to compile.
Cloning and compiling
Start with cloning the Mana server from the Git repository and compile it. We're using the cmake build system:
$ git clone git://github.com/mana/manaserv.git manaserv $ cd manaserv $ cmake . $ make
N.B.: By default, the Mana server is compiled with Sqlite support, when willing to set it up with MySQL support, you'll have to replace the following command: $ cmake . with: $ cmake -DWITH_MYSQL=1 .
Note: The PostGreSQL support is planned for later but cannot be compiled at the moment.
Once this step is successful, you'll have to configure the server, or use the Mana server data given in the
provided along with the source code.
What you need
- Code::Blocks with MinGW: http://www.codeblocks.org/
- The library pack for Windows: https://github.com/mana/mana-mingw-libs/archive/master/mana-mingw-libs-master.zip
- Git for Windows: http://code.google.com/p/msysgit/
Compilation Instructions with Sqlite support
- Install Code::Blocks and Msysgit
- Download the library pack and unzip its contents into the MinGW directory of your Code::Blocks installation so that the so that everything is in the current directory.
- Create a directory for your manaserv installation
- Right-click on it and select "Git Bash"
- enter the following command to download the sourcecode: git clone git://github.com/mana/manaserv.git manaserv
- open accountserver.cbp and gameserver.cbp with Code::Blocks and compile them by selecting Project->Build from the build menu.
- When you get errors about "Undefined references to something" verify that you performed step 2 correctly. When you did join our IRC Channel and complain that someone forgot to update the code::blocks project files again. Hey, it's work in progress!
- Copy all the DLL files from the library pack into the same folder where accountserver.exe and gameserver.exe where created during compilation (when you want to set up multiple independent server installations you might prefer to put them into windows\system32 instead so that you don't have to do this for every instance)
The accountserver.exe should now start, but complain about a database problem. Proceed to the "Configuration" section below to set up your database. After you created your database you can start the Mana server by starting both the account- and the gameserver.
Compilation with MySQL support
What you need in that case
- All what is in 'What you need' above.
- MySQL Community Server: http://dev.mysql.com/downloads/mysql/#downloads
- Install Code::Blocks with MinGW, Git for Windows and MySQL Community Server.
- Download the library pack and unzip its contents into the MinGW directory of your Code::Blocks installation.
- Create a directory for your manaserv installation.
- Right-click the directory created and select
Git Bash Here
- Enter the following command to obtain the source files: git clone
- Navigate to the MySQL Community Server directory and copy the folders
include & liband paste them inside the
manaservfolder created in step 5.
- Open the
manaservdirectory, go into the
includefolder and copy the
mysql.hfile into the folder
- Open the
accountserver.cbpwith Code::Blocks and in the
Buildmenu, select the target
Windows (MySQL Support).
Project > Build Options...Then click on
Windows (MySQL Support).
- In the
Linker settings, Under
Link libraries, press
Browse...and navigate to the
manaserv > libfolder and select
- Press the Build Icon or Right click the Mana server Accountserver project and select
Once this is done, you may consider configuring your new server.