diff --git a/frontend/Makefile.toml b/frontend/Makefile.toml index 0dbc58d572..42708d7c32 100644 --- a/frontend/Makefile.toml +++ b/frontend/Makefile.toml @@ -68,6 +68,7 @@ RUST_COMPILE_TARGET = "aarch64-apple-darwin" FLUTTER_OUTPUT_DIR = "Release" PRODUCT_EXT = "app" APP_ENVIRONMENT = "production" +BUILD_ARCHS = "arm64" [env.production-mac-x86_64] BUILD_FLAG = "release" @@ -76,6 +77,7 @@ RUST_COMPILE_TARGET = "x86_64-apple-darwin" FLUTTER_OUTPUT_DIR = "Release" PRODUCT_EXT = "app" APP_ENVIRONMENT = "production" +BUILD_ARCHS = "x86_64" [env.development-windows-x86] TARGET_OS = "windows" @@ -146,6 +148,7 @@ script = [ echo PRODUCT_EXT: ${PRODUCT_EXT} echo APP_ENVIRONMENT: ${APP_ENVIRONMENT} echo ${platforms} + echo ${BUILD_ARCHS} ''' ] script_runner = "@shell" diff --git a/frontend/app_flowy/macos/Podfile b/frontend/app_flowy/macos/Podfile index dade8dfad0..e806f574bd 100644 --- a/frontend/app_flowy/macos/Podfile +++ b/frontend/app_flowy/macos/Podfile @@ -26,6 +26,23 @@ require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelpe flutter_macos_podfile_setup +def build_specify_archs_only + if ENV.has_key?('BUILD_ARCHS') + xcodeproj_path = File.dirname(__FILE__) + '/Runner.xcodeproj' + project = Xcodeproj::Project.open(xcodeproj_path) + project.targets.each do |target| + if target.name == 'Runner' + target.build_configurations.each do |config| + config.build_settings['ARCHS'] = ENV['BUILD_ARCHS'] + end + end + end + project.save() + end +end + +build_specify_archs_only() + target 'Runner' do use_frameworks! use_modular_headers!