forked from NWNX/nwnx2-linux
-
Notifications
You must be signed in to change notification settings - Fork 0
/
compile.sh
executable file
·85 lines (60 loc) · 1.85 KB
/
compile.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
#!/bin/sh
set -e
if [ `uname -p` = "x86_64" ]; then
echo "nwnx2 does not build on x64."
echo "Try running this in a 32bit chroot."
exit 1
fi
echo "
=====
This script compiles nwnx2 for linux.
You will need the following packages installed to compile the core:
cmake, build-essential (including gcc, make, bintools ..), gzlib1-dev
A lot of plugins depend on 'gperf' to generate lookup tables, but it is not
strictly required to compile the core.
This is a non-exhaustive list of plugin dependencies:
* odmbc-mysql: libmysqlclient-dev
* odmbc-pq: libpq-dev
* odmbc-sqlite: libsqlite3-dev
* ruby: libruby1.8-dev
* jvm: any recent java jdk with jni headers
* lua: liblua5.1-dev
* vaultster: libboost-system-dev, libboost-boost-program-options-dev
You will see warnings emitted for plugins that cannot be compiled due to
missing dependencies.
=====
Press enter to begin.
"
read x
rm -r compiled || true
cmake .
make all
mkdir -vp compiled/
cp -v ./nwnstartup.sh ./compiled/
cp -v ./nwnx2.ini ./compiled/
for p in plugins/*/; do
if [ -f $p/*.so ]; then
if [ -f $p/nwnx2.ini ]; then
echo "" >> ./compiled/nwnx2.ini
echo "" >> ./compiled/nwnx2.ini
cat $p/nwnx2.ini >> ./compiled/nwnx2.ini
fi
fi
done
mv -v ./plugins/*/*.so ./compiled/
mv -v ./nwnx2.so ./compiled/
echo "
=====
NWNX has been compiled successfully.
- Look in the 'compiled' directory for the libraries.
- Copy those that you want to use into your NWN server directory.
IMPORTANT:
- In the case of multiple so files and/or dynamic and static
variants (for example, the odmbc plugin), choose only one.
If you're running wserver the same host that you are compiling on,
the dynamic one is recommended.
static binaries include the database connector linked in.
- Read & change nwnx2.ini carefully.
- Edit nwnstartup.sh to match your desired server settings.
Have fun!
====="