Page 1 of 1

Compiling Mana Server with MySQL Support on Windows.

Posted: 14 Nov 2011, 20:20
by visaboy

Code: Select all

I've seen a few posts requesting support because they can't get the source compiled with MySQL Support due to the lack of documentation regarding this subject and since I cannot edit the manasource docs, I decided to post it here.

Reference: http://doc.manasource.org/compile_manaserv_from_source
Compiling Mana Server with MySQL Support on Windows.

What you need

Code::Blocks with MinGW: http://www.codeblocks.org/
The newest library pack for Windows: http://forums.themanaworld.org/viewtopic.php?f=6&t=5356
Git for Windows: http://code.google.com/p/msysgit/downlo ... ficial+Git
MySQL Community Server: http://dev.mysql.com/downloads/mysql/#downloads

Compilation Instructions

1. Install Code::Blocks with MinGW, Git for Windows and MySQL Community Server.
2. Download the library pack and unzip its contents into the MinGW directory of your Code::Blocks installation.
3. Create a directory for your manaserv installation.
4. Right-click the directory created and select "Git Bash Here"
5. Enter the following command to obtain the source files: git clone git://github.com/mana/manaserv.git manaserv
6. Navigate to the MySQL Community Server directory and copy the folders "include & lib" and paste them inside the manaserv folder created in step 5.
7. Open "manaserv" directory, click "include" and copy "mysql.h". Paste inside the folder "mysql".
8. Open "accountserver.cbp" and on Build target select "Windows (MySQL Support)".
9. Select Project > Build Options... Then click on "Windows (MySQL Support)", following by "Linker settings".
10. Under Link libraries press "Add", click "Browse..." and navigate to manaserver > lib and select "libmysql.lib", press "Open", then "Yes", and "Ok" "Ok".
11. Press the Build Icon or Right click ManaServ Accountserver and select Build.

You can now build both accountserver.cbp and gameserver.cbp | Good Luck!

Re: Compiling Mana Server with MySQL Support on Windows.

Posted: 08 Jan 2012, 08:24
by Ablu
Added link to this on the documentation site (http://doc.manasource.org/compile_manaserv_from_source).
Thanks for putting together the steps.

Best regards
Ablu

Re: Compiling Mana Server with MySQL Support on Windows.

Posted: 11 Jan 2012, 10:29
by Bertram
Hi visaboy,

Thanks a lot for the doc tinkering :)

Do we have your permission to put what you did in the official doc? (Assuming it's GPL v2)

Thanks in advance for your answer and best regards,

Yohann

Re: Compiling Mana Server with MySQL Support on Windows.

Posted: 01 Mar 2012, 05:18
by visaboy
Late but yes of course :)

Anything for open source projects!

Re: Compiling Mana Server with MySQL Support on Windows.

Posted: 05 Mar 2012, 07:50
by Bertram
Hi visaboy,

I must say I imported it (using my own sauce) some time ago, thanks anyway for pointing out. :)

Best regards,