Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100755 453 lines (383 sloc) 11.533 kb
817c9a5 Joshua Roesslein Initial commit!
joshthecoder authored
1 #!/bin/bash
2
3 set -e
4
2e5afad Erik Ogenvik Restructure the directories.
erikogenvik authored
5 export HAMMERDIR=$PWD
6 export WORKDIR=$HAMMERDIR/work
7 export PREFIX=$WORKDIR/local
8 export SOURCE=$WORKDIR/build/worldforge
9 export DEPS_SOURCE=$WORKDIR/build/deps
d3c089f Joshua Roesslein Removed the make -s option. Doesn't help any.
joshthecoder authored
10 export MAKEOPTS="-j3"
355bf65 Erik Ogenvik Include the original PKG_CONFIG_PATH as well.
erikogenvik authored
11 export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH
a0d9f19 Joshua Roesslein arch --> uname
joshthecoder authored
12 export BUILDDIR=`uname -m`
2806726 Joshua Roesslein Applying patch from Erik.
joshthecoder authored
13
4ffe0b3 Joshua Roesslein Minor fixes.
joshthecoder authored
14 # setup directories
15 mkdir -p $PREFIX
16 mkdir -p $DEPS_SOURCE
dde0cd5 Joshua Roesslein Bump ogre version.
joshthecoder authored
17 mkdir -p $SOURCE
4ffe0b3 Joshua Roesslein Minor fixes.
joshthecoder authored
18
477df2d Joshua Roesslein Added logging build output to files.
joshthecoder authored
19 # Log Directory
2e5afad Erik Ogenvik Restructure the directories.
erikogenvik authored
20 LOGDIR=$WORKDIR/logs
477df2d Joshua Roesslein Added logging build output to files.
joshthecoder authored
21 mkdir -p $LOGDIR
22
23 # Output redirect logs
819925a Joshua Roesslein Added logging for dependency install.
joshthecoder authored
24 AUTOLOG=autogen.log # Autogen output
25 CONFIGLOG=config.log # Configure output
26 MAKELOG=build.log # Make output
27 INSTALLLOG=install.log # Install output
477df2d Joshua Roesslein Added logging build output to files.
joshthecoder authored
28
bdb8ced Joshua Roesslein Added clean command to delete build files.
joshthecoder authored
29 # Dependencies
9b1790d Erik Ogenvik Bumped Ogre and CEGUI versions.
erikogenvik authored
30 CEGUI=CEGUI-0.7.5
31 CEGUI_DOWNLOAD=CEGUI-0.7.5.tar.gz
561660c Erik Ogenvik Bump Ogre version.
erikogenvik authored
32 OGRE=ogre_1_7_3
33 OGRE_DOWNLOAD=ogre_src_v1-7-3.tar.bz2
bdb8ced Joshua Roesslein Added clean command to delete build files.
joshthecoder authored
34
a7f75ad Erik Ogenvik Various fixes for getting it to compile on mingw.
erikogenvik authored
35 CONFIGURE_EXTRA_FLAGS=""
e517660 Erik Ogenvik Upgrade to Ogre 1.7.1 and CEGUI 0.7.1. Note that this haven't been tried
erikogenvik authored
36 CMAKE_EXTRA_FLAGS=""
a7f75ad Erik Ogenvik Various fixes for getting it to compile on mingw.
erikogenvik authored
37
53db09a Peter Szücs Add *FLAGS protection for freeimage build.
sajty authored
38 if [[ x$MSYSTEM = x"MINGW32" && $1 != "install-deps" ]] ; then
a7f75ad Erik Ogenvik Various fixes for getting it to compile on mingw.
erikogenvik authored
39 export CONFIGURE_EXTRA_FLAGS="--enable-shared --disable-static"
7122ce8 Peter Szücs Link CEGUILuaScriptModule statically.
sajty authored
40 export CXXFLAGS="-O2 -msse2 -mthreads -DBOOST_THREAD_USE_LIB -DCEGUILUA_EXPORTS $CXXFLAGS"
929ef75 Peter Szücs Use same build settings for wf and deps.
sajty authored
41 export PATH="$PREFIX/bin:$PATH"
42 export CPATH="$PREFIX/include:$CPATH"
43 export LIBRARY_PATH="$PREFIX/lib:$LIBRARY_PATH"
44 export LD_LIBRARY_PATH="$PREFIX/lib:$LD_LIBRARY_PATH"
45 export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:/usr/local/lib/pkgconfig:/mingw/lib/pkgconfig:/lib/pkgconfig:$PKG_CONFIG_PATH"
a7f75ad Erik Ogenvik Various fixes for getting it to compile on mingw.
erikogenvik authored
46 fi
47
48
817c9a5 Joshua Roesslein Initial commit!
joshthecoder authored
49 function buildwf()
50 {
e76feb2 Peter Szücs Add WebEmber build support.
sajty authored
51 if [ x"$2" = x"" ]; then
52 PRJNAME="$1"
53 else
54 PRJNAME="$2"
55 fi
56
57 mkdir -p $LOGDIR/$PRJNAME
477df2d Joshua Roesslein Added logging build output to files.
joshthecoder authored
58
2e5afad Erik Ogenvik Restructure the directories.
erikogenvik authored
59 cd $SOURCE/$1
2806726 Joshua Roesslein Applying patch from Erik.
joshthecoder authored
60 if [ ! -f "configure" ] ; then
61 echo " Running autogen..."
e76feb2 Peter Szücs Add WebEmber build support.
sajty authored
62 NOCONFIGURE=1 ./autogen.sh > $LOGDIR/$PRJNAME/$AUTOLOG
2806726 Joshua Roesslein Applying patch from Erik.
joshthecoder authored
63 fi
64
65 mkdir -p $BUILDDIR
66 cd $BUILDDIR
f411aca Joshua Roesslein Added ability to select build target.
joshthecoder authored
67 if [ ! -f "Makefile" ] ; then
355bf65 Erik Ogenvik Include the original PKG_CONFIG_PATH as well.
erikogenvik authored
68 echo " Running configure..."
e76feb2 Peter Szücs Add WebEmber build support.
sajty authored
69 ../configure --prefix=$PREFIX $CONFIGURE_EXTRA_FLAGS > $LOGDIR/$PRJNAME/$CONFIGLOG
f411aca Joshua Roesslein Added ability to select build target.
joshthecoder authored
70 fi
477df2d Joshua Roesslein Added logging build output to files.
joshthecoder authored
71
1fa95d8 Joshua Roesslein Added a few echoes in buildwf.
joshthecoder authored
72 echo " Building..."
e76feb2 Peter Szücs Add WebEmber build support.
sajty authored
73 make $MAKEOPTS > $LOGDIR/$PRJNAME/$MAKELOG
1fa95d8 Joshua Roesslein Added a few echoes in buildwf.
joshthecoder authored
74 echo " Installing..."
e76feb2 Peter Szücs Add WebEmber build support.
sajty authored
75 make install > $LOGDIR/$PRJNAME/$INSTALLLOG
817c9a5 Joshua Roesslein Initial commit!
joshthecoder authored
76 }
77
2806726 Joshua Roesslein Applying patch from Erik.
joshthecoder authored
78 function checkoutwf()
79 {
e76feb2 Peter Szücs Add WebEmber build support.
sajty authored
80 if [ x"$2" = x"" ]; then
81 USER="worldforge"
82 else
83 USER="$2"
84 fi
85 if [ x"$3" = x"" ]; then
86 BRANCH="master"
87 else
88 BRANCH="$3"
89 fi
2806726 Joshua Roesslein Applying patch from Erik.
joshthecoder authored
90 if [ ! -d $1 ]; then
e76feb2 Peter Szücs Add WebEmber build support.
sajty authored
91 git clone git://github.com/$USER/$1.git -b $BRANCH
2806726 Joshua Roesslein Applying patch from Erik.
joshthecoder authored
92 else
e76feb2 Peter Szücs Add WebEmber build support.
sajty authored
93 cd $1 && git remote set-url origin git://github.com/$USER/$1.git && git fetch && git rebase origin/$BRANCH && cd ..
2806726 Joshua Roesslein Applying patch from Erik.
joshthecoder authored
94 fi
95 }
96
87b9c57 Joshua Roesslein Added cyphesis support.
joshthecoder authored
97 function cyphesis_post_install()
98 {
99 cd $PREFIX/bin
100
101 # Rename real cyphesis binary to cyphesis.bin
102 mv cyphesis cyphesis.bin
103
104 # Install our cyphesis.in script as cyphesis
105 cp $HAMMERDIR/cyphesis.in cyphesis
106 chmod +x cyphesis
107 }
108
71810f9 Joshua Roesslein Added help command that will display help text.
joshthecoder authored
109 function show_help()
110 {
111 if [ $1 = "main" ] ; then
112 echo "Script for automating the process of installing dependencies"
87b9c57 Joshua Roesslein Added cyphesis support.
joshthecoder authored
113 echo "and compiling Worldforge in a self contained environment."
71810f9 Joshua Roesslein Added help command that will display help text.
joshthecoder authored
114 echo ""
115 echo "Usage: hammer.sh <command> <arguments>"
116 echo "Commands:"
117 echo " install-deps - install all 3rd party dependencies"
118 echo " checkout - fetch worldforge source (libraries, clients)"
119 echo " build - build the sources and install in environment"
bdb8ced Joshua Roesslein Added clean command to delete build files.
joshthecoder authored
120 echo " clean - delete build directory so a fresh build can be performed"
71810f9 Joshua Roesslein Added help command that will display help text.
joshthecoder authored
121 echo ""
122 echo "For more help, type: hammer.sh help <command>"
123 elif [ $1 = "install-deps" ] ; then
124 echo "Install all 3rd party dependencies into build environment."
125 echo ""
126 echo "Usage: hammer.sh install-deps <dependency to install>"
127 echo "Dependencies Available:"
128 echo " all - install all dependencies listed below"
129 echo " cegui - a free library providing windowing and widgets for
130 graphics APIs / engines"
131 echo " ogre - 3D rendering engine"
07b40e1 Erik Ogenvik Updated help texts.
erikogenvik authored
132 echo "Hint: build ogre first then cegui"
71810f9 Joshua Roesslein Added help command that will display help text.
joshthecoder authored
133 elif [ $1 = "checkout" ] ; then
134 echo "Fetch latest source code for worldforge libraries and clients."
135 echo ""
136 echo "Usage: hammer.sh checkout"
137 elif [ $1 = "build" ] ; then
138 echo "Build the sources and install in environment."
139 echo ""
da7cd4e Joshua Roesslein Added support for passing in make options.
joshthecoder authored
140 echo "Usage: hammer.sh build <target> \"<makeopts>\""
71810f9 Joshua Roesslein Added help command that will display help text.
joshthecoder authored
141 echo "Available targets:"
142 echo " libs - build libraries only"
143 echo " ember - build ember only"
87b9c57 Joshua Roesslein Added cyphesis support.
joshthecoder authored
144 echo " cyphesis - build cyphesis server only"
da7cd4e Joshua Roesslein Added support for passing in make options.
joshthecoder authored
145 echo "makeopts [optional] - options to pass into make"
71810f9 Joshua Roesslein Added help command that will display help text.
joshthecoder authored
146 echo ""
147 echo "Hint: after a checkout use 'all'. To rebuild after changing code"
148 echo "only in Ember, use 'ember'. Will build much quicker!"
bdb8ced Joshua Roesslein Added clean command to delete build files.
joshthecoder authored
149 elif [ $1 = "clean" ] ; then
150 echo "Clean out build files of a project."
151 echo ""
152 echo "Usage: hammer.sh clean <target>"
153 echo "Targets:"
154 echo " cegui, ogre, libs/<name>, clients/<name>, servers/<name>"
71810f9 Joshua Roesslein Added help command that will display help text.
joshthecoder authored
155 else
156 echo "No help page found!"
157 fi
158 }
159
160 # Show main help page if no arguments given
161 if [ $# -eq 0 ] ; then
162 show_help "main"
163
164 # If help command given, show help page
165 elif [ $1 = "help" ] ; then
166 if [ $# -eq 2 ] ; then
167 show_help $2
168 else
169 show_help "main"
170 fi
2806726 Joshua Roesslein Applying patch from Erik.
joshthecoder authored
171
817c9a5 Joshua Roesslein Initial commit!
joshthecoder authored
172 mkdir -p $PREFIX $SOURCE $DEPS_SOURCE
173
174 # Dependencies install
71810f9 Joshua Roesslein Added help command that will display help text.
joshthecoder authored
175 elif [ $1 = "install-deps" ] ; then
d17af5a Peter Szücs Call the script for install-deps with MINGW.
sajty authored
176 if [ x$MSYSTEM = x"MINGW32" ] ; then
177 SCRIPTDIR=`dirname "$0"`
178 $SCRIPTDIR/mingw_install_deps.sh
179 exit 0
180 fi
fb61b3f Joshua Roesslein Updated Ogre. Added parameter checks.
joshthecoder authored
181 if [ $# -ne 2 ] ; then
182 echo "Missing required parameter!"
183 show_help "install-deps"
184 exit 1
185 fi
186
817c9a5 Joshua Roesslein Initial commit!
joshthecoder authored
187 echo "Installing deps..."
188
819925a Joshua Roesslein Added logging for dependency install.
joshthecoder authored
189 # Create deps log directory
190 mkdir -p $LOGDIR/deps
191
817c9a5 Joshua Roesslein Initial commit!
joshthecoder authored
192 # Ogre3D
193 if [ $2 = "all" ] || [ $2 = "ogre" ] ; then
194 echo " Installing Ogre..."
819925a Joshua Roesslein Added logging for dependency install.
joshthecoder authored
195 mkdir -p $LOGDIR/deps/ogre
817c9a5 Joshua Roesslein Initial commit!
joshthecoder authored
196 cd $DEPS_SOURCE
bdb8ced Joshua Roesslein Added clean command to delete build files.
joshthecoder authored
197 if [ ! -d $OGRE ]; then
819925a Joshua Roesslein Added logging for dependency install.
joshthecoder authored
198 echo " Downloading..."
bdb8ced Joshua Roesslein Added clean command to delete build files.
joshthecoder authored
199 wget -c http://downloads.sourceforge.net/sourceforge/ogre/$OGRE_DOWNLOAD
200 mkdir -p $OGRE
201 cd $OGRE
202 tar -xjf ../$OGRE_DOWNLOAD
1b99135 Joshua Roesslein Fixes for errors during testing.
joshthecoder authored
203 fi
e517660 Erik Ogenvik Upgrade to Ogre 1.7.1 and CEGUI 0.7.1. Note that this haven't been tried
erikogenvik authored
204 cd $DEPS_SOURCE/$OGRE/`ls $DEPS_SOURCE/$OGRE`
2806726 Joshua Roesslein Applying patch from Erik.
joshthecoder authored
205 mkdir -p $BUILDDIR
206 cd $BUILDDIR
819925a Joshua Roesslein Added logging for dependency install.
joshthecoder authored
207 echo " Configuring..."
a7f75ad Erik Ogenvik Various fixes for getting it to compile on mingw.
erikogenvik authored
208 OGRE_EXTRA_FLAGS=""
e517660 Erik Ogenvik Upgrade to Ogre 1.7.1 and CEGUI 0.7.1. Note that this haven't been tried
erikogenvik authored
209 cmake .. -DCMAKE_INSTALL_PREFIX="$PREFIX" -DOGRE_BUILD_SAMPLES=false $OGRE_EXTRA_FLAGS $CMAKE_EXTRA_FLAGS > $LOGDIR/deps/ogre/$CONFIGLOG
819925a Joshua Roesslein Added logging for dependency install.
joshthecoder authored
210 echo " Building..."
211 make $MAKEOPTS > $LOGDIR/deps/ogre/$MAKELOG
212 echo " Installing..."
213 make install > $LOGDIR/deps/ogre/$INSTALLLOG
817c9a5 Joshua Roesslein Initial commit!
joshthecoder authored
214 echo " Done."
215 fi
216
e517660 Erik Ogenvik Upgrade to Ogre 1.7.1 and CEGUI 0.7.1. Note that this haven't been tried
erikogenvik authored
217 # CEGUI
218 if [ $2 = "all" ] || [ $2 = "cegui" ] ; then
219 echo " Installing CEGUI..."
220 mkdir -p $LOGDIR/deps/CEGUI # create CEGUI log directory
221 cd $DEPS_SOURCE
222 if [ ! -d $CEGUI ] ; then
223 echo " Downloading..."
224 wget -c http://downloads.sourceforge.net/sourceforge/crayzedsgui/$CEGUI_DOWNLOAD
225 tar zxvf $CEGUI_DOWNLOAD
226 fi
227 cd $CEGUI
228 mkdir -p $BUILDDIR
229 cd $BUILDDIR
230 echo " Configuring..."
231 ../configure --prefix=$PREFIX --disable-samples --disable-opengl-renderer --disable-irrlicht-renderer --disable-xerces-c --disable-libxml --disable-expat --disable-directfb-renderer $CONFIGURE_EXTRA_FLAGS > $LOGDIR/deps/CEGUI/$CONFIGLOG
232 echo " Building..."
233 make $MAKEOPTS > $LOGDIR/deps/CEGUI/$MAKELOG
234 echo " Installing..."
235 make install > $LOGDIR/deps/CEGUI/$INSTALLLOG
236 echo " Done."
237 fi
238
817c9a5 Joshua Roesslein Initial commit!
joshthecoder authored
239 echo "Install Done."
240
241 # Source checkout
242 elif [ $1 = "checkout" ] ; then
243 echo "Fetching sources..."
244
1491b0f Peter Szücs Add options for checkout.
sajty authored
245 if [ $2 = "libs" ] || [ $2 = "all" ] ; then
246
2e5afad Erik Ogenvik Restructure the directories.
erikogenvik authored
247 mkdir -p $SOURCE/libs
248 cd $SOURCE/libs
b22888e Joshua Roesslein Bump ogre version to 1.6. Checkout atlas and varconf from Git.
joshthecoder authored
249
817c9a5 Joshua Roesslein Initial commit!
joshthecoder authored
250 # Varconf
251 echo " Varconf..."
b22888e Joshua Roesslein Bump ogre version to 1.6. Checkout atlas and varconf from Git.
joshthecoder authored
252 checkoutwf "varconf"
817c9a5 Joshua Roesslein Initial commit!
joshthecoder authored
253 echo " Done."
254
b22888e Joshua Roesslein Bump ogre version to 1.6. Checkout atlas and varconf from Git.
joshthecoder authored
255 # Atlas-C++
817c9a5 Joshua Roesslein Initial commit!
joshthecoder authored
256 echo " Atlas-C++..."
edb7af1 Erik Ogenvik Update with Github urls.
erikogenvik authored
257 checkoutwf "atlas-cpp"
817c9a5 Joshua Roesslein Initial commit!
joshthecoder authored
258 echo " Done."
259
260 # Skstream
261 echo " Skstream..."
2806726 Joshua Roesslein Applying patch from Erik.
joshthecoder authored
262 checkoutwf "skstream"
817c9a5 Joshua Roesslein Initial commit!
joshthecoder authored
263 echo " Done."
264
265 # Wfmath
266 echo " Wfmath..."
2806726 Joshua Roesslein Applying patch from Erik.
joshthecoder authored
267 checkoutwf "wfmath"
817c9a5 Joshua Roesslein Initial commit!
joshthecoder authored
268 echo " Done."
269
270 # Eris
271 echo " Eris..."
2806726 Joshua Roesslein Applying patch from Erik.
joshthecoder authored
272 checkoutwf "eris"
817c9a5 Joshua Roesslein Initial commit!
joshthecoder authored
273 echo " Done."
274
275 # Libwfut
276 echo " Libwfut..."
2806726 Joshua Roesslein Applying patch from Erik.
joshthecoder authored
277 checkoutwf "libwfut"
817c9a5 Joshua Roesslein Initial commit!
joshthecoder authored
278 echo " Done."
279
280 # Mercator
281 echo " Mercator..."
2806726 Joshua Roesslein Applying patch from Erik.
joshthecoder authored
282 checkoutwf "mercator"
817c9a5 Joshua Roesslein Initial commit!
joshthecoder authored
283 echo " Done."
1491b0f Peter Szücs Add options for checkout.
sajty authored
284 fi
817c9a5 Joshua Roesslein Initial commit!
joshthecoder authored
285
4544742 Peter Szücs Checkout webember should clone ember too.
sajty authored
286 if [ $2 = "ember" ] || [ $2 = "webember" ] || [ $2 = "all" ] ; then
817c9a5 Joshua Roesslein Initial commit!
joshthecoder authored
287 # Ember client
288 echo " Ember client..."
2e5afad Erik Ogenvik Restructure the directories.
erikogenvik authored
289 mkdir -p $SOURCE/clients
290 cd $SOURCE/clients
e76feb2 Peter Szücs Add WebEmber build support.
sajty authored
291 #get github.com/sajty/ember.git with webember branch
292 checkoutwf "ember" "sajty" "webember"
817c9a5 Joshua Roesslein Initial commit!
joshthecoder authored
293 echo " Done."
1491b0f Peter Szücs Add options for checkout.
sajty authored
294 fi
817c9a5 Joshua Roesslein Initial commit!
joshthecoder authored
295
1491b0f Peter Szücs Add options for checkout.
sajty authored
296 if [ $2 = "cyphesis" ] || [ $2 = "all" ] ; then
87b9c57 Joshua Roesslein Added cyphesis support.
joshthecoder authored
297 # Cyphesis
298 echo " Cyphesis..."
2e5afad Erik Ogenvik Restructure the directories.
erikogenvik authored
299 mkdir -p $SOURCE/servers
300 cd $SOURCE/servers
87b9c57 Joshua Roesslein Added cyphesis support.
joshthecoder authored
301 checkoutwf "cyphesis"
302 echo " Done."
1491b0f Peter Szücs Add options for checkout.
sajty authored
303 fi
e76feb2 Peter Szücs Add WebEmber build support.
sajty authored
304
305 if [ $2 = "webember" ] || [ $2 = "all" ] ; then
306 echo " FireBreath..."
307 mkdir -p $SOURCE/clients/webember
308 cd $SOURCE/clients/webember
309 checkoutwf "FireBreath" "sajty"
310 echo " Done."
311 echo " WebEmber..."
312 checkoutwf "WebEmber" "sajty"
313 echo " Done."
314 fi
315
817c9a5 Joshua Roesslein Initial commit!
joshthecoder authored
316 echo "Checkout Done."
317
318 # Build source
319 elif [ $1 = "build" ] ; then
da7cd4e Joshua Roesslein Added support for passing in make options.
joshthecoder authored
320 if [ $# -lt 2 ] ; then
fb61b3f Joshua Roesslein Updated Ogre. Added parameter checks.
joshthecoder authored
321 echo "Missing required parameter!"
322 show_help "build"
da7cd4e Joshua Roesslein Added support for passing in make options.
joshthecoder authored
323 exit 1
324 fi
325
326 # Check for make options
327 if [ $# -ge 3 ] ; then
328 MAKEOPTS=$3
fb61b3f Joshua Roesslein Updated Ogre. Added parameter checks.
joshthecoder authored
329 fi
330
817c9a5 Joshua Roesslein Initial commit!
joshthecoder authored
331 echo "Building sources..."
f411aca Joshua Roesslein Added ability to select build target.
joshthecoder authored
332
333 # Build libraries
334 if [ $2 = "libs" ] || [ $2 = "all" ] ; then
335
817c9a5 Joshua Roesslein Initial commit!
joshthecoder authored
336 # Varconf
337 echo " Varconf..."
338 buildwf "libs/varconf"
339 echo " Done."
340
341 # Skstream
342 echo " Skstream..."
343 buildwf "libs/skstream"
344 echo " Done."
345
346 # Wfmath
347 echo " Wfmath..."
348 buildwf "libs/wfmath"
349 echo " Done."
350
351 # Atlas-C++
352 echo " Atlas-C++..."
b77ba8f Erik Ogenvik Fixed building of Atlas, thanks Dean.
erikogenvik authored
353 buildwf "libs/atlas-cpp"
817c9a5 Joshua Roesslein Initial commit!
joshthecoder authored
354 echo " Done."
355
1b99135 Joshua Roesslein Fixes for errors during testing.
joshthecoder authored
356 # Mercator
357 echo " Mercator..."
358 buildwf "libs/mercator"
359 echo " Done."
360
817c9a5 Joshua Roesslein Initial commit!
joshthecoder authored
361 # Eris
362 echo " Eris..."
363 buildwf "libs/eris"
364 echo " Done."
365
366 # Libwfut
367 echo " Libwfut..."
368 buildwf "libs/libwfut"
369 echo " Done."
370
fde5310 Joshua Roesslein Fix for build all issue where ember and cyphesis where not getting
joshthecoder authored
371 fi
372
373 if [ $2 = "ember" ] || [ $2 = "all" ] ; then
f411aca Joshua Roesslein Added ability to select build target.
joshthecoder authored
374
817c9a5 Joshua Roesslein Initial commit!
joshthecoder authored
375 # Ember client
376 echo " Ember client..."
b3e1474 Erik Ogenvik Oops, this shouldn't have been commented out.
erikogenvik authored
377 buildwf "clients/ember"
817c9a5 Joshua Roesslein Initial commit!
joshthecoder authored
378 echo " Done."
379
a7f75ad Erik Ogenvik Various fixes for getting it to compile on mingw.
erikogenvik authored
380 if command -v rsync &> /dev/null; then
381 echo "Fetching media..."
2e5afad Erik Ogenvik Restructure the directories.
erikogenvik authored
382 cd $SOURCE/clients/ember/$BUILDDIR
a7f75ad Erik Ogenvik Various fixes for getting it to compile on mingw.
erikogenvik authored
383 make devmedia
384 echo "Media fetched."
385 else
2e5afad Erik Ogenvik Restructure the directories.
erikogenvik authored
386 echo "Rsync not found, skipping fetching media. You will need to download and install it yourself."
a7f75ad Erik Ogenvik Various fixes for getting it to compile on mingw.
erikogenvik authored
387 fi
2806726 Joshua Roesslein Applying patch from Erik.
joshthecoder authored
388
fde5310 Joshua Roesslein Fix for build all issue where ember and cyphesis where not getting
joshthecoder authored
389 fi
390
391 if [ $2 = "cyphesis" ] || [ $2 = "all" ] ; then
87b9c57 Joshua Roesslein Added cyphesis support.
joshthecoder authored
392
393 # Cyphesis
394 echo " Cyphesis..."
395 buildwf "servers/cyphesis"
396 cyphesis_post_install
397 echo " Done."
e76feb2 Peter Szücs Add WebEmber build support.
sajty authored
398 fi
399
400
401 if [ $2 = "webember" ] || [ $2 = "all" ] ; then
402
403 echo " WebEmber..."
404 CONFIGURE_EXTRA_FLAGS="$CONFIGURE_EXTRA_FLAGS --enable-webember --enable-shared"
405 #we ned to change the BUILDDIR to separate the ember and webember build directories.
406 export BUILDDIR="${BUILDDIR}_webember"
407 buildwf "clients/ember" "webember"
408 echo " Done."
409
410 if command -v rsync &> /dev/null; then
411 echo "Fetching media..."
412 cd $SOURCE/clients/ember/$BUILDDIR
413 make devmedia > $LOGDIR/webember/media.log
414 echo "Media fetched."
415 else
416 echo "Rsync not found, skipping fetching media. You will need to download and install it yourself."
417 fi
87b9c57 Joshua Roesslein Added cyphesis support.
joshthecoder authored
418
e76feb2 Peter Szücs Add WebEmber build support.
sajty authored
419 # WebEmber
420 echo " WebEmber plugin..."
421 mkdir -p $LOGDIR/webember_plugin
422 mkdir -p $SOURCE/clients/webember/FireBreath/$BUILDDIR
423 cd $SOURCE/clients/webember/FireBreath/$BUILDDIR
424 cmake -DCMAKE_INSTALL_PREFIX=$PREFIX -DFB_PROJECTS_DIR=$SOURCE/clients/webember/WebEmber/plugin -DBUILD_EXAMPLES=false -DWITH_SYSTEM_BOOST=true .. > $LOGDIR/webember_plugin/cmake.log
425 make $MAKEOPTS > $LOGDIR/webember_plugin/build.log
426 mkdir -p ~/.mozilla/plugins
427 cp bin/WebEmber/npWebEmber.so ~/.mozilla/plugins/npWebEmber.so
428 echo " Done."
87b9c57 Joshua Roesslein Added cyphesis support.
joshthecoder authored
429 fi
430
817c9a5 Joshua Roesslein Initial commit!
joshthecoder authored
431 echo "Build Done."
432
bdb8ced Joshua Roesslein Added clean command to delete build files.
joshthecoder authored
433 elif [ $1 = "clean" ] ; then
434 if [ $# -ne 2 ] ; then
435 echo "Missing required parameter!"
436 show_help "clean"
437 exit 1
438 fi
817c9a5 Joshua Roesslein Initial commit!
joshthecoder authored
439
bdb8ced Joshua Roesslein Added clean command to delete build files.
joshthecoder authored
440 # Delete build directory
441 if [ $2 = "cegui" ] ; then
442 rm -rf $DEPS_SOURCE/$CEGUI/$BUILDDIR
443 elif [ $2 = "ogre" ] ; then
444 rm -rf $DEPS_SOURCE/$OGRE/ogre/$BUILDDIR
445 else
2e5afad Erik Ogenvik Restructure the directories.
erikogenvik authored
446 rm -rf $SOURCE/$2/$BUILDDIR
bdb8ced Joshua Roesslein Added clean command to delete build files.
joshthecoder authored
447 fi
448
449 else
450 echo "Invalid command!"
451 show_help "main"
452 fi
Something went wrong with that request. Please try again.