Nagram/bin/native_libs.sh

93 lines
1.3 KiB
Bash
Raw Normal View History

2020-06-24 16:15:30 +00:00
#!/bin/bash
if [ ! -x "$(command -v go)" ]; then
# if [ ! -x "$(command -v gvm)" ]; then
#
# apt install -y bison binutils gcc make
#
# bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer)
#
# source "$HOME/.bashrc"
#
# fi
#
2020-11-22 09:57:13 +00:00
# gvm install go1.15.5 -B
# gvm use go1.15.5 --default
2020-06-24 16:15:30 +00:00
echo "install golang please!"
exit 1
fi
if [ ! -x "$(command -v ninja)" ]; then
# apt install -y ninja-build
2020-06-24 16:15:30 +00:00
echo "install ninja-build please!"
exit 1
fi
2020-07-27 04:49:42 +00:00
if [ ! -x "$(command -v cmake)" ]; then
2020-06-24 16:15:30 +00:00
# apt install -y cmake
2020-06-24 16:15:30 +00:00
2020-07-27 04:49:42 +00:00
echo "install cmake please!"
2020-06-24 16:15:30 +00:00
exit 1
fi
2020-08-10 10:20:22 +00:00
if [ -z "$ANDROID_HOME" ]; then
if [ -d "$HOME/Android/Sdk" ]; then
export ANDROID_HOME=$HOME/Android/Sdk
else
echo "E: ANDROID_HOME not found."
exit 1
fi
fi
2020-06-24 16:15:30 +00:00
if [ -f "$ANDROID_HOME/ndk-bundle/source.properties" ]; then
export NDK=$ANDROID_HOME/ndk-bundle
else
export NDK=$ANDROID_HOME/ndk/21.3.6528147
fi
export NINJA_PATH="$(command -v ninja)"
export PATH=$(echo "$ANDROID_HOME"/cmake/*/bin):$PATH
2020-07-08 04:00:22 +00:00
cd TMessagesProj/jni || exit 1
2020-06-24 16:15:30 +00:00
git submodule update --init --recursive
2020-07-27 04:49:42 +00:00
cd ffmpeg
git reset --hard
git clean -fdx
cd ..
2020-06-24 16:15:30 +00:00
2020-07-27 04:49:42 +00:00
./build_ffmpeg_clang.sh
2020-06-24 16:15:30 +00:00
./patch_ffmpeg.sh
2020-07-27 04:49:42 +00:00
cd boringssl
git reset --hard
git clean -fdx
cd ..
2020-06-24 16:15:30 +00:00
2020-07-27 04:49:42 +00:00
./patch_boringssl.sh
./build_boringssl.sh