summaryrefslogtreecommitdiffstats
path: root/remoting/webapp/BUILD.gn
blob: 02b666779d18c22bc9a6b0423b71168a360619b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

# Keep in sync with targets in remoting/remoting_client.gypi.

import("//build/config/features.gni")
import("//remoting/webapp/build_template.gni")

group("webapp") {
  deps = [
    ":webapp_v1",
  ]

  if (enable_nacl) {
    deps += [ ":webapp_v2" ]
  }
}

remoting_webapp("webapp_v1") {
  webapp_type = "v1"
  output_dir = "remoting.webapp"
  zip_path = "remoting-webapp.zip"
  extra_files = []
}

remoting_webapp("webapp_v2") {
  webapp_type = "v2_pnacl"
  output_dir = "remoting.webapp.v2"
  zip_path = "remoting-webapp.v2.zip"
  extra_files = [
    "crd/remoting_client_pnacl.nmf.jinja2",
    # TODO(garykac): Get correct path to this.
    #"<(PRODUCT_DIR)/remoting_client_plugin_newlib.pexe",
  ]
}

group("html") {
  deps = [
    ":background_html",
    ":main_html",
    ":message_window_html",
    ":wcs_sandbox_html",
  ]
}

action("main_html") {
  script = "build-html.py"

  inputs = [ remoting_webapp_template_main ] + remoting_webapp_template_files +
           remoting_webapp_crd_main_html_all_js_files

  outputs = [
    "$target_gen_dir/main.html",
  ]

  args = [
    rebase_path("$target_gen_dir/main.html", root_build_dir),
    rebase_path(remoting_webapp_template_main, root_build_dir),
  ]
  args += [
    "--template-dir",
    rebase_path(remoting_dir, root_build_dir),
  ]
  args += [ "--templates" ] +
          rebase_path(remoting_webapp_template_files, remoting_dir)
  args += [ "--js" ] +
          rebase_path(remoting_webapp_crd_main_html_all_js_files, remoting_dir)
}

action("wcs_sandbox_html") {
  script = "build-html.py"

  inputs = [ remoting_webapp_template_wcs_sandbox ] +
           remoting_webapp_wcs_sandbox_html_all_js_files

  outputs = [
    "$target_gen_dir/wcs_sandbox.html",
  ]

  args = [
    rebase_path("$target_gen_dir/wcs_sandbox.html", root_build_dir),
    rebase_path(remoting_webapp_template_wcs_sandbox, root_build_dir),
  ]
  args +=
      [ "--js" ] +
      rebase_path(remoting_webapp_wcs_sandbox_html_all_js_files, remoting_dir)
}

action("background_html") {
  script = "build-html.py"

  inputs = [ remoting_webapp_template_background ] +
           remoting_webapp_background_html_all_js_files

  outputs = [
    "$target_gen_dir/background.html",
  ]

  args = [
    rebase_path("$target_gen_dir/background.html", root_build_dir),
    rebase_path(remoting_webapp_template_background, root_build_dir),
  ]
  args += [ "--js" ] + rebase_path(remoting_webapp_background_html_all_js_files,
                                   remoting_dir)
}

action("message_window_html") {
  script = "build-html.py"

  inputs = [ remoting_webapp_template_message_window ] +
           remoting_webapp_message_window_html_all_js_files

  outputs = [
    "$target_gen_dir/message_window.html",
  ]

  args = [
    rebase_path("$target_gen_dir/message_window.html", root_build_dir),
    rebase_path(remoting_webapp_template_message_window, root_build_dir),
  ]
  args +=
      [ "--js" ] + rebase_path(remoting_webapp_message_window_html_all_js_files,
                               remoting_dir)
}