OLD | NEW |
1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import("//build/config/mac/base_rules.gni") | 5 import("//build/config/mac/base_rules.gni") |
6 | 6 |
7 # Generates Info.plist files for Mac apps and frameworks. | 7 # Generates Info.plist files for Mac apps and frameworks. |
8 # | 8 # |
9 # Arguments | 9 # Arguments |
10 # | 10 # |
11 # info_plist: | 11 # info_plist: |
12 # string, the path to an plist file that will be included in the final | 12 # string, the path to an plist file that will be included in the final |
13 # Info.plist generated. | 13 # Info.plist generated. |
14 # | 14 # |
15 # executable_name: | 15 # executable_name: |
16 # string, name of the generated target used for the product | 16 # string, name of the generated target used for the product |
17 # and executable name as specified in the output Info.plist. | 17 # and executable name as specified in the output Info.plist. |
18 # | 18 # |
19 # extra_substitutions: | 19 # extra_substitutions: |
20 # (optional) string array, 'key=value' pairs for extra fields which are | 20 # (optional) string array, 'key=value' pairs for extra fields which are |
21 # specified in a source Info.plist template. | 21 # specified in a source Info.plist template. |
22 template("mac_info_plist") { | 22 template("mac_info_plist") { |
23 info_plist(target_name) { | 23 info_plist(target_name) { |
| 24 format = "xml1" |
24 extra_substitutions = [] | 25 extra_substitutions = [] |
25 if (defined(invoker.extra_substitutions)) { | 26 if (defined(invoker.extra_substitutions)) { |
26 extra_substitutions = invoker.extra_substitutions | 27 extra_substitutions = invoker.extra_substitutions |
27 } | 28 } |
28 extra_substitutions += [ | 29 extra_substitutions += [ |
29 "MAC_SDK_BUILD=$mac_sdk_build", | 30 "MAC_SDK_BUILD=$mac_sdk_build", |
30 "MAC_SDK_NAME=$mac_sdk_name$mac_sdk_version", | 31 "MAC_SDK_NAME=$mac_sdk_name$mac_sdk_version", |
31 ] | 32 ] |
32 plist_templates = [ | 33 plist_templates = [ |
33 "//build/config/mac/BuildInfo.plist", | 34 "//build/config/mac/BuildInfo.plist", |
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 ]) | 302 ]) |
302 if (!defined(deps)) { | 303 if (!defined(deps)) { |
303 deps = [] | 304 deps = [] |
304 } | 305 } |
305 deps += [ ":$_loadable_module_bundle_data" ] | 306 deps += [ ":$_loadable_module_bundle_data" ] |
306 | 307 |
307 bundle_root_dir = "$root_out_dir/$_output_name.plugin/Contents" | 308 bundle_root_dir = "$root_out_dir/$_output_name.plugin/Contents" |
308 bundle_executable_dir = "$bundle_root_dir/MacOS" | 309 bundle_executable_dir = "$bundle_root_dir/MacOS" |
309 } | 310 } |
310 } | 311 } |
OLD | NEW |