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
3 # found in the LICENSE file.
5 import("//remoting/remoting_locales.gni")
6 import("//tools/grit/grit_rule.gni")
13 #":verify_resources", TODO(GYP) enable this.
17 # TODO(GYP) enable verify_resources. The bots are complaining about
18 # gen/main.html not being found but this doesn't seems to reproduce locally.
20 action("verify_resources") {
21 script = "//remoting/tools/verify_resources.py"
24 "$root_gen_dir/main.html",
25 "../base/resources_unittest.cc",
26 "../host/continue_window_mac.mm",
27 "../host/disconnect_window_mac.mm",
28 "../host/installer/mac/uninstaller/remoting_uninstaller-InfoPlist.strings.jinja2",
29 "../host/mac/me2me_preference_pane-InfoPlist.strings.jinja2",
30 "../host/win/core.rc.jinja2",
31 "../host/win/host_messages.mc.jinja2",
32 "../host/win/version.rc.jinja2",
33 "../resources/play_store_resources.cc",
34 "../webapp/background/background.js",
35 "../webapp/butter_bar.js",
36 "../webapp/client_screen.js",
38 "../webapp/host_list.js",
39 "../webapp/host_setup_dialog.js",
40 "../webapp/host_table_entry.js",
41 "../webapp/manifest.json.jinja2",
42 "../webapp/paired_client_manager.js",
43 "../webapp/remoting.js",
44 "../webapp/window_frame.js",
47 inputs = [ "remoting_strings.grd" ] + sources_to_verify
49 stampfile = "$root_build_dir/remoting_resources_verified_stamp"
56 rebase_path(stampfile, root_build_dir),
58 rebase_path("remoting_strings.grd", root_build_dir),
59 ] + rebase_path(sources_to_verify, root_build_dir)
62 "//remoting/webapp:main_html",
63 ] # Generates main.html.
68 source = "remoting_strings.grd"
69 output_name = "remoting_strings"
71 # The grd file encodes "remoting/..." in the name, so root everything in the
72 # generated file root.
73 output_dir = root_gen_dir
76 "remoting/base/string_resources.h",
79 # The grd produces a *.pak file and a messages.json file (this one uses
80 # underscores instead of hyphens) for each locale.
82 process_file_template(remoting_locales,
83 [ "remoting/resources/{{source_name_part}}.pak" ])
85 outputs += remoting_webapp_locale_files
88 action("copy_locales") {
89 script = "../tools/build/remoting_copy_locales.py"
91 # The gyp build calls out to Python, but the Python just computes a simple
92 # replacement over the locales. Here, we can do this in GN script by
93 # pretending the locale list is a list of files. The {{source_name_part}}
94 # will just expand to the locale name.
95 inputs = process_file_template(remoting_locales,
96 [ "$target_gen_dir/{{source_name_part}}.pak" ])
98 # Likewise, process the outputs in the same way as the inputs.
99 if (is_mac || is_ios) {
100 # On mac, use underscores instead of hyphens and put the files in a
102 outputs = process_file_template(
103 remoting_locales_with_underscores,
104 [ "$root_build_dir/remoting/resources/{{source_name_part}}.lproj/locale.pak" ])
106 outputs = process_file_template(
108 [ "$root_build_dir/remoting_locales/{{source_name_part}}.pak" ])
115 rebase_path(root_gen_dir, root_build_dir),
117 rebase_path(root_out_dir, root_build_dir),