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

Unified Diff: components/policy/BUILD.gn

Issue 2083903005: Adds gn config for policy_templates.zip (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 | « BUILD.gn ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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",
+ ]
+ }
+ }
}
« no previous file with comments | « BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698