Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
blob: bd19ec997479712f4210a5ce32fea97d74ef3414 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
	<meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
	<meta name="keywords" content="osirion, free, game, space, trade, combat, freelancer, privateer, opengl, radiant, gpl, creative commons">
	<link rel="stylesheet" type="text/css" href="osirion.css">
	<link rel="icon" type="image/png" href="http://osirion.org/icon.png">
	<title>Project::OSiRiON - Building from source code</title>
</head>

<body>
<div id="page">

<!-- header and menu ======================================= -->

<table class = "osirionmenu" width="100%" cellpadding="0" cellspacing="0"  border="0">
<tr>
	<td>
		<a href="http://osirion.org"><img class="osirionmenu" src="images/banner.png" alt="Project::OSiRiON"></a>
	</td>
</tr><tr>
	<td class="osirionmenu">
		<a class="osirionmenu" href="http://osirion.org/">News</a> .
		<a class="osirioncurrent" href="index.html">Documentation</a> .
		<a class="osirionmenu" href="http://osirion.org/index.php?page=screenshots">Screenshots</a> .
		<a class="osirionmenu" href="http://osirion.org/index.php?page=downloads">Downloads</a> .
		<a class="osirionmenu" href="http://osirion.org/forum/">Forum</a> .
		<a class="osirionmenu" href="http://osirion.org/wiki/">Wiki</a> .
		<a class="osirionmenu" href="http://osirion.org/tracker/">Tracker</a>
	</td>
</tr>
</table>

<div id="pagecontent">

<div class="content">

<h1 class="content">Building from source code</h1>

<p class="content">
	To build Project::OSiRiON from source code you need a working C++ compiler
	and have the necessary libraries and header files installed. 
	The official binaries are compiled with gcc on linux, and mingw on windows.
</p>
<ul class="content">
	<li class="content"><a href="#requirements">Requirements</a>
	<li class="content"><a href="#building_ubuntu">Building on Ubuntu Linux</a>
	<li class="content"><a href="#building_windows">Building on Windows</a>
	<li class="content"><a href="#building_bullet">Builiding the Bullet physics library</a>
	<li class="content"><a href="#download_source">Obtaining the source code</a>
	<li class="content"><a href="#configure">Configuring the source code</a>
	<li class="content"><a href="#building">Building the binaries</a>
	<li class="content"><a href="#download_data">Obtaining the game data</a>
	<li class="content"><a href="#running">Running</a>
</ul>

</div> <!-- div content -->

<!-- System requirements =================================== -->

<Div class="content">

<h2 class="content" id="requirements">Requirements</h2>

<p class="content">
	The following packages are required to build the the dedicated server: 
</p>
<ul class="content">
	<li class="content">zlib
	<li class="content"><a href="http://www.bulletphysics.com/">Bullet physics library</a>
	<li class="content">ncurses or pdcurses (optional) 
</ul>
<p class="content">
	Additionally, the client requires:
</p>
<ul class="content">
	<li class="content">libjpeg 
	<li class="content">libpng 
	<li class="content">libSDL 1.2 
	<li class="content">OpenGL 
	<li class="content">OpenAL or OpenAL Soft 
	<li class="content">Ogg Vorbis
</ul>
<p class="content">
	You will also need gcc, GNU make, automake and libtool.
</p>

</div> <!-- div content -->

<!-- Building on Ubuntu Linux ============================== -->

<div class="content">

<h2 class="content" id="building_ubuntu">Building on Ubuntu Linux</h2>

<p class="content">
	To build the game on Ubuntu, you can install the required tools and dependencies by running the following commands in a terminal window:
</p>
<pre class="content">
sudo su -
apt-get install autoconf automake libtool subversion
apt-get install libjpeg8 libjpeg8-dev
apt-get install libpng3 libpng3-dev
apt-get install libvorbisfile3 libvorbis-dev
apt-get install libglu1-mesa-dev
apt-get install libopenal1 libopenal-dev
apt-get install libsdl1.2debian libsdl1.2-dev
</pre>

<p class="content"></p>

</div> <!-- div content -->

<!-- Building on Windows =================================== -->

<div class="content">

<h2 class="content" id="building_windows">Building on Windows</h2>

<p class="content">
	You can build the game on windows using a MinGW/MSYS environment. You can use
	the instructions in <a href="http://ingar.satgnu.net/devenv/mingw32/">this document</a>
	to create a complete environment, capable of building the Project::OSiRiON source code. 
</p>
<p>
	Note that the current win32 build environment uses <span class="fixed">/local32</span> instead of
	<span class="fixed">/usr/local</span>. Edit the building instructions accordingly.

</div> <!-- div content -->

<!-- Building the Bullet physics library =========================== -->

<div class="content">

<h2 class="content" id="building_bullet">Building the Bullet physics library</h2>

<p class="content">
	The engine uses the <a href="http://www.bulletphysics.com/">Bullet Physics Library</a>
	for physics support. You can download the bullet source code here:
	<ul class="content">
		<li class="content"><a href="http://code.google.com/p/bullet/downloads/list">http://code.google.com/p/bullet/downloads/list</a>
	</ul>
</p>
<p class="content">
	To download and install the library:
</p>
<pre class="content">
wget http://bullet.googlecode.com/files/bullet-2.81-rev2613.tgz
tar zxvf bullet-2.81-rev2613.tgz
cd bullet-2.81-rev2613
./autogen.sh
./configure --prefix=/usr/local --disable-demos
make
sudo make install
cd ..
</pre>
<p class="content">
	If you do not want to install bullet in <span class="fixed">/usr/local</span>,
	you can edit the <span class="fixed">--prefix</span> option here.
	Edit the the <span class="fixed">--with-bullet</span> option
	when configuring the Project::OSiRiON source code accordingly.
</p>
<p class="content">
	It is recommended you use this specific version of the library, 
	physics behaviour could be different in other versions.
</p>

</div> <!-- div content -->

<!-- Obtaining the source code ===================================== -->

<div class="content">

<h2 class="content" id="download_source">Obtaining the source code</h2>

<p class="content">
	Download the source package from the website:
</p>
<ul class="content">
	<li class="content"><a href="http://osirion.org/files/osirion-latest-src.tar.bz2">osirion-latest-src.tar.bz2</a>
</ul>
<p class="content">
	Unzip the package into a directory of your liking and enter the new directory:
</p>
<div class="fixed">
	wget http://osirion.org/files/osirion-0.2.2-svn1195-src.tar.bz2<br>
	tar jxf osirion-0.2.2-svn1195-src.tar.bz2<br>
	cd osirion-0.2.2-svn1195-src<br>
</div>

<p class="content"></p>

</div> <!-- div content -->

<!-- Configuring the source code =================================== -->

<div class="content">

<h2 class="content" id="configure">Configuring the source code</h2>

<p class="content">
	Enter the new directory and configure the source code:
</p>
<pre class="content">
./configure --with-bullet=/usr/local --enable-static-bullet
</pre>
<p class="content">
	If you do not need the client and want to build the dedicated server only you can pass 
	the <span class="fixed">--without-client</span> option to configure:
</p>
<pre class="content">
./configure --with-bullet=/usr/local --enable-static-bullet --without-client
</pre>
<p class="content">
	If configure finds ncurses or pdcurses, the dedicated server will use this library and a have a curses console.
	To disable curses detection, pass the <span class="fixed">--without-curses</span> option to configure. 
</p>
<pre class="content">
./configure --with-bullet=/usr/local --enable-static-bullet --without-client --without-curses
</pre>
<p class="content">
	You can use the <span class="fixed">--help</span> option to get a list of all available options: 
</p>
<pre class="content">
./configure --help
</pre>

<p class="content"></p>

</div> <!-- div content -->

<!-- Building the binaries ========================================== -->

<div class="content">

<h2 class="content" id="building">Building the binaries</h2>
<p class="content">
	Compile the source code:
</p>
<pre class="content">
make
</pre>
<p class="content">
	The binaries will be built in the <span class="fixed">src/</span> subdirectory of the main distribution.
</p>
<p class="content">
	<b>Important</b>: <span class="fixed">make install</span> is not supported. Results are unpredictable.
</p>

</div> <!-- div content -->

<!-- Obtaining the game data ======================================= -->

<div class="content">

<h2 class="content" id="download_data">Obtaining the game data</h2>

<p class="content">
	Download the game data package from the website:
</p>
<ul class="content">
	<li class="content"><a href="http://osirion.org/files/osirion-latest-data.zip">osirion-latest-data.zip</a>
</ul>
<p class="content">
	Unzip the package into the osirion directory. 
	The game data should be located in the <span class="fixed">data/</span> subdirectory of the main distribution.
</p>

</div> <!-- div content -->

<!-- Running ======================================================= -->

<div class="content">

<h2 class="content" id="running">Running</h2>

<p class="content">
	The client and the dedicated server will look for game data in the <span class="fixed">data</span> subdirectory 
	of the current working directory. Since the binaries are build in the <span class="fixed">src</span> you will
	have start them with the <span class="fixed">src/</span> prefix.
</p>
<p class="content">
	To start the client:
</p>
<pre class="content">
src/osirion
</pre>
<p class="content">
	If the client opens a new window and immediatly close it again, it probably could not find
	the game data and exited. Check your installation.
</p>
<p class="content">
	To start the dedicated server:
</p>
<pre class="content">
src/osiriond
</pre>
<p class="content">
	If you are using windows, the binaries will be called <span class="fixed">osirion.exe</span> and <span class="fixed">osiriond.exe</span>.
</p>

</div> <!-- div content -->

<!-- footer ================================================ -->

</div> <!-- div pagecontent -->

<div id="pagefooter">

<div class="floatright">
	<a href="http://validator.w3.org/check?uri=referer">
	<img src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01 Strict" height="31" width="88">		
	</a>
</div>
<p>
	Copyright &copy; 2007-2012 Project::OSiRiON
</p>
</div>

</div>
</body>

</html>