Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Side by Side Diff: remoting/host/BUILD.gn

Issue 2034513002: Adding mac support for Remoting host GN builds. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adding Carbon.framework Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « remoting/BUILD.gn ('k') | remoting/host/constants_mac.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 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 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 import("//build/config/features.gni") 5 import("//build/config/features.gni")
6 import("//build/config/ui.gni") 6 import("//build/config/ui.gni")
7 import("//build/config/win/manifest.gni") 7 import("//build/config/win/manifest.gni")
8 import("//build/util/version.gni") 8 import("//build/util/version.gni")
9 import("//chrome/version.gni")
9 import("//remoting/remoting_enable.gni") 10 import("//remoting/remoting_enable.gni")
10 import("//remoting/remoting_locales.gni") 11 import("//remoting/remoting_locales.gni")
11 import("//remoting/remoting_options.gni") 12 import("//remoting/remoting_options.gni")
12 import("//remoting/remoting_srcs.gni") 13 import("//remoting/remoting_srcs.gni")
13 import("//remoting/remoting_version.gni") 14 import("//remoting/remoting_version.gni")
14 import("//remoting/tools/build/remoting_localize.gni") 15 import("//remoting/tools/build/remoting_localize.gni")
15 16
17 process_version("remoting_version") {
18 template_file = "//remoting/host/version.h.in"
19 sources = [
20 branding_path,
21 ]
22 output = "$target_gen_dir/version.h"
23 }
24
16 if (is_win) { 25 if (is_win) {
17 import("//remoting/host/predefines_win.gni") 26 import("//remoting/host/predefines_win.gni")
18 } 27 }
19 28
20 # Reference this manifest to indicate that a process is per-monitor DPI aware. 29 # Reference this manifest to indicate that a process is per-monitor DPI aware.
21 dpi_aware_manifest = "//remoting/host/win/dpi_aware.manifest" 30 dpi_aware_manifest = "//remoting/host/win/dpi_aware.manifest"
22 31
23 # Depending on this target gives a default executable manifest with the addition 32 # Depending on this target gives a default executable manifest with the addition
24 # of the DPI aware tag. 33 # of the DPI aware tag.
25 windows_manifest("dpi_aware_exe_manifest") { 34 windows_manifest("dpi_aware_exe_manifest") {
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 args = [ 74 args = [
66 "credits", 75 "credits",
67 rebase_path(about_credits_file, root_build_dir), 76 rebase_path(about_credits_file, root_build_dir),
68 "--file-template", 77 "--file-template",
69 rebase_path("installer/credits.tmpl", root_build_dir), 78 rebase_path("installer/credits.tmpl", root_build_dir),
70 "--entry-template", 79 "--entry-template",
71 rebase_path("installer/credits_entry.tmpl", root_build_dir), 80 rebase_path("installer/credits_entry.tmpl", root_build_dir),
72 ] 81 ]
73 } 82 }
74 83
75 if (is_mac) { 84 # This must be a static library instead of a source set because
76 # TODO(GYP) Mac build of remoting host, https://crbug.com/611859 85 # remoting_unittests requires that remoting_me2me_host.cc not be pulled in,
77 # If you fix this, also enable in //remoting/remoting_enable.gni 86 # which in turn depends on remoting_me2me_host_static which isn't part of that
78 # on mac. 87 # build.
79 group("host") { 88 #
80 } 89 # TODO fix this, successful builds should not depend on static libraries
81 group("test_support") { 90 # stripping code.
82 } 91 static_library("host") {
83 group("unit_tests") { 92 sources = rebase_path(remoting_host_srcs_gypi_values.remoting_host_sources,
84 } 93 ".",
85 } else { 94 "//remoting")
86 # This must be a static library instead of a source set because 95
87 # remoting_unittests requires that remoting_me2me_host.cc not be pulled in, 96 libs = []
88 # which in turn depends on remoting_me2me_host_static which isn't part of that 97
89 # build. 98 configs += [
90 # 99 "//build/config/compiler:wexit_time_destructors",
91 # TODO fix this, successful builds should not depend on static libraries 100 "//remoting:version",
92 # stripping code. 101 ]
93 static_library("host") { 102
94 sources = rebase_path(remoting_host_srcs_gypi_values.remoting_host_sources, 103 defines = [ "WEBRTC_CHROMIUM_BUILD" ]
95 ".", 104
96 "//remoting") 105 deps = [
97 106 "//base:i18n",
98 libs = [] 107 "//components/policy:policy_component_common",
99 108 "//crypto",
109 "//google_apis",
110 "//ipc",
111 "//remoting/base",
112 "//remoting/protocol",
113 "//remoting/resources",
114 "//ui/base",
115 "//ui/events:dom_keycode_converter",
116 "//ui/events/platform",
117 ]
118
119 if (enable_configuration_policy) {
120 deps += [ "//components/policy:policy" ]
121 }
122
123 if (is_linux && !is_chromeos) {
124 libs += [ "pam" ]
125 }
126
127 if (use_x11) {
100 configs += [ 128 configs += [
101 "//build/config/compiler:wexit_time_destructors", 129 "//build/config/linux:x11",
102 "//remoting:version", 130 "//build/config/linux:xrandr",
103 ] 131 ]
104 132 if (is_desktop_linux) {
105 defines = [ "WEBRTC_CHROMIUM_BUILD" ] 133 deps += [ "//build/config/linux/gtk2" ]
106 134 }
107 deps = [ 135 } else {
108 "//base:i18n", 136 sources -= [
109 "//components/policy:policy_component_common", 137 "clipboard_x11.cc",
110 "//crypto", 138 "desktop_resizer_x11.cc",
111 "//google_apis", 139 "input_injector_x11.cc",
112 "//ipc", 140 "local_input_monitor_x11.cc",
113 "//remoting/base", 141 ]
114 "//remoting/protocol", 142 if (is_linux) {
115 "//remoting/resources", 143 # These will already be filtered out on non-Linux.
116 "//ui/base", 144 sources -= [
117 "//ui/events:dom_keycode_converter", 145 "linux/unicode_to_keysym.cc",
118 "//ui/events/platform", 146 "linux/x11_util.cc",
119 ] 147 "linux/x_server_clipboard.cc",
120 148 "linux/x_server_clipboard.h",
121 if (enable_configuration_policy) { 149 ]
122 deps += [ "//components/policy:policy" ] 150 }
123 } 151 }
124 152
125 if (is_linux && !is_chromeos) { 153 if (!use_ozone) {
126 libs += [ "pam" ] 154 sources -= [ "desktop_resizer_ozone.cc" ]
127 } 155 }
128 156
129 if (use_x11) { 157 if (is_chromeos) {
130 configs += [ 158 # TODO(GYP): crbug.com/481627. These should only be included
131 "//build/config/linux:x11", 159 # when enable_me2me_host is true.
132 "//build/config/linux:xrandr", 160 sources -= [
133 ] 161 "me2me_desktop_environment.cc",
134 if (is_desktop_linux) { 162 "me2me_desktop_environment.h",
135 deps += [ "//build/config/linux/gtk2" ] 163 ]
136 } 164 deps += [
165 "//cc",
166 "//gpu/command_buffer/common",
167 "//ppapi/host",
168 "//skia",
169 "//ui/aura",
170 "//ui/compositor",
171 "//ui/events",
172 "//ui/views",
173 ]
174
175 if (use_ash) {
176 deps += [ "//ash" ]
177 }
178
179 if (use_ozone) {
180 deps += [ "//ui/ozone" ]
181 sources -= [ "desktop_resizer_ozone.cc" ]
137 } else { 182 } else {
138 sources -= [ 183 sources -= [
139 "clipboard_x11.cc", 184 "clipboard_x11.cc",
140 "desktop_resizer_x11.cc", 185 "desktop_resizer_x11.cc",
141 "input_injector_x11.cc", 186 "input_injector_chromeos.cc",
187 "input_injector_chromeos.h",
188 "linux/x_server_clipboard.cc",
189 "linux/x_server_clipboard.h",
142 "local_input_monitor_x11.cc", 190 "local_input_monitor_x11.cc",
143 ] 191 ]
144 if (is_linux) { 192 }
145 # These will already be filtered out on non-Linux. 193
146 sources -= [ 194 sources -= [
147 "linux/unicode_to_keysym.cc", 195 "continue_window_linux.cc",
148 "linux/x11_util.cc", 196 "curtain_mode_linux.cc",
149 "linux/x_server_clipboard.cc", 197 "disconnect_window_linux.cc",
150 "linux/x_server_clipboard.h", 198 ]
151 ] 199 }
152 } 200
153 } 201 if (is_mac) {
154 202 libs += [
155 if (!use_ozone) { 203 "Accelerate.framework",
156 sources -= [ "desktop_resizer_ozone.cc" ] 204 "Carbon.framework",
157 } 205 ]
158 206
159 if (is_chromeos) { 207 # TODO(nicholss): When we can delete GYP builds,
160 # TODO(GYP): crbug.com/481627. These should only be included 208 # this flag and usage can be removed.
161 # when enable_me2me_host is true. 209 defines += [ "GN_BUILD=1" ]
162 sources -= [ 210 deps += [
163 "me2me_desktop_environment.cc", 211 ":remoting_version",
164 "me2me_desktop_environment.h", 212 "//third_party/google_toolbox_for_mac",
165 ] 213 ]
166 deps += [ 214 }
167 "//cc", 215
168 "//gpu/command_buffer/common", 216 if (is_win) {
169 "//ppapi/host", 217 deps += [
170 "//skia", 218 ":messages",
171 "//ui/aura", 219 ":remoting_lib_idl",
172 "//ui/compositor", 220 ]
173 "//ui/events", 221 }
174 "//ui/views", 222
175 ] 223 if (enable_webrtc) {
176 224 deps += [ "//third_party/webrtc/modules/desktop_capture" ]
177 if (use_ash) { 225 }
178 deps += [ "//ash" ] 226
179 } 227 if (is_android) {
180 228 sources -= [
181 if (use_ozone) { 229 "single_window_desktop_environment.cc",
182 deps += [ "//ui/ozone" ] 230 "single_window_desktop_environment.h",
183 sources -= [ "desktop_resizer_ozone.cc" ] 231 ]
184 } else { 232 }
185 sources -= [ 233 }
186 "clipboard_x11.cc", 234
187 "desktop_resizer_x11.cc", 235 source_set("test_support") {
188 "input_injector_chromeos.cc", 236 testonly = true
189 "input_injector_chromeos.h", 237
190 "linux/x_server_clipboard.cc", 238 sources = [
191 "linux/x_server_clipboard.h", 239 "fake_desktop_environment.cc",
192 "local_input_monitor_x11.cc", 240 "fake_desktop_environment.h",
193 ] 241 "fake_host_extension.cc",
194 } 242 "fake_host_extension.h",
195 243 "fake_host_status_monitor.h",
196 sources -= [ 244 "fake_host_status_monitor.h",
197 "continue_window_linux.cc", 245 "fake_mouse_cursor_monitor.cc",
198 "curtain_mode_linux.cc", 246 "fake_mouse_cursor_monitor.h",
199 "disconnect_window_linux.cc", 247 "fake_oauth_token_getter.cc",
200 ] 248 "fake_oauth_token_getter.h",
201 } 249 "host_mock_objects.cc",
202 250 "host_mock_objects.h",
203 if (is_mac) { 251 "security_key/fake_ipc_gnubby_auth_handler.cc",
204 # TODO(GYP) Mac host_bundle_name and prefpane_bundle_name. 252 "security_key/fake_ipc_gnubby_auth_handler.h",
205 # Note if you are looking at this: It really sucks to have to synchronousl y 253 "security_key/fake_remote_security_key_ipc_client.cc",
206 # call into python twice to get these values. They should instead be 254 "security_key/fake_remote_security_key_ipc_client.h",
207 # written into a generated header via the process_version template, and we 255 "security_key/fake_remote_security_key_ipc_server.cc",
208 # change the source files to include that header rather than rely on these 256 "security_key/fake_remote_security_key_ipc_server.h",
209 # defines being set in the build. 257 "security_key/fake_remote_security_key_message_reader.cc",
210 #defines += [ 258 "security_key/fake_remote_security_key_message_reader.h",
211 # "HOST_BUNDLE_NAME=\"$host_bundle_name\"", 259 "security_key/fake_remote_security_key_message_writer.cc",
212 # "PREFPANE_BUNDLE_NAME=\"$prefpane_bundle_name\"", 260 "security_key/fake_remote_security_key_message_writer.h",
213 #] 261 "setup/mock_oauth_client.cc",
214 262 "setup/mock_oauth_client.h",
215 libs += [ 263 ]
216 "Accelerate.framework", 264
217 "libpam.a", 265 configs += [ "//remoting:version" ]
218 ] 266
219 267 deps = [
220 deps += [ "//third_party/google_toolbox_for_mac" ] 268 "//remoting/proto",
221 } 269 "//testing/gmock",
222 270 "//testing/gtest",
223 if (is_win) { 271 ]
224 deps += [ 272 public_deps = [
225 ":messages", 273 ":host",
226 ":remoting_lib_idl", 274 "//third_party/protobuf:protobuf_lite",
227 ] 275 ]
228 } 276
229 277 if (enable_webrtc) {
230 if (enable_webrtc) { 278 public_deps += [
231 deps += [ "//third_party/webrtc/modules/desktop_capture" ] 279 "//third_party/libjingle:libjingle_webrtc",
232 } 280 "//third_party/webrtc/modules/desktop_capture",
233 281 ]
234 if (is_android) { 282 }
235 sources -= [ 283 }
236 "single_window_desktop_environment.cc", 284
237 "single_window_desktop_environment.h", 285 # The host portions of the remoting unit tests.
238 ] 286 source_set("unit_tests") {
239 } 287 testonly = true
240 } 288
241 289 sources = [
242 source_set("test_support") { 290 "audio_pump_unittest.cc",
243 testonly = true 291 "audio_silence_detector_unittest.cc",
292 "backoff_timer_unittest.cc",
293 "chromeos/aura_desktop_capturer_unittest.cc",
294 "chromeos/clipboard_aura_unittest.cc",
295 "chromoting_host_context_unittest.cc",
296 "chromoting_host_unittest.cc",
297 "client_session_unittest.cc",
298 "config_file_watcher_unittest.cc",
299 "daemon_process_unittest.cc",
300 "desktop_process_unittest.cc",
301 "gcd_rest_client_unittest.cc",
302 "gcd_state_updater_unittest.cc",
303 "heartbeat_sender_unittest.cc",
304 "host_change_notification_listener_unittest.cc",
305 "host_config_unittest.cc",
306 "host_extension_session_manager_unittest.cc",
307 "host_status_logger_unittest.cc",
308 "ipc_desktop_environment_unittest.cc",
309 "it2me/it2me_confirmation_dialog_proxy_unittest.cc",
310 "it2me/it2me_native_messaging_host_unittest.cc",
311 "linux/audio_pipe_reader_unittest.cc",
312 "linux/certificate_watcher_unittest.cc",
313 "linux/unicode_to_keysym_unittest.cc",
314 "linux/x_server_clipboard_unittest.cc",
315 "local_input_monitor_unittest.cc",
316 "mouse_cursor_monitor_proxy_unittest.cc",
317 "mouse_shape_pump_unittest.cc",
318 "native_messaging/native_messaging_reader_unittest.cc",
319 "native_messaging/native_messaging_writer_unittest.cc",
320 "pairing_registry_delegate_linux_unittest.cc",
321 "pairing_registry_delegate_win_unittest.cc",
322 "pin_hash_unittest.cc",
323 "policy_watcher_unittest.cc",
324 "register_support_host_request_unittest.cc",
325 "remote_input_filter_unittest.cc",
326 "resizing_host_observer_unittest.cc",
327 "resources_unittest.cc",
328 "screen_resolution_unittest.cc",
329 "security_key/gnubby_auth_handler_linux_unittest.cc",
330 "security_key/gnubby_auth_handler_win_unittest.cc",
331 "security_key/gnubby_extension_session_unittest.cc",
332 "security_key/remote_security_key_ipc_client_unittest.cc",
333 "security_key/remote_security_key_ipc_server_unittest.cc",
334 "security_key/remote_security_key_message_handler_unittest.cc",
335 "security_key/remote_security_key_message_reader_impl_unittest.cc",
336 "security_key/remote_security_key_message_writer_impl_unittest.cc",
337 "server_log_entry_host_unittest.cc",
338 "setup/me2me_native_messaging_host_unittest.cc",
339 "setup/oauth_helper_unittest.cc",
340 "setup/pin_validator_unittest.cc",
341 "third_party_auth_config_unittest.cc",
342 "token_validator_factory_impl_unittest.cc",
343 "touch_injector_win_unittest.cc",
344 "win/rdp_client_unittest.cc",
345 "win/worker_process_launcher_unittest.cc",
346 ]
347
348 if (!use_x11 && is_linux) {
349 sources -= [ "linux/unicode_to_keysym_unittest.cc" ]
350 }
351 if (use_ozone || is_chromeos) {
352 sources -= [ "local_input_monitor_unittest.cc" ]
353 }
354 if (is_chromeos) {
355 sources -= [ "linux/x_server_clipboard_unittest.cc" ]
356 }
357 if (is_android) {
358 sources -= [ "it2me/it2me_native_messaging_host_unittest.cc" ]
359 }
360
361 configs += [ "//remoting:version" ]
362
363 deps = [
364 ":host",
365 ":test_support",
366 "//remoting/host/it2me:common",
367 "//remoting/host/native_messaging",
368 "//remoting/host/setup",
369 "//remoting/proto",
370 "//skia",
371 "//testing/gmock",
372 "//testing/gtest",
373 ]
374
375 if (enable_configuration_policy) {
376 deps += [ "//components/policy:policy_component_test_support" ]
377 }
378 }
379
380 if (is_win) {
381 import("//build/toolchain/win/midl.gni")
382 import("//build/win/message_compiler.gni")
383
384 # TODO(brettw) these should not be generated via exec_script. This should be
385 # part of the build process rather than the metabuild. Instead, a script
386 # should generate a header containing the #defines for this as well as the
387 # IDL file with the values.
388 clsids = exec_script("win/get_clsids.py",
389 [
390 remoting_srcs_gypi_values.daemon_controller_guid,
391 remoting_srcs_gypi_values.rdp_desktop_session_guid,
392 chrome_version_full,
393 ],
394 "value")
395 daemon_controller_clsid = clsids[0]
396 rdp_desktop_session_clsid = clsids[1]
397
398 action("generate_idl") {
399 script = "//build/util/version.py"
400
401 inputs = [
402 "win/chromoting_lib_idl.templ",
403 ]
404 outputs = [
405 "$target_gen_dir/chromoting_lib.idl",
406 ]
407
408 args = [
409 "-e",
410 "DAEMON_CONTROLLER_CLSID='$daemon_controller_clsid'",
411 "-e",
412 "RDP_DESKTOP_SESSION_CLSID='$rdp_desktop_session_clsid'",
413 rebase_path(inputs[0], root_build_dir),
414 rebase_path(outputs[0], root_build_dir),
415 ]
416 }
417
418 midl("remoting_lib_idl") {
419 sources = get_target_outputs(":generate_idl")
420 deps = [
421 ":generate_idl",
422 ]
423 }
424
425 config("MIDL_config") {
426 if (is_clang) {
427 cflags = [
428 # MIDL generated code has a habit of omitting optional braces.
429 "-Wno-missing-braces",
430
431 # Source files generated by the MIDL compiler trigger warnings with
432 # -Wincompatible-pointer-types enabled.
433 "-Wno-incompatible-pointer-types",
434
435 # Generated code contains unused variables.
436 "-Wno-unused-variable",
437
438 # PROXYFILE_LIST_START is an extern with initializer.
439 "-Wno-extern-initializer",
440 ]
441 }
442 }
443
444 # GYP version: remoting/remoting_host_win.gypi:remoting_lib_ps
445 static_library("remoting_lib_ps") {
446 configs += [ ":MIDL_config" ]
447
448 defines = [
449 "ENTRY_PREFIX=Ps",
450 "REGISTER_PROXY_DLL",
451 ]
452
453 deps = [
454 ":remoting_lib_idl",
455 ]
244 456
245 sources = [ 457 sources = [
246 "fake_desktop_environment.cc", 458 "$root_gen_dir/remoting/host/chromoting_lib.dlldata.c",
247 "fake_desktop_environment.h", 459 "$root_gen_dir/remoting/host/chromoting_lib_p.c",
248 "fake_host_extension.cc", 460 ]
249 "fake_host_extension.h", 461 }
250 "fake_host_status_monitor.h", 462
251 "fake_host_status_monitor.h", 463 # Makes the .mc file from the .mc.jinja file.
252 "fake_mouse_cursor_monitor.cc", 464 remoting_localize("messages_localizing") {
253 "fake_mouse_cursor_monitor.h", 465 sources = [
254 "fake_oauth_token_getter.cc", 466 "win/host_messages.mc.jinja2",
255 "fake_oauth_token_getter.h", 467 ]
256 "host_mock_objects.cc", 468 locales = remoting_locales
257 "host_mock_objects.h", 469 locale_dir = webapp_locale_dir
258 "security_key/fake_ipc_gnubby_auth_handler.cc", 470 encoding = "utf-16"
259 "security_key/fake_ipc_gnubby_auth_handler.h", 471
260 "security_key/fake_remote_security_key_ipc_client.cc", 472 # This target is funny. It only produces one file and the output doesn't
261 "security_key/fake_remote_security_key_ipc_client.h", 473 # match the input. We want to generate remoting_host_messages.mc from
262 "security_key/fake_remote_security_key_ipc_server.cc", 474 # host_messages.mg.jinja2. GN complains if it doesn't see a pattern in the
263 "security_key/fake_remote_security_key_ipc_server.h", 475 # output, so the following pattern produces the name we want with a template
264 "security_key/fake_remote_security_key_message_reader.cc", 476 # based on the input.
265 "security_key/fake_remote_security_key_message_reader.h", 477 #
266 "security_key/fake_remote_security_key_message_writer.cc", 478 # TODO: This is for GYP compat. We should just make the names match instead.
267 "security_key/fake_remote_security_key_message_writer.h", 479 output = "$target_gen_dir/remoting_{{source_name_part}}"
268 "setup/mock_oauth_client.cc", 480 }
269 "setup/mock_oauth_client.h", 481
270 ] 482 # Makes the .h/.rc files from the .mc file.
271 483 message_compiler("messages") {
272 configs += [ "//remoting:version" ] 484 compile_generated_code = false
273 485 sources = get_target_outputs(":messages_localizing")
274 deps = [ 486 deps = [
275 "//remoting/proto", 487 ":messages_localizing",
276 "//testing/gmock", 488 ]
277 "//testing/gtest", 489 }
278 ] 490
279 public_deps = [ 491 # GYP version: remoting/remoting_host_win.gypi:remoting_console
280 ":host", 492 executable("remoting_console") {
281 "//third_party/protobuf:protobuf_lite", 493 configs += [ "//build/config/compiler:wexit_time_destructors" ]
282 ] 494
283 495 defines = host_predefines + [ "BINARY=BINARY_HOST_ME2ME" ]
284 if (enable_webrtc) { 496
285 public_deps += [ 497 deps = [
286 "//third_party/libjingle:libjingle_webrtc", 498 ":dpi_aware_exe_manifest",
287 "//third_party/webrtc/modules/desktop_capture", 499 ":remoting_core",
288 ] 500 ":remoting_windows_resources",
289 } 501 ]
290 }
291
292 # The host portions of the remoting unit tests.
293 source_set("unit_tests") {
294 testonly = true
295 502
296 sources = [ 503 sources = [
297 "audio_pump_unittest.cc", 504 "$root_gen_dir/remoting/version.rc",
298 "audio_silence_detector_unittest.cc", 505 "win/entry_point.cc",
299 "backoff_timer_unittest.cc", 506 ]
300 "chromeos/aura_desktop_capturer_unittest.cc", 507
301 "chromeos/clipboard_aura_unittest.cc", 508 ldflags = [
302 "chromoting_host_context_unittest.cc", 509 "/ENTRY:HostEntryPoint",
303 "chromoting_host_unittest.cc", 510 # "/NODEFAULTLIB",
304 "client_session_unittest.cc", 511 ]
305 "config_file_watcher_unittest.cc", 512 }
306 "daemon_process_unittest.cc", 513
307 "desktop_process_unittest.cc", 514 # GYP version: //remoting/remoting_host_win.gypi:remoting_core
308 "gcd_rest_client_unittest.cc", 515 shared_library("remoting_core") {
309 "gcd_state_updater_unittest.cc", 516 configs += [ "//build/config/compiler:wexit_time_destructors" ]
310 "heartbeat_sender_unittest.cc", 517
311 "host_change_notification_listener_unittest.cc", 518 defines = host_predefines + [
312 "host_config_unittest.cc", 519 "_ATL_APARTMENT_THREADED",
313 "host_extension_session_manager_unittest.cc", 520 "_ATL_CSTRING_EXPLICIT_CONSTRUCTORS",
314 "host_status_logger_unittest.cc", 521 "_ATL_NO_AUTOMATIC_NAMESPACE",
315 "ipc_desktop_environment_unittest.cc", 522 "_ATL_NO_EXCEPTIONS",
316 "it2me/it2me_confirmation_dialog_proxy_unittest.cc", 523 "BINARY=BINARY_CORE",
317 "it2me/it2me_native_messaging_host_unittest.cc", 524 "DAEMON_CONTROLLER_CLSID=\"$daemon_controller_clsid\"",
318 "linux/audio_pipe_reader_unittest.cc", 525 "RDP_DESKTOP_SESSION_CLSID=\"$rdp_desktop_session_clsid\"",
319 "linux/certificate_watcher_unittest.cc", 526 "HOST_IMPLEMENTATION",
320 "linux/unicode_to_keysym_unittest.cc", 527 "ISOLATION_AWARE_ENABLED=1",
321 "linux/x_server_clipboard_unittest.cc", 528 "STRICT",
322 "local_input_monitor_unittest.cc", 529 "VERSION=$chrome_version_full",
323 "mouse_cursor_monitor_proxy_unittest.cc", 530 ]
324 "mouse_shape_pump_unittest.cc", 531
325 "native_messaging/native_messaging_reader_unittest.cc", 532 if (remoting_multi_process != 0 && remoting_rdp_session != 0) {
326 "native_messaging/native_messaging_writer_unittest.cc", 533 defines += [ "REMOTING_RDP_SESSION" ]
327 "pairing_registry_delegate_linux_unittest.cc", 534 }
328 "pairing_registry_delegate_win_unittest.cc", 535
329 "pin_hash_unittest.cc", 536 if (remoting_multi_process != 0) {
330 "policy_watcher_unittest.cc", 537 defines += [ "REMOTING_MULTI_PROCESS" ]
331 "register_support_host_request_unittest.cc", 538 }
332 "remote_input_filter_unittest.cc",
333 "resizing_host_observer_unittest.cc",
334 "resources_unittest.cc",
335 "screen_resolution_unittest.cc",
336 "security_key/gnubby_auth_handler_linux_unittest.cc",
337 "security_key/gnubby_auth_handler_win_unittest.cc",
338 "security_key/gnubby_extension_session_unittest.cc",
339 "security_key/remote_security_key_ipc_client_unittest.cc",
340 "security_key/remote_security_key_ipc_server_unittest.cc",
341 "security_key/remote_security_key_message_handler_unittest.cc",
342 "security_key/remote_security_key_message_reader_impl_unittest.cc",
343 "security_key/remote_security_key_message_writer_impl_unittest.cc",
344 "server_log_entry_host_unittest.cc",
345 "setup/me2me_native_messaging_host_unittest.cc",
346 "setup/oauth_helper_unittest.cc",
347 "setup/pin_validator_unittest.cc",
348 "third_party_auth_config_unittest.cc",
349 "token_validator_factory_impl_unittest.cc",
350 "touch_injector_win_unittest.cc",
351 "win/rdp_client_unittest.cc",
352 "win/worker_process_launcher_unittest.cc",
353 ]
354
355 if (!use_x11 && is_linux) {
356 sources -= [ "linux/unicode_to_keysym_unittest.cc" ]
357 }
358 if (use_ozone || is_chromeos) {
359 sources -= [ "local_input_monitor_unittest.cc" ]
360 }
361 if (is_chromeos) {
362 sources -= [ "linux/x_server_clipboard_unittest.cc" ]
363 }
364 if (is_android) {
365 sources -= [ "it2me/it2me_native_messaging_host_unittest.cc" ]
366 }
367
368 configs += [ "//remoting:version" ]
369 539
370 deps = [ 540 deps = [
371 ":host", 541 ":host",
372 ":test_support", 542 ":messages",
543 ":remoting_lib_idl",
544 ":remoting_lib_ps",
545 ":remoting_me2me_host_static",
546 ":remoting_windows_resources",
547 "//base",
548 "//base:base_static",
549 "//base/allocator",
550 "//base/third_party/dynamic_annotations",
551 "//build/win:default_exe_manifest",
552 "//ipc",
553 "//net",
554 "//remoting/base",
555 "//remoting/base:breakpad",
556 "//remoting/codec",
373 "//remoting/host/it2me:common", 557 "//remoting/host/it2me:common",
374 "//remoting/host/native_messaging", 558 "//remoting/host/native_messaging",
375 "//remoting/host/setup", 559 "//remoting/host/setup",
560 "//remoting/protocol",
561 "//sandbox/win:sandbox", # Should always use Windows version
562 "//third_party/webrtc/modules/desktop_capture",
563 ]
564
565 sources = [
566 "$root_gen_dir/remoting/core.rc",
567 "$root_gen_dir/remoting/host/remoting_host_messages.rc",
568 "$root_gen_dir/remoting/version.rc",
569 "desktop_process_main.cc",
570 "host_main.cc",
571 "host_main.h",
572 "it2me/it2me_native_messaging_host_main.cc",
573 "it2me/it2me_native_messaging_host_main.h",
574 "security_key/remote_security_key_main.cc",
575 "security_key/remote_security_key_main.h",
576 "setup/host_starter.cc",
577 "setup/host_starter.h",
578 "setup/me2me_native_messaging_host_main.cc",
579 "setup/me2me_native_messaging_host_main.h",
580 "setup/start_host_main.cc",
581 "setup/start_host_main.h",
582 "win/chromoting_lib.rc",
583 "win/chromoting_module.cc",
584 "win/chromoting_module.h",
585 "win/core.cc",
586 "win/core_resource.h",
587 "win/host_service.cc",
588 "win/host_service.h",
589 "win/omaha.cc",
590 "win/omaha.h",
591 "win/rdp_desktop_session.cc",
592 "win/rdp_desktop_session.h",
593 "win/unprivileged_process_delegate.cc",
594 "win/unprivileged_process_delegate.h",
595 "win/wts_session_process_delegate.cc",
596 "win/wts_session_process_delegate.h",
597 "worker_process_ipc_delegate.h",
598 ]
599
600 ldflags = [
601 "/EXPORT:DllGetClassObject=PsDllGetClassObject,PRIVATE",
602 "/EXPORT:DllCanUnloadNow=PsDllCanUnloadNow,PRIVATE",
603 "/EXPORT:DllRegisterServer=PsDllRegisterServer,PRIVATE",
604 "/EXPORT:DllUnregisterServer=PsDllUnregisterServer,PRIVATE",
605 ]
606
607 libs = [
608 "comctl32.lib",
609 "rpcns4.lib",
610 "rpcrt4.lib",
611 "sas.lib",
612 "uuid.lib",
613 "wtsapi32.lib",
614 ]
615
616 if (is_clang) {
617 cflags = [ "-Wno-header-hygiene" ]
618 }
619 }
620
621 # GYP version: //remoting/remoting_host_win.gypi:remoting_desktop
622 executable("remoting_desktop") {
623 configs += [
624 "//build/config/compiler:wexit_time_destructors",
625 "//build/config/win:windowed",
626 ]
627
628 defines = host_predefines + [ "BINARY=BINARY_DESKTOP" ]
629
630 deps = [
631 ":remoting_core",
632 ":remoting_windows_resources",
633 ]
634
635 if (is_official_build) {
636 deps += [ ":dpi_aware_elevated_exe_manifest" ]
637 } else {
638 deps += [ ":dpi_aware_exe_manifest" ]
639 }
640
641 sources = [
642 "$root_gen_dir/remoting/version.rc",
643 "win/entry_point.cc",
644 ]
645
646 ldflags = [
647 "/ENTRY:HostEntryPoint",
648 # "/NODEFAULTLIB",
649 ]
650 }
651
652 # GYP version: //remoting/remoting_host_win.gypi:remote_security_key
653 executable("remote_security_key") {
654 configs += [ "//build/config/compiler:wexit_time_destructors" ]
655
656 defines = host_predefines + [ "BINARY=BINARY_REMOTE_SECURITY_KEY" ]
657
658 deps = [
659 ":remoting_core",
660 ":remoting_windows_resources",
661 "//build/win:default_exe_manifest",
662 ]
663
664 sources = [
665 "$root_gen_dir/remoting/version.rc",
666 "security_key/remote_security_key_entry_point.cc",
667 ]
668 }
669
670 # GYP version:
671 # //remoting/remoting_host_win.gypi:remoting_me2me_native_messaging_host
672 executable("remoting_native_messaging_host") {
673 configs += [ "//build/config/compiler:wexit_time_destructors" ]
674
675 defines = host_predefines + [ "BINARY=BINARY_NATIVE_MESSAGING_HOST" ]
676
677 deps = [
678 ":remoting_core",
679 ":remoting_windows_resources",
680 "//build/win:default_exe_manifest",
681 ]
682
683 sources = [
684 "$root_gen_dir/remoting/version.rc",
685 "setup/me2me_native_messaging_host_entry_point.cc",
686 ]
687 }
688
689 # GYP version: //remoting/remoting_host_win.gypi:remoting_windows_resources
690 remoting_localize("remoting_windows_resources") {
691 deps = [
692 "//remoting/resources",
693 ]
694
695 sources = [
696 "win/core.rc.jinja2",
697 "win/version.rc.jinja2",
698 ]
699
700 # TODO(zijiehe): Export lastchange_path from
701 # //chrome/version.gni:process_version
702 variables = [
703 rebase_path(chrome_version_file),
704 rebase_path(remoting_version_file),
705 rebase_path("//build/util/LASTCHANGE"),
706 ]
707
708 output = "$root_gen_dir/remoting/{{source_name_part}}"
709
710 locale_dir = webapp_locale_dir
711
712 encoding = "utf-16"
713
714 locales = remoting_locales
715 }
716
717 # TODO(GYP) More Windows remoting targets from remoting_host_win.gypi
718 }
719
720 if (enable_remoting_host && !is_android) {
721 executable("remoting_start_host") {
722 sources = [
723 "setup/start_host_entry_point.cc",
724 ]
725
726 deps = [
727 "//build/config/sanitizers:deps",
728 ]
729
730 configs += [ "//build/config/compiler:wexit_time_destructors" ]
731
732 if (is_win) {
733 defines = host_predefines + [ "BINARY=BINARY_REMOTING_START_HOST" ]
734
735 deps += [
736 ":remoting_core",
737 ":remoting_windows_resources",
738 "//build/win:default_exe_manifest",
739 ]
740 } else {
741 sources += [
742 "setup/host_starter.cc",
743 "setup/host_starter.h",
744 "setup/start_host_main.cc",
745 "setup/start_host_main.h",
746 ]
747
748 deps += [ "//remoting/host/setup" ]
749 }
750
751 if (enable_webrtc) {
752 deps += [ "//third_party/libjingle:libjingle_webrtc" ]
753 }
754 }
755
756 action_foreach("remoting_native_messaging_manifests") {
757 if (is_mac) {
758 me2me_host_path = "/Library/PrivilegedHelperTools/$me2me_host_bundle_name/ Contents/MacOS/$native_messaging_host_bundle_name/Contents/MacOS/native_messagin g_host"
759 it2me_host_path = "/Library/PrivilegedHelperTools/$me2me_host_bundle_name/ Contents/MacOS/$remote_assistance_host_bundle_name/Contents/MacOS/remote_assista nce_host"
760 } else if (is_win) {
761 me2me_host_path = "remoting_native_messaging_host.exe"
762 it2me_host_path = "remote_assistance_host.exe"
763 } else {
764 me2me_host_path =
765 "/opt/google/chrome-remote-desktop/native-messaging-host"
766 it2me_host_path =
767 "/opt/google/chrome-remote-desktop/remote-assistance-host"
768 }
769
770 script = "../tools/build/remoting_localize.py"
771
772 sources = [
773 "it2me/com.google.chrome.remote_assistance.json.jinja2",
774 "setup/com.google.chrome.remote_desktop.json.jinja2",
775 ]
776
777 inputs = [
778 branding_path,
779 ]
780
781 outputs = [
782 "$root_build_dir/remoting/{{source_name_part}}",
783 ]
784
785 args = [
786 "--define",
787 "ME2ME_HOST_PATH=$me2me_host_path",
788 "--define",
789 "IT2ME_HOST_PATH=$it2me_host_path",
790 "--variables",
791 rebase_path(branding_path),
792 "--template",
793 "{{source}}",
794 "--locale_output",
795 "remoting/{{source_name_part}}",
796 "en",
797 ]
798 }
799
800 # TODO(crbug.com/512899) This still needs to be ported to GN.
801 group("remoting_infoplist_strings") {
802 }
803 }
804
805 if (enable_me2me_host) {
806 source_set("remoting_me2me_host_static") {
807 sources = [
808 "pam_authorization_factory_posix.cc",
809 "pam_authorization_factory_posix.h",
810 "remoting_me2me_host.cc",
811 ]
812 defines = []
813
814 configs += [ "//remoting:version" ]
815
816 deps = [
817 "//base",
818 "//base:i18n",
819 "//components/policy:policy_component_common",
820 "//net",
821 "//remoting/base",
822 "//remoting/host",
376 "//remoting/proto", 823 "//remoting/proto",
377 "//skia", 824 "//third_party/webrtc/modules/desktop_capture",
378 "//testing/gmock",
379 "//testing/gtest",
380 ] 825 ]
381 826
382 if (enable_configuration_policy) { 827 if (enable_configuration_policy) {
383 deps += [ "//components/policy:policy_component_test_support" ] 828 deps += [ "//components/policy" ]
829 }
830
831 if (enable_webrtc) {
832 deps += [ "//third_party/libjingle:libjingle_webrtc" ]
833 }
834
835 if (is_desktop_linux) {
836 deps += [ "//build/config/linux/gtk2" ]
837 }
838 if ((is_linux && !is_chromeos) || is_mac) {
839 libs = [ "pam" ]
840 }
841
842 if (is_mac && is_official_build) {
843 sources += [ "internal/internal_mac-inl.h" ]
844 defines += [ "USE_REMOTING_MACOSX_INTERNAL" ]
845 }
846
847 if (is_win && remoting_multi_process != 0 && remoting_rdp_session != 0) {
848 defines += [ "REMOTING_RDP_SESSION" ]
849 }
850
851 if (remoting_multi_process != 0) {
852 defines += [ "REMOTING_MULTI_PROCESS" ]
384 } 853 }
385 } 854 }
386 855
387 if (is_win) { 856 if (is_win) {
388 import("//build/toolchain/win/midl.gni") 857 # GYP version: //remoting/remoting_host_win.gypi:remoting_me2me_host
389 import("//build/win/message_compiler.gni") 858 executable("remoting_me2me_host") {
390 859 configs += [
391 # TODO(brettw) these should not be generated via exec_script. This should be 860 "//build/config/compiler:wexit_time_destructors",
392 # part of the build process rather than the metabuild. Instead, a script 861 "//build/config/win:windowed",
393 # should generate a header containing the #defines for this as well as the 862 ]
394 # IDL file with the values.
395 clsids = exec_script("win/get_clsids.py",
396 [
397 remoting_srcs_gypi_values.daemon_controller_guid,
398 remoting_srcs_gypi_values.rdp_desktop_session_guid,
399 chrome_version_full,
400 ],
401 "value")
402 daemon_controller_clsid = clsids[0]
403 rdp_desktop_session_clsid = clsids[1]
404
405 action("generate_idl") {
406 script = "//build/util/version.py"
407
408 inputs = [
409 "win/chromoting_lib_idl.templ",
410 ]
411 outputs = [
412 "$target_gen_dir/chromoting_lib.idl",
413 ]
414
415 args = [
416 "-e",
417 "DAEMON_CONTROLLER_CLSID='$daemon_controller_clsid'",
418 "-e",
419 "RDP_DESKTOP_SESSION_CLSID='$rdp_desktop_session_clsid'",
420 rebase_path(inputs[0], root_build_dir),
421 rebase_path(outputs[0], root_build_dir),
422 ]
423 }
424
425 midl("remoting_lib_idl") {
426 sources = get_target_outputs(":generate_idl")
427 deps = [
428 ":generate_idl",
429 ]
430 }
431
432 config("MIDL_config") {
433 if (is_clang) {
434 cflags = [
435 # MIDL generated code has a habit of omitting optional braces.
436 "-Wno-missing-braces",
437
438 # Source files generated by the MIDL compiler trigger warnings with
439 # -Wincompatible-pointer-types enabled.
440 "-Wno-incompatible-pointer-types",
441
442 # Generated code contains unused variables.
443 "-Wno-unused-variable",
444
445 # PROXYFILE_LIST_START is an extern with initializer.
446 "-Wno-extern-initializer",
447 ]
448 }
449 }
450
451 # GYP version: remoting/remoting_host_win.gypi:remoting_lib_ps
452 static_library("remoting_lib_ps") {
453 configs += [ ":MIDL_config" ]
454
455 defines = [
456 "ENTRY_PREFIX=Ps",
457 "REGISTER_PROXY_DLL",
458 ]
459
460 deps = [
461 ":remoting_lib_idl",
462 ]
463
464 sources = [
465 "$root_gen_dir/remoting/host/chromoting_lib.dlldata.c",
466 "$root_gen_dir/remoting/host/chromoting_lib_p.c",
467 ]
468 }
469
470 # Makes the .mc file from the .mc.jinja file.
471 remoting_localize("messages_localizing") {
472 sources = [
473 "win/host_messages.mc.jinja2",
474 ]
475 locales = remoting_locales
476 locale_dir = webapp_locale_dir
477 encoding = "utf-16"
478
479 # This target is funny. It only produces one file and the output doesn't
480 # match the input. We want to generate remoting_host_messages.mc from
481 # host_messages.mg.jinja2. GN complains if it doesn't see a pattern in the
482 # output, so the following pattern produces the name we want with a templa te
483 # based on the input.
484 #
485 # TODO: This is for GYP compat. We should just make the names match instea d.
486 output = "$target_gen_dir/remoting_{{source_name_part}}"
487 }
488
489 # Makes the .h/.rc files from the .mc file.
490 message_compiler("messages") {
491 compile_generated_code = false
492 sources = get_target_outputs(":messages_localizing")
493 deps = [
494 ":messages_localizing",
495 ]
496 }
497
498 # GYP version: remoting/remoting_host_win.gypi:remoting_console
499 executable("remoting_console") {
500 configs += [ "//build/config/compiler:wexit_time_destructors" ]
501 863
502 defines = host_predefines + [ "BINARY=BINARY_HOST_ME2ME" ] 864 defines = host_predefines + [ "BINARY=BINARY_HOST_ME2ME" ]
503 865
504 deps = [ 866 deps = [
505 ":dpi_aware_exe_manifest", 867 ":dpi_aware_exe_manifest",
506 ":remoting_core", 868 ":remoting_core",
507 ":remoting_windows_resources", 869 ":remoting_windows_resources",
508 ] 870 ]
509 871
510 sources = [ 872 sources = [
511 "$root_gen_dir/remoting/version.rc", 873 "$root_gen_dir/remoting/version.rc",
512 "win/entry_point.cc", 874 "win/entry_point.cc",
513 ] 875 ]
514 876
877 output_name = "remoting_host"
878
515 ldflags = [ 879 ldflags = [
516 "/ENTRY:HostEntryPoint", 880 "/ENTRY:HostEntryPoint",
517 # "/NODEFAULTLIB", 881 # "/NODEFAULTLIB",
518 ] 882 ]
519 } 883 }
520 884 } else {
521 # GYP version: //remoting/remoting_host_win.gypi:remoting_core 885 executable("remoting_me2me_host") {
522 shared_library("remoting_core") { 886 configs += [ "//remoting:version" ]
523 configs += [ "//build/config/compiler:wexit_time_destructors" ] 887
524 888 sources = [
525 defines = host_predefines + [ 889 "host_main.cc",
526 "_ATL_APARTMENT_THREADED", 890 "host_main.h",
527 "_ATL_CSTRING_EXPLICIT_CONSTRUCTORS", 891 ]
528 "_ATL_NO_AUTOMATIC_NAMESPACE", 892
529 "_ATL_NO_EXCEPTIONS", 893 if (is_mac && is_chrome_branded && is_official_build) {
530 "BINARY=BINARY_CORE", 894 defines = [ "REMOTING_ENABLE_BREAKPAD" ]
531 "DAEMON_CONTROLLER_CLSID=\"$daemon_controller_clsid\"",
532 "RDP_DESKTOP_SESSION_CLSID=\"$rdp_desktop_session_clsid\"",
533 "HOST_IMPLEMENTATION",
534 "ISOLATION_AWARE_ENABLED=1",
535 "STRICT",
536 "VERSION=$chrome_version_full",
537 ]
538
539 if (remoting_multi_process != 0 && remoting_rdp_session != 0) {
540 defines += [ "REMOTING_RDP_SESSION" ]
541 } 895 }
542 896
543 if (remoting_multi_process != 0) { 897 deps = [
544 defines += [ "REMOTING_MULTI_PROCESS" ] 898 ":credits",
899 ":remoting_me2me_host_static",
900 "//build/config/sanitizers:deps",
901 ]
902 }
903
904 if (is_linux) {
905 copy("remoting_me2me_host_copy_script") {
906 sources = [
907 "linux/linux_me2me_host.py",
908 ]
909 outputs = [
910 "$root_build_dir/remoting/chrome-remote-desktop",
911 ]
545 } 912 }
913 copy("remoting_me2me_host_copy_host") {
914 sources = [
915 "linux/remoting_me2me_host_wrapper.sh",
916 ]
917 outputs = [
918 "$root_build_dir/remoting/chrome-remote-desktop-host",
919 ]
920 deps = [
921 ":remoting_me2me_host",
922 ]
923 }
924 group("remoting_dev_me2me_host") {
925 deps = [
926 ":remoting_me2me_host",
927 ":remoting_me2me_host_copy_host",
928 ":remoting_me2me_host_copy_script",
929 ]
930 }
931 }
932
933 executable("native_messaging_host") {
934 sources = [
935 "setup/me2me_native_messaging_host_entry_point.cc",
936 "setup/me2me_native_messaging_host_main.cc",
937 "setup/me2me_native_messaging_host_main.h",
938 ]
546 939
547 deps = [ 940 deps = [
548 ":host", 941 ":remoting_infoplist_strings",
549 ":messages",
550 ":remoting_lib_idl",
551 ":remoting_lib_ps",
552 ":remoting_me2me_host_static",
553 ":remoting_windows_resources",
554 "//base", 942 "//base",
555 "//base:base_static",
556 "//base/allocator",
557 "//base/third_party/dynamic_annotations",
558 "//build/win:default_exe_manifest",
559 "//ipc",
560 "//net",
561 "//remoting/base",
562 "//remoting/base:breakpad", 943 "//remoting/base:breakpad",
563 "//remoting/codec", 944 "//remoting/host",
564 "//remoting/host/it2me:common",
565 "//remoting/host/native_messaging", 945 "//remoting/host/native_messaging",
566 "//remoting/host/setup", 946 "//remoting/host/setup",
567 "//remoting/protocol", 947 ]
568 "//sandbox/win:sandbox", # Should always use Windows version 948
569 "//third_party/webrtc/modules/desktop_capture", 949 configs += [ "//build/config/compiler:wexit_time_destructors" ]
570 ] 950
571 951 # The |major|, |build| and |patch| versions are inherited from Chrome.
952 # Since Chrome's |minor| version is always '0', we replace it with a
953 # Chromoting-specific patch version.
954 defines = [ "VERSION=" + "$chrome_version_major" + "." +
955 "$remoting_version_patch" + "." + "$chrome_version_build" +
956 "." + "$chrome_version_patch" ]
957 }
958 }
959
960 if (is_chrome_branded && enable_me2me_host && is_linux && !is_chromeos) {
961 # TODO(GYP): add support for archive_chromoting_tests variable?
962
963 import("//build/config/zip.gni")
964
965 build_deb_script = "installer/linux/build_deb.py"
966 deb_filename =
967 "$root_build_dir/" + exec_script(build_deb_script,
968 [
969 "-p",
970 "-s",
971 rebase_path("//"),
972 ],
973 "string",
974 [ "installer/linux/build-deb.sh" ])
975 changes_filename =
976 "$root_build_dir/" + get_path_info(deb_filename, "name") + ".changes"
977
978 packaging_outputs = [
979 deb_filename,
980 changes_filename,
981
982 # TODO(GYP): Check that these are generated by build_deb.py.
983 #"$root_build_dir/remoting_me2me_host.debug",
984 #"$root_build_dir/remoting_start_host.debug",
985 #"$root_build_dir/native_messaging_host.debug",
986 #"$root_build_dir/remote_assistance_host.debug",
987 ]
988
989 zip("remoting_me2me_host_archive") {
990 # Store the installer package(s) into a zip file so there is a
991 # consistent filename to reference for build archiving (i.e. in
992 # FILES.cfg). This also avoids possible conflicts with "wildcard"
993 # package handling in other build/signing scripts.
994 inputs = packaging_outputs
995 output = "$root_build_dir/remoting-me2me-host-linux.zip"
996 deps = [
997 ":remoting_me2me_host_copy",
998 ]
999 }
1000
1001 copy("remoting_me2me_host_copy") {
1002 # Copy the debian package file, which has version info in it,
1003 # to a consistewnt filename for use on Chromoting swarming bots.
572 sources = [ 1004 sources = [
573 "$root_gen_dir/remoting/core.rc", 1005 deb_filename,
574 "$root_gen_dir/remoting/host/remoting_host_messages.rc", 1006 ]
575 "$root_gen_dir/remoting/version.rc", 1007 outputs = [
576 "desktop_process_main.cc", 1008 "$root_build_dir/remoting-me2me-host.deb",
577 "host_main.cc", 1009 ]
578 "host_main.h", 1010 public_deps = [
579 "it2me/it2me_native_messaging_host_main.cc", 1011 ":remoting_me2me_host_deb_installer",
580 "it2me/it2me_native_messaging_host_main.h", 1012 ]
581 "security_key/remote_security_key_main.cc", 1013 }
582 "security_key/remote_security_key_main.h", 1014
583 "setup/host_starter.cc", 1015 action("remoting_me2me_host_deb_installer") {
584 "setup/host_starter.h", 1016 script = build_deb_script
585 "setup/me2me_native_messaging_host_main.cc", 1017 inputs = [
586 "setup/me2me_native_messaging_host_main.h", 1018 build_deb_script,
587 "setup/start_host_main.cc", 1019 "installer/linux/Makefile",
588 "setup/start_host_main.h", 1020 "installer/linux/debian/chrome-remote-desktop.init",
589 "win/chromoting_lib.rc", 1021 "installer/linux/debian/chrome-remote-desktop.pam",
590 "win/chromoting_module.cc", 1022 "installer/linux/debian/compat",
591 "win/chromoting_module.h", 1023 "installer/linux/debian/control",
592 "win/core.cc", 1024 "installer/linux/debian/copyright",
593 "win/core_resource.h", 1025 "installer/linux/debian/postinst",
594 "win/host_service.cc", 1026 "installer/linux/debian/preinst",
595 "win/host_service.h", 1027 "installer/linux/debian/rules",
596 "win/omaha.cc", 1028 ]
597 "win/omaha.h", 1029 outputs = packaging_outputs
598 "win/rdp_desktop_session.cc", 1030 sources = [
599 "win/rdp_desktop_session.h", 1031 "installer/linux/build-deb.sh",
600 "win/unprivileged_process_delegate.cc", 1032 ]
601 "win/unprivileged_process_delegate.h", 1033 args = [
602 "win/wts_session_process_delegate.cc", 1034 "-s",
603 "win/wts_session_process_delegate.h", 1035 rebase_path("//"),
604 "worker_process_ipc_delegate.h", 1036 "-o",
605 ] 1037 rebase_path("$root_build_dir"),
606 1038 ]
607 ldflags = [ 1039
608 "/EXPORT:DllGetClassObject=PsDllGetClassObject,PRIVATE", 1040 deps = [
609 "/EXPORT:DllCanUnloadNow=PsDllCanUnloadNow,PRIVATE", 1041 ":native_messaging_host",
610 "/EXPORT:DllRegisterServer=PsDllRegisterServer,PRIVATE", 1042 ":remoting_me2me_host",
611 "/EXPORT:DllUnregisterServer=PsDllUnregisterServer,PRIVATE", 1043 ":remoting_native_messaging_manifests",
612 ] 1044 ":remoting_start_host",
613 1045 "//remoting/host/it2me:remote_assistance_host",
614 libs = [ 1046 "//remoting/resources",
615 "comctl32.lib", 1047 "//third_party/icu:icudata",
616 "rpcns4.lib", 1048 ]
617 "rpcrt4.lib", 1049 }
618 "sas.lib", 1050 } else if (is_win) {
619 "uuid.lib", 1051 # GYP version: //remoting/remoting_host_win.gypi:remoting_me2me_host_archive
620 "wtsapi32.lib", 1052 action("remoting_me2me_host_archive") {
621 ] 1053 script = "//remoting/host/installer/build-installer-archive.py"
622 1054
623 if (is_clang) { 1055 deps = [
624 cflags = [ "-Wno-header-hygiene" ] 1056 ":credits",
1057 ":remote_security_key",
1058 ":remoting_core",
1059 ":remoting_desktop",
1060 ":remoting_me2me_host",
1061 ":remoting_native_messaging_host",
1062 ":remoting_native_messaging_manifests",
1063 ":remoting_start_host",
1064 "it2me:remote_assistance_host",
1065 "//third_party/icu:icudata",
1066 ]
1067
1068 _output = "$root_out_dir/remoting-me2me-host-$target_os.zip"
1069
1070 outputs = [
1071 _output,
1072 ]
1073 if (is_chrome_branded) {
1074 _branding = "Chrome"
1075 } else {
1076 _branding = "Chromium"
625 } 1077 }
626 } 1078
627 1079 if (is_official_build) {
628 # GYP version: //remoting/remoting_host_win.gypi:remoting_desktop 1080 _official_build = "1"
629 executable("remoting_desktop") { 1081 } else {
630 configs += [ 1082 _official_build = "0"
631 "//build/config/compiler:wexit_time_destructors", 1083 }
632 "//build/config/win:windowed", 1084
633 ] 1085 _generated_files = rebase_path(
634 1086 [
635 defines = host_predefines + [ "BINARY=BINARY_DESKTOP" ] 1087 "$root_out_dir/remote_assistance_host.exe",
636 1088 "$root_out_dir/remote_security_key.exe",
1089 "$root_out_dir/remoting_core.dll",
1090 "$root_out_dir/remoting_desktop.exe",
1091 "$root_out_dir/remoting_host.exe",
1092 "$root_out_dir/remoting_native_messaging_host.exe",
1093 "$root_out_dir/remoting_start_host.exe",
1094 "$root_gen_dir/remoting/CREDITS.txt",
1095 "$root_out_dir/remoting/com.google.chrome.remote_assistance.json ",
1096 "$root_out_dir/remoting/com.google.chrome.remote_desktop.json",
1097 "$root_out_dir/icudtl.dat",
1098 ],
1099 root_build_dir)
1100 _extra_files = []
1101
1102 args = [
1103 rebase_path("$root_gen_dir/installation", root_build_dir),
1104 rebase_path(_output, root_build_dir),
1105 "--source-file-roots",
1106 rebase_path("//remoting/host/installer/win"),
1107 "--source-files",
1108 rebase_path("//remoting/host/installer/win/chromoting.wxs"),
1109 rebase_path("//remoting/host/installer/win/parameters.json"),
1110
1111 # Input files
1112 "--generated-files",
1113 ] + _generated_files +
1114 [
1115 rebase_path("//remoting/resources/chromoting.ico"),
1116
1117 # Position of files in zip file
1118 "--generated-files-dst",
1119 "files/remote_assistance_host.exe",
1120 "files/remote_security_key.exe",
1121 "files/remoting_core.dll",
1122 "files/remoting_desktop.exe",
1123 "files/remoting_host.exe",
1124 "files/remoting_native_messaging_host.exe",
1125 "files/remoting_start_host.exe",
1126 "files/CREDITS.txt",
1127 "files/com.google.chrome.remote_assistance.json",
1128 "files/com.google.chrome.remote_desktop.json",
1129 "files/chromoting.ico",
1130 "files/icudtl.dat",
1131 ] + _extra_files + # Defs
1132 [
1133 "--defs",
1134 "BRANDING=$_branding",
1135 "DAEMON_CONTROLLER_CLSID={$daemon_controller_clsid}",
1136 "RDP_DESKTOP_SESSION_CLSID={$rdp_desktop_session_clsid}",
1137 "VERSION=$chrome_version_full",
1138 "OFFICIAL_BUILD=$_official_build",
1139 ]
1140 }
1141 } else {
1142 group("remoting_me2me_host_archive") {
1143 }
1144 }
1145
1146 if (is_win && is_chrome_branded) {
1147 if (target_cpu == "x86") {
1148 # The script uses "ia32" instead of "x86".
1149 msi_script_arch = "ia32"
1150 } else {
1151 msi_script_arch = target_cpu
1152 }
1153
1154 # GYP version: remoting/remoting_host_win.gyp:remoting_host_installation
1155 action("remoting_host_installation") {
637 deps = [ 1156 deps = [
638 ":remoting_core", 1157 "//remoting/host:remoting_me2me_host_archive",
639 ":remoting_windows_resources", 1158 ]
640 ] 1159 script = "../tools/zip2msi.py"
641
642 if (is_official_build) {
643 deps += [ ":dpi_aware_elevated_exe_manifest" ]
644 } else {
645 deps += [ ":dpi_aware_exe_manifest" ]
646 }
647
648 sources = [
649 "$root_gen_dir/remoting/version.rc",
650 "win/entry_point.cc",
651 ]
652
653 ldflags = [
654 "/ENTRY:HostEntryPoint",
655 # "/NODEFAULTLIB",
656 ]
657 }
658
659 # GYP version: //remoting/remoting_host_win.gypi:remote_security_key
660 executable("remote_security_key") {
661 configs += [ "//build/config/compiler:wexit_time_destructors" ]
662
663 defines = host_predefines + [ "BINARY=BINARY_REMOTE_SECURITY_KEY" ]
664
665 deps = [
666 ":remoting_core",
667 ":remoting_windows_resources",
668 "//build/win:default_exe_manifest",
669 ]
670
671 sources = [
672 "$root_gen_dir/remoting/version.rc",
673 "security_key/remote_security_key_entry_point.cc",
674 ]
675 }
676
677 # GYP version:
678 # //remoting/remoting_host_win.gypi:remoting_me2me_native_messaging_host
679 executable("remoting_native_messaging_host") {
680 configs += [ "//build/config/compiler:wexit_time_destructors" ]
681
682 defines = host_predefines + [ "BINARY=BINARY_NATIVE_MESSAGING_HOST" ]
683
684 deps = [
685 ":remoting_core",
686 ":remoting_windows_resources",
687 "//build/win:default_exe_manifest",
688 ]
689
690 sources = [
691 "$root_gen_dir/remoting/version.rc",
692 "setup/me2me_native_messaging_host_entry_point.cc",
693 ]
694 }
695
696 # GYP version: //remoting/remoting_host_win.gypi:remoting_windows_resources
697 remoting_localize("remoting_windows_resources") {
698 deps = [
699 "//remoting/resources",
700 ]
701
702 sources = [
703 "win/core.rc.jinja2",
704 "win/version.rc.jinja2",
705 ]
706
707 # TODO(zijiehe): Export lastchange_path from
708 # //chrome/version.gni:process_version
709 variables = [
710 rebase_path(chrome_version_file),
711 rebase_path(remoting_version_file),
712 rebase_path("//build/util/LASTCHANGE"),
713 ]
714
715 output = "$root_gen_dir/remoting/{{source_name_part}}"
716
717 locale_dir = webapp_locale_dir
718
719 encoding = "utf-16"
720
721 locales = remoting_locales
722 }
723
724 # TODO(GYP) More Windows remoting targets from remoting_host_win.gypi
725 }
726
727 if (enable_remoting_host && !is_android) {
728 executable("remoting_start_host") {
729 sources = [
730 "setup/start_host_entry_point.cc",
731 ]
732
733 deps = [
734 "//build/config/sanitizers:deps",
735 ]
736
737 configs += [ "//build/config/compiler:wexit_time_destructors" ]
738
739 if (is_win) {
740 defines = host_predefines + [ "BINARY=BINARY_REMOTING_START_HOST" ]
741
742 deps += [
743 ":remoting_core",
744 ":remoting_windows_resources",
745 "//build/win:default_exe_manifest",
746 ]
747 } else {
748 sources += [
749 "setup/host_starter.cc",
750 "setup/host_starter.h",
751 "setup/start_host_main.cc",
752 "setup/start_host_main.h",
753 ]
754
755 deps += [ "//remoting/host/setup" ]
756 }
757
758 if (enable_webrtc) {
759 deps += [ "//third_party/libjingle:libjingle_webrtc" ]
760 }
761 }
762
763 action_foreach("remoting_native_messaging_manifests") {
764 if (is_mac) {
765 assert(false, "not implemented on mac yet")
766 } else if (is_win) {
767 me2me_host_path = "remoting_native_messaging_host.exe"
768 it2me_host_path = "remote_assistance_host.exe"
769 } else {
770 me2me_host_path =
771 "/opt/google/chrome-remote-desktop/native-messaging-host"
772 it2me_host_path =
773 "/opt/google/chrome-remote-desktop/remote-assistance-host"
774 }
775
776 script = "../tools/build/remoting_localize.py"
777
778 sources = [
779 "it2me/com.google.chrome.remote_assistance.json.jinja2",
780 "setup/com.google.chrome.remote_desktop.json.jinja2",
781 ]
782
783 inputs = [
784 branding_path,
785 ]
786
787 outputs = [ 1160 outputs = [
788 "$root_build_dir/remoting/{{source_name_part}}", 1161 "$root_out_dir/chromoting.msi",
789 ] 1162 ]
790
791 args = [ 1163 args = [
792 "--define", 1164 "--wix_path",
793 "ME2ME_HOST_PATH=$me2me_host_path", 1165 rebase_path("//third_party/wix"),
794 "--define", 1166 "--intermediate_dir",
795 "IT2ME_HOST_PATH=$it2me_host_path", 1167 rebase_path("$root_gen_dir/installation", root_build_dir),
796 "--variables", 1168 "--target_arch",
797 rebase_path(branding_path), 1169 msi_script_arch,
798 "--template", 1170 rebase_path("$root_out_dir/remoting-me2me-host-$current_os.zip",
799 "{{source}}", 1171 root_build_dir),
800 "--locale_output", 1172 rebase_path(outputs[0], root_build_dir),
801 "remoting/{{source_name_part}}", 1173 ]
802 "en",
803 ]
804 }
805
806 # TODO(crbug.com/512899) This still needs to be ported to GN.
807 group("remoting_infoplist_strings") {
808 }
809 }
810
811 if (enable_me2me_host) {
812 source_set("remoting_me2me_host_static") {
813 sources = [
814 "pam_authorization_factory_posix.cc",
815 "pam_authorization_factory_posix.h",
816 "remoting_me2me_host.cc",
817 ]
818 defines = []
819
820 configs += [ "//remoting:version" ]
821
822 deps = [
823 "//base",
824 "//base:i18n",
825 "//components/policy:policy_component_common",
826 "//net",
827 "//remoting/base",
828 "//remoting/host",
829 "//remoting/proto",
830 "//third_party/webrtc/modules/desktop_capture",
831 ]
832
833 if (enable_configuration_policy) {
834 deps += [ "//components/policy" ]
835 }
836
837 if (enable_webrtc) {
838 deps += [ "//third_party/libjingle:libjingle_webrtc" ]
839 }
840
841 if (is_desktop_linux) {
842 deps += [ "//build/config/linux/gtk2" ]
843 }
844 if ((is_linux && !is_chromeos) || is_mac) {
845 libs = [ "pam" ]
846 }
847
848 if (is_mac && is_official_build) {
849 sources += [ "internal/internal_mac-inl.h" ]
850 defines += [ "USE_REMOTING_MACOSX_INTERNAL" ]
851 }
852
853 if (is_win && remoting_multi_process != 0 && remoting_rdp_session != 0) {
854 defines += [ "REMOTING_RDP_SESSION" ]
855 }
856
857 if (remoting_multi_process != 0) {
858 defines += [ "REMOTING_MULTI_PROCESS" ]
859 }
860 }
861
862 if (is_win) {
863 # GYP version: //remoting/remoting_host_win.gypi:remoting_me2me_host
864 executable("remoting_me2me_host") {
865 configs += [
866 "//build/config/compiler:wexit_time_destructors",
867 "//build/config/win:windowed",
868 ]
869
870 defines = host_predefines + [ "BINARY=BINARY_HOST_ME2ME" ]
871
872 deps = [
873 ":dpi_aware_exe_manifest",
874 ":remoting_core",
875 ":remoting_windows_resources",
876 ]
877
878 sources = [
879 "$root_gen_dir/remoting/version.rc",
880 "win/entry_point.cc",
881 ]
882
883 output_name = "remoting_host"
884
885 ldflags = [
886 "/ENTRY:HostEntryPoint",
887 # "/NODEFAULTLIB",
888 ]
889 }
890 } else {
891 executable("remoting_me2me_host") {
892 configs += [ "//remoting:version" ]
893
894 sources = [
895 "host_main.cc",
896 "host_main.h",
897 ]
898
899 if (is_mac && is_chrome_branded && is_official_build) {
900 defines = [ "REMOTING_ENABLE_BREAKPAD" ]
901 }
902
903 deps = [
904 ":credits",
905 ":remoting_me2me_host_static",
906 "//build/config/sanitizers:deps",
907 ]
908 }
909
910 if (is_linux) {
911 copy("remoting_me2me_host_copy_script") {
912 sources = [
913 "linux/linux_me2me_host.py",
914 ]
915 outputs = [
916 "$root_build_dir/remoting/chrome-remote-desktop",
917 ]
918 }
919 copy("remoting_me2me_host_copy_host") {
920 sources = [
921 "linux/remoting_me2me_host_wrapper.sh",
922 ]
923 outputs = [
924 "$root_build_dir/remoting/chrome-remote-desktop-host",
925 ]
926 deps = [
927 ":remoting_me2me_host",
928 ]
929 }
930 group("remoting_dev_me2me_host") {
931 deps = [
932 ":remoting_me2me_host",
933 ":remoting_me2me_host_copy_host",
934 ":remoting_me2me_host_copy_script",
935 ]
936 }
937 }
938
939 executable("native_messaging_host") {
940 sources = [
941 "setup/me2me_native_messaging_host_entry_point.cc",
942 "setup/me2me_native_messaging_host_main.cc",
943 "setup/me2me_native_messaging_host_main.h",
944 ]
945
946 deps = [
947 ":remoting_infoplist_strings",
948 "//base",
949 "//remoting/base:breakpad",
950 "//remoting/host",
951 "//remoting/host/native_messaging",
952 "//remoting/host/setup",
953 ]
954
955 configs += [ "//build/config/compiler:wexit_time_destructors" ]
956
957 # The |major|, |build| and |patch| versions are inherited from Chrome.
958 # Since Chrome's |minor| version is always '0', we replace it with a
959 # Chromoting-specific patch version.
960 defines = [ "VERSION=" + "$chrome_version_major" + "." +
961 "$remoting_version_patch" + "." + "$chrome_version_build" +
962 "." + "$chrome_version_patch" ]
963
964 if (is_mac) {
965 assert(false, "not implemented on mac yet")
966 }
967 }
968 }
969
970 if (is_chrome_branded && enable_me2me_host && is_linux && !is_chromeos) {
971 # TODO(GYP): add support for archive_chromoting_tests variable?
972
973 import("//build/config/zip.gni")
974
975 build_deb_script = "installer/linux/build_deb.py"
976 deb_filename =
977 "$root_build_dir/" + exec_script(build_deb_script,
978 [
979 "-p",
980 "-s",
981 rebase_path("//"),
982 ],
983 "string",
984 [ "installer/linux/build-deb.sh" ])
985 changes_filename =
986 "$root_build_dir/" + get_path_info(deb_filename, "name") + ".changes"
987
988 packaging_outputs = [
989 deb_filename,
990 changes_filename,
991
992 # TODO(GYP): Check that these are generated by build_deb.py.
993 #"$root_build_dir/remoting_me2me_host.debug",
994 #"$root_build_dir/remoting_start_host.debug",
995 #"$root_build_dir/native_messaging_host.debug",
996 #"$root_build_dir/remote_assistance_host.debug",
997 ]
998
999 zip("remoting_me2me_host_archive") {
1000 # Store the installer package(s) into a zip file so there is a
1001 # consistent filename to reference for build archiving (i.e. in
1002 # FILES.cfg). This also avoids possible conflicts with "wildcard"
1003 # package handling in other build/signing scripts.
1004 inputs = packaging_outputs
1005 output = "$root_build_dir/remoting-me2me-host-linux.zip"
1006 deps = [
1007 ":remoting_me2me_host_copy",
1008 ]
1009 }
1010
1011 copy("remoting_me2me_host_copy") {
1012 # Copy the debian package file, which has version info in it,
1013 # to a consistewnt filename for use on Chromoting swarming bots.
1014 sources = [
1015 deb_filename,
1016 ]
1017 outputs = [
1018 "$root_build_dir/remoting-me2me-host.deb",
1019 ]
1020 public_deps = [
1021 ":remoting_me2me_host_deb_installer",
1022 ]
1023 }
1024
1025 action("remoting_me2me_host_deb_installer") {
1026 script = build_deb_script
1027 inputs = [
1028 build_deb_script,
1029 "installer/linux/Makefile",
1030 "installer/linux/debian/chrome-remote-desktop.init",
1031 "installer/linux/debian/chrome-remote-desktop.pam",
1032 "installer/linux/debian/compat",
1033 "installer/linux/debian/control",
1034 "installer/linux/debian/copyright",
1035 "installer/linux/debian/postinst",
1036 "installer/linux/debian/preinst",
1037 "installer/linux/debian/rules",
1038 ]
1039 outputs = packaging_outputs
1040 sources = [
1041 "installer/linux/build-deb.sh",
1042 ]
1043 args = [
1044 "-s",
1045 rebase_path("//"),
1046 "-o",
1047 rebase_path("$root_build_dir"),
1048 ]
1049
1050 deps = [
1051 ":native_messaging_host",
1052 ":remoting_me2me_host",
1053 ":remoting_native_messaging_manifests",
1054 ":remoting_start_host",
1055 "//remoting/host/it2me:remote_assistance_host",
1056 "//remoting/resources",
1057 "//third_party/icu:icudata",
1058 ]
1059 }
1060 } else if (is_win) {
1061 # GYP version: //remoting/remoting_host_win.gypi:remoting_me2me_host_archi ve
1062 action("remoting_me2me_host_archive") {
1063 script = "//remoting/host/installer/build-installer-archive.py"
1064
1065 deps = [
1066 ":credits",
1067 ":remote_security_key",
1068 ":remoting_core",
1069 ":remoting_desktop",
1070 ":remoting_me2me_host",
1071 ":remoting_native_messaging_host",
1072 ":remoting_native_messaging_manifests",
1073 ":remoting_start_host",
1074 "it2me:remote_assistance_host",
1075 "//third_party/icu:icudata",
1076 ]
1077
1078 _output = "$root_out_dir/remoting-me2me-host-$target_os.zip"
1079
1080 outputs = [
1081 _output,
1082 ]
1083 if (is_chrome_branded) {
1084 _branding = "Chrome"
1085 } else {
1086 _branding = "Chromium"
1087 }
1088
1089 if (is_official_build) {
1090 _official_build = "1"
1091 } else {
1092 _official_build = "0"
1093 }
1094
1095 _generated_files = rebase_path(
1096 [
1097 "$root_out_dir/remote_assistance_host.exe",
1098 "$root_out_dir/remote_security_key.exe",
1099 "$root_out_dir/remoting_core.dll",
1100 "$root_out_dir/remoting_desktop.exe",
1101 "$root_out_dir/remoting_host.exe",
1102 "$root_out_dir/remoting_native_messaging_host.exe",
1103 "$root_out_dir/remoting_start_host.exe",
1104 "$root_gen_dir/remoting/CREDITS.txt",
1105 "$root_out_dir/remoting/com.google.chrome.remote_assistance.js on",
1106 "$root_out_dir/remoting/com.google.chrome.remote_desktop.json" ,
1107 "$root_out_dir/icudtl.dat",
1108 ],
1109 root_build_dir)
1110 _extra_files = []
1111
1112 args = [
1113 rebase_path("$root_gen_dir/installation", root_build_dir),
1114 rebase_path(_output, root_build_dir),
1115 "--source-file-roots",
1116 rebase_path("//remoting/host/installer/win"),
1117 "--source-files",
1118 rebase_path("//remoting/host/installer/win/chromoting.wxs"),
1119 rebase_path("//remoting/host/installer/win/parameters.json"),
1120
1121 # Input files
1122 "--generated-files",
1123 ] + _generated_files +
1124 [
1125 rebase_path("//remoting/resources/chromoting.ico"),
1126
1127 # Position of files in zip file
1128 "--generated-files-dst",
1129 "files/remote_assistance_host.exe",
1130 "files/remote_security_key.exe",
1131 "files/remoting_core.dll",
1132 "files/remoting_desktop.exe",
1133 "files/remoting_host.exe",
1134 "files/remoting_native_messaging_host.exe",
1135 "files/remoting_start_host.exe",
1136 "files/CREDITS.txt",
1137 "files/com.google.chrome.remote_assistance.json",
1138 "files/com.google.chrome.remote_desktop.json",
1139 "files/chromoting.ico",
1140 "files/icudtl.dat",
1141 ] + _extra_files + # Defs
1142 [
1143 "--defs",
1144 "BRANDING=$_branding",
1145 "DAEMON_CONTROLLER_CLSID={$daemon_controller_clsid}",
1146 "RDP_DESKTOP_SESSION_CLSID={$rdp_desktop_session_clsid}",
1147 "VERSION=$chrome_version_full",
1148 "OFFICIAL_BUILD=$_official_build",
1149 ]
1150 }
1151 } else {
1152 group("remoting_me2me_host_archive") {
1153 }
1154 }
1155
1156 if (is_win && is_chrome_branded) {
1157 if (target_cpu == "x86") {
1158 # The script uses "ia32" instead of "x86".
1159 msi_script_arch = "ia32"
1160 } else {
1161 msi_script_arch = target_cpu
1162 }
1163
1164 # GYP version: remoting/remoting_host_win.gyp:remoting_host_installation
1165 action("remoting_host_installation") {
1166 deps = [
1167 "//remoting/host:remoting_me2me_host_archive",
1168 ]
1169 script = "../tools/zip2msi.py"
1170 outputs = [
1171 "$root_out_dir/chromoting.msi",
1172 ]
1173 args = [
1174 "--wix_path",
1175 rebase_path("//third_party/wix"),
1176 "--intermediate_dir",
1177 rebase_path("$root_gen_dir/installation", root_build_dir),
1178 "--target_arch",
1179 msi_script_arch,
1180 rebase_path("$root_out_dir/remoting-me2me-host-$current_os.zip",
1181 root_build_dir),
1182 rebase_path(outputs[0], root_build_dir),
1183 ]
1184 }
1185 } 1174 }
1186 } 1175 }
1187 } 1176 }
OLDNEW
« no previous file with comments | « remoting/BUILD.gn ('k') | remoting/host/constants_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698