[GUIDE] Downloading OsRose from SVN and Compiling the source

Guides for osRose and osiRose (compilation / setup)...

Moderators: osRose dev team, ospRose dev team, osiRose dev team, Moderators

[GUIDE] Downloading OsRose from SVN and Compiling the source

Postby rl2171 on Tue Aug 07, 2007 11:23 pm

[GUIDE] Downloading OsRose SVN Revisions and Compilng the source code by SoulEater

*******************************************************

April 10th Backup of the guide, might change it a bit afterwards =O

Hullo,

This guide's purpose is to show you lot how to retrieve an svn revision of osrose on Windows and then compile using Codeblocks, I might add some extra tips for server launching but due to the fact that there is Akai's mega guide for server setup I am not
promissing anything ^^

So let's get to business :D


----- Downloads -----

SVN client:
We'll be using Tortoisesvn as an SVN client to retrieve the revisions we want, so I'll ask you to download it from the page below:
http://tortoisesvn.net/downloads
You can choose between the 32bits or 64bits versions depending on your processor's architecture :-° You don't want to download something that won't work so make sure you know which version is compliant with your computer.
Compiler/libs:
To compile the source code into binary files we'll need a compiler ( really?! :p ), so here is the download page of Codeblocks,
the IDE we'll be using throughout this guide which will help us build our binaries pretty much easily: http://codeblocks.org/downloads.php
Make sure you download the version with MINGW compiler.
I am using Codeblocks because I am getting used to it and I find it quite handy, but this doesn't mean that it's the only IDE able to build osrose, you can also use Dev-C++ or Visual C++ Express edition ( the free one :p ) for instance ;)

We'll also need some libraries to successfully compile our source code, and here they are :
libmysql 5 : we'll download it once Codebocks is installed :D
pthread : here is the link to download this devpack : http://devpaks.org/details.php?devpak=118 .
You just put this away for now, I'll show you how to install these when you retrieve the svn revision


----- Retrieving OsRose SVN revision -----

Downloading Revision:
After you download Tortoise install it then restart your computer.
Now you've got to create a new folder anywhere you want on your computer ( you'd better not put it on your desktop :-°)
I named mine osRosesvn just like on this screenshot :
Image
So as to retrieve the revision we must make an SVN Checkout, so we'll just right click on our newly made folder and click on
SVN checkout, here is a screen shot to show you:
Image
Now a window will pop up and you must type in some information:
Image
In the URL of repository field you must type in osrose's svn repository, you can choose between the Branches or Trunk releases, knowing that the Branches releases are constantly updated because that's where osrose's develloppers do all their primary changes and tests, and on the other hand the Trunk releases are only updated when all the fixes and changes have been tested over and over for a more comfortable and stable work of osrose. However, here are the links towards these svn repositories :

1. Branches : https://opensvn.csie.org/osrose/Branches/
2. Trunk : https://opensvn.csie.org/osrose/Trunk/


Once you've made your choice on which repository you'll use, you can leave all the other fields as they are :) then click on OK.
An identification prompt may pop up but you just leave it blank and click again on OK, then wait while the files are downloaded then click on OK:
Image
Now now, it wasn't that hard, wasn't it ? :)

Updating revision:
There is nothing easier, all you've got to do is to right click on the folder where you have retrieved the past revision, click on SVN update and wait for tortoise to update it :)
Once you've done all these procedures successfully you can move on and compile the source code :)


----- Compiling the source code -----

After you download the Codeblocks setup, run it and install the IDE.
Now that we have Codeblocks on our computer, we're going to create a little folder somewhere and name it for example : orsvnbuild.
Then we'll copy the contents of the folder where we have retrieved the svn revision of osrose and paste them in this newly made folder :)
Now we'll delete all the .svn folders ( these are hidden folders, you must enable windows explorer to show them ) inside the orsvnbuild folder. There are about 14 .svn folders, each subfolder of orsvnbuild has one, they contain the data about the svn revision and we won't need them in our build folder ^^ ( too many folders around huh ? :D )
When all of the .svn folders are deleted from the "orsvnbuild" folder you won't see any green exclamation mark on any of the subfolders which means they can't be updated using tortoisesvn anymore, which suits us well because we already have a specific folder for svn retreival ( osRosesvn ).
Well all this folder story was only for organizing a little bit our working environment so as not to be confused ;)

Now we'll install libmysql 5, and to do so open up Codeblocks and go to Plugins > Dev-C++ Devpack updater/installer :
Image
A window like this will appear :
Image
Choose the second package server (devpaks.org Community Devpaks) and search in the list for libmysql 5 Devpack then right click on it and choose download & install, it will take a minute you'll just have to say ok ok ok to all of the prompts that appears ;)
Great then libmysql is installed now you'll need the pthread library, you'll just have to open the devpak you already downloaded with winrar and extract it, then you open the extracted file again with winrar and extract the contents ( pthreads folder ) somewhere. Now you'll open this folder and open the include subfolder and copy its contents ( several header files ;) ). Go to Codeblocks's include folder ( generally : C:\Program Files\CodeBlocks\include\ ) and paste in it the header files. Then you also got to copy the libpthreadGC.a file in pthread's lib folder, and paste it in Codeblocks's lib folder.
Okay now you're done setting up the libraries :-° Let's build some source code :D

The good thing about Codeblocks is that it can open Dev-C++ projects so we won't have to create our own CBPs (Codeblocks Project).
drauk was kind and gave us his own Dev-C++ projects so we'll just open them using CB. The projects are : LoginServer.dev, CharServer.dev and WorldServer.dev you MUST use the ones in orsvnbuild folder or either you would have been loosing your time organizing your folders :/
When the projects are open within Codeblocks you can see them as on the screen shot below :
Image
Right click on each one of them, one by one, and choose Build then wait a minute while the binaries are being built, if every thing is done alright and you have followed the steps I showed you before attentively, the source code would be successfully compiled and you can run the server =)

It's all for the moment I hope you find this guide useful, and don't forget I will add all the missing parts soon and maybe show
you how to retrieve the source code using svn and compile it on a Linux OS ( probably debian or an ubuntu ) now that osrose is
probably going to be linux compliant :D

Cheers,
Souleater
Image
rl2171
Admin
Admin
 
Posts: 1706
Joined: Mon Aug 06, 2007 5:17 pm
Location: Sacramento, CA USA - GMT-8

Re: [GUIDE] Downloading OsRose from SVN and Compiling the source

Postby devotion on Sat Sep 15, 2007 1:12 pm

ow can u help me at this part..?i cant understand it... i hope u can help me.. thnx a lot.. can u post a screenshot...? thnx
Great then libmysql is installed now you'll need the pthread library, you'll just have to open the devpak you already downloaded with winrar and extract it, then you open the extracted file again with winrar and extract the contents ( pthreads folder ) somewhere. Now you'll open this folder and open the include subfolder and copy its contents ( several header files ;) ). Go to Codeblocks's include folder ( generally : C:\Program Files\CodeBlocks\include\ ) and paste in it the header files. Then you also got to copy the libpthreadGC.a file in pthread's lib folder, and paste it in Codeblocks's lib folder.
Okay now you're done setting up the libraries :-° Let's build some source code :D

The good thing about Codeblocks is that it can open Dev-C++ projects so we won't have to create our own CBPs (Codeblocks Project).
More Power OsRose ^_^...
User avatar
devotion
Jelly Bean
Jelly Bean
 
Posts: 14
Joined: Thu Aug 09, 2007 2:45 am

Re: [GUIDE] Downloading OsRose from SVN and Compiling the source

Postby Souleater on Sun Sep 16, 2007 1:43 pm

Here, I've made a .rar archive with the pthreads files ready to go.

Pthreads Lib

Now all you gotta do is skip the devpak extract and re-extract part, and proceed to the copy paste part ;-)
Image
Souleater
Antares
Antares
 
Posts: 355
Joined: Thu Aug 09, 2007 10:59 pm

Re: [GUIDE] Downloading OsRose from SVN and Compiling the source

Postby devotion on Sun Sep 16, 2007 10:46 pm

im still really confused..

when i open the worldserver.devs loginserver.dev, charserver.dev... i got this msg...

1.JPG


and when i click one of it the CB closes....


btw THANKS Souleater
More Power OsRose ^_^...
User avatar
devotion
Jelly Bean
Jelly Bean
 
Posts: 14
Joined: Thu Aug 09, 2007 2:45 am

Re: [GUIDE] Downloading OsRose from SVN and Compiling the source

Postby Souleater on Wed Sep 19, 2007 6:11 pm

You choose GNU GCC compiler ;) I thought I've mentioned it in the guide though :o maybe not in this version :roll:
Image
Souleater
Antares
Antares
 
Posts: 355
Joined: Thu Aug 09, 2007 10:59 pm

Re: [GUIDE] Downloading OsRose from SVN and Compiling the source

Postby Jvd on Sun Sep 30, 2007 5:44 pm

Souleater wrote:Here, I've made a .rar archive with the pthreads files ready to go.

Pthreads Lib

Now all you gotta do is skip the devpak extract and re-extract part, and proceed to the copy paste part ;-)


can you upload it somewhere else please, i have to wait 500 hours to download it -_-
Im stuck at the same part where devotion was, line: Great then libmysql is installed now you'll need the pthread library..
i cant seem to find this, and also the libmysql 5 was broken, atleast thats what a error said. i could still install it but i dont know where to find the devpack which ive downloaded..

you'll just have to open the devpak you already downloaded with winrar and extract it, then you open the extracted file again with winrar and extract the contents ( pthreads folder )

Where is this?
Jvd
Smoulie
Smoulie
 
Posts: 51
Joined: Tue Sep 25, 2007 3:53 pm

Re: [GUIDE] Downloading OsRose from SVN and Compiling the source

Postby Jvd on Sun Sep 30, 2007 6:44 pm

Ok i had to extract some things now it almost works,
but now, when i try to Build it says: ld.exe cannot find -lmysql
how do i fix this?
It says this:

Project : WorldServer
Compiler : GNU GCC Compiler (called directly)
Directory : C:\Documents and Settings\Nanko van dijk\Mijn documenten\Rose online server dingen\osRose Spullen\orsvnbuild\Binary\
--------------------------------------------------------------------------------
Switching to target: default
Linking console executable: C:\Documents and Settings\Nanko van dijk\Mijn documenten\Rose online server dingen\osRose Spullen\orsvnbuild\Binary\WorldServer.exe
C:\Program Files\CodeBlocks\bin\..\lib\gcc\mingw32\3.4.4\..\..\..\..\mingw32\bin\ld.exe: cannot find -lmysql
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 1 seconds)
1 errors, 0 warnings
Jvd
Smoulie
Smoulie
 
Posts: 51
Joined: Tue Sep 25, 2007 3:53 pm

Re: [GUIDE] Downloading OsRose from SVN and Compiling the source

Postby lmame on Mon Oct 01, 2007 3:32 am

Did you install the myssql lib for devc++ as told in the tutorial?
The world is full of love and peace ^_^
Image
User avatar
lmame
Admin
Admin
 
Posts: 8997
Joined: Mon Aug 06, 2007 4:42 pm
Location: July City

Re: [GUIDE] Downloading OsRose from SVN and Compiling the source

Postby Jvd on Mon Oct 01, 2007 8:20 am

yea i followed every step in the tutorial, but first when i tried to build it said that it couldnt find mysql/mysql.h files, because there was no map called mysql.
so i made 1, and then it worked, but now i have this.. :(
Jvd
Smoulie
Smoulie
 
Posts: 51
Joined: Tue Sep 25, 2007 3:53 pm

Re: [GUIDE] Downloading OsRose from SVN and Compiling the source

Postby Jvd on Mon Oct 01, 2007 9:47 am

ok i reinstalled codeblocks and refollowed the tutorial, and i think it works now!
Jvd
Smoulie
Smoulie
 
Posts: 51
Joined: Tue Sep 25, 2007 3:53 pm

Next

Return to osRose / osiRose Guides

Who is online

Users browsing this forum: No registered users and 4 guests