cake_wallet/scripts/android/copy_monero_deps.sh

45 lines
986 B
Bash
Raw Normal View History

2022-03-31 14:47:40 +00:00
#!/bin/bash
2021-03-16 18:18:54 +00:00
WORKDIR=/opt/android
CW_DIR=${WORKDIR}/cake_wallet
2022-03-30 15:57:04 +00:00
CW_EXRTERNAL_DIR=${CW_DIR}/cw_shared_external/ios/External/android
2022-04-01 12:54:04 +00:00
CW_HAVEN_EXTERNAL_DIR=${CW_DIR}/cw_haven/ios/External/android
CW_MONERO_EXTERNAL_DIR=${CW_DIR}/cw_monero/ios/External/android
2021-03-16 18:18:54 +00:00
for arch in "aarch" "aarch64" "i686" "x86_64"
do
PREFIX=${WORKDIR}/prefix_${arch}
ABI=""
case $arch in
"aarch" )
ABI="armeabi-v7a";;
"aarch64" )
ABI="arm64-v8a";;
"i686" )
ABI="x86";;
"x86_64" )
ABI="x86_64";;
esac
LIB_DIR=${CW_EXRTERNAL_DIR}/${ABI}/lib
INCLUDE_DIR=${CW_EXRTERNAL_DIR}/${ABI}/include
2022-08-10 14:40:39 +00:00
LIBANBOUND_PATH=${PREFIX}/lib/libunbound.a
2021-03-16 18:18:54 +00:00
mkdir -p $LIB_DIR
mkdir -p $INCLUDE_DIR
cp -r ${PREFIX}/lib/* $LIB_DIR
cp -r ${PREFIX}/include/* $INCLUDE_DIR
2022-08-10 14:40:39 +00:00
if [ -f "$LIBANBOUND_PATH" ]; then
cp $LIBANBOUND_PATH ${LIB_DIR}/monero
fi
2021-03-16 18:18:54 +00:00
done
2022-04-01 12:50:33 +00:00
mkdir -p ${CW_HAVEN_EXTERNAL_DIR}/include
mkdir -p ${CW_MONERO_EXTERNAL_DIR}/include
cp $CW_EXRTERNAL_DIR/x86/include/haven/wallet2_api.h ${CW_HAVEN_EXTERNAL_DIR}/include