From b2c603a47b127cb5eb48d3a600f77b08a36666aa Mon Sep 17 00:00:00 2001 From: mkyq <53115730+mkyq@users.noreply.github.com> Date: Mon, 1 May 2023 09:36:46 -0400 Subject: [PATCH] Fix gen scripts. Change default arch for macos application. (#901) * Fix gen scripts. Change default arch for macos application. * Add combine script for combine arm and x86_64 libs. * - Update Mac version for release - Update branch with main [skip ci] --------- Co-authored-by: OmarHatem --- macos/Podfile.lock | 2 +- macos/Runner.xcodeproj/project.pbxproj | 6 +++--- scripts/macos/app_env.sh | 4 ++-- scripts/macos/combine.sh | 17 +++++++++++++++++ scripts/macos/gen_common.sh | 6 +----- scripts/macos/gen_universal.sh | 2 +- 6 files changed, 25 insertions(+), 12 deletions(-) create mode 100755 scripts/macos/combine.sh diff --git a/macos/Podfile.lock b/macos/Podfile.lock index a56166e28..ea15b9495 100644 --- a/macos/Podfile.lock +++ b/macos/Podfile.lock @@ -103,7 +103,7 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: connectivity_macos: 5dae6ee11d320fac7c05f0d08bd08fc32b5514d9 - cw_monero: f8b7f104508efba2591548e76b5c058d05cba3f0 + cw_monero: ec03de55a19c4a2b174ea687e0f4202edc716fa4 device_info_plus: 5401765fde0b8d062a2f8eb65510fb17e77cf07f devicelocale: 9f0f36ac651cabae2c33f32dcff4f32b61c38225 flutter_secure_storage_macos: 6ceee8fbc7f484553ad17f79361b556259df89aa diff --git a/macos/Runner.xcodeproj/project.pbxproj b/macos/Runner.xcodeproj/project.pbxproj index 06558bf57..a7d9e2807 100644 --- a/macos/Runner.xcodeproj/project.pbxproj +++ b/macos/Runner.xcodeproj/project.pbxproj @@ -423,7 +423,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; buildSettings = { - ARCHS = arm64; + ARCHS = "$(ARCHS_STANDARD)"; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; @@ -557,7 +557,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; buildSettings = { - ARCHS = arm64; + ARCHS = "$(ARCHS_STANDARD)"; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; @@ -585,7 +585,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; buildSettings = { - ARCHS = arm64; + ARCHS = "$(ARCHS_STANDARD)"; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Release.entitlements; diff --git a/scripts/macos/app_env.sh b/scripts/macos/app_env.sh index 76a32903b..785dc9e24 100755 --- a/scripts/macos/app_env.sh +++ b/scripts/macos/app_env.sh @@ -15,8 +15,8 @@ if [ -n "$1" ]; then fi CAKEWALLET_NAME="Cake Wallet" -CAKEWALLET_VERSION="1.0.2" -CAKEWALLET_BUILD_NUMBER=18 +CAKEWALLET_VERSION="1.0.3" +CAKEWALLET_BUILD_NUMBER=20 CAKEWALLET_BUNDLE_ID="com.fotolockr.cakewallet" if ! [[ " ${TYPES[*]} " =~ " ${APP_MACOS_TYPE} " ]]; then diff --git a/scripts/macos/combine.sh b/scripts/macos/combine.sh new file mode 100755 index 000000000..37c2c85fb --- /dev/null +++ b/scripts/macos/combine.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +. ./config.sh + +cd $EXTERNAL_DIR +mkdir -p $EXTERNAL_MACOS_LIB_DIR + +EXTERNAL_DIR_MACOS_ARM=${EXTERNAL_DIR}/macos-arm/lib +EXTERNAL_DIR_MACOS_X86_64=${EXTERNAL_DIR}/macos-x86_64/lib + +LIBS=(libboost.a libcrypto.a libssl.a libsodium.a libunbound.a libmonero.a) + +for lib in ${LIBS[@]}; do + echo ${EXTERNAL_DIR_MACOS_ARM}/$lib + echo ${EXTERNAL_DIR_MACOS_X86_64}/$lib + lipo -create -arch arm64 ${EXTERNAL_DIR_MACOS_ARM}/$lib -arch x86_64 ${EXTERNAL_DIR_MACOS_X86_64}/$lib -output ${EXTERNAL_MACOS_LIB_DIR}/$lib; +done \ No newline at end of file diff --git a/scripts/macos/gen_common.sh b/scripts/macos/gen_common.sh index 62f4effab..87fd54b43 100755 --- a/scripts/macos/gen_common.sh +++ b/scripts/macos/gen_common.sh @@ -15,13 +15,9 @@ gen_podspec() { gen_project() { ARCH=$1 CW_DIR="`pwd`/../../macos/Runner.xcodeproj" - BASE_FILENAME="project_base.pbxproj" - BASE_FILE_PATH="${CW_DIR}/${BASE_FILENAME}" DEFAULT_FILENAME="project.pbxproj" DEFAULT_FILE_PATH="${CW_DIR}/${DEFAULT_FILENAME}" - rm -f $DEFAULT_FILE_PATH - cp $BASE_FILE_PATH $DEFAULT_FILE_PATH - sed -i '' "s/ARCHS =.*/ARCHS = ${ARCH};/g" $DEFAULT_FILE_PATH + sed -i '' "s/ARCHS =.*/ARCHS = \"${ARCH}\";/g" $DEFAULT_FILE_PATH } gen() { diff --git a/scripts/macos/gen_universal.sh b/scripts/macos/gen_universal.sh index 6056053a5..283411804 100755 --- a/scripts/macos/gen_universal.sh +++ b/scripts/macos/gen_universal.sh @@ -2,4 +2,4 @@ . ./gen_common.sh -gen "arm64, x86_64" \ No newline at end of file +gen "\$(ARCHS_STANDARD)" \ No newline at end of file