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