mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-22 11:39:22 +00:00
Applied a patch for iOS build (Boost and Zano scripts)
This commit is contained in:
parent
2dbea9b055
commit
f7474b9d8d
6 changed files with 47 additions and 32 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -126,7 +126,7 @@ cw_shared_external/ios/External/
|
|||
cw_haven/ios/External/
|
||||
cw_haven/android/.externalNativeBuild/
|
||||
cw_haven/android/.cxx/
|
||||
|
||||
cw_zano/ios/External/
|
||||
lib/bitcoin/bitcoin.dart
|
||||
lib/monero/monero.dart
|
||||
lib/haven/haven.dart
|
||||
|
|
|
@ -21,29 +21,22 @@ Pod::Spec.new do |s|
|
|||
s.xcconfig = { 'HEADER_SEARCH_PATHS' => "${PODS_ROOT}/#{s.name}/Classes/*.h" }
|
||||
|
||||
s.subspec 'OpenSSL' do |openssl|
|
||||
openssl.preserve_paths = '../../../../../cw_shared_external/ios/External/ios/include/**/*.h'
|
||||
openssl.vendored_libraries = '../../../../../cw_shared_external/ios/External/ios/lib/libcrypto.a', '../../../../../cw_shared_external/ios/External/ios/lib/libssl.a'
|
||||
openssl.preserve_paths = 'External/ios/include/**/*.h'
|
||||
openssl.vendored_libraries = 'External/ios/lib/libcrypto.a', 'External/ios/lib/libssl.a'
|
||||
openssl.libraries = 'ssl', 'crypto'
|
||||
openssl.xcconfig = { 'HEADER_SEARCH_PATHS' => "${PODS_ROOT}/#{s.name}/External/ios/include/**" }
|
||||
end
|
||||
|
||||
s.subspec 'Sodium' do |sodium|
|
||||
sodium.preserve_paths = '../../../../../cw_shared_external/ios/External/ios/include/**/*.h'
|
||||
sodium.vendored_libraries = '../../../../../cw_shared_external/ios/External/ios/lib/libsodium.a'
|
||||
sodium.libraries = 'sodium'
|
||||
sodium.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',
|
||||
boost.preserve_paths = 'External/ios/include/**/*.h',
|
||||
boost.vendored_libraries = 'External/ios/lib/libboost.a',
|
||||
boost.libraries = ''
|
||||
boost.xcconfig = { 'HEADER_SEARCH_PATHS' => "${PODS_ROOT}/#{s.name}/External/ios/include/**" }
|
||||
end
|
||||
|
||||
s.subspec 'Zano' do |zano|
|
||||
zano.preserve_paths = 'External/ios/include/**/*.h'
|
||||
zano.vendored_libraries = '../../../../../cw_shared_external/ios/External/ios/lib/zano/libcommon.a', '../../../../../cw_shared_external/ios/External/ios/lib/zano/libcrypto.a', '../../../../../cw_shared_external/ios/External/ios/lib/zano/libcurrency_core.a', '../../../../../cw_shared_external/ios/External/ios/lib/zano/libwallet.a' , '../../../../../cw_shared_external/ios/External/ios/lib/zano/libz.a'
|
||||
zano.vendored_libraries = 'External/ios/lib/libzano.a'
|
||||
zano.libraries = ''
|
||||
zano.xcconfig = { 'HEADER_SEARCH_PATHS' => "${PODS_ROOT}/#{s.name}/External/ios/include" }
|
||||
end
|
||||
|
|
|
@ -11,15 +11,12 @@ PODS:
|
|||
- cw_zano (0.0.1):
|
||||
- cw_zano/Boost (= 0.0.1)
|
||||
- cw_zano/OpenSSL (= 0.0.1)
|
||||
- cw_zano/Sodium (= 0.0.1)
|
||||
- cw_zano/Zano (= 0.0.1)
|
||||
- Flutter
|
||||
- cw_zano/Boost (0.0.1):
|
||||
- Flutter
|
||||
- cw_zano/OpenSSL (0.0.1):
|
||||
- Flutter
|
||||
- cw_zano/Sodium (0.0.1):
|
||||
- Flutter
|
||||
- cw_zano/Zano (0.0.1):
|
||||
- Flutter
|
||||
- device_display_brightness (0.0.1):
|
||||
|
@ -233,7 +230,7 @@ SPEC CHECKSUMS:
|
|||
BigInt: f668a80089607f521586bbe29513d708491ef2f7
|
||||
connectivity_plus: bf0076dd84a130856aa636df1c71ccaff908fa1d
|
||||
CryptoSwift: 967f37cea5a3294d9cce358f78861652155be483
|
||||
cw_zano: 8fee0e1d14163be13c0ee6f08f3cfafa72905710
|
||||
cw_zano: e13e2987734da2e94770540121762c288cdcf5b3
|
||||
device_display_brightness: 1510e72c567a1f6ce6ffe393dcd9afd1426034f7
|
||||
device_info_plus: c6fb39579d0f423935b0c9ce7ee2f44b71b9fce6
|
||||
devicelocale: b22617f40038496deffba44747101255cee005b0
|
||||
|
|
|
@ -1,27 +1,42 @@
|
|||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
. ./config.sh
|
||||
|
||||
MIN_IOS_VERSION=10.0
|
||||
BOOST_URL="https://github.com/cake-tech/Apple-Boost-BuildScript.git"
|
||||
BOOST_DIR_PATH="${EXTERNAL_IOS_SOURCE_DIR}/Apple-Boost-BuildScript"
|
||||
BOOST_VERSION=1.76.0
|
||||
BOOST_LIBS="random regex graph random chrono thread filesystem system date_time locale serialization program_options thread timer atomic"
|
||||
BOOST_VERSION=1.84.0
|
||||
BOOST_LIBS="random regex graph random chrono thread filesystem system date_time locale serialization program_options"
|
||||
|
||||
echo "============================ Boost ============================"
|
||||
|
||||
echo "Cloning Apple-Boost-BuildScript from - $BOOST_URL"
|
||||
git clone -b build $BOOST_URL $BOOST_DIR_PATH
|
||||
cd $BOOST_DIR_PATH
|
||||
|
||||
# Check if the directory already exists.
|
||||
if [ -d "$BOOST_DIR_PATH" ]; then
|
||||
echo "Boost directory already exists."
|
||||
else
|
||||
echo "Cloning Boost from $BOOST_URL"
|
||||
git clone -b build $BOOST_URL $BOOST_DIR_PATH
|
||||
fi
|
||||
|
||||
# Verify if the repository was cloned successfully.
|
||||
if [ -d "$BOOST_DIR_PATH/.git" ]; then
|
||||
echo "Boost repository cloned successfully."
|
||||
cd $BOOST_DIR_PATH
|
||||
git checkout build
|
||||
else
|
||||
echo "Failed to clone Boost repository. Exiting."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
./boost.sh -ios \
|
||||
--min-ios-version ${MIN_IOS_VERSION} \
|
||||
--boost-libs "${BOOST_LIBS}" \
|
||||
--boost-version ${BOOST_VERSION} \
|
||||
-ios \
|
||||
--no-framework
|
||||
|
||||
mv ${BOOST_DIR_PATH}/build/boost/${BOOST_VERSION}/ios/release/prefix/include/* $EXTERNAL_IOS_INCLUDE_DIR
|
||||
#mv ${BOOST_DIR_PATH}/build/boost/${BOOST_VERSION}/ios/release/prefix/lib/* $EXTERNAL_IOS_LIB_DIR
|
||||
mv ${BOOST_DIR_PATH}/build/boost/${BOOST_VERSION}/ios/release/build/iphonesimulator/arm64/* $EXTERNAL_IOS_LIB_DIR
|
||||
|
||||
|
||||
mv -f ${BOOST_DIR_PATH}/build/boost/${BOOST_VERSION}/ios/release/prefix/include/* $EXTERNAL_IOS_INCLUDE_DIR
|
||||
mv -f ${BOOST_DIR_PATH}/build/boost/${BOOST_VERSION}/ios/release/prefix/lib/* $EXTERNAL_IOS_LIB_DIR
|
|
@ -4,5 +4,4 @@
|
|||
./install_missing_headers.sh
|
||||
./build_openssl.sh
|
||||
./build_boost.sh
|
||||
./build_sodium.sh
|
||||
./build_zano.sh
|
|
@ -13,16 +13,21 @@ fi
|
|||
libtool -static -o libboost.a ./libboost_*.a
|
||||
libtool -static -o libhaven.a ./haven/*.a
|
||||
libtool -static -o libmonero.a ./monero/*.a
|
||||
libtool -static -o libzano.a ./zano/*.a
|
||||
|
||||
CW_HAVEN_EXTERNAL_LIB=../../../../../cw_haven/ios/External/ios/lib
|
||||
CW_HAVEN_EXTERNAL_INCLUDE=../../../../../cw_haven/ios/External/ios/include
|
||||
CW_MONERO_EXTERNAL_LIB=../../../../../cw_monero/ios/External/ios/lib
|
||||
CW_MONERO_EXTERNAL_INCLUDE=../../../../../cw_monero/ios/External/ios/include
|
||||
CW_ZANO_EXTERNAL_LIB=../../../../../cw_zano/ios/External/ios/lib
|
||||
CW_ZANO_EXTERNAL_INCLUDE=../../../../../cw_zano/ios/External/ios/include
|
||||
|
||||
mkdir -p $CW_HAVEN_EXTERNAL_INCLUDE
|
||||
mkdir -p $CW_MONERO_EXTERNAL_INCLUDE
|
||||
mkdir -p $CW_ZANO_EXTERNAL_INCLUDE
|
||||
mkdir -p $CW_HAVEN_EXTERNAL_LIB
|
||||
mkdir -p $CW_MONERO_EXTERNAL_LIB
|
||||
mkdir -p $CW_ZANO_EXTERNAL_LIB
|
||||
|
||||
ln ./libboost.a ${CW_HAVEN_EXTERNAL_LIB}/libboost.a
|
||||
ln ./libcrypto.a ${CW_HAVEN_EXTERNAL_LIB}/libcrypto.a
|
||||
|
@ -38,3 +43,9 @@ 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
|
||||
|
||||
ln ./libboost.a ${CW_ZANO_EXTERNAL_LIB}/libboost.a
|
||||
ln ./libcrypto.a ${CW_ZANO_EXTERNAL_LIB}/libcrypto.a
|
||||
ln ./libssl.a ${CW_ZANO_EXTERNAL_LIB}/libssl.a
|
||||
cp ./libzano.a $CW_ZANO_EXTERNAL_LIB
|
||||
cp ../include/zano/* $CW_ZANO_EXTERNAL_INCLUDE
|
||||
|
|
Loading…
Reference in a new issue