Project

General

Profile

SourceCode » History » Revision 4

Revision 3 (Andreas Schneider, 03/19/2017 11:18 AM) → Revision 4/5 (Andreas Schneider, 03/19/2017 02:34 PM)

h1. SourceCode 

 [[CentrED]]'s Source Code can be obtained via "Mercurial":https://www.mercurial-scm.org from https://hg.aksdb.de/CentrED. 
 The whole program has been developed using "FreePascal":http://www.freepascal.org and "Lazarus":http://www.lazarus-ide.org. Therefore both are required to compile the source. 

 h2. Cloning the repository 

 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. 

 <pre> 
 $ hg clone https://hg.aksdb.de/CentrED CentrED 
 </pre> 

 This command will create a directory named "CentrED" containing the said copy of the repository. 

 For further commands and more detailed descriptions on how Mercurial works, please refer to "Mercurial's Website":https://www.mercurial-scm.org. 

 h2. The directory structure 

 CentrED's source is divided into the following subdirectories. 

 <pre> 
 Client/ 
 Client/GLFont 
 Client/Overlay 
 Client/Tools 
 Imaging/ 
 MulProvider/ 
 Server/ 
 UOLib/ 
 Tools/ 
 bin/ 
 obj/ 
 </pre> 

 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. 

 @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). 

 @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. 

 Within @Server/@ are the Lazarus project and source files for strictly server related things. 

 @Tools/@ contains some helper programs used during development. 

 @bin/@ and @obj/@ are the target directories for the compile process of CentrED and cedserver. 

 h2. Compiling 

 h3. Requirements 

 You need the following tools and libraries to successfully build CentrED. 

 * "FreePascal":http://www.freepascal.org 3.0.2 or newer (usually included in Lazarus, see below) 
 * "Lazarus":http://www.lazarus-ide.org/ 1.6 or newer 
 * "lNet":http://wiki.lazarus.freepascal.org/lNet 0.6.5 (preferable from "SVN":http://svn.freepascal.org/svn/fpcprojects/lnet/trunk) 0.6 
 * MultiLog from "github":https://github.com/blikblum/multilog 
 * VirtualTreeView 5 and LCLExtensions from "github":https://github.com/blikblum/VirtualTreeView-Lazarus/releases 
 * LazOpenGLContext (which is bundled with Lazarus but has to be installed explicitly) 

 h3. Build Process 

 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/@.