| 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 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 _framework_toc += invoker.framework_contents | 275 _framework_toc += invoker.framework_contents |
| 276 _framework_contents += invoker.framework_contents | 276 _framework_contents += invoker.framework_contents |
| 277 } | 277 } |
| 278 _framework_toc_file = "$target_out_dir/${target_name}.toc" | 278 _framework_toc_file = "$target_out_dir/${target_name}.toc" |
| 279 write_file(_framework_toc_file, _framework_toc) | 279 write_file(_framework_toc_file, _framework_toc) |
| 280 | 280 |
| 281 # Create local variables for referencing different parts of the bundle. | 281 # Create local variables for referencing different parts of the bundle. |
| 282 _framework_target = _target_name | 282 _framework_target = _target_name |
| 283 _framework_name = _output_name + ".framework" | 283 _framework_name = _output_name + ".framework" |
| 284 _framework_base_dir = "$root_out_dir/$_framework_name" | 284 _framework_base_dir = "$root_out_dir/$_framework_name" |
| 285 dsym_name = "${_framework_name}.dSYM" |
| 285 if (defined(invoker.framework_version) && invoker.framework_version != "") { | 286 if (defined(invoker.framework_version) && invoker.framework_version != "") { |
| 286 _framework_version = invoker.framework_version | 287 _framework_version = invoker.framework_version |
| 287 _framework_root_dir = _framework_base_dir + "/Versions/$_framework_version" | 288 _framework_root_dir = _framework_base_dir + "/Versions/$_framework_version" |
| 288 } else { | 289 } else { |
| 289 _framework_root_dir = _framework_base_dir | 290 _framework_root_dir = _framework_base_dir |
| 290 } | 291 } |
| 291 | 292 |
| 292 # Clean the entire framework if the framework_version changes. | 293 # Clean the entire framework if the framework_version changes. |
| 293 _version_arg = "''" | 294 _version_arg = "''" |
| 294 if (defined(invoker.framework_version)) { | 295 if (defined(invoker.framework_version)) { |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 496 _product_type = "com.apple.product-type.application" | 497 _product_type = "com.apple.product-type.application" |
| 497 _write_pkg_info = true | 498 _write_pkg_info = true |
| 498 } else if (_package_type == "xpc") { | 499 } else if (_package_type == "xpc") { |
| 499 _output_extension = "xpc" | 500 _output_extension = "xpc" |
| 500 _product_type = "com.apple.product-type.xpc-service" | 501 _product_type = "com.apple.product-type.xpc-service" |
| 501 _write_pkg_info = false | 502 _write_pkg_info = false |
| 502 } else { | 503 } else { |
| 503 assert(false, "Unsupported packge_type: " + packge_type) | 504 assert(false, "Unsupported packge_type: " + packge_type) |
| 504 } | 505 } |
| 505 | 506 |
| 507 dsym_name = "${_output_name}.${_output_extension}.dSYM" |
| 508 |
| 506 _executable_target = target_name + "_executable" | 509 _executable_target = target_name + "_executable" |
| 507 _executable_bundle_data = _executable_target + "_bundle_data" | 510 _executable_bundle_data = _executable_target + "_bundle_data" |
| 508 | 511 |
| 509 _info_plist_target = target_name + "_info_plist" | 512 _info_plist_target = target_name + "_info_plist" |
| 510 | 513 |
| 511 mac_info_plist(_info_plist_target) { | 514 mac_info_plist(_info_plist_target) { |
| 512 executable_name = _output_name | 515 executable_name = _output_name |
| 513 forward_variables_from(invoker, | 516 forward_variables_from(invoker, |
| 514 [ | 517 [ |
| 515 "extra_substitutions", | 518 "extra_substitutions", |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 683 ]) | 686 ]) |
| 684 if (!defined(deps)) { | 687 if (!defined(deps)) { |
| 685 deps = [] | 688 deps = [] |
| 686 } | 689 } |
| 687 deps += [ ":$_loadable_module_bundle_data" ] | 690 deps += [ ":$_loadable_module_bundle_data" ] |
| 688 | 691 |
| 689 bundle_root_dir = "$root_out_dir/$_output_name.plugin/Contents" | 692 bundle_root_dir = "$root_out_dir/$_output_name.plugin/Contents" |
| 690 bundle_executable_dir = "$bundle_root_dir/MacOS" | 693 bundle_executable_dir = "$bundle_root_dir/MacOS" |
| 691 } | 694 } |
| 692 } | 695 } |
| OLD | NEW |