OLD | NEW |
---|---|
1 # Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 # Keep in sync with 'remoting_webapp' target in remoting/remoting_client.gypi. | 5 # Keep in sync with 'remoting_webapp' target in remoting/remoting_client.gypi. |
6 | 6 |
7 import("//build/config/chrome_build.gni") | 7 import("//build/config/chrome_build.gni") |
8 import("//remoting/remoting_locales.gni") | 8 import("//remoting/remoting_locales.gni") |
9 import("//remoting/remoting_options.gni") | 9 import("//remoting/remoting_options.gni") |
10 import("//remoting/remoting_version.gni") | 10 import("//remoting/remoting_version.gni") |
(...skipping 29 matching lines...) Expand all Loading... | |
40 rebase_path(webapp_locale_dir, root_build_dir) + | 40 rebase_path(webapp_locale_dir, root_build_dir) + |
41 "/@{json_suffix}/messages.json", | 41 "/@{json_suffix}/messages.json", |
42 "--locales_listfile", | 42 "--locales_listfile", |
43 rebase_path(locales_listfile_output, root_build_dir), | 43 rebase_path(locales_listfile_output, root_build_dir), |
44 ] | 44 ] |
45 args += remoting_locales | 45 args += remoting_locales |
46 } | 46 } |
47 } | 47 } |
48 | 48 |
49 template("build_webapp_html") { | 49 template("build_webapp_html") { |
50 target_jscompile = "${target_name}_jscompile" | |
51 target_jscompile_stamp = "$target_gen_dir/${target_jscompile}.stamp" | |
Dan Beam
2015/06/03 22:09:56
if (run_jscompile) {
| |
52 action(target_jscompile) { | |
53 js_files = remoting_webapp_js_proto_files + invoker.js_files | |
54 | |
55 script = "../../third_party/closure_compiler/compile.py" | |
56 inputs = js_files | |
57 outputs = [ | |
58 target_jscompile_stamp, | |
59 ] | |
60 | |
61 args = [ | |
62 "--strict", | |
63 "--no-single-file", | |
64 "--success-stamp", | |
65 rebase_path(target_jscompile_stamp, root_build_dir), | |
66 ] + rebase_path(js_files, root_build_dir) | |
67 } | |
Dan Beam
2015/06/03 22:09:56
}
| |
68 | |
50 action(target_name) { | 69 action(target_name) { |
51 html_template_file = invoker.html_template_file | 70 html_template_file = invoker.html_template_file |
52 html_template_files = invoker.html_template_files | 71 html_template_include_files = invoker.html_template_include_files |
53 js_files = invoker.js_files | 72 js_files = invoker.js_files |
54 html_output = invoker.html_output | 73 html_output = invoker.html_output |
55 | 74 |
56 script = "build-html.py" | 75 script = "build-html.py" |
57 | 76 |
58 inputs = [ html_template_file ] + html_template_files + js_files | 77 inputs = [ html_template_file ] + html_template_include_files + js_files |
59 | 78 |
60 outputs = [ | 79 outputs = [ |
61 html_output, | 80 html_output, |
62 ] | 81 ] |
63 | 82 |
83 if (run_jscompile) { | |
84 deps = [ | |
85 ":$target_jscompile", | |
86 ] | |
87 } | |
88 | |
64 args = [ | 89 args = [ |
65 rebase_path(html_output, root_build_dir), | 90 rebase_path(html_output, root_build_dir), |
66 rebase_path(html_template_file, root_build_dir), | 91 rebase_path(html_template_file, root_build_dir), |
67 ] | 92 ] |
68 args += [ | 93 args += [ |
69 "--template-dir", | 94 "--template-dir", |
70 rebase_path(remoting_dir, root_build_dir), | 95 rebase_path(remoting_dir, root_build_dir), |
71 ] | 96 ] |
72 args += [ "--templates" ] + html_template_files | 97 args += [ "--templates" ] + html_template_include_files |
73 args += [ "--js" ] + rebase_path(js_files, remoting_dir) | 98 args += [ "--js" ] + rebase_path(js_files, remoting_dir) |
74 } | 99 } |
75 } | 100 } |
76 | 101 |
77 template("desktop_remoting_webapp") { | 102 template("desktop_remoting_webapp") { |
78 locales_listfile = target_name + "_locales" | 103 locales_listfile = target_name + "_locales" |
79 locales_listfile_output = "$target_gen_dir/${target_name}_locales.txt" | 104 locales_listfile_output = "$target_gen_dir/${target_name}_locales.txt" |
80 | 105 |
81 build_locales_listfile(locales_listfile) { | 106 build_locales_listfile(locales_listfile) { |
82 # Template uses locales_listfile_output from outer scope. | 107 # Template uses locales_listfile_output from outer scope. |
83 } | 108 } |
84 | 109 |
85 background_html = target_name + "_background_html" | 110 background_html = target_name + "_background_html" |
86 background_html_output = "$target_gen_dir/html/$target_name/background.html" | 111 background_html_output = "$target_gen_dir/html/$target_name/background.html" |
87 | 112 |
88 build_webapp_html(background_html) { | 113 build_webapp_html(background_html) { |
89 html_template_file = remoting_webapp_template_background | 114 html_template_file = remoting_webapp_template_background |
90 html_template_files = [] | 115 html_template_include_files = [] |
garykac
2015/05/18 17:08:54
Add '_include' to make it easier to distinguish.
| |
91 js_files = remoting_webapp_background_html_all_js_files | 116 js_files = remoting_webapp_background_html_all_js_files |
92 html_output = background_html_output | 117 html_output = background_html_output |
93 } | 118 } |
94 | 119 |
95 message_window_html = target_name + "_message_window_html" | 120 message_window_html = target_name + "_message_window_html" |
96 message_window_html_output = | 121 message_window_html_output = |
97 "$target_gen_dir/html/$target_name/message_window.html" | 122 "$target_gen_dir/html/$target_name/message_window.html" |
98 | 123 |
99 build_webapp_html(message_window_html) { | 124 build_webapp_html(message_window_html) { |
100 html_template_file = remoting_webapp_template_message_window | 125 html_template_file = remoting_webapp_template_message_window |
101 html_template_files = [] | 126 html_template_include_files = [] |
102 js_files = remoting_webapp_message_window_html_all_js_files | 127 js_files = remoting_webapp_message_window_html_all_js_files |
103 html_output = message_window_html_output | 128 html_output = message_window_html_output |
104 } | 129 } |
105 | 130 |
106 wcs_sandbox_html = target_name + "_wcs_sandbox_html" | 131 wcs_sandbox_html = target_name + "_wcs_sandbox_html" |
107 wcs_sandbox_html_output = "$target_gen_dir/html/$target_name/wcs_sandbox.html" | 132 wcs_sandbox_html_output = "$target_gen_dir/html/$target_name/wcs_sandbox.html" |
108 | 133 |
109 build_webapp_html(wcs_sandbox_html) { | 134 build_webapp_html(wcs_sandbox_html) { |
110 html_template_file = remoting_webapp_template_wcs_sandbox | 135 html_template_file = remoting_webapp_template_wcs_sandbox |
111 html_template_files = [] | 136 html_template_include_files = [] |
112 js_files = remoting_webapp_wcs_sandbox_html_all_js_files | 137 js_files = remoting_webapp_wcs_sandbox_html_all_js_files |
113 html_output = wcs_sandbox_html_output | 138 html_output = wcs_sandbox_html_output |
114 } | 139 } |
115 | 140 |
116 main_html = target_name + "_main_html" | 141 main_html = target_name + "_main_html" |
117 main_html_output = "$target_gen_dir/html/$target_name/main.html" | 142 main_html_output = "$target_gen_dir/html/$target_name/main.html" |
118 | 143 |
119 build_webapp_html(main_html) { | 144 build_webapp_html(main_html) { |
120 html_template_file = remoting_webapp_template_main | 145 html_template_file = remoting_webapp_template_main |
121 html_template_files = remoting_webapp_template_files | 146 html_template_include_files = remoting_webapp_template_files |
122 js_files = remoting_webapp_crd_main_html_all_js_files | 147 js_files = remoting_webapp_crd_main_html_all_js_files |
123 html_output = main_html_output | 148 html_output = main_html_output |
124 } | 149 } |
125 | 150 |
126 action(target_name) { | 151 action(target_name) { |
127 script = "build-webapp.py" | 152 script = "build-webapp.py" |
128 | 153 |
129 webapp_type = invoker.webapp_type | 154 webapp_type = invoker.webapp_type |
130 output_dir = invoker.output_dir | 155 output_dir = invoker.output_dir |
131 zip_path = invoker.zip_path | 156 zip_path = invoker.zip_path |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
196 build_locales_listfile(locales_listfile) { | 221 build_locales_listfile(locales_listfile) { |
197 # Template uses locales_listfile_output from outer scope. | 222 # Template uses locales_listfile_output from outer scope. |
198 } | 223 } |
199 | 224 |
200 feedback_consent_html = target_name + "_feedback_consent_html" | 225 feedback_consent_html = target_name + "_feedback_consent_html" |
201 feedback_consent_html_output = | 226 feedback_consent_html_output = |
202 "$target_gen_dir/html/$target_name/feedback_consent.html" | 227 "$target_gen_dir/html/$target_name/feedback_consent.html" |
203 | 228 |
204 build_webapp_html(feedback_consent_html) { | 229 build_webapp_html(feedback_consent_html) { |
205 html_template_file = ar_feedback_consent_template | 230 html_template_file = ar_feedback_consent_template |
206 html_template_files = [] | 231 html_template_include_files = [] |
207 js_files = ar_feedback_consent_html_all_js_files | 232 js_files = ar_feedback_consent_html_all_js_files |
208 html_output = feedback_consent_html_output | 233 html_output = feedback_consent_html_output |
209 } | 234 } |
210 | 235 |
211 loading_window_html = target_name + "_loading_window_html" | 236 loading_window_html = target_name + "_loading_window_html" |
212 loading_window_html_output = | 237 loading_window_html_output = |
213 "$target_gen_dir/html/$target_name/loading_window.html" | 238 "$target_gen_dir/html/$target_name/loading_window.html" |
214 | 239 |
215 build_webapp_html(loading_window_html) { | 240 build_webapp_html(loading_window_html) { |
216 html_template_file = ar_loading_window_template | 241 html_template_file = ar_loading_window_template |
217 html_template_files = [] | 242 html_template_include_files = [] |
218 | 243 |
219 # The loading window is just a reskin of the message window -- all JS code | 244 # The loading window is just a reskin of the message window -- all JS code |
220 # is shared. | 245 # is shared. |
221 js_files = remoting_webapp_message_window_html_all_js_files | 246 js_files = remoting_webapp_message_window_html_all_js_files |
222 html_output = loading_window_html_output | 247 html_output = loading_window_html_output |
223 } | 248 } |
224 | 249 |
225 message_window_html = target_name + "_message_window_html" | 250 message_window_html = target_name + "_message_window_html" |
226 message_window_html_output = | 251 message_window_html_output = |
227 "$target_gen_dir/html/$target_name/message_window.html" | 252 "$target_gen_dir/html/$target_name/message_window.html" |
228 | 253 |
229 build_webapp_html(message_window_html) { | 254 build_webapp_html(message_window_html) { |
230 html_template_file = remoting_webapp_template_message_window | 255 html_template_file = remoting_webapp_template_message_window |
231 html_template_files = [] | 256 html_template_include_files = [] |
232 js_files = remoting_webapp_message_window_html_all_js_files | 257 js_files = remoting_webapp_message_window_html_all_js_files |
233 html_output = message_window_html_output | 258 html_output = message_window_html_output |
234 } | 259 } |
235 | 260 |
236 wcs_sandbox_html = target_name + "_wcs_sandbox_html" | 261 wcs_sandbox_html = target_name + "_wcs_sandbox_html" |
237 wcs_sandbox_html_output = "$target_gen_dir/html/$target_name/wcs_sandbox.html" | 262 wcs_sandbox_html_output = "$target_gen_dir/html/$target_name/wcs_sandbox.html" |
238 | 263 |
239 build_webapp_html(wcs_sandbox_html) { | 264 build_webapp_html(wcs_sandbox_html) { |
240 html_template_file = remoting_webapp_template_wcs_sandbox | 265 html_template_file = remoting_webapp_template_wcs_sandbox |
241 html_template_files = [] | 266 html_template_include_files = [] |
242 js_files = remoting_webapp_wcs_sandbox_html_all_js_files | 267 js_files = remoting_webapp_wcs_sandbox_html_all_js_files |
243 html_output = wcs_sandbox_html_output | 268 html_output = wcs_sandbox_html_output |
244 } | 269 } |
245 | 270 |
246 main_html = target_name + "_main_html" | 271 main_html = target_name + "_main_html" |
247 main_html_output = "$target_gen_dir/html/$target_name/main.html" | 272 main_html_output = "$target_gen_dir/html/$target_name/main.html" |
248 | 273 |
249 build_webapp_html(main_html) { | 274 build_webapp_html(main_html) { |
250 html_template_file = ar_main_template | 275 html_template_file = ar_main_template |
251 html_template_files = ar_main_template_files | 276 html_template_include_files = ar_main_template_files |
252 js_files = ar_main_js_files | 277 js_files = ar_main_js_files |
253 html_output = main_html_output | 278 html_output = main_html_output |
254 } | 279 } |
255 | 280 |
256 action(target_name) { | 281 action(target_name) { |
257 script = "build-webapp.py" | 282 script = "build-webapp.py" |
258 | 283 |
259 app_key = invoker.app_key | 284 app_key = invoker.app_key |
260 app_id = invoker.app_id | 285 app_id = invoker.app_id |
261 app_client_id = invoker.app_client_id | 286 app_client_id = invoker.app_client_id |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
376 args += [ | 401 args += [ |
377 "--manifest_key", | 402 "--manifest_key", |
378 manifest_key, | 403 manifest_key, |
379 ] | 404 ] |
380 args += [ | 405 args += [ |
381 "--app_client_id", | 406 "--app_client_id", |
382 app_client_id, | 407 app_client_id, |
383 ] | 408 ] |
384 } | 409 } |
385 } | 410 } |
OLD | NEW |