Implement GetNetworkList based on AddressTrackerLinux for ChromeOS/Linux/Android
[chromium-blink-merge.git] / remoting / remoting_host.gypi
blob55387003fd8cc528aa695ccb97aaa80c1098b7c0
1 # Copyright (c) 2012 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.
6   'includes': [
7     'remoting_host_linux.gypi',
8     'remoting_host_mac.gypi',
9     'remoting_host_win.gypi',
10   ],
12   'variables': {
13     'conditions': [
14       # Remoting host is supported only on Windows, OSX and Linux (with X11).
15       ['OS=="win" or OS=="mac" or (OS=="linux" and use_x11==1)', {
16         'enable_me2me_host': 1,
17         'enable_it2me_host': 1,
18         'enable_remoting_host': 1,
19       }, {
20         'enable_me2me_host': 0,
21         'enable_it2me_host': 0,
22         'enable_remoting_host': 0,
23       }],
24       ['chromeos==1', {
25         'enable_me2me_host': 0,
26         'enable_it2me_host': 0,
27       }],
28     ],
29   },
31   'conditions': [
32     ['enable_remoting_host==1', {
33       'targets': [
34         {
35           'target_name': 'remoting_host',
36           'type': 'static_library',
37           'variables': {
38             'enable_wexit_time_destructors': 1,
39             'host_bundle_name': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_HOST_BUNDLE_NAME@")',
40             'prefpane_bundle_name': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_PREFPANE_BUNDLE_NAME@")',
41           },
42           'dependencies': [
43             'remoting_base',
44             'remoting_protocol',
45             'remoting_resources',
46             '../base/base.gyp:base_i18n',
47             '../crypto/crypto.gyp:crypto',
48             '../google_apis/google_apis.gyp:google_apis',
49             '../ipc/ipc.gyp:ipc',
50             '../ui/events/events.gyp:dom4_keycode_converter',
51           ],
52           'defines': [
53             'HOST_BUNDLE_NAME="<(host_bundle_name)"',
54             'PREFPANE_BUNDLE_NAME="<(prefpane_bundle_name)"',
55             'VERSION=<(version_full)',
56           ],
57           'sources': [
58             'host/audio_capturer.cc',
59             'host/audio_capturer.h',
60             'host/audio_capturer_linux.cc',
61             'host/audio_capturer_linux.h',
62             'host/audio_capturer_mac.cc',
63             'host/audio_capturer_win.cc',
64             'host/audio_capturer_win.h',
65             'host/audio_scheduler.cc',
66             'host/audio_scheduler.h',
67             'host/audio_silence_detector.cc',
68             'host/audio_silence_detector.h',
69             'host/basic_desktop_environment.cc',
70             'host/basic_desktop_environment.h',
71             'host/branding.cc',
72             'host/branding.h',
73             'host/capture_scheduler.cc',
74             'host/capture_scheduler.h',
75             'host/chromeos/aura_desktop_capturer.cc',
76             'host/chromeos/aura_desktop_capturer.h',
77             'host/chromium_port_allocator_factory.cc',
78             'host/chromium_port_allocator_factory.h',
79             'host/chromoting_host.cc',
80             'host/chromoting_host.h',
81             'host/chromoting_host_context.cc',
82             'host/chromoting_host_context.h',
83             'host/chromoting_messages.cc',
84             'host/chromoting_messages.h',
85             'host/chromoting_param_traits.cc',
86             'host/chromoting_param_traits.h',
87             'host/client_session.cc',
88             'host/client_session.h',
89             'host/client_session_control.h',
90             'host/clipboard.h',
91             'host/clipboard_mac.mm',
92             'host/clipboard_win.cc',
93             'host/clipboard_x11.cc',
94             'host/config_file_watcher.cc',
95             'host/config_file_watcher.h',
96             'host/config_watcher.h',
97             'host/constants_mac.cc',
98             'host/constants_mac.h',
99             'host/continue_window.cc',
100             'host/continue_window.h',
101             'host/continue_window_linux.cc',
102             'host/continue_window_mac.mm',
103             'host/continue_window_win.cc',
104             'host/daemon_process.cc',
105             'host/daemon_process.h',
106             'host/daemon_process_win.cc',
107             'host/desktop_environment.h',
108             'host/desktop_process.cc',
109             'host/desktop_process.h',
110             'host/desktop_resizer.h',
111             'host/desktop_resizer_linux.cc',
112             'host/desktop_session.cc',
113             'host/desktop_session.h',
114             'host/desktop_session_agent.cc',
115             'host/desktop_session_agent.h',
116             'host/desktop_session_win.cc',
117             'host/desktop_session_win.h',
118             'host/desktop_resizer_mac.cc',
119             'host/desktop_resizer_win.cc',
120             'host/desktop_session_connector.h',
121             'host/desktop_session_proxy.cc',
122             'host/desktop_session_proxy.h',
123             'host/desktop_shape_tracker.h',
124             'host/desktop_shape_tracker_mac.cc',
125             'host/desktop_shape_tracker_win.cc',
126             'host/desktop_shape_tracker_x11.cc',
127             'host/disconnect_window_linux.cc',
128             'host/disconnect_window_mac.h',
129             'host/disconnect_window_mac.mm',
130             'host/disconnect_window_win.cc',
131             'host/dns_blackhole_checker.cc',
132             'host/dns_blackhole_checker.h',
133             'host/gnubby_auth_handler.h',
134             'host/gnubby_auth_handler_posix.cc',
135             'host/gnubby_auth_handler_posix.h',
136             'host/gnubby_auth_handler_win.cc',
137             'host/gnubby_socket.cc',
138             'host/gnubby_socket.h',
139             'host/heartbeat_sender.cc',
140             'host/heartbeat_sender.h',
141             'host/host_change_notification_listener.cc',
142             'host/host_change_notification_listener.h',
143             'host/host_config.cc',
144             'host/host_config.h',
145             'host/host_event_logger.h',
146             'host/host_event_logger_posix.cc',
147             'host/host_event_logger_win.cc',
148             'host/host_exit_codes.cc',
149             'host/host_exit_codes.h',
150             'host/host_export.h',
151             'host/host_extension.h',
152             'host/host_extension_session.cc',
153             'host/host_extension_session.h',
154             'host/host_extension_session_manager.cc',
155             'host/host_extension_session_manager.h',
156             'host/host_secret.cc',
157             'host/host_secret.h',
158             'host/host_status_logger.cc',
159             'host/host_status_logger.h',
160             'host/host_status_monitor.h',
161             'host/host_status_observer.h',
162             'host/host_status_sender.cc',
163             'host/host_status_sender.h',
164             'host/host_window.h',
165             'host/host_window_proxy.cc',
166             'host/host_window_proxy.h',
167             'host/in_memory_host_config.cc',
168             'host/in_memory_host_config.h',
169             'host/input_injector.h',
170             'host/input_injector_linux.cc',
171             'host/input_injector_mac.cc',
172             'host/input_injector_win.cc',
173             'host/ipc_audio_capturer.cc',
174             'host/ipc_audio_capturer.h',
175             'host/ipc_constants.cc',
176             'host/ipc_constants.h',
177             'host/ipc_desktop_environment.cc',
178             'host/ipc_desktop_environment.h',
179             'host/ipc_host_event_logger.cc',
180             'host/ipc_host_event_logger.h',
181             'host/ipc_input_injector.cc',
182             'host/ipc_input_injector.h',
183             'host/ipc_mouse_cursor_monitor.cc',
184             'host/ipc_mouse_cursor_monitor.h',
185             'host/ipc_screen_controls.cc',
186             'host/ipc_screen_controls.h',
187             'host/ipc_util.h',
188             'host/ipc_util_posix.cc',
189             'host/ipc_util_win.cc',
190             'host/ipc_video_frame_capturer.cc',
191             'host/ipc_video_frame_capturer.h',
192             'host/it2me_desktop_environment.cc',
193             'host/it2me_desktop_environment.h',
194             'host/json_host_config.cc',
195             'host/json_host_config.h',
196             'host/linux/audio_pipe_reader.cc',
197             'host/linux/audio_pipe_reader.h',
198             'host/linux/unicode_to_keysym.cc',
199             'host/linux/unicode_to_keysym.h',
200             'host/linux/x11_util.cc',
201             'host/linux/x11_util.h',
202             'host/linux/x_server_clipboard.cc',
203             'host/linux/x_server_clipboard.h',
204             'host/local_input_monitor.h',
205             'host/local_input_monitor_linux.cc',
206             'host/local_input_monitor_mac.mm',
207             'host/local_input_monitor_win.cc',
208             'host/logging.h',
209             'host/logging_posix.cc',
210             'host/logging_win.cc',
211             'host/me2me_desktop_environment.cc',
212             'host/me2me_desktop_environment.h',
213             'host/mouse_clamping_filter.cc',
214             'host/mouse_clamping_filter.h',
215             'host/oauth_token_getter.cc',
216             'host/oauth_token_getter.h',
217             'host/pairing_registry_delegate.cc',
218             'host/pairing_registry_delegate.h',
219             'host/pairing_registry_delegate_linux.cc',
220             'host/pairing_registry_delegate_linux.h',
221             'host/pairing_registry_delegate_mac.cc',
222             'host/pairing_registry_delegate_win.cc',
223             'host/pairing_registry_delegate_win.h',
224             'host/pam_authorization_factory_posix.cc',
225             'host/pam_authorization_factory_posix.h',
226             'host/pin_hash.cc',
227             'host/pin_hash.h',
228             'host/policy_hack/policy_watcher.cc',
229             'host/policy_hack/policy_watcher.h',
230             'host/policy_hack/policy_watcher_linux.cc',
231             'host/policy_hack/policy_watcher_mac.mm',
232             'host/policy_hack/policy_watcher_win.cc',
233             'host/register_support_host_request.cc',
234             'host/register_support_host_request.h',
235             'host/remote_input_filter.cc',
236             'host/remote_input_filter.h',
237             'host/remoting_me2me_host.cc',
238             'host/resizing_host_observer.cc',
239             'host/resizing_host_observer.h',
240             'host/sas_injector.h',
241             'host/sas_injector_win.cc',
242             'host/screen_controls.h',
243             'host/screen_resolution.cc',
244             'host/screen_resolution.h',
245             'host/server_log_entry_host.cc',
246             'host/server_log_entry_host.h',
247             'host/session_manager_factory.cc',
248             'host/session_manager_factory.h',
249             'host/shaped_desktop_capturer.cc',
250             'host/shaped_desktop_capturer.h',
251             'host/signaling_connector.cc',
252             'host/signaling_connector.h',
253             'host/single_window_desktop_environment.cc',
254             'host/single_window_desktop_environment.h',
255             'host/single_window_input_injector.h',
256             'host/single_window_input_injector_linux.cc',
257             'host/single_window_input_injector_mac.cc',
258             'host/single_window_input_injector_win.cc',
259             'host/token_validator_base.cc',
260             'host/token_validator_base.h',
261             'host/token_validator_factory_impl.cc',
262             'host/token_validator_factory_impl.h',
263             'host/usage_stats_consent.h',
264             'host/usage_stats_consent_mac.cc',
265             'host/usage_stats_consent_win.cc',
266             'host/username.cc',
267             'host/username.h',
268             'host/video_frame_recorder.cc',
269             'host/video_frame_recorder.h',
270             'host/video_frame_recorder_host_extension.cc',
271             'host/video_frame_recorder_host_extension.h',
272             'host/video_scheduler.cc',
273             'host/video_scheduler.h',
274             'host/win/com_imported_mstscax.tlh',
275             'host/win/com_security.cc',
276             'host/win/com_security.h',
277             'host/win/launch_process_with_token.cc',
278             'host/win/launch_process_with_token.h',
279             'host/win/omaha.cc',
280             'host/win/omaha.h',
281             'host/win/rdp_client.cc',
282             'host/win/rdp_client.h',
283             'host/win/rdp_client_window.cc',
284             'host/win/rdp_client_window.h',
285             'host/win/security_descriptor.cc',
286             'host/win/security_descriptor.h',
287             'host/win/session_desktop_environment.cc',
288             'host/win/session_desktop_environment.h',
289             'host/win/session_input_injector.cc',
290             'host/win/session_input_injector.h',
291             'host/win/window_station_and_desktop.cc',
292             'host/win/window_station_and_desktop.h',
293             'host/win/wts_terminal_monitor.cc',
294             'host/win/wts_terminal_monitor.h',
295             'host/win/wts_terminal_observer.h',
296           ],
297           'conditions': [
298             ['OS=="linux"', {
299               'dependencies': [
300                 '../build/linux/system.gyp:x11',
301                 '../build/linux/system.gyp:xext',
302                 '../build/linux/system.gyp:xfixes',
303                 '../build/linux/system.gyp:xi',
304                 '../build/linux/system.gyp:xrandr',
305                 '../build/linux/system.gyp:xtst',
306               ],
307               'link_settings': {
308                 'libraries': [
309                   '-lpam',
310                 ],
311               },
312             }],
313             ['OS=="linux" and chromeos==0', {
314               'dependencies' : [
315                 # Always use GTK on Linux, even for Aura builds.
316                 '../build/linux/system.gyp:gtk',
317               ],
318             }],
319             ['chromeos==1', {
320               'dependencies' : [
321                 '../ash/ash.gyp:ash',
322                 '../cc/cc.gyp:cc',
323                 '../content/content.gyp:content',
324                 '../ppapi/ppapi_internal.gyp:ppapi_host',
325                 '../skia/skia.gyp:skia',
326                 '../ui/aura/aura.gyp:aura',
327                 '../ui/compositor/compositor.gyp:compositor',
328               ],
329               'include_dirs': [
330                 '../third_party/skia/include/utils',
331               ],
332               'sources!' : [
333                 'host/continue_window.cc',
334                 'host/continue_window.h',
335                 'host/continue_window_linux.cc',
336                 'host/disconnect_window.cc',
337                 'host/disconnect_window_linux.cc',
338                 'host/remoting_me2me_host.cc',
339               ]
340             }, {  # chromeos==0
341                'sources!' : [
342                  'host/chromeos/aura_desktop_capturer.cc',
343                  'host/chromeos/aura_desktop_capturer.h',
344                ],
345             }],
346             ['OS=="mac"', {
347               'dependencies': [
348                 '../third_party/google_toolbox_for_mac/google_toolbox_for_mac.gyp:google_toolbox_for_mac',
349               ],
350               'link_settings': {
351                 'libraries': [
352                   '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework',
353                   'libpam.a',
354                ],
355               },
356             }],
357             ['OS=="win"', {
358               'defines': [
359                 '_ATL_NO_EXCEPTIONS',
360                 'ISOLATION_AWARE_ENABLED=1',
361               ],
362               'dependencies': [
363                 '../sandbox/sandbox.gyp:sandbox',
364                 'remoting_host_messages',
365                 'remoting_lib_idl',
366               ],
367               'msvs_settings': {
368                 'VCCLCompilerTool': {
369                   # /MP conflicts with #import directive so we limit the number
370                   # of processes to spawn to 1.
371                   'AdditionalOptions': ['/MP1'],
372                 },
373               },
374               'variables': {
375                 'output_dir': '<(SHARED_INTERMEDIATE_DIR)/remoting/host',
376               },
377               'sources': [
378                 '<(output_dir)/remoting_host_messages.mc',
379               ],
380               'include_dirs': [
381                 '<(output_dir)',
382               ],
383               'direct_dependent_settings': {
384                 'include_dirs': [
385                   '<(output_dir)',
386                 ],
387               },
388               'rules': [{
389                 # Rule to run the message compiler.
390                 'rule_name': 'message_compiler',
391                 'extension': 'mc',
392                 'outputs': [
393                   '<(output_dir)/<(RULE_INPUT_ROOT).h',
394                   '<(output_dir)/<(RULE_INPUT_ROOT).rc',
395                 ],
396                 'action': [
397                   'mc.exe',
398                   '-h', '<(output_dir)',
399                   '-r', '<(output_dir)/.',
400                   '-u',
401                   '<(RULE_INPUT_PATH)',
402                 ],
403                 'process_outputs_as_sources': 1,
404                 'message': 'Running message compiler on <(RULE_INPUT_PATH)',
405               }],
406             }],
407             ['enable_webrtc==1', {
408               'dependencies': [
409                 '../third_party/webrtc/modules/modules.gyp:desktop_capture',
410                 '../third_party/libjingle/libjingle.gyp:libpeerconnection',
411               ],
412               'sources': [
413                 'host/cast_extension.cc',
414                 'host/cast_extension.h',
415                 'host/cast_extension_session.cc',
416                 'host/cast_extension_session.h',
417                 'host/cast_video_capturer_adapter.cc',
418                 'host/cast_video_capturer_adapter.h',
419               ],
420             }],
421           ],
422         },  # end of target 'remoting_host'
424         {
425           'target_name': 'remoting_native_messaging_base',
426           'type': 'static_library',
427           'variables': { 'enable_wexit_time_destructors': 1, },
428           'dependencies': [
429             '../base/base.gyp:base',
430           ],
431           'sources': [
432             'host/native_messaging/pipe_messaging_channel.cc',
433             'host/native_messaging/pipe_messaging_channel.h',
434             'host/native_messaging/native_messaging_pipe.cc',
435             'host/native_messaging/native_messaging_pipe.h',
436             'host/native_messaging/native_messaging_reader.cc',
437             'host/native_messaging/native_messaging_reader.h',
438             'host/native_messaging/native_messaging_writer.cc',
439             'host/native_messaging/native_messaging_writer.h',
440           ],
441         },  # end of target 'remoting_native_messaging_base'
443         {
444           'target_name': 'remoting_host_setup_base',
445           'type': 'static_library',
446           'variables': { 'enable_wexit_time_destructors': 1, },
447           'dependencies': [
448             '../base/base.gyp:base',
449             '../google_apis/google_apis.gyp:google_apis',
450             'remoting_host',
451           ],
452           'defines': [
453             'VERSION=<(version_full)',
454           ],
455           'sources': [
456             'host/setup/daemon_controller.cc',
457             'host/setup/daemon_controller.h',
458             'host/setup/daemon_controller_delegate_linux.cc',
459             'host/setup/daemon_controller_delegate_linux.h',
460             'host/setup/daemon_controller_delegate_mac.h',
461             'host/setup/daemon_controller_delegate_mac.mm',
462             'host/setup/daemon_controller_delegate_win.cc',
463             'host/setup/daemon_controller_delegate_win.h',
464             'host/setup/daemon_installer_win.cc',
465             'host/setup/daemon_installer_win.h',
466             'host/setup/me2me_native_messaging_host.cc',
467             'host/setup/me2me_native_messaging_host.h',
468             'host/setup/oauth_client.cc',
469             'host/setup/oauth_client.h',
470             'host/setup/oauth_helper.cc',
471             'host/setup/oauth_helper.h',
472             'host/setup/pin_validator.cc',
473             'host/setup/pin_validator.h',
474             'host/setup/service_client.cc',
475             'host/setup/service_client.h',
476             'host/setup/test_util.cc',
477             'host/setup/test_util.h',
478             'host/setup/win/auth_code_getter.cc',
479             'host/setup/win/auth_code_getter.h',
480           ],
481           'conditions': [
482             ['OS=="win"', {
483               'dependencies': [
484                 '../google_update/google_update.gyp:google_update',
485                 'remoting_lib_idl',
486               ],
487               # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
488               'msvs_disabled_warnings': [4267, ],
489             }],
490           ],
491         },  # end of target 'remoting_host_setup_base'
493         # Generates native messaging manifest files.
494         {
495           'target_name': 'remoting_native_messaging_manifests',
496           'type': 'none',
497           'conditions': [
498             [ 'OS == "win"', {
499               'variables': {
500                 'me2me_host_path': 'remoting_native_messaging_host.exe',
501                 'it2me_host_path': 'remote_assistance_host.exe',
502               },
503             }],
504             [ 'OS == "mac"', {
505               'variables': {
506                 'me2me_host_bundle_name': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_HOST_BUNDLE_NAME@")',
507                 'native_messaging_host_bundle_name': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_NATIVE_MESSAGING_HOST_BUNDLE_NAME@")',
508                 'remote_assistance_host_bundle_name': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_REMOTE_ASSISTANCE_HOST_BUNDLE_NAME@")',
509                 'me2me_host_path':
510                     '/Library/PrivilegedHelperTools/<(me2me_host_bundle_name)/Contents/MacOS/<(native_messaging_host_bundle_name)/Contents/MacOS/native_messaging_host',
511                 'it2me_host_path':
512                     '/Library/PrivilegedHelperTools/<(me2me_host_bundle_name)/Contents/MacOS/<(remote_assistance_host_bundle_name)/Contents/MacOS/remote_assistance_host',
513               },
514             }],
515             [ 'OS != "mac" and OS != "win"', {
516               'variables': {
517                 'me2me_host_path':
518                     '/opt/google/chrome-remote-desktop/native-messaging-host',
519                 'it2me_host_path':
520                     '/opt/google/chrome-remote-desktop/remote-assistance-host',
521               },
522             }],
523           ],  # conditions
524           'sources': [
525             'host/it2me/com.google.chrome.remote_assistance.json.jinja2',
526             'host/setup/com.google.chrome.remote_desktop.json.jinja2',
527           ],
528           'rules': [{
529             'rule_name': 'generate_manifest',
530             'extension': 'jinja2',
531             'inputs': [
532               '<(remoting_localize_path)',
533               '<(branding_path)',
534             ],
535             'outputs': [
536               '<(PRODUCT_DIR)/remoting/<(RULE_INPUT_ROOT)',
537             ],
538             'action': [
539               'python', '<(remoting_localize_path)',
540               '--define', 'ME2ME_HOST_PATH=<(me2me_host_path)',
541               '--define', 'IT2ME_HOST_PATH=<(it2me_host_path)',
542               '--variables', '<(branding_path)',
543               '--template', '<(RULE_INPUT_PATH)',
544               '--locale_output', '<@(_outputs)',
545               'en',
546             ],
547           }],
548         },  # end of target 'remoting_native_messaging_manifests'
549         {
550           'target_name': 'remoting_start_host',
551           'type': 'executable',
552           'dependencies': [
553             'remoting_host_setup_base',
554           ],
555           'sources': [
556             'host/setup/host_starter.cc',
557             'host/setup/host_starter.h',
558             'host/setup/start_host.cc',
559           ],
560           'conditions': [
561             ['OS=="linux" and use_allocator!="none"', {
562               'dependencies': [
563                 '../base/allocator/allocator.gyp:allocator',
564               ],
565             }],
566           ],
567         },  # end of target 'remoting_start_host'
568         {
569           'target_name': 'remoting_infoplist_strings',
570           'type': 'none',
571           'dependencies': [
572             'remoting_resources',
573           ],
574           'sources': [
575             'host/remoting_me2me_host-InfoPlist.strings.jinja2',
576             'host/mac/me2me_preference_pane-InfoPlist.strings.jinja2',
577             'host/installer/mac/uninstaller/remoting_uninstaller-InfoPlist.strings.jinja2',
578             'host/setup/native_messaging_host-InfoPlist.strings.jinja2',
579             'host/it2me/remote_assistance_host-InfoPlist.strings.jinja2',
580           ],
581           'rules': [{
582             'rule_name': 'generate_strings',
583             'extension': 'jinja2',
584             'inputs': [
585               '<(remoting_localize_path)',
586             ],
587             'outputs': [
588               '<!@pymod_do_main(remoting_localize --locale_output '
589                   '"<(SHARED_INTERMEDIATE_DIR)/remoting/<(RULE_INPUT_ROOT)/@{json_suffix}.lproj/InfoPlist.strings" '
590                   '--print_only <(remoting_locales))',
591             ],
592             'action': [
593               'python', '<(remoting_localize_path)',
594               '--locale_dir', '<(webapp_locale_dir)',
595               '--template', '<(RULE_INPUT_PATH)',
596               '--locale_output',
597               '<(SHARED_INTERMEDIATE_DIR)/remoting/<(RULE_INPUT_ROOT)/@{json_suffix}.lproj/InfoPlist.strings',
598               '<@(remoting_locales)',
599             ]},
600           ],
601         },  # end of target 'remoting_infoplist_strings'
602       ],  # end of 'targets'
603     }],  # 'enable_remoting_host==1'
605     ['enable_me2me_host==1', {
606       'targets': [
607         {
608           'target_name': 'remoting_me2me_host_static',
609           'type': 'static_library',
610           'variables': { 'enable_wexit_time_destructors': 1, },
611           'dependencies': [
612             '../base/base.gyp:base',
613             '../base/base.gyp:base_i18n',
614             '../net/net.gyp:net',
615             '../third_party/webrtc/modules/modules.gyp:desktop_capture',
616             'remoting_base',
617             'remoting_breakpad',
618             'remoting_host',
619             'remoting_protocol',
620           ],
621           'defines': [
622             'VERSION=<(version_full)',
623           ],
624           'sources': [
625             'host/curtain_mode.h',
626             'host/curtain_mode_linux.cc',
627             'host/curtain_mode_mac.cc',
628             'host/curtain_mode_win.cc',
629             'host/posix/signal_handler.cc',
630             'host/posix/signal_handler.h',
631           ],
632           'conditions': [
633             ['os_posix != 1', {
634               'sources/': [
635                 ['exclude', '^host/posix/'],
636               ],
637             }],
638           ],  # end of 'conditions'
639         },  # end of target 'remoting_me2me_host_static'
640       ] # end of targets
641     }], # end of enable_me2me_host==1
643     ['enable_it2me_host==1', {
644       'targets': [
645         {
646           'target_name': 'remoting_it2me_host_static',
647           'type': 'static_library',
648           'variables': { 'enable_wexit_time_destructors': 1, },
649           'dependencies': [
650             '../base/base.gyp:base_i18n',
651             '../net/net.gyp:net',
652             'remoting_base',
653             'remoting_host',
654             'remoting_infoplist_strings',
655             'remoting_protocol',
656             'remoting_resources',
657           ],
658           'defines': [
659             'VERSION=<(version_full)',
660           ],
661           'sources': [
662             'host/it2me/it2me_host.cc',
663             'host/it2me/it2me_host.h',
664             'host/it2me/it2me_native_messaging_host.cc',
665             'host/it2me/it2me_native_messaging_host.h',
666           ],
667         },  # end of target 'remoting_it2me_host_static'
668       ] # end of targets
669     }], # end of 'enable_it2me_host==1'
671     ['OS!="win" and enable_me2me_host==1', {
672       'targets': [
673         {
674           'target_name': 'remoting_me2me_host',
675           'type': 'executable',
676           'variables': { 'enable_wexit_time_destructors': 1, },
677           'dependencies': [
678             '../base/base.gyp:base',
679             '../base/base.gyp:base_i18n',
680             '<(icu_gyp_path):icudata',
681             '../net/net.gyp:net',
682             '../third_party/webrtc/modules/modules.gyp:desktop_capture',
683             'remoting_base',
684             'remoting_breakpad',
685             'remoting_host',
686             'remoting_infoplist_strings',
687             'remoting_me2me_host_static',
688             'remoting_protocol',
689           ],
690           'defines': [
691             'VERSION=<(version_full)',
692           ],
693           'sources': [
694             'host/host_main.cc',
695             'host/host_main.h',
696           ],
697           'conditions': [
698             ['OS=="mac"', {
699               'mac_bundle': 1,
700               'variables': {
701                  'host_bundle_id': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_HOST_BUNDLE_ID@")',
702               },
703               'xcode_settings': {
704                 'INFOPLIST_FILE': 'host/remoting_me2me_host-Info.plist',
705                 'INFOPLIST_PREPROCESS': 'YES',
706                 'INFOPLIST_PREPROCESSOR_DEFINITIONS': 'VERSION_FULL="<(version_full)" VERSION_SHORT="<(version_short)" BUNDLE_ID="<(host_bundle_id)"',
707               },
708               'mac_bundle_resources': [
709                 '<(PRODUCT_DIR)/icudtl.dat',
710                 'host/disconnect_window.xib',
711                 'host/remoting_me2me_host.icns',
712                 'host/remoting_me2me_host-Info.plist',
713                 '<!@pymod_do_main(remoting_copy_locales -o -p <(OS) -x <(PRODUCT_DIR) <(remoting_locales))',
715                 # Localized strings for 'Info.plist'
716                 '<!@pymod_do_main(remoting_localize --locale_output '
717                     '"<(SHARED_INTERMEDIATE_DIR)/remoting/remoting_me2me_host-InfoPlist.strings/@{json_suffix}.lproj/InfoPlist.strings" '
718                     '--print_only <(remoting_locales))',
719               ],
720               'mac_bundle_resources!': [
721                 'host/remoting_me2me_host-Info.plist',
722               ],
723               'conditions': [
724                 ['mac_breakpad==1', {
725                   'variables': {
726                     # A real .dSYM is needed for dump_syms to operate on.
727                     'mac_real_dsym': 1,
728                   },
729                   'copies': [
730                     {
731                       'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Resources',
732                       'files': [
733                         '<(PRODUCT_DIR)/crash_inspector',
734                         '<(PRODUCT_DIR)/crash_report_sender.app'
735                       ],
736                     },
737                   ],
738                   'dependencies': [
739                     '../breakpad/breakpad.gyp:dump_syms',
740                   ],
741                   'postbuilds': [
742                     {
743                       'postbuild_name': 'Dump Symbols',
744                       'variables': {
745                         'dump_product_syms_path':
746                             'scripts/mac/dump_product_syms',
747                       },
748                       'action': [
749                         '<(dump_product_syms_path)',
750                         '<(version_full)',
751                       ],
752                     },  # end of postbuild 'dump_symbols'
753                   ],  # end of 'postbuilds'
754                 }],  # mac_breakpad==1
755               ],  # conditions
756             }],  # OS=mac
757             ['OS=="linux" and use_allocator!="none"', {
758               'dependencies': [
759                 '../base/allocator/allocator.gyp:allocator',
760               ],
761             }],  # OS=linux
762           ],  # end of 'conditions'
763         },  # end of target 'remoting_me2me_host'
764         {
765           'target_name': 'remoting_me2me_native_messaging_host',
766           'type': 'executable',
767           'product_name': 'native_messaging_host',
768           'variables': { 'enable_wexit_time_destructors': 1, },
769           'dependencies': [
770             '../base/base.gyp:base',
771             'remoting_breakpad',
772             'remoting_host',
773             'remoting_host_setup_base',
774             'remoting_infoplist_strings',
775             'remoting_native_messaging_base',
776           ],
777           'defines': [
778             'VERSION=<(version_full)',
779           ],
780           'sources': [
781             'host/setup/me2me_native_messaging_host_entry_point.cc',
782             'host/setup/me2me_native_messaging_host_main.cc',
783             'host/setup/me2me_native_messaging_host_main.h',
784           ],
785           'conditions': [
786             ['OS=="linux" and use_allocator!="none"', {
787               'dependencies': [
788                 '../base/allocator/allocator.gyp:allocator',
789               ],
790             }],
791             ['OS=="mac"', {
792               'mac_bundle': 1,
793               'variables': {
794                  'host_bundle_id': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_NATIVE_MESSAGING_HOST_BUNDLE_ID@")',
795               },
796               'xcode_settings': {
797                 'INFOPLIST_FILE': 'host/setup/native_messaging_host-Info.plist',
798                 'INFOPLIST_PREPROCESS': 'YES',
799                 'INFOPLIST_PREPROCESSOR_DEFINITIONS': 'VERSION_FULL="<(version_full)" VERSION_SHORT="<(version_short)" BUNDLE_ID="<(host_bundle_id)"',
800               },
801               'mac_bundle_resources': [
802                 'host/setup/native_messaging_host-Info.plist',
803                 '<!@pymod_do_main(remoting_copy_locales -o -p <(OS) -x <(PRODUCT_DIR) <(remoting_locales))',
805                 # Localized strings for 'Info.plist'
806                 '<!@pymod_do_main(remoting_localize --locale_output '
807                     '"<(SHARED_INTERMEDIATE_DIR)/remoting/native_messaging_host-InfoPlist.strings/@{json_suffix}.lproj/InfoPlist.strings" '
808                     '--print_only <(remoting_locales))',
809               ],
810               'mac_bundle_resources!': [
811                 'host/setup/native_messaging_host-Info.plist',
812               ],
813               'conditions': [
814                 ['mac_breakpad==1', {
815                   'variables': {
816                     # A real .dSYM is needed for dump_syms to operate on.
817                     'mac_real_dsym': 1,
818                   },
819                   'copies': [
820                     {
821                       'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Resources',
822                       'files': [
823                         '<(PRODUCT_DIR)/crash_inspector',
824                         '<(PRODUCT_DIR)/crash_report_sender.app'
825                       ],
826                     },
827                   ],
828                   'dependencies': [
829                     '../breakpad/breakpad.gyp:dump_syms',
830                   ],
831                   'postbuilds': [
832                     {
833                       'postbuild_name': 'Dump Symbols',
834                       'variables': {
835                         'dump_product_syms_path':
836                             'scripts/mac/dump_product_syms',
837                       },
838                       'action': [
839                         '<(dump_product_syms_path)',
840                         '<(version_full)',
841                       ],
842                     },  # end of postbuild 'dump_symbols'
843                   ],  # end of 'postbuilds'
844                 }],  # mac_breakpad==1
845               ],  # conditions
846             }],  # OS=mac
847           ],
848         },  # end of target 'remoting_me2me_native_messaging_host'
849       ], # targets
850     }], # end of OS!="win" and enable_me2me_host==1
852     ['OS!="win" and enable_it2me_host==1', {
853       'targets': [
854         {
855           'target_name': 'remoting_it2me_native_messaging_host',
856           'type': 'executable',
857           'product_name': 'remote_assistance_host',
858           'variables': { 'enable_wexit_time_destructors': 1, },
859           'dependencies': [
860             '../base/base.gyp:base',
861             'remoting_base',
862             'remoting_breakpad',
863             'remoting_host',
864             'remoting_it2me_host_static',
865             'remoting_native_messaging_base',
866             'remoting_protocol',
867           ],
868           'defines': [
869             'VERSION=<(version_full)',
870           ],
871           'sources': [
872             'host/it2me/it2me_native_messaging_host_entry_point.cc',
873             'host/it2me/it2me_native_messaging_host_main.cc',
874             'host/it2me/it2me_native_messaging_host_main.h',
875           ],
876           'conditions': [
877             ['OS=="linux" and chromeos==0', {
878               'dependencies': [
879                 # Always use GTK on Linux, even for Aura builds.
880                 '../build/linux/system.gyp:gtk',
881               ],
882             }],
883             ['OS=="linux" and use_allocator!="none"', {
884               'dependencies': [
885                 '../base/allocator/allocator.gyp:allocator',
886               ],
887             }],
888             ['OS=="mac"', {
889               'mac_bundle': 1,
890               'variables': {
891                  'host_bundle_id': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_REMOTE_ASSISTANCE_HOST_BUNDLE_ID@")',
892               },
893               'xcode_settings': {
894                 'INFOPLIST_FILE': 'host/it2me/remote_assistance_host-Info.plist',
895                 'INFOPLIST_PREPROCESS': 'YES',
896                 'INFOPLIST_PREPROCESSOR_DEFINITIONS': 'VERSION_FULL="<(version_full)" VERSION_SHORT="<(version_short)" BUNDLE_ID="<(host_bundle_id)"',
897               },
898               'mac_bundle_resources': [
899                 '<(PRODUCT_DIR)/icudtl.dat',
900                 'host/disconnect_window.xib',
901                 'host/it2me/remote_assistance_host-Info.plist',
902                 '<!@pymod_do_main(remoting_copy_locales -o -p <(OS) -x <(PRODUCT_DIR) <(remoting_locales))',
904                 # Localized strings for 'Info.plist'
905                 '<!@pymod_do_main(remoting_localize --locale_output '
906                     '"<(SHARED_INTERMEDIATE_DIR)/remoting/remote_assistance_host-InfoPlist.strings/@{json_suffix}.lproj/InfoPlist.strings" '
907                     '--print_only <(remoting_locales))',
908               ],
909               'mac_bundle_resources!': [
910                 'host/it2me/remote_assistance_host-Info.plist',
911               ],
912               'conditions': [
913                 ['mac_breakpad==1', {
914                   'variables': {
915                     # A real .dSYM is needed for dump_syms to operate on.
916                     'mac_real_dsym': 1,
917                   },
918                   'copies': [
919                     {
920                       'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Resources',
921                       'files': [
922                         '<(PRODUCT_DIR)/crash_inspector',
923                         '<(PRODUCT_DIR)/crash_report_sender.app'
924                       ],
925                     },
926                   ],
927                   'dependencies': [
928                     '../breakpad/breakpad.gyp:dump_syms',
929                   ],
930                   'postbuilds': [
931                     {
932                       'postbuild_name': 'Dump Symbols',
933                       'variables': {
934                         'dump_product_syms_path':
935                             'scripts/mac/dump_product_syms',
936                       },
937                       'action': [
938                         '<(dump_product_syms_path)',
939                         '<(version_full)',
940                       ],
941                     },  # end of postbuild 'dump_symbols'
942                   ],  # end of 'postbuilds'
943                 }],  # mac_breakpad==1
944               ],  # conditions
945             }],  # OS=mac
946           ],
947         },  # end of target 'remoting_it2me_native_messaging_host'
948       ],  # end of 'targets'
949     }],  # # end of OS!="win" and enable_it2me_host==1
951   ],  # end of 'conditions'