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 # |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 # of info_plist. The two arguments are mutually exclusive. | 207 # of info_plist. The two arguments are mutually exclusive. |
208 # | 208 # |
209 # output_name: | 209 # output_name: |
210 # (optional) string, name of the generated app without the | 210 # (optional) string, name of the generated app without the |
211 # .app suffix. If omitted, defaults to target_name. | 211 # .app suffix. If omitted, defaults to target_name. |
212 # | 212 # |
213 # extra_configs: | 213 # extra_configs: |
214 # (optional) list of label, additional configs to apply to the | 214 # (optional) list of label, additional configs to apply to the |
215 # executable target. | 215 # executable target. |
216 # | 216 # |
| 217 # remove_configs: |
| 218 # (optional) list of label, default configs to remove from the target. |
| 219 # |
217 # extra_substitutions: | 220 # extra_substitutions: |
218 # (optional) string array, 'key=value' pairs for extra fields which are | 221 # (optional) string array, 'key=value' pairs for extra fields which are |
219 # specified in a source Info.plist template. | 222 # specified in a source Info.plist template. |
220 template("mac_app_bundle") { | 223 template("mac_app_bundle") { |
221 _target_name = target_name | 224 _target_name = target_name |
222 _output_name = target_name | 225 _output_name = target_name |
223 if (defined(invoker.output_name)) { | 226 if (defined(invoker.output_name)) { |
224 _output_name = invoker.output_name | 227 _output_name = invoker.output_name |
225 } | 228 } |
226 | 229 |
(...skipping 20 matching lines...) Expand all Loading... |
247 [ | 250 [ |
248 "assert_no_deps", | 251 "assert_no_deps", |
249 "data_deps", | 252 "data_deps", |
250 "info_plist", | 253 "info_plist", |
251 "output_name", | 254 "output_name", |
252 "visibility", | 255 "visibility", |
253 ]) | 256 ]) |
254 if (defined(extra_configs)) { | 257 if (defined(extra_configs)) { |
255 configs += extra_configs | 258 configs += extra_configs |
256 } | 259 } |
| 260 if (defined(remove_configs)) { |
| 261 configs -= remove_configs |
| 262 } |
257 output_name = _output_name | 263 output_name = _output_name |
258 output_dir = "$target_out_dir/$_executable_target" | 264 output_dir = "$target_out_dir/$_executable_target" |
259 } | 265 } |
260 | 266 |
261 bundle_data(_executable_bundle_data) { | 267 bundle_data(_executable_bundle_data) { |
262 visibility = [ ":$_target_name" ] | 268 visibility = [ ":$_target_name" ] |
263 forward_variables_from(invoker, [ "testonly" ]) | 269 forward_variables_from(invoker, [ "testonly" ]) |
264 sources = [ | 270 sources = [ |
265 "$target_out_dir/$_executable_target/$_output_name", | 271 "$target_out_dir/$_executable_target/$_output_name", |
266 ] | 272 ] |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
363 ]) | 369 ]) |
364 if (!defined(deps)) { | 370 if (!defined(deps)) { |
365 deps = [] | 371 deps = [] |
366 } | 372 } |
367 deps += [ ":$_loadable_module_bundle_data" ] | 373 deps += [ ":$_loadable_module_bundle_data" ] |
368 | 374 |
369 bundle_root_dir = "$root_out_dir/$_output_name.plugin/Contents" | 375 bundle_root_dir = "$root_out_dir/$_output_name.plugin/Contents" |
370 bundle_executable_dir = "$bundle_root_dir/MacOS" | 376 bundle_executable_dir = "$bundle_root_dir/MacOS" |
371 } | 377 } |
372 } | 378 } |
OLD | NEW |