-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtools.sh
executable file
·66 lines (55 loc) · 1.67 KB
/
tools.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
if [ $1 == "--install_deps" ]; then
apt-get update
apt install -y openssl libssl-dev libboost-all-dev libcpprest-dev unzip zip git curl
apt install -y gcc clang pkg-config cmake make gdb
mkdir -p $ANDROID_HOME /usr/local
if [ ! -d "external/vcpkg" ]; then
git clone https://github.com/Microsoft/vcpkg.git external/vcpkg
fi
cd external/vcpkg && \
./bootstrap-vcpkg.sh && \
./vcpkg integrate install && \
./vcpkg install jsoncpp && \
cd ../..
curl -L -o /usr/local/jbr.tar.gz $JAVA_URL
cd /usr/local && \
tar zxf jbr.tar.gz && \
rm jbr.tar.gz && \
mv $JAVA_URL_PATH java && \
curl -o $ANDROID_HOME/android-sdk.zip $ANDROID_SDK_URL
cd $ANDROID_HOME && \
unzip android-sdk.zip && \
rm android-sdk.zip && \
yes | ${ANDROID_HOME}/cmdline-tools/bin/sdkmanager --sdk_root=$ANDROID_HOME --licenses
$ANDROID_HOME/cmdline-tools/bin/sdkmanager --sdk_root=$ANDROID_HOME --update
$ANDROID_HOME/cmdline-tools/bin/sdkmanager --sdk_root=$ANDROID_HOME "build-tools;${ANDROID_BUILD_TOOLS_VERSION}" \
"build-tools;${ANDROID_BUILD_TOOLS_VERSION}" \
"platforms;android-${ANDROID_VERSION}" \
"platform-tools"
elif [ $1 == "--buildLibs" ]; then
mkdir -p deps && \
rm -rf deps/* && \
mkdir -p shared/build && \
rm -rf shared/build/* && \
cd shared/build && \
cmake .. && \
make && \
cd ../../ && \
mv shared/build/libBuildroid_Libs.so deps && \
cd shared/libgit2 && \
mkdir -p build && \
rm -rf build/* && \
cd build && \
cmake .. && \
make && \
cd ../../.. && \
mv shared/libgit2/build/libgit2.so.1.8.2 deps && \
mv shared/libgit2/build/libgit2.so.1.8 deps && \
mv shared/libgit2/build/libgit2.so deps
elif [ $1 == "--build" ]; then
mkdir -p build && \
rm -rf build/* && \
cd build && \
cmake .. && \
make
fi