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 # TODO: refactor this into another file like generate_manifest.gni |
| 37 # to share with other extensions. |
| 38 template("manifest") { |
| 39 version_file = "//chrome/VERSION" |
| 40 version_script = "//build/util/version.py" |
| 41 template_file = "manifest.json.jinja2" |
| 42 output_file = invoker.output_file |
| 43 key = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAukZ6JJWr0jHmFTkn0pcigpjI+cP
0FqTo8FRIcCwy2fPeM+Ymf+7C9MK642i+Nhdr2qSsRF26AMIKbBdSDUnh04bfg5J/rKa/VO88LvXENYQ
MGhTo1y9mVg2OsbQJtEL9aTLU2G0SoKcr3g/+lggBKR5ydW1Qa0WGGAM9XrLm8iu/wn2uF4mfcMii6Kf
yEsAwWalpr/Td5WbtIoNNDpNeKO4ZSZJis1n9PZXqaOKpW7PqFDpEHw2PnPATxkcqj/wIx+Shgada0fh
rzMlhXLhhj7ThSSWbuTz5n5NebuQ49/Z2ATgpBCSzYBVXEXMDe6LBBtGiZ/QR9UkA8Lz8bP6xIQIDAQA
B" |
| 44 action(target_name) { |
| 45 script = "//chrome/browser/resources/chromeos/chromevox/tools/generate_manif
est.py" |
| 46 inputs = [ |
| 47 version_file, |
| 48 version_script, |
| 49 ] |
| 50 sources = [ |
| 51 template_file, |
| 52 ] |
| 53 outputs = [ |
| 54 output_file, |
| 55 ] |
| 56 args = [ |
| 57 "--key=$key", |
| 58 "--version_file=" + rebase_path(version_file, root_build_dir), |
| 59 "--output_manifest=" + rebase_path(output_file, root_build_dir), |
| 60 ] |
| 61 if (defined(invoker.is_guest_manifest) && invoker.is_guest_manifest) { |
| 62 args += [ "--is_guest_manifest=1" ] |
| 63 } |
| 64 args += rebase_path(sources, root_build_dir) |
| 65 } |
| 66 } |
| 67 |
| 68 manifest("select_to_speak_manifest") { |
| 69 output_file = "$select_to_speak_out_dir/manifest.json" |
| 70 } |
| 71 |
| 72 manifest("select_to_speak_guest_manifest") { |
| 73 output_file = "$select_to_speak_out_dir/manifest_guest.json" |
| 74 is_guest_manifest = true |
| 75 } |
OLD | NEW |