Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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/chrome_build.gni") | 5 import("//build/config/chrome_build.gni") |
| 6 import("//build/config/features.gni") | 6 import("//build/config/features.gni") |
| 7 import("//components/policy/resources/policy_templates.gni") | 7 import("//components/policy/resources/policy_templates.gni") |
| 8 import("//third_party/protobuf/proto_library.gni") | 8 import("//third_party/protobuf/proto_library.gni") |
| 9 import("//tools/grit/grit_rule.gni") | 9 import("//tools/grit/grit_rule.gni") |
| 10 | 10 |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 126 "--app-restrictions-definition=" + | 126 "--app-restrictions-definition=" + |
| 127 rebase_path(app_restrictions_path, root_build_dir), | 127 rebase_path(app_restrictions_path, root_build_dir), |
| 128 "--risk-tag-header=" + rebase_path(risk_tag_header_path, root_build_dir), | 128 "--risk-tag-header=" + rebase_path(risk_tag_header_path, root_build_dir), |
| 129 chrome_version_path, | 129 chrome_version_path, |
| 130 target_os, | 130 target_os, |
| 131 chromeos_flag, | 131 chromeos_flag, |
| 132 rebase_path("resources/policy_templates.json", root_build_dir), | 132 rebase_path("resources/policy_templates.json", root_build_dir), |
| 133 ] | 133 ] |
| 134 } | 134 } |
| 135 | 135 |
| 136 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.
| |
| 136 grit("policy_templates") { | 137 grit("policy_templates") { |
| 137 source = "resources/policy_templates.grd" | 138 source = grit_grd_file |
| 138 use_qualified_include = true | 139 use_qualified_include = true |
| 139 output_dir = "$root_gen_dir/chrome" | 140 output_dir = "$root_gen_dir/chrome" |
| 140 outputs = policy_templates_doc_outputs | 141 outputs = policy_templates_doc_outputs |
| 141 if (is_android) { | 142 if (is_android) { |
| 142 outputs += policy_templates_android_outputs | 143 outputs += policy_templates_android_outputs |
| 143 } | 144 } |
| 144 if (is_linux) { | 145 if (is_linux) { |
| 145 outputs += policy_templates_linux_outputs | 146 outputs += policy_templates_linux_outputs |
| 146 } | 147 } |
| 147 if (is_mac) { | 148 if (is_mac) { |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 387 create_bundle("chrome_manifest_bundle") { | 388 create_bundle("chrome_manifest_bundle") { |
| 388 bundle_root_dir = "$root_out_dir/$chrome_mac_bundle_id.manifest/Contents" | 389 bundle_root_dir = "$root_out_dir/$chrome_mac_bundle_id.manifest/Contents" |
| 389 bundle_resources_dir = "$bundle_root_dir/Resources" | 390 bundle_resources_dir = "$bundle_root_dir/Resources" |
| 390 | 391 |
| 391 deps = [ | 392 deps = [ |
| 392 ":manifest_bundle_data", | 393 ":manifest_bundle_data", |
| 393 ":manifest_strings_bundle_data", | 394 ":manifest_strings_bundle_data", |
| 394 ] | 395 ] |
| 395 } | 396 } |
| 396 } | 397 } |
| 398 | |
| 399 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.
| |
| 400 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.
| |
| 401 | |
| 402 copy("add_version") { | |
| 403 sources = [ | |
| 404 "../../chrome/VERSION", | |
|
brettw
2016/06/21 22:50:42
This would be clearer as "//chrome/VERSION"
zmin
2016/06/22 00:02:23
Done.
| |
| 405 ] | |
| 406 outputs = [ | |
| 407 version_path, | |
| 408 ] | |
| 409 } | |
| 410 | |
| 411 action("pack_templates") { | |
| 412 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
| |
| 413 script = "tools/make_policy_zip.py" | |
| 414 inputs = [ | |
| 415 version_path, | |
| 416 grit_grd_file, | |
| 417 grit_info_script, | |
| 418 ] + policy_templates_windows_outputs + policy_templates_doc_outputs | |
| 419 outputs = [ | |
| 420 output_zip_file, | |
| 421 ] | |
| 422 args = [ | |
| 423 "--output", | |
| 424 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.
| |
| 425 "--basedir", | |
| 426 rebase_path(policy_templates_base_dir, root_out_dir), | |
| 427 "--grd_input", | |
| 428 rebase_path(grit_grd_file, root_out_dir), | |
| 429 "--grd_strip_path_prefix", | |
| 430 "app/policy", | |
| 431 "--extra_input", | |
| 432 version_file, | |
| 433 "--grit_info", | |
| 434 rebase_path(grit_info_script, root_out_dir), | |
| 435 ] + grit_defines | |
| 436 deps = [ | |
| 437 ":add_version", | |
| 438 ":policy_templates", | |
| 439 ] | |
| 440 } | |
| 441 | |
| 442 group("pack_policy_templates") { | |
| 443 if (is_win) { | |
| 444 deps = [ | |
| 445 ":pack_templates", | |
| 446 ] | |
| 447 } | |
| 448 } | |
| 397 } | 449 } |
| OLD | NEW |