Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2804)

Unified Diff: build/config/mac/rules.gni

Issue 2055933002: [Mac/GN] Write PkgInfo files for .app bundles. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | build/config/mac/write_pkg_info.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/mac/rules.gni
diff --git a/build/config/mac/rules.gni b/build/config/mac/rules.gni
index 651f26312015d69090b2ff15ca778c2c423c31b0..c91e12e46594109322eb21914578fbfc8357a34d 100644
--- a/build/config/mac/rules.gni
+++ b/build/config/mac/rules.gni
@@ -243,6 +243,22 @@ template("mac_app_bundle") {
])
}
+ _pkg_info_target = target_name + "_pkg_info"
+
+ action(_pkg_info_target) {
+ forward_variables_from(invoker, [ "testonly" ])
+ script = "//build/config/mac/write_pkg_info.py"
+ sources = get_target_outputs(":$_info_plist_target")
+ outputs = [
+ "$target_gen_dir/$_pkg_info_target",
+ ]
+ args = [ "--plist" ] + rebase_path(sources, root_build_dir) +
+ [ "--output" ] + rebase_path(outputs, root_build_dir)
+ deps = [
+ ":$_info_plist_target",
+ ]
+ }
+
executable(_executable_target) {
visibility = [ ":$_executable_bundle_data" ]
forward_variables_from(invoker,
@@ -292,6 +308,20 @@ template("mac_app_bundle") {
]
}
+ _pkg_info_bundle_data = _pkg_info_target + "_bundle_data"
+
+ bundle_data(_pkg_info_bundle_data) {
+ forward_variables_from(invoker, [ "testonly" ])
+ visibility = [ ":$_target_name" ]
+ sources = get_target_outputs(":$_pkg_info_target")
+ outputs = [
+ "{{bundle_root_dir}}/PkgInfo",
+ ]
+ public_deps = [
+ ":$_pkg_info_target",
+ ]
+ }
+
create_bundle(_target_name) {
forward_variables_from(invoker,
[
@@ -306,6 +336,7 @@ template("mac_app_bundle") {
deps += [
":$_executable_bundle_data",
":$_info_plist_bundle_data",
+ ":$_pkg_info_bundle_data",
]
bundle_root_dir = "$root_out_dir/${_output_name}.app/Contents"
« no previous file with comments | « no previous file | build/config/mac/write_pkg_info.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698