mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-01-24 11:36:21 +00:00
Add ability to build monero wallet lib as universal lib. Update macOS build guide. Change default arch for macOS project to .
This commit is contained in:
parent
888543c3fd
commit
bf2ff45282
3 changed files with 42 additions and 8 deletions
|
@ -74,6 +74,15 @@ Build the Monero libraries and their dependencies:
|
||||||
|
|
||||||
`$ ./build_monero_all.sh`
|
`$ ./build_monero_all.sh`
|
||||||
|
|
||||||
|
If you be needed to build universal monero lib, then it will require additional steps. Steps for build universal monero lib on mac with Apple Silicon (arm64):
|
||||||
|
|
||||||
|
- Need to install Rosetta: `$ softwareupdate --install-rosetta`
|
||||||
|
- Need to install [Brew](https://brew.sh/) with rosetta: `$ arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"` (or take another way to install brew, but be use that you have installed it into /usr/local as it's using for x86_64 macs)
|
||||||
|
- Install dependencies for build monero wallet lib for x86_64 with brew: `$ arch -x86_64 /usr/local/bin/brew install unbound boost@1.76 zmq` and link installed boost@1.76 for x86_64 `$ arch -x86_64 /usr/local/bin/brew link boost@1.76`
|
||||||
|
- Run building script with additional argument: `$ ./build_monero_all.sh universal`
|
||||||
|
|
||||||
|
If you will be needed to build monero wallet lib only for x86_64 on arm64 mac, then you need use steps above, but run build script with rosetta without arguments: `$ arch -x86_64 ./build_monero_all.sh`.
|
||||||
|
|
||||||
It is now time to change back to the base directory of the CakeWallet source code:
|
It is now time to change back to the base directory of the CakeWallet source code:
|
||||||
|
|
||||||
`$ cd ../../`
|
`$ cd ../../`
|
||||||
|
|
|
@ -437,7 +437,7 @@
|
||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */;
|
baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
ARCHS = arm64;
|
ARCHS = "$(ARCHS_STANDARD)";
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
||||||
|
@ -572,7 +572,7 @@
|
||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */;
|
baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
ARCHS = arm64;
|
ARCHS = "$(ARCHS_STANDARD)";
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
||||||
|
@ -601,7 +601,7 @@
|
||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */;
|
baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
ARCHS = arm64;
|
ARCHS = "$(ARCHS_STANDARD)";
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
||||||
|
|
|
@ -4,6 +4,8 @@ set -x -e
|
||||||
cd "$(dirname "$0")"
|
cd "$(dirname "$0")"
|
||||||
|
|
||||||
NPROC="-j$(sysctl -n hw.logicalcpu)"
|
NPROC="-j$(sysctl -n hw.logicalcpu)"
|
||||||
|
LIBS=""
|
||||||
|
MONEROC_RELEASE_DIR="../monero_c/release/monero"
|
||||||
|
|
||||||
../prepare_moneroc.sh
|
../prepare_moneroc.sh
|
||||||
|
|
||||||
|
@ -18,13 +20,36 @@ then
|
||||||
popd
|
popd
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
|
if [[ "x$1" == "xuniversal" ]]; then
|
||||||
|
ARCHS=(arm64 x86_64)
|
||||||
|
else
|
||||||
|
ARCHS=$(uname -m)
|
||||||
|
fi
|
||||||
for COIN in monero;
|
for COIN in monero;
|
||||||
do
|
do
|
||||||
|
for ARCH in "${ARCHS[@]}";
|
||||||
|
do
|
||||||
|
if [[ "$ARCH" == "arm64" ]]; then
|
||||||
|
export HOMEBREW_PREFIX=/opt/homebrew
|
||||||
|
HOST="aarch64-host-apple-darwin"
|
||||||
|
else
|
||||||
|
export HOMEBREW_PREFIX=/usr/local
|
||||||
|
HOST="${ARCH}-host-apple-darwin"
|
||||||
|
fi
|
||||||
|
|
||||||
|
LIBS="${LIBS} -arch ${ARCH} ${MONEROC_RELEASE_DIR}/${HOST}_libwallet2_api_c.dylib"
|
||||||
|
|
||||||
|
if [[ ! $(uname -m) == $ARCH ]]; then
|
||||||
|
PRC="arch -${ARCH}"
|
||||||
|
fi
|
||||||
|
|
||||||
pushd ../monero_c
|
pushd ../monero_c
|
||||||
./build_single.sh ${COIN} host-apple-darwin $NPROC
|
$PRC ./build_single.sh ${COIN} ${HOST} $NPROC
|
||||||
|
unxz -f ./release/monero/${HOST}_libwallet2_api_c.dylib.xz
|
||||||
|
|
||||||
popd
|
popd
|
||||||
done
|
done
|
||||||
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
unxz -f ../monero_c/release/monero/host-apple-darwin_libwallet2_api_c.dylib.xz
|
lipo -create ${LIBS} -output "${MONEROC_RELEASE_DIR}/host-apple-darwin_libwallet2_api_c.dylib"
|
||||||
# unxz -f ../monero_c/release/wownero/host-apple-darwin_libwallet2_api_c.dylib.xz
|
|
||||||
|
|
Loading…
Reference in a new issue