Chromium Code Reviews| Index: components/policy/BUILD.gn |
| diff --git a/components/policy/BUILD.gn b/components/policy/BUILD.gn |
| index bd3728ea5bd703a463c3da8fe2661a4124a5e053..5f33bd280367df992c0040f34e485631ea862839 100644 |
| --- a/components/policy/BUILD.gn |
| +++ b/components/policy/BUILD.gn |
| @@ -133,8 +133,9 @@ if (enable_configuration_policy) { |
| ] |
| } |
| + grit_grd_file = "resources/policy_templates.grd" |
|
brettw
2016/06/21 22:50:42
This variable name seems too generic, maybe someth
zmin
2016/06/22 00:02:23
Done.
|
| grit("policy_templates") { |
| - source = "resources/policy_templates.grd" |
| + source = grit_grd_file |
| use_qualified_include = true |
| output_dir = "$root_gen_dir/chrome" |
| outputs = policy_templates_doc_outputs |
| @@ -394,4 +395,55 @@ if (enable_configuration_policy) { |
| ] |
| } |
| } |
| + |
| + version_file = "VERSION" |
|
brettw
2016/06/21 22:50:42
You should put these add_version and pack_template
zmin
2016/06/22 00:02:23
Done.
|
| + version_path = "$policy_templates_base_dir/" + version_file |
|
brettw
2016/06/21 22:50:42
This can be written:
version_path = "$policy_tem
zmin
2016/06/22 00:02:23
Done.
|
| + |
| + copy("add_version") { |
| + sources = [ |
| + "../../chrome/VERSION", |
|
brettw
2016/06/21 22:50:42
This would be clearer as "//chrome/VERSION"
zmin
2016/06/22 00:02:23
Done.
|
| + ] |
| + outputs = [ |
| + version_path, |
| + ] |
| + } |
| + |
| + action("pack_templates") { |
| + output_zip_file = "$root_out_dir/policy_templates.zip" |
|
brettw
2016/06/21 22:50:42
_Don't_ change this line when doing the below root
|
| + script = "tools/make_policy_zip.py" |
| + inputs = [ |
| + version_path, |
| + grit_grd_file, |
| + grit_info_script, |
| + ] + policy_templates_windows_outputs + policy_templates_doc_outputs |
| + outputs = [ |
| + output_zip_file, |
| + ] |
| + args = [ |
| + "--output", |
| + rebase_path(output_zip_file, root_out_dir), |
|
brettw
2016/06/21 22:50:42
All of these root_out_dir calls in args should be
zmin
2016/06/22 00:02:23
Done.
|
| + "--basedir", |
| + rebase_path(policy_templates_base_dir, root_out_dir), |
| + "--grd_input", |
| + rebase_path(grit_grd_file, root_out_dir), |
| + "--grd_strip_path_prefix", |
| + "app/policy", |
| + "--extra_input", |
| + version_file, |
| + "--grit_info", |
| + rebase_path(grit_info_script, root_out_dir), |
| + ] + grit_defines |
| + deps = [ |
| + ":add_version", |
| + ":policy_templates", |
| + ] |
| + } |
| + |
| + group("pack_policy_templates") { |
| + if (is_win) { |
| + deps = [ |
| + ":pack_templates", |
| + ] |
| + } |
| + } |
| } |