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