| 5 | # if [ ! -x "$(command -v gvm)" ]; then |
| 6 | # |
| 7 | # apt install -y bison |
| 8 | # |
| 9 | # bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer) |
| 10 | # |
| 11 | # source "$HOME/.bashrc" |
| 12 | # |
| 13 | # fi |
| 14 | # |
| 15 | # gvm install go1.14 -B |
| 16 | # gvm use go1.14 --default |
| 17 |
| 18 | echo "install golang please!" |
| 19 |
| 20 | exit 1 |
| 21 |
| 22 | fi |
| 23 |
| 24 |
| 25 | if [ ! -x "$(command -v ninja)" ]; then |
| 26 |
| 27 | # apt install -y ninja-build |
| 28 |
| 29 | echo "install ninja-build please!" |
| 30 |
| 31 | exit 1 |
| 32 |
| 33 | fi |
| 34 |
| 35 | if [ ! -x "$(command -v cmake)" ]; then |
| 36 |
| 37 | # apt install -y cmake |
| 38 |
| 39 | echo "install cmake please!" |
| 40 |
| 41 | exit 1 |
| 42 |
| 43 | fi |
| 44 |
| 45 | if [ -f "$ANDROID_HOME/ndk-bundle/source.properties" ]; then |
| 46 |
| 47 | export NDK=$ANDROID_HOME/ndk-bundle |
| 48 |
| 49 | else |
| 50 |
| 51 | export NDK=$ANDROID_HOME/ndk/21.3.6528147 |
| 52 |
| 53 | fi |
| 54 |
| 55 | export NINJA_PATH="$(command -v ninja)" |
| 56 |
| 57 | export PATH=$(echo "$ANDROID_HOME"/cmake/*/bin):$PATH |
| 58 |
| 59 | cd TMessagesProj/jni || exit 1 |
| 60 |
| 61 | git submodule update --init --recursive |
| 62 |
| 63 | cd ffmpeg |
| 64 | git reset --hard |
| 65 | git clean -fdx |
| 66 | cd .. |
| 67 |
| 68 | ./build_ffmpeg_clang.sh |
| 69 | ./patch_ffmpeg.sh |
| 70 |
| 71 | cd boringssl |
| 72 | git reset --hard |
| 73 | git clean -fdx |
| 74 | cd .. |
| 75 |
| 76 | ./patch_boringssl.sh |
| 77 | ./build_boringssl.sh |