mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-22 11:39:22 +00:00
Update scripts for build monero lib for ios.
This commit is contained in:
parent
a0bec37fc8
commit
c3808c416d
7 changed files with 52 additions and 15 deletions
|
@ -34,6 +34,13 @@ Pod::Spec.new do |s|
|
|||
sodium.xcconfig = { 'HEADER_SEARCH_PATHS' => "${PODS_ROOT}/#{s.name}/External/ios/include/**" }
|
||||
end
|
||||
|
||||
s.subspec 'Unbound' do |unbound|
|
||||
unbound.preserve_paths = '../../../../../cw_shared_external/ios/External/ios/include/**/*.h'
|
||||
unbound.vendored_libraries = '../../../../../cw_shared_external/ios/External/ios/lib/libunbound.a'
|
||||
unbound.libraries = 'unbound'
|
||||
unbound.xcconfig = { 'HEADER_SEARCH_PATHS' => "${PODS_ROOT}/#{s.name}/External/ios/include/**" }
|
||||
end
|
||||
|
||||
s.subspec 'Boost' do |boost|
|
||||
boost.preserve_paths = '../../../../../cw_shared_external/ios/External/ios/include/**/*.h',
|
||||
boost.vendored_libraries = '../../../../../cw_shared_external/ios/External/ios/lib/libboost.a',
|
||||
|
|
|
@ -32,6 +32,7 @@ PODS:
|
|||
- cw_monero/Monero (= 0.0.2)
|
||||
- cw_monero/OpenSSL (= 0.0.2)
|
||||
- cw_monero/Sodium (= 0.0.2)
|
||||
- cw_monero/Unbound (= 0.0.2)
|
||||
- cw_shared_external
|
||||
- Flutter
|
||||
- cw_monero/Boost (0.0.2):
|
||||
|
@ -46,6 +47,9 @@ PODS:
|
|||
- cw_monero/Sodium (0.0.2):
|
||||
- cw_shared_external
|
||||
- Flutter
|
||||
- cw_monero/Unbound (0.0.2):
|
||||
- cw_shared_external
|
||||
- Flutter
|
||||
- cw_shared_external (0.0.1):
|
||||
- cw_shared_external/Boost (= 0.0.1)
|
||||
- cw_shared_external/OpenSSL (= 0.0.1)
|
||||
|
@ -214,7 +218,7 @@ SPEC CHECKSUMS:
|
|||
connectivity: c4130b2985d4ef6fd26f9702e886bd5260681467
|
||||
CryptoSwift: 093499be1a94b0cae36e6c26b70870668cb56060
|
||||
cw_haven: b3e54e1fbe7b8e6fda57a93206bc38f8e89b898a
|
||||
cw_monero: 88c5e7aa596c6848330750f5f8bcf05fb9c66375
|
||||
cw_monero: 4cf3b96f2da8e95e2ef7d6703dd4d2c509127b7d
|
||||
cw_shared_external: 2972d872b8917603478117c9957dfca611845a92
|
||||
device_display_brightness: 1510e72c567a1f6ce6ffe393dcd9afd1426034f7
|
||||
devicelocale: b22617f40038496deffba44747101255cee005b0
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
MONERO_URL="https://github.com/cake-tech/monero.git"
|
||||
MONERO_DIR_PATH="${EXTERNAL_IOS_SOURCE_DIR}/monero"
|
||||
MONERO_VERSION=release-v0.17.3.2
|
||||
MONERO_VERSION=release-v0.18.0.0
|
||||
BUILD_TYPE=release
|
||||
PREFIX=${EXTERNAL_IOS_DIR}
|
||||
DEST_LIB_DIR=${EXTERNAL_IOS_LIB_DIR}/monero
|
||||
|
@ -18,6 +18,9 @@ git submodule update --init --force
|
|||
mkdir -p build
|
||||
cd ..
|
||||
|
||||
mkdir -p $DEST_LIB_DIR
|
||||
mkdir -p $DEST_INCLUDE_DIR
|
||||
|
||||
ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
if [ -z $INSTALL_PREFIX ]; then
|
||||
INSTALL_PREFIX=${ROOT_DIR}/monero
|
||||
|
@ -46,20 +49,14 @@ cmake -D IOS=ON \
|
|||
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
|
||||
-DSTATIC=ON \
|
||||
-DBUILD_GUI_DEPS=ON \
|
||||
-DINSTALL_VENDORED_LIBUNBOUND=ON \
|
||||
-DUNBOUND_INCLUDE_DIR=${EXTERNAL_IOS_INCLUDE_DIR} \
|
||||
-DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} \
|
||||
-DUSE_DEVICE_TREZOR=OFF \
|
||||
../..
|
||||
make -j4 && make install
|
||||
cp external/randomx/librandomx.a ${DEST_LIB}/
|
||||
cp src/cryptonote_basic/libcryptonote_basic.a ${DEST_LIB}/
|
||||
cp src/cryptonote_basic/libcryptonote_format_utils_basic.a ${DEST_LIB}/
|
||||
make wallet_api -j4
|
||||
find . -path ./lib -prune -o -name '*.a' -exec cp '{}' lib \;
|
||||
cp -r ./lib/* $DEST_LIB_DIR
|
||||
cp ../../src/wallet/api/wallet2_api.h $DEST_INCLUDE_DIR
|
||||
popd
|
||||
|
||||
done
|
||||
|
||||
#only for arm64
|
||||
mkdir -p $DEST_LIB_DIR
|
||||
mkdir -p $DEST_INCLUDE_DIR
|
||||
cp ${MONERO_DIR_PATH}/lib-armv8-a/* $DEST_LIB_DIR
|
||||
cp ${MONERO_DIR_PATH}/include/wallet/api/* $DEST_INCLUDE_DIR
|
||||
|
|
|
@ -6,4 +6,5 @@
|
|||
./build_boost.sh
|
||||
./build_sodium.sh
|
||||
./build_zmq.sh
|
||||
./build_unbound.sh
|
||||
./build_monero.sh
|
|
@ -10,7 +10,7 @@ echo "============================ OpenSSL ============================"
|
|||
echo "Cloning Open SSL from - $OPEN_SSL_URL"
|
||||
git clone $OPEN_SSL_URL $OPEN_SSL_DIR_PATH
|
||||
cd $OPEN_SSL_DIR_PATH
|
||||
./build-libssl.sh --version=1.1.1k --archs="x86_64 arm64 armv7s armv7" --targets="ios64-cross-arm64" --deprecated
|
||||
./build-libssl.sh --version=1.1.1q --archs="x86_64 arm64 armv7s armv7" --targets="ios64-cross-arm64" --deprecated
|
||||
|
||||
mv ${OPEN_SSL_DIR_PATH}/include/* $EXTERNAL_IOS_INCLUDE_DIR
|
||||
mv ${OPEN_SSL_DIR_PATH}/lib/* $EXTERNAL_IOS_LIB_DIR
|
27
scripts/ios/build_unbound.sh
Executable file
27
scripts/ios/build_unbound.sh
Executable file
|
@ -0,0 +1,27 @@
|
|||
#!/bin/sh
|
||||
|
||||
. ./config.sh
|
||||
|
||||
UNBOUND_VERSION=1.13.2
|
||||
UNBOUND_HASH=0a13b547f3b92a026b5ebd0423f54c991e5718037fd9f72445817f6a040e1a83
|
||||
UNBOUND_URL="https://www.nlnetlabs.nl/downloads/unbound/unbound-${UNBOUND_VERSION}.tar.gz"
|
||||
UNBOUND_DIR_PATH="${EXTERNAL_IOS_SOURCE_DIR}/unbound-${UNBOUND_VERSION}"
|
||||
UNBOUND_ARCH_PATH=${EXTERNAL_IOS_SOURCE_DIR}/unbound-${UNBOUND_VERSION}.tar.gz
|
||||
|
||||
echo $UNBOUND_DIR_PATH
|
||||
echo "============================ Unbound ============================"
|
||||
curl $UNBOUND_URL -L -o $UNBOUND_ARCH_PATH
|
||||
tar -xzf $UNBOUND_ARCH_PATH -C $EXTERNAL_IOS_SOURCE_DIR
|
||||
cd $UNBOUND_DIR_PATH
|
||||
|
||||
export IOS_SDK=iPhone
|
||||
export IOS_CPU=arm64
|
||||
export IOS_PREFIX=$EXTERNAL_IOS_DIR
|
||||
export AUTOTOOLS_HOST=aarch64-apple-ios
|
||||
export AUTOTOOLS_BUILD="$(./config.guess)"
|
||||
source ./contrib/ios/setenv_ios.sh
|
||||
./contrib/ios/install_tools.sh
|
||||
./contrib/ios/install_expat.sh
|
||||
./configure --build="$AUTOTOOLS_BUILD" --host="$AUTOTOOLS_HOST" --prefix="$IOS_PREFIX" --with-ssl="$IOS_PREFIX" --disable-gost --with-libexpat="$IOS_PREFIX"
|
||||
make
|
||||
make install
|
|
@ -35,5 +35,6 @@ ln ./libboost.a ${CW_MONERO_EXTERNAL_LIB}/libboost.a
|
|||
ln ./libcrypto.a ${CW_MONERO_EXTERNAL_LIB}/libcrypto.a
|
||||
ln ./libssl.a ${CW_MONERO_EXTERNAL_LIB}/libssl.a
|
||||
ln ./libsodium.a ${CW_MONERO_EXTERNAL_LIB}/libsodium.a
|
||||
ln ./libunbound.a ${CW_MONERO_EXTERNAL_LIB}/libunbound.a
|
||||
cp ./libmonero.a $CW_MONERO_EXTERNAL_LIB
|
||||
cp ../include/monero/* $CW_MONERO_EXTERNAL_INCLUDE
|
Loading…
Reference in a new issue