Project

General

Profile

SourceCode » History » Version 2

Andreas Schneider, 12/08/2009 03:13 PM
Updated VirtualTreeview SVN link

1 1 Andreas Schneider
h1. SourceCode
2
3
[[CentrED]]'s Source Code can be obtained via "Mercurial":http://mercurial.selenic.com/ from http://hg.aksdb.de/CentrED.
4
The whole program has been developed using "FreePascal":http://www.freepascal.org and "Lazarus":http://www.lazarus.freepascal.org. Therefore both are required to compile the source.
5
6
h2. Cloning the repository
7
8
The act of getting the source code for the first time is refered to as *clone*. This will copy the whole repository with all past revisions, their log entries, etc. to your local drive. You can commit new changes anytime to your local copy without interfering with the official repository.
9
10
<pre>
11
$ hg clone http://hg.aksdb.de/CentrED CentrED
12
</pre>
13
14
This command will create a directory named "CentrED" containing the said copy of the repository.
15
16
For further commands and more detailed descriptions on how Mercurial works, please refer to "Mercurial's Website":http://mercurial.selenic.com/.
17
18
h2. The directory structure
19
20
CentrED's source is divided into the following subdirectories.
21
22
<pre>
23
Client/
24
Client/GLFont
25
Client/Overlay
26
Client/Tools
27
Imaging/
28
MulProvider/
29
Server/
30
UOLib/
31
Tools/
32
bin/
33
obj/
34
</pre>
35
36
The directory @Client/@ contains the Lazarus project as well as the strictly client related source files. It also houses the subdirectories @GLFont@ which holds the bitmap font used to display characters in OpenGL, @Overlay@ which contains graphics for additional on-screen elements and @Tools@ which contains the dialogs and their source for the map and statics manipulating commands.
37
38
@Imaging/@ contains a slightly modified copy of the "Vampyre Imaging Library":http://imaginglib.sourceforge.net by _Marek Mauder_. It contains classes to load several different graphics formats, manipulate them and convert them into OpenGL textures at runtime (plus several features more, that aren't used within CentrED however).
39
40
@MulProvider/@ and @UOLib/@ contain code specific to the UO data files for reading as well as writing them. The map and statics related classes however also contain extensions to support easier management of these tiles within the UI.
41
42
Within @Server/@ are the Lazarus project and source files for strictly server related things.
43
44
@Tools/@ contains some helper programs used during development.
45
46
@bin/@ and @obj/@ are the target directories for the compile process of CentrED and cedserver.
47
48
h2. Compiling
49
50
h3. Requirements
51
52
You need the following tools and libraries to successfully build CentrED.
53
54
* "FreePascal":http://www.freepascal.org 2.4.0
55
* "Lazarus":http://www.lazarus.freepascal.org 0.9.28.2 or better yet a snapshot or SVN checkout
56
* "lNet":http://wiki.lazarus.freepascal.org/lNet 0.6
57
* "MultiLog":http://code.google.com/p/luipack/wiki/MultiLog from "SVN":http://luipack.googlecode.com/svn/trunk/multilog
58
* "LCLExtensions":http://code.google.com/p/luipack/wiki/LCLExtensions from "SVN":http://luipack.googlecode.com/svn/trunk/lclextensions
59 2 Andreas Schneider
* "VirtualTreeview":http://code.google.com/p/luipack/wiki/VirtualTreeview from "SVN":https://lazarus-ccr.svn.sourceforge.net/svnroot/lazarus-ccr/components/virtualtreeview-new/trunk
60 1 Andreas Schneider
* OpenGLContext (which is bundled with Lazarus but has to be installed explicitly)
61
62
h3. Build Process
63
64
The build process mainly includes opening the according project file (@Client/CentrED.lpi@ or @Server/cedserver.lpi@) with Lazarus and hit *Compile* (and/or *Run*). If all previously mentioned libraries are installed correctly that should already produce a working executable in @bin/@.
65
66
Additionally you need the @CentrED.dat@ to start the client. You can either obtain it from a released version or build it yourself. To build it yourself you have to compile the _ResourceBuilder_ first.
67
68
<pre>
69
$ fpc -XX -CX -Xs -FUobj -FEbin ResourceBuilder.pas
70
$ cd Client
71
$ ../bin/ResourceBuilder ResourceList.txt ../bin/CentrED.dat
72
</pre>