-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathStart.sh
executable file
·68 lines (55 loc) · 1.09 KB
/
Start.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
#!/bin/bash -e
# List of ARCH'es
ARCHS=("armv7" "arm64" "x86_64")
for ARCH in "${ARCHS[@]}"; do
echo "Building for ARCH: $ARCH"
case "$OSTYPE" in
darwin*)
sed -i '' '/^arch/d' local.properties
;;
*)
touch local.properties
sed -i '/^arch/d' local.properties
;;
esac
echo "arch = $ARCH" >> local.properties
# Set NDK path
export ANDROID_NDK="$(grep '^ndk\.dir' local.properties | sed 's/^.*=[[:space:]]*//')"
if [ ! -d "$ANDROID_NDK" ];
then
echo "Please specify path of ANDROID NDK"
echo "e.g. $HOME/Android/android-ndk-r26"
read ANDROID_NDK
if [ ! -d "$ANDROID_NDK" ];
then
echo "$ANDROID_NDK is not a valid folder"
exit 1
fi
echo "ndk.dir = $ANDROID_NDK" >> local.properties
fi
# Clean the deps
if [ -w deps ]; then
rm -rf deps/*/
else
echo "Cannot delete deps: Permission denied"
fi
mkdir -p deps
chmod -R u+w deps
# Build libs
./gettext.sh
./leveldb.sh
if [[ "$OSTYPE" == linux* ]]; then
./luajit.sh
fi
./libjpeg.sh
./libpng.sh
./freetype.sh
./SDL2.sh
./irrlicht.sh
./openal.sh
./openssl.sh
./libcurl.sh
./vorbis.sh
echo "Done building for $ARCH!"
done
echo "All builds completed!"