Compiling Mana Server with MySQL Support on Windows.

Ask for help regarding any technical issue or report any bug or OS independent issues.
Post Reply
User avatar
visaboy
Peon
Peon
Posts: 29
Joined: 09 Jan 2011, 06:19

Compiling Mana Server with MySQL Support on Windows.

Post 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!
Last edited by visaboy on 01 Mar 2012, 05:19, edited 1 time in total.
“If it moves, fondle it - except porcupines, ball lightning, and policemen” :)
Ablu
Manasource
Manasource
Posts: 288
Joined: 23 Jul 2011, 08:31
Location: Germany

Re: Compiling Mana Server with MySQL Support on Windows.

Post 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
User avatar
Bertram
Manasource
Manasource
Posts: 1026
Joined: 07 Sep 2004, 14:55
Location: France

Re: Compiling Mana Server with MySQL Support on Windows.

Post 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
User avatar
visaboy
Peon
Peon
Posts: 29
Joined: 09 Jan 2011, 06:19

Re: Compiling Mana Server with MySQL Support on Windows.

Post by visaboy »

Late but yes of course :)

Anything for open source projects!
“If it moves, fondle it - except porcupines, ball lightning, and policemen” :)
User avatar
Bertram
Manasource
Manasource
Posts: 1026
Joined: 07 Sep 2004, 14:55
Location: France

Re: Compiling Mana Server with MySQL Support on Windows.

Post by Bertram »

Hi visaboy,

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

Best regards,
Post Reply