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