1 # Copyright 2015 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 # Keep in sync with 'remoting_webapp' target in remoting/remoting_client.gypi.
7 import("//build/config/chrome_build.gni")
8 import("//remoting/remoting_locales.gni")
9 import("//remoting/remoting_options.gni")
10 import("//remoting/remoting_version.gni")
11 import("//remoting/webapp/files.gni")
13 # The base remoting directory that is used as the root directory for file
14 # references. Many of the scripts rely on the files being specified relative
16 remoting_dir = "//remoting"
18 template("remoting_webapp") {
19 locales_listfile = target_name + "_locales"
20 listfile = "$target_gen_dir/${target_name}_locales.txt"
21 listfile_rel = rebase_path(listfile, root_build_dir)
23 action(locales_listfile) {
24 script = "../tools/build/remoting_localize.py"
33 rebase_path(webapp_locale_dir, root_build_dir) +
34 "/@{json_suffix}/messages.json",
38 args += remoting_locales
42 script = "build-webapp.py"
44 webapp_type = invoker.webapp_type
45 output_dir = invoker.output_dir
46 zip_path = invoker.zip_path
47 extra_files = invoker.extra_files
51 "$target_gen_dir/$zip_path",
57 "//remoting/resources",
62 if (is_official_build) {
63 buildtype = "Official"
69 generated_html_files = [
70 "$target_gen_dir/background.html",
71 "$target_gen_dir/main.html",
72 "$target_gen_dir/message_window.html",
73 "$target_gen_dir/wcs_sandbox.html",
76 # Create a file that contains a list of all the resource files needed
77 # to build the webapp. This is needed to avoid problems on platforms that
78 # limit the size of a command line.
79 file_list = "$target_gen_dir/${target_name}_file_list.txt"
81 files += rebase_path(generated_html_files, root_build_dir)
82 files += rebase_path(remoting_webapp_crd_files, root_build_dir)
83 files += rebase_path(extra_files, root_build_dir)
84 write_file(file_list, files)
91 rebase_path("crd/manifest.json.jinja2", root_build_dir),
96 rebase_path(file_list, root_build_dir),