mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-17 05:41:29 +02:00
monero: update dependencies (#3064)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
source "$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)/functions.sh"
|
||||
|
||||
# Usage: env USE_DOCKER= ./build_all.sh
|
||||
# Usage: env USE_DOCKER= ./build_all.sh
|
||||
|
||||
set -x -e
|
||||
|
||||
@@ -12,15 +12,33 @@ cd "$(dirname "$0")"
|
||||
for COIN in monero wownero zano;
|
||||
do
|
||||
pushd ../monero_c
|
||||
monero_c_tag=$(git describe --tags)
|
||||
for target in {x86_64,aarch64}-linux-android armv7a-linux-androideabi
|
||||
do
|
||||
if [[ -f "release/${COIN}/${target}_libwallet2_api_c.so" ]];
|
||||
if [[ -f "release/${monero_c_tag}/${target}/${COIN}_libwallet2_api_c.so" ]];
|
||||
then
|
||||
echo "file exist, not building monero_c for ${COIN}/$target.";
|
||||
else
|
||||
./build_single.sh ${COIN} $target -j$MAKE_JOB_COUNT
|
||||
unxz -f ../monero_c/release/${COIN}/${target}_libwallet2_api_c.so.xz
|
||||
fi
|
||||
|
||||
case $target in
|
||||
x86_64-linux-android)
|
||||
mkdir -p ../../android/app/src/main/jniLibs/x86_64 || true
|
||||
cp ../monero_c/release/${monero_c_tag}/${target}/lib${COIN}_wallet2_api_c.so ../../android/app/src/main/jniLibs/x86_64/
|
||||
;;
|
||||
armv7a-linux-androideabi)
|
||||
mkdir -p ../../android/app/src/main/jniLibs/armeabi-v7a || true
|
||||
cp ../monero_c/release/${monero_c_tag}/${target}/lib${COIN}_wallet2_api_c.so ../../android/app/src/main/jniLibs/armeabi-v7a/
|
||||
;;
|
||||
aarch64-linux-android)
|
||||
mkdir -p ../../android/app/src/main/jniLibs/arm64-v8a || true
|
||||
cp ../monero_c/release/${monero_c_tag}/${target}/lib${COIN}_wallet2_api_c.so ../../android/app/src/main/jniLibs/arm64-v8a/
|
||||
;;
|
||||
*)
|
||||
echo "Unsupported target: $target"
|
||||
exit 1;
|
||||
esac
|
||||
done
|
||||
popd
|
||||
done
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
source "$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)/functions.sh"
|
||||
source "$(cd "$(dirname "$0")/.." && pwd)/functions.sh"
|
||||
|
||||
. ./config.sh
|
||||
# ./install_missing_headers.sh
|
||||
@@ -19,16 +19,8 @@ for COIN in monero wownero zano;
|
||||
do
|
||||
pushd ../monero_c
|
||||
./build_single.sh ${COIN} aarch64-apple-ios -j$MAKE_JOB_COUNT
|
||||
./build_single.sh ${COIN} aarch64-apple-iossimulator -j$MAKE_JOB_COUNT
|
||||
./build_single.sh ${COIN} aarch64-apple-ios-simulator -j$MAKE_JOB_COUNT
|
||||
popd
|
||||
done
|
||||
|
||||
unxz -fk ../monero_c/release/monero/aarch64-apple-ios_libwallet2_api_c.dylib.xz
|
||||
unxz -fk ../monero_c/release/wownero/aarch64-apple-ios_libwallet2_api_c.dylib.xz
|
||||
unxz -fk ../monero_c/release/zano/aarch64-apple-ios_libwallet2_api_c.dylib.xz
|
||||
|
||||
unxz -fk ../monero_c/release/monero/aarch64-apple-iossimulator_libwallet2_api_c.dylib.xz
|
||||
unxz -fk ../monero_c/release/wownero/aarch64-apple-iossimulator_libwallet2_api_c.dylib.xz
|
||||
unxz -fk ../monero_c/release/zano/aarch64-apple-iossimulator_libwallet2_api_c.dylib.xz
|
||||
|
||||
./gen_framework.sh
|
||||
./gen_framework.sh
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
set -e
|
||||
|
||||
IOS_DIR="$(pwd)/../../ios"
|
||||
DYLIB_PATH="$(pwd)/../../scripts/monero_c/release"
|
||||
monero_c_tag=$(cd $(pwd)/../../scripts/monero_c/; git describe --tags)
|
||||
DYLIB_PATH="$(pwd)/../../scripts/monero_c/release/${monero_c_tag}/"
|
||||
TMP_DIR="${IOS_DIR}/tmp"
|
||||
|
||||
rm -rf "${IOS_DIR:?}/MoneroWallet.xcframework" "${IOS_DIR:?}/WowneroWallet.xcframework" "${IOS_DIR:?}/ZanoWallet.xcframework"
|
||||
@@ -16,7 +17,7 @@ write_info_plist() {
|
||||
target="$3"
|
||||
plist_path="${framework_bundle}/Info.plist"
|
||||
|
||||
if [[ "x$target" = "xiossimulator" ]]; then
|
||||
if [[ "x$target" = "xios-simulator" ]]; then
|
||||
platform="iPhoneSimulator"
|
||||
dtplatformname="iphonesimulator"
|
||||
dtsdkname="iphonesimulator17.4"
|
||||
@@ -97,11 +98,11 @@ create_framework() {
|
||||
echo "Creating ${framework_name}.framework for target ${target} in ${out_dir}..."
|
||||
|
||||
framework_bundle="${out_dir}/${framework_name}.framework"
|
||||
|
||||
|
||||
rm -rf "$framework_bundle"
|
||||
mkdir -p "$framework_bundle"
|
||||
|
||||
input_dylib="${DYLIB_PATH}/${wallet}/aarch64-apple-${target}_libwallet2_api_c.dylib"
|
||||
input_dylib="${DYLIB_PATH}/aarch64-apple-${target}/lib${wallet}_wallet2_api_c.dylib"
|
||||
if [[ ! -f "$input_dylib" ]]; then
|
||||
echo "Error: Input dylib not found: $input_dylib"
|
||||
exit 1
|
||||
@@ -144,7 +145,7 @@ for i in "${!wallets[@]}"; do
|
||||
mkdir -p "$device_out" "$simulator_out"
|
||||
|
||||
create_framework "$wallet" "$framework_name" "ios" "$device_out"
|
||||
create_framework "$wallet" "$framework_name" "iossimulator" "$simulator_out"
|
||||
create_framework "$wallet" "$framework_name" "ios-simulator" "$simulator_out"
|
||||
|
||||
device_framework="${device_out}/${framework_name}.framework"
|
||||
simulator_framework="${simulator_out}/${framework_name}.framework"
|
||||
|
||||
@@ -16,13 +16,7 @@ do
|
||||
else
|
||||
target="x86_64-linux-gnu"
|
||||
fi
|
||||
|
||||
if [[ -f "release/${COIN}/${target}_libwallet2_api_c.so" ]];
|
||||
then
|
||||
echo "file exist, not building monero_c for ${COIN}/$target.";
|
||||
else
|
||||
./build_single.sh ${COIN} $target -j$MAKE_JOB_COUNT
|
||||
unxz -f ../monero_c/release/${COIN}/${target}_libwallet2_api_c.so.xz
|
||||
fi
|
||||
|
||||
./build_single.sh ${COIN} $target -j$MAKE_JOB_COUNT
|
||||
popd
|
||||
done
|
||||
done
|
||||
|
||||
@@ -6,8 +6,8 @@ cd "$(dirname "$0")"
|
||||
NPROC="-j$(sysctl -n hw.logicalcpu)"
|
||||
MONERO_LIBS=""
|
||||
WOWNERO_LIBS=""
|
||||
MONEROC_RELEASE_DIR="../monero_c/release/monero"
|
||||
WOWNEROC_RELEASE_DIR="../monero_c/release/wownero"
|
||||
monero_c_tag=$(cd ../monero_c/; git describe --tags)
|
||||
MONEROC_RELEASE_DIR="../monero_c/release/${monero_c_tag}"
|
||||
|
||||
../prepare_moneroc.sh
|
||||
|
||||
@@ -35,8 +35,8 @@ else
|
||||
HOST="x86_64-apple-darwin"
|
||||
fi
|
||||
|
||||
MONERO_LIBS="$MONERO_LIBS -arch ${ARCH} ${MONEROC_RELEASE_DIR}/${HOST}_libwallet2_api_c.dylib"
|
||||
WOWNERO_LIBS="$WOWNERO_LIBS -arch ${ARCH} ${WOWNEROC_RELEASE_DIR}/${HOST}_libwallet2_api_c.dylib"
|
||||
MONERO_LIBS="$MONERO_LIBS -arch ${ARCH} ${MONEROC_RELEASE_DIR}/${HOST}/libmonero_libwallet2_api_c.dylib"
|
||||
WOWNERO_LIBS="$WOWNERO_LIBS -arch ${ARCH} ${MONEROC_RELEASE_DIR}/${HOST}/libwownero_libwallet2_api_c.dylib"
|
||||
|
||||
pushd ../monero_c
|
||||
./build_single.sh ${COIN} ${HOST} -j$MAKE_JOB_COUNT
|
||||
|
||||
@@ -9,18 +9,17 @@ then
|
||||
rm -rf monero_c
|
||||
git clone https://github.com/mrcyjanek/monero_c --branch master monero_c
|
||||
cd monero_c
|
||||
# NOTE: Make sure to update monero_c prebuilds link in workflow files
|
||||
# https://github.com/MrCyjaneK/monero_c/releases/download/v0.18.4.0-RC9/release-bundle.zip
|
||||
git checkout 411e8a1cdb3f4c2812d83f28c335d2a4eb18bd29
|
||||
git reset --hard
|
||||
git submodule update --init --force --recursive
|
||||
./apply_patches.sh monero
|
||||
./apply_patches.sh wownero
|
||||
./apply_patches.sh zano
|
||||
else
|
||||
cd monero_c
|
||||
fi
|
||||
|
||||
# NOTE: Make sure to update monero_c prebuilds link in workflow files
|
||||
# https://github.com/MrCyjaneK/monero_c/releases/download/v0.18.4.6-RC1/release-bundle.zip
|
||||
git fetch -a
|
||||
git checkout c157cb82973b05d1226b39b4d8de0bec4aa10000
|
||||
git reset --hard
|
||||
git submodule update --init --force --recursive
|
||||
|
||||
for coin in monero wownero zano;
|
||||
do
|
||||
if [[ ! -f "$coin/.patch-applied" ]];
|
||||
|
||||
Reference in New Issue
Block a user