This repository has been archived by the owner on Dec 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
/
hammer.sh
executable file
·177 lines (141 loc) · 3.58 KB
/
hammer.sh
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
#!/bin/bash
set -e
export PREFIX=$PWD/local
export SOURCE=$PWD/dev/worldforge
export DEPS_SOURCE=$PWD/local/src
export MAKEOPTS="-j3"
export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig
function buildwf()
{
cd $SOURCE/forge/$1
export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig
if [ ! -f "Makefile" ] ; then
echo " Generating makefile..."
./autogen.sh
./configure --prefix=$PREFIX
fi
make
make install
}
mkdir -p $PREFIX $SOURCE $DEPS_SOURCE
# Dependencies install
if [ $1 = "install-deps" ] ; then
echo "Installing deps..."
# CEGUI
if [ $2 = "all" ] || [ $2 = "cegui" ] ; then
echo " Installing CEGUI..."
cd $DEPS_SOURCE
if [ ! -d "CEGUI-0.6.2" ] ; then
wget -c http://voxel.dl.sourceforge.net/sourceforge/crayzedsgui/CEGUI-0.6.2b.tar.gz
tar zxvf CEGUI-0.6.2b.tar.gz
fi
cd CEGUI-0.6.2/
./configure --prefix=$PREFIX --disable-samples --disable-opengl-renderer --disable-irrlicht-renderer --disable-xerces-c --disable-libxml --disable-expat
make
make install
echo " Done."
fi
# Ogre3D
if [ $2 = "all" ] || [ $2 = "ogre" ] ; then
echo " Installing Ogre..."
cd $DEPS_SOURCE
if [ ! -d "ogre" ]; then
wget -c http://voxel.dl.sourceforge.net/sourceforge/ogre/ogre-v1-6-1.tar.bz2
tar -xjf ogre-v1-6-1.tar.bz2
fi
cd ogre
export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig
./configure --prefix=$PREFIX --disable-freeimage --disable-ogre-demos
make
make install
echo " Done."
fi
echo "Install Done."
# Source checkout
elif [ $1 = "checkout" ] ; then
echo "Fetching sources..."
cd $SOURCE
# Varconf
echo " Varconf..."
cvs -z3 -d :pserver:cvsanon@cvs.worldforge.org:/home/cvspsrv/worldforge -q co forge/libs/varconf
echo " Done."
# Atlas-C++
echo " Atlas-C++..."
cvs -z3 -d :pserver:cvsanon@cvs.worldforge.org:/home/cvspsrv/worldforge -q co forge/libs/Atlas-C++
echo " Done."
cd $SOURCE/forge/libs
# Skstream
echo " Skstream..."
git clone git://git.worldforge.org/skstream.git
echo " Done."
# Wfmath
echo " Wfmath..."
git clone git://git.worldforge.org/wfmath.git
echo " Done."
# Eris
echo " Eris..."
git clone git://git.worldforge.org/eris.git
echo " Done."
# Libwfut
echo " Libwfut..."
git clone git://git.worldforge.org/libwfut.git
echo " Done."
# Mercator
echo " Mercator..."
git clone git://git.worldforge.org/mercator.git
echo " Done."
# Ember client
echo " Ember client..."
mkdir -p $SOURCE/forge/clients
cd $SOURCE/forge/clients
git clone git://git.worldforge.org/ember.git
echo " Done."
echo "Checkout Done."
# Build source
elif [ $1 = "build" ] ; then
echo "Building sources..."
# Build libraries
if [ $2 = "libs" ] || [ $2 = "all" ] ; then
# Varconf
echo " Varconf..."
buildwf "libs/varconf"
echo " Done."
# Skstream
echo " Skstream..."
buildwf "libs/skstream"
echo " Done."
# Wfmath
echo " Wfmath..."
buildwf "libs/wfmath"
echo " Done."
# Atlas-C++
echo " Atlas-C++..."
buildwf "libs/Atlas-C++"
echo " Done."
# Mercator
echo " Mercator..."
buildwf "libs/mercator"
echo " Done."
# Eris
echo " Eris..."
buildwf "libs/eris"
echo " Done."
# Libwfut
echo " Libwfut..."
buildwf "libs/libwfut"
echo " Done."
fi
if [ $2 = "ember" ] || [ $2 = "all" ] ; then
# Ember client
echo " Ember client..."
buildwf "clients/ember"
echo " Done."
fi
echo "Build Done."
# Media
elif [ $1 = "fetch-media" ] ; then
echo "Fetching media..."
cd $SOURCE/forge/clients/ember
make devmedia
echo "Media fetched."
fi