Unverified Commit c6e240ac authored by Hanwen Cheng's avatar Hanwen Cheng Committed by GitHub
Browse files

docs: update readme for ndk (#639)

* doc: update readme for ndk

* rephrase

* update docs

* update doc
parent ea5786c8
Pipeline #95443 failed with stages
in 52 seconds
......@@ -25,6 +25,9 @@ Any data transfer from or to the app happens using QR code. By doing so, the mos
- [Troubleshooting](https://github.com/paritytech/parity-signer/wiki/Troubleshooting)
- [Publishing](https://github.com/paritytech/parity-signer/wiki/Publishing)
## Changes from 4.3.1
From [4.3.1](https://github.com/paritytech/parity-signer/commit/ea5786c85661d9b176795b9386af640b3e73aff3) we use the latest prebuild NDK (r21) toolchains for building rust libraries for android, so that we do not need to build the standalone NDK toolchains manually. If you have built or develop Parity Signer before 4.3.1, please download the NDK r19 or newer[here](https://developer.android.com/ndk/downloads) and point the `NKD_HOME` environment variable to it with e.g. `export NDK_HOME=/path/to/latest/ndk`
## License
Parity-Signer is [GPL 3.0 licensed](LICENSE).
#!/bin/bash
source ./scripts/variables.sh
# Build iOS
cd ./rust/signer
cargo lipo --release
cp "./target/universal/release/lib${LIB_NAME}.a" "../../ios/lib${LIB_NAME}.a"
# Build android
if [ -z ${NDK_HOME+x} ];
then
printf 'Please install android-ndk\n\n'
printf 'from https://developer.android.com/ndk/downloads or with sdkmanager'
exit 1
else
printf "Building Andriod targets...";
fi
CC_aarch64_linux_android="${ANDROID_PREBUILD_BIN}/aarch64-linux-android${API_LEVEL}-clang" \
CARGO_TARGET_AARCH64_LINUX_ANDROID_LINKER="${ANDROID_PREBUILD_BIN}/aarch64-linux-android${API_LEVEL}-clang" \
cargo build --target aarch64-linux-android --release
CC_armv7_linux_androideabi="${ANDROID_PREBUILD_BIN}/armv7a-linux-androideabi${API_LEVEL}-clang" \
CARGO_TARGET_ARMV7_LINUX_ANDROIDEABI_LINKER="${ANDROID_PREBUILD_BIN}/armv7a-linux-androideabi${API_LEVEL}-clang" \
cargo build --target armv7-linux-androideabi --release
CC_i686_linux_android="${ANDROID_PREBUILD_BIN}/i686-linux-android${API_LEVEL}-clang" \
CARGO_TARGET_I686_LINUX_ANDROID_LINKER="${ANDROID_PREBUILD_BIN}/i686-linux-android${API_LEVEL}-clang" \
cargo build --target i686-linux-android --release
CC_x86_64_linux_android="${ANDROID_PREBUILD_BIN}/x86_64-linux-android${API_LEVEL}-clang" \
CARGO_TARGET_X86_64_LINUX_ANDROID_LINKER="${ANDROID_PREBUILD_BIN}/x86_64-linux-android${API_LEVEL}-clang" \
cargo build --target x86_64-linux-android --release
for i in "${!ANDROID_ARCHS[@]}";
do
mkdir -p "../android/src/main/${ANDROID_FOLDER[$i]}"
cp "./target/${ANDROID_ARCHS[$i]}/release/lib${LIB_NAME}.so" "../android/src/main/jniLibs/${ANDROID_FOLDER[$i]}/lib${LIB_NAME}.so"
done
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment