2021-02-28 16:06:24 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2021-03-05 15:09:24 +00:00
|
|
|
source "bin/init/env.sh"
|
|
|
|
|
2021-02-28 16:06:24 +00:00
|
|
|
## Install rust
|
2021-02-28 18:40:50 +00:00
|
|
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain none -y
|
2021-02-28 16:06:24 +00:00
|
|
|
source $HOME/.cargo/env
|
2021-03-09 12:20:43 +00:00
|
|
|
cd ss-rust/src/main/rust/shadowsocks-rust
|
2021-02-28 16:06:24 +00:00
|
|
|
rustup target install armv7-linux-androideabi aarch64-linux-android i686-linux-android x86_64-linux-android
|
|
|
|
|
2021-03-05 15:09:24 +00:00
|
|
|
echo "rust.rustcCommand=$HOME/.cargo/bin/rustc" >>local.properties
|
|
|
|
echo "rust.cargoCommand=$HOME/.cargo/bin/cargo" >>local.properties
|
|
|
|
echo "rust.pythonCommand=/usr/bin/python3" >>local.properties
|
2021-02-28 16:06:24 +00:00
|
|
|
|
2021-02-28 18:40:50 +00:00
|
|
|
# Install Golang
|
2021-03-05 15:09:24 +00:00
|
|
|
curl -o golang.tar.gz https://storage.googleapis.com/golang/go1.16.linux-amd64.tar.gz
|
2021-03-08 15:05:59 +00:00
|
|
|
mkdir "$HOME/.go"
|
|
|
|
tar -C "$HOME/.go" --strip-components=1 -xzf golang.tar.gz
|
2021-02-28 18:40:50 +00:00
|
|
|
rm golang.tar.gz
|
2021-03-08 15:05:59 +00:00
|
|
|
export PATH="$PATH:$HOME/.go/bin"
|
|
|
|
go version || exit 1
|
2021-02-28 18:40:50 +00:00
|
|
|
|
2021-03-05 15:09:24 +00:00
|
|
|
echo "sdk.dir=$ANDROID_HOME" >>local.properties
|
|
|
|
echo "ndk.dir=$ANDROID_NDK_HOME" >>local.properties
|
2021-02-28 16:06:24 +00:00
|
|
|
|
2021-03-01 08:02:36 +00:00
|
|
|
bin/libs/v2ray/init.sh
|
|
|
|
|
2021-02-28 16:06:24 +00:00
|
|
|
## Remove unused non-free dependencies
|
|
|
|
pushd TMessagesProj
|
|
|
|
|
|
|
|
sed -i -e /play:core/d build.gradle
|
|
|
|
sed -i -e /firebase/d build.gradle
|
2021-02-28 18:40:50 +00:00
|
|
|
sed -i -e /gms/d build.gradle
|
|
|
|
|
|
|
|
rm -r jni/boringssl/fuzz
|
|
|
|
rm jni/libwebp/swig/libwebp.jar
|
|
|
|
rm jni/libwebp/gradle/wrapper/gradle-wrapper.jar
|
|
|
|
rm jni/boringssl/util/ar/testdata/mac/libsample.a
|
|
|
|
rm jni/boringssl/util/ar/testdata/linux/libsample.a
|
|
|
|
|
|
|
|
popd
|
|
|
|
|
|
|
|
rm -r ssr-libev/src/main/jni/pcre/dist/testdata
|
|
|
|
rm -r ssr-libev/src/main/jni/mbedtls/programs/fuzz/corpuses
|
2021-03-05 15:09:24 +00:00
|
|
|
rm -r ssr-libev/src/main/jni/mbedtls/tests/data_files
|