From 6effb999a6e24054884ffc05c56a6c0d96a53d33 Mon Sep 17 00:00:00 2001 From: Xilai Zhang Date: Tue, 2 Aug 2022 08:51:08 -0700 Subject: [PATCH] [gn] entitlement config for macos framework zip (flutter/engine#34987) --- .../shell/platform/darwin/macos/BUILD.gn | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/engine/src/flutter/shell/platform/darwin/macos/BUILD.gn b/engine/src/flutter/shell/platform/darwin/macos/BUILD.gn index 640e340b3f..0381e6feb8 100644 --- a/engine/src/flutter/shell/platform/darwin/macos/BUILD.gn +++ b/engine/src/flutter/shell/platform/darwin/macos/BUILD.gn @@ -306,6 +306,10 @@ action("_generate_symlinks") { ":copy_framework_module_map", ":copy_license", ] + metadata = { + macos_framework_without_entitlement = + [ "FlutterMacOS.framework.zip/Versions/A/FlutterMacOS" ] + } } group("flutter_framework") { @@ -332,8 +336,19 @@ zip_bundle("zip_macos_flutter_framework") { ] } +generated_file("macos_framework_without_entitlement_config") { + outputs = [ "$target_gen_dir/framework_without_entitlements.txt" ] + + data_keys = [ "macos_framework_without_entitlement" ] + + deps = [ ":_generate_symlinks" ] +} + zip_bundle("macos_flutter_framework_archive") { - deps = [ ":zip_macos_flutter_framework" ] + deps = [ + ":macos_framework_without_entitlement_config", + ":zip_macos_flutter_framework", + ] prefix = "$full_platform_name-$flutter_runtime_mode/" if (flutter_runtime_mode == "debug") { prefix = "$full_platform_name/" @@ -344,5 +359,9 @@ zip_bundle("macos_flutter_framework_archive") { source = "$root_out_dir/zip_archives/tmp/FlutterMacOS.framework.zip" destination = "FlutterMacOS.framework.zip" }, + { + source = "$target_gen_dir/framework_without_entitlements.txt" + destination = "without_entitlements.txt" + }, ] }