OLD | NEW |
---|---|
(Empty) | |
1 # Copyright 2016 The Chromium Authors. All rights reserved. | |
2 # Use of this source code is governed by a BSD-style license that can be | |
3 # found in the LICENSE file. | |
4 | |
5 import("//build/config/features.gni") | |
6 import("//testing/test.gni") | |
7 import("//chrome/test/base/js2gtest.gni") | |
8 import("//chrome/browser/resources/chromeos/chromevox/run_jsbundler.gni") | |
9 | |
10 assert(is_chromeos) | |
11 | |
12 select_to_speak_out_dir = "$root_out_dir/resources/chromeos/select_to_speak" | |
13 | |
14 group("select_to_speak") { | |
15 deps = [ | |
16 ":select_to_speak_copied_files", | |
17 ":select_to_speak_guest_manifest", | |
18 ":select_to_speak_manifest", | |
19 ] | |
20 } | |
21 | |
22 # Instead of setting up one copy target for each subdirectory, use a script | |
23 # to copy all files. | |
24 run_jsbundler("select_to_speak_copied_files") { | |
25 mode = "copy" | |
26 dest_dir = select_to_speak_out_dir | |
27 sources = [ | |
28 "background.js", | |
29 ] | |
30 rewrite_rules = [ | |
31 rebase_path(".", root_build_dir) + ":", | |
32 rebase_path(closure_library_dir, root_build_dir) + ":closure", | |
33 ] | |
34 } | |
35 | |
36 template("manifest") { | |
David Tseng
2016/09/16 21:16:02
Optional: would be great to share this in another
dmazzoni
2016/09/16 22:06:20
Added a TODO
| |
37 version_file = "//chrome/VERSION" | |
38 version_script = "//build/util/version.py" | |
39 template_file = "manifest.json.jinja2" | |
40 output_file = invoker.output_file | |
41 key = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAukZ6JJWr0jHmFTkn0pcigpjI+cP 0FqTo8FRIcCwy2fPeM+Ymf+7C9MK642i+Nhdr2qSsRF26AMIKbBdSDUnh04bfg5J/rKa/VO88LvXENYQ MGhTo1y9mVg2OsbQJtEL9aTLU2G0SoKcr3g/+lggBKR5ydW1Qa0WGGAM9XrLm8iu/wn2uF4mfcMii6Kf yEsAwWalpr/Td5WbtIoNNDpNeKO4ZSZJis1n9PZXqaOKpW7PqFDpEHw2PnPATxkcqj/wIx+Shgada0fh rzMlhXLhhj7ThSSWbuTz5n5NebuQ49/Z2ATgpBCSzYBVXEXMDe6LBBtGiZ/QR9UkA8Lz8bP6xIQIDAQA B" | |
42 action(target_name) { | |
43 script = "//chrome/browser/resources/chromeos/chromevox/tools/generate_manif est.py" | |
44 inputs = [ | |
45 version_file, | |
46 version_script, | |
47 ] | |
48 sources = [ | |
49 template_file, | |
50 ] | |
51 outputs = [ | |
52 output_file, | |
53 ] | |
54 args = [ | |
55 "--key=$key", | |
56 "--version_file=" + rebase_path(version_file, root_build_dir), | |
57 "--output_manifest=" + rebase_path(output_file, root_build_dir), | |
58 ] | |
59 if (defined(invoker.is_guest_manifest) && invoker.is_guest_manifest) { | |
60 args += [ "--is_guest_manifest=1" ] | |
61 } | |
62 args += rebase_path(sources, root_build_dir) | |
63 } | |
64 } | |
65 | |
66 manifest("select_to_speak_manifest") { | |
67 output_file = "$select_to_speak_out_dir/manifest.json" | |
68 } | |
69 | |
70 manifest("select_to_speak_guest_manifest") { | |
71 output_file = "$select_to_speak_out_dir/manifest_guest.json" | |
72 is_guest_manifest = true | |
73 } | |
OLD | NEW |