-
Notifications
You must be signed in to change notification settings - Fork 7
/
build.sh
executable file
·61 lines (47 loc) · 1.49 KB
/
build.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
#!/usr/bin/env sh
echo
echo Make sure you install required build dependencies by executing
echo pkg install git cmake libX11 libXrandr libXinerama libXcursor xinput apache-ant dyncall
echo
# (there might be more that I've missed)
ROOT=`pwd`
LIBS=${ROOT}/native-libs
mkdir -p ${LIBS} || exit 1
echo Cloning dependencies...
GIT_OPTIONS="--single-branch --depth 1"
#GIT_OPTIONS=""
# lwjgl3 dependency
git clone -b 1.18.2 [email protected]:johalun/openal-soft.git
# lwjgl3 dependency
git clone -b 'freebsd' ${GIT_OPTIONS} [email protected]:johalun/glfw.git
# main repo
git clone -b 'freebsd-3.2.1' ${GIT_OPTIONS} [email protected]:johalun/lwjgl3.git
cd openal-soft
rm -fr build
mkdir build
cd build
cmake -DALSOFT_REQUIRE_OSS=ON -DALSOFT_EMBED_HRTF_DATA=YES -DCMAKE_BUILD_TYPE=Release .. || exit 1
cmake --build . || exit 1
strip libopenal.so || exit 1
cp libopenal.so ${LIBS}/ || exit 1
echo
echo Building glfw
echo =============
echo
cd ${ROOT}/glfw
mkdir -p build
cd build
cmake -DBUILD_SHARED_LIBS=ON -DGLFW_BUILD_EXAMPLES=OFF -DGLFW_BUILD_TESTS=OFF -DGLFW_BUILD_DOCS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS="-I/usr/local/include" .. || exit 1
cmake --build . || exit 1
cd src
strip libglfw.so
cp libglfw.so ${LIBS}/ || exit 1
echo
echo Building lwjgl3
echo ===============
echo
cd ${ROOT}/lwjgl3
ant -Dos.name=Linux -Dplatform=linux || exit 1
ant -Dos.name=Linux -Dplatform=linux release || exit 1
echo
echo "Build done. Make ROOT in minecraft-runtime-1.13 point to this folder and execute minecraft-client-1.13."