-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathprepare.sh
More file actions
executable file
·34 lines (29 loc) · 1.19 KB
/
prepare.sh
File metadata and controls
executable file
·34 lines (29 loc) · 1.19 KB
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
#!/bin/bash -e
__DIR__="$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd)"
if [ ! -d "td" ]; then
cd $__DIR__
git clone https://github.com/tdlib/td.git
cd td
# How to get the hash if there is no version tag:
# - Goto https://github.com/tdlib/td/blame/master/CMakeLists.txt
# - Check the version from the line: `project(TDLib VERSION <version>...`
# - Copy version and paste to following:
# git checkout tags/v1.8.52
# - Click the commit link
# - Copy the commit hash from the browser url link (e.q. https://github.com/tdlib/td/commit/<hash>) and paste it to:
git checkout 4269f54e16b9cf564efc2db5bcd29743a2eec6ee
cd ..
fi
if [ ! -d "openssl" ]; then
cd $__DIR__
git clone https://github.com/PurpleI2P/OpenSSL-for-Android-Prebuilt.git
mv OpenSSL-for-Android-Prebuilt/openssl-1.1.1k-clang openssl
rm -fr OpenSSL-for-Android-Prebuilt
fi
# Need to generate some files first, see https://github.com/tdlib/td/issues/1077#issuecomment-640056388
if [ ! -d "$__DIR__/build/td/prepare_cross_compiling" ]; then
mkdir -p $__DIR__/build/td/prepare_cross_compiling
cd $__DIR__/build/td/prepare_cross_compiling
cmake $__DIR__/td || exit 1
cmake --build . --target prepare_cross_compiling || exit 1
fi