Mac: Use unique output path for compile_xibs template in GN |
|||
Issue description
Version: Chromium master revision 318e6f54 (#400326)
OS: Mac
What steps will reproduce the problem?
(1) As part of defining multiple mac_app_bundle targets in the same BUILD.gn file define multiple mac_xib_bundle_data targets that use the same xib file name (see below).
What is the expected output?
The `gn gen` should succeed.
What do you see instead?
The `gn gen` fails due to multiple targets with the same output.
Please use labels and text to provide additional information.
The compile_xibs template currently uses an output path of "$target_gen_dir/{{source_name_part}}.nib". This means the following in the same BUILD.gn file will fail:
mac_xib_bundle_data("app1_xibs") {
sources = [
"app1/English.lproj/MainMenu.xib",
]
output_path = "{{bundle_resources_dir}}/English.lproj"
}
mac_xib_bundle_data("app2_xibs") {
sources = [
"app2/English.lproj/MainMenu.xib",
]
output_path = "{{bundle_resources_dir}}/English.lproj"
}
The compile_xibs template should probably be modified to use a unique output path. For example:
diff --git a/build/config/mac/base_rules.gni b/build/config/mac/base_rules.gni
index 76610cc..7d17aba 100644
--- a/build/config/mac/base_rules.gni
+++ b/build/config/mac/base_rules.gni
@@ -366,13 +366,13 @@ template("compile_xibs") {
script = "//build/config/mac/compile_xib.py"
sources = invoker.sources
outputs = [
- "$target_gen_dir/{{source_name_part}}.nib",
+ "$target_gen_dir/$target_name/{{source_name_part}}.nib",
]
args = [
"--input",
"{{source}}",
"--output",
- rebase_path("$target_gen_dir/{{source_name_part}}.nib"),
+ rebase_path("$target_gen_dir/$target_name/{{source_name_part}}.nib"),
] + ibtool_flags
}
}
,
Jul 7 2016
CL: https://codereview.chromium.org/2130793003
,
Jul 8 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/2b273ced692cd454d1d2b9b6ff8ac9bf97754ce2 commit 2b273ced692cd454d1d2b9b6ff8ac9bf97754ce2 Author: marshall <marshall@chromium.org> Date: Fri Jul 08 16:49:16 2016 Mac: Use unique output path for compile_xibs template in GN BUG= 623237 R=rsesek@chromium.org Review-Url: https://codereview.chromium.org/2130793003 Cr-Commit-Position: refs/heads/master@{#404416} [modify] https://crrev.com/2b273ced692cd454d1d2b9b6ff8ac9bf97754ce2/build/config/mac/base_rules.gni
,
Jul 11 2016
|
|||
►
Sign in to add a comment |
|||
Comment 1 by rsesek@chromium.org
, Jun 27 2016