[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
----- 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
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 :
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:
Now a window will pop up and you must type in some information:
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:
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 ? )
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 :
A window like this will appear :
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
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 :
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
Cheers,
Souleater