1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
|
# Copyright 2024 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/apple/compile_entitlements.gni")
import("//build/apple/tweak_info_plist.gni")
import("//build/config/ios/rules.gni")
import("//build/ios/extension_bundle_data.gni")
import("//ios/build/chrome_build.gni")
import("//ios/build/config.gni")
template("browserkit_extension") {
_process_target = target_name
_bundle_name = "test_${_process_target}"
target_name = _bundle_name
tweak_info_plist("tweak_${target_name}_plist") {
info_plist = "//content/app/ios/appex/${_process_target}.plist"
}
extension_bundle_data("${target_name}_bundle") {
forward_variables_from(invoker, TESTONLY_AND_VISIBILITY)
extension_dir = "Extensions"
extension_name = "${_bundle_name}.appex"
extension_target = ":${_bundle_name}"
}
compile_entitlements("${target_name}_entitlements") {
substitutions = [ "IOS_BUNDLE_ID_PREFIX=$ios_app_bundle_id_prefix" ]
output_name = "$target_gen_dir/${_process_target}.appex.entitlements"
entitlements_templates =
[ "//content/app/ios/appex/${_process_target}.appex.entitlements" ]
}
# We don't use ios_appex_bundle here because we don't want to mess with multiple
# toolkits as the core framework is built with the default toolkit.
ios_app_bundle(target_name) {
forward_variables_from(invoker,
"*",
[
"defines",
"deps",
"framework_dirs",
"frameworks",
"public_deps",
"sources",
"target_name",
])
output_name = target_name
transparent = true
deps = [
"//content/app/ios/appex:${_process_target}",
"//content/public/app",
"//content/public/app",
"//content/public/common",
"//content/shell:content_shell_app",
"//content/shell:content_shell_lib",
"//content/test:browsertest_support",
"//content/test:default_content_test_launcher",
"//third_party/icu:icudata",
]
if (!defined(ldflags)) {
ldflags = []
}
ldflags += [
"-Wl,--ignore-auto-link-option=CoreAudioTypes",
"-Wl,-no_application_extension",
"-Wl,-rpath,@executable_path/../../Frameworks",
]
product_type = "com.apple.product-type.app-extension"
entitlements_target = ":${target_name}_entitlements"
info_plist_target = ":tweak_${target_name}_plist"
}
}
set_defaults("browserkit_extension") {
configs = [ "//build/config/ios:ios_extension_executable_flags" ]
}
|