Sends NetworkChangeNotifier connection type changes to Blink, to support NetInfo v3.
[chromium-blink-merge.git] / remoting / remoting_host.gypi
blobdc4cdc658acd6077757ce82251b1fab97a3936b6
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_posix.cc',
123             'host/gnubby_auth_handler_posix.h',
124             'host/gnubby_auth_handler_win.cc',
125             'host/gnubby_auth_handler.h',
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_secret.cc',
141             'host/host_secret.h',
142             'host/host_status_monitor.h',
143             'host/host_status_observer.h',
144             'host/host_status_sender.cc',
145             'host/host_status_sender.h',
146             'host/host_window.h',
147             'host/host_window_proxy.cc',
148             'host/host_window_proxy.h',
149             'host/in_memory_host_config.cc',
150             'host/in_memory_host_config.h',
151             'host/input_injector.h',
152             'host/input_injector_linux.cc',
153             'host/input_injector_mac.cc',
154             'host/input_injector_win.cc',
155             'host/ipc_audio_capturer.cc',
156             'host/ipc_audio_capturer.h',
157             'host/ipc_constants.cc',
158             'host/ipc_constants.h',
159             'host/ipc_desktop_environment.cc',
160             'host/ipc_desktop_environment.h',
161             'host/ipc_host_event_logger.cc',
162             'host/ipc_host_event_logger.h',
163             'host/ipc_input_injector.cc',
164             'host/ipc_input_injector.h',
165             'host/ipc_screen_controls.cc',
166             'host/ipc_screen_controls.h',
167             'host/ipc_util.h',
168             'host/ipc_util_posix.cc',
169             'host/ipc_util_win.cc',
170             'host/ipc_video_frame_capturer.cc',
171             'host/ipc_video_frame_capturer.h',
172             'host/it2me_desktop_environment.cc',
173             'host/it2me_desktop_environment.h',
174             'host/json_host_config.cc',
175             'host/json_host_config.h',
176             'host/linux/audio_pipe_reader.cc',
177             'host/linux/audio_pipe_reader.h',
178             'host/linux/x11_util.cc',
179             'host/linux/x11_util.h',
180             'host/linux/x_server_clipboard.cc',
181             'host/linux/x_server_clipboard.h',
182             'host/local_input_monitor.h',
183             'host/local_input_monitor_linux.cc',
184             'host/local_input_monitor_mac.mm',
185             'host/local_input_monitor_win.cc',
186             'host/log_to_server.cc',
187             'host/log_to_server.h',
188             'host/logging.h',
189             'host/logging_posix.cc',
190             'host/logging_win.cc',
191             'host/me2me_desktop_environment.cc',
192             'host/me2me_desktop_environment.h',
193             'host/mouse_clamping_filter.cc',
194             'host/mouse_clamping_filter.h',
195             'host/oauth_token_getter.cc',
196             'host/oauth_token_getter.h',
197             'host/pairing_registry_delegate.cc',
198             'host/pairing_registry_delegate.h',
199             'host/pairing_registry_delegate_linux.cc',
200             'host/pairing_registry_delegate_linux.h',
201             'host/pairing_registry_delegate_mac.cc',
202             'host/pairing_registry_delegate_win.cc',
203             'host/pairing_registry_delegate_win.h',
204             'host/pam_authorization_factory_posix.cc',
205             'host/pam_authorization_factory_posix.h',
206             'host/pin_hash.cc',
207             'host/pin_hash.h',
208             'host/policy_hack/policy_watcher.cc',
209             'host/policy_hack/policy_watcher.h',
210             'host/policy_hack/policy_watcher_linux.cc',
211             'host/policy_hack/policy_watcher_mac.mm',
212             'host/policy_hack/policy_watcher_win.cc',
213             'host/register_support_host_request.cc',
214             'host/register_support_host_request.h',
215             'host/remote_input_filter.cc',
216             'host/remote_input_filter.h',
217             'host/resizing_host_observer.cc',
218             'host/resizing_host_observer.h',
219             'host/sas_injector.h',
220             'host/sas_injector_win.cc',
221             'host/screen_controls.h',
222             'host/screen_resolution.cc',
223             'host/screen_resolution.h',
224             'host/server_log_entry_host.cc',
225             'host/server_log_entry_host.h',
226             'host/service_urls.cc',
227             'host/service_urls.h',
228             'host/session_manager_factory.cc',
229             'host/session_manager_factory.h',
230             'host/shaped_screen_capturer.cc',
231             'host/shaped_screen_capturer.h',
232             'host/signaling_connector.cc',
233             'host/signaling_connector.h',
234             'host/token_validator_base.cc',
235             'host/token_validator_base.h',
236             'host/token_validator_factory_impl.cc',
237             'host/token_validator_factory_impl.h',
238             'host/usage_stats_consent.h',
239             'host/usage_stats_consent_mac.cc',
240             'host/usage_stats_consent_win.cc',
241             'host/username.cc',
242             'host/username.h',
243             'host/video_scheduler.cc',
244             'host/video_scheduler.h',
245             'host/win/com_imported_mstscax.tlh',
246             'host/win/com_security.cc',
247             'host/win/com_security.h',
248             'host/win/launch_process_with_token.cc',
249             'host/win/launch_process_with_token.h',
250             'host/win/omaha.cc',
251             'host/win/omaha.h',
252             'host/win/rdp_client.cc',
253             'host/win/rdp_client.h',
254             'host/win/rdp_client_window.cc',
255             'host/win/rdp_client_window.h',
256             'host/win/security_descriptor.cc',
257             'host/win/security_descriptor.h',
258             'host/win/session_desktop_environment.cc',
259             'host/win/session_desktop_environment.h',
260             'host/win/session_input_injector.cc',
261             'host/win/session_input_injector.h',
262             'host/win/window_station_and_desktop.cc',
263             'host/win/window_station_and_desktop.h',
264             'host/win/wts_terminal_monitor.cc',
265             'host/win/wts_terminal_monitor.h',
266             'host/win/wts_terminal_observer.h',
267           ],
268           'conditions': [
269             ['OS=="linux"', {
270               'dependencies': [
271                 # Always use GTK on Linux, even for Aura builds.
272                 '../build/linux/system.gyp:gtk',
273                 '../build/linux/system.gyp:x11',
274                 '../build/linux/system.gyp:xext',
275                 '../build/linux/system.gyp:xfixes',
276                 '../build/linux/system.gyp:xi',
277                 '../build/linux/system.gyp:xrandr',
278                 '../build/linux/system.gyp:xtst',
279               ],
280               'link_settings': {
281                 'libraries': [
282                   '-lpam',
283                 ],
284               },
285             }],
286             ['OS=="mac"', {
287               'dependencies': [
288                 '../third_party/google_toolbox_for_mac/google_toolbox_for_mac.gyp:google_toolbox_for_mac',
289               ],
290               'link_settings': {
291                 'libraries': [
292                   '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework',
293                   'libpam.a',
294                ],
295               },
296             }],
297             ['OS=="win"', {
298               'defines': [
299                 '_ATL_NO_EXCEPTIONS',
300                 'ISOLATION_AWARE_ENABLED=1',
301               ],
302               'dependencies': [
303                 '../sandbox/sandbox.gyp:sandbox',
304                 'remoting_host_messages',
305                 'remoting_lib_idl',
306               ],
307               'msvs_settings': {
308                 'VCCLCompilerTool': {
309                   # /MP conflicts with #import directive so we limit the number
310                   # of processes to spawn to 1.
311                   'AdditionalOptions': ['/MP1'],
312                 },
313               },
314               'variables': {
315                 'output_dir': '<(SHARED_INTERMEDIATE_DIR)/remoting/host',
316               },
317               'sources': [
318                 '<(output_dir)/remoting_host_messages.mc',
319               ],
320               'include_dirs': [
321                 '<(output_dir)',
322               ],
323               'direct_dependent_settings': {
324                 'include_dirs': [
325                   '<(output_dir)',
326                 ],
327               },
328               'rules': [{
329                 # Rule to run the message compiler.
330                 'rule_name': 'message_compiler',
331                 'extension': 'mc',
332                 'outputs': [
333                   '<(output_dir)/<(RULE_INPUT_ROOT).h',
334                   '<(output_dir)/<(RULE_INPUT_ROOT).rc',
335                 ],
336                 'action': [
337                   'mc.exe',
338                   '-h', '<(output_dir)',
339                   '-r', '<(output_dir)/.',
340                   '-u',
341                   '<(RULE_INPUT_PATH)',
342                 ],
343                 'process_outputs_as_sources': 1,
344                 'message': 'Running message compiler on <(RULE_INPUT_PATH)',
345               }],
346             }],
347           ],
348         },  # end of target 'remoting_host'
350         {
351           'target_name': 'remoting_native_messaging_base',
352           'type': 'static_library',
353           'variables': { 'enable_wexit_time_destructors': 1, },
354           'dependencies': [
355             '../base/base.gyp:base',
356           ],
357           'sources': [
358             'host/native_messaging/native_messaging_channel.cc',
359             'host/native_messaging/native_messaging_channel.h',
360             'host/native_messaging/native_messaging_reader.cc',
361             'host/native_messaging/native_messaging_reader.h',
362             'host/native_messaging/native_messaging_writer.cc',
363             'host/native_messaging/native_messaging_writer.h',
364           ],
365         },  # end of target 'remoting_native_messaging_base'
367         {
368           'target_name': 'remoting_me2me_host_static',
369           'type': 'static_library',
370           'variables': { 'enable_wexit_time_destructors': 1, },
371           'dependencies': [
372             '../base/base.gyp:base',
373             '../base/base.gyp:base_i18n',
374             '../net/net.gyp:net',
375             '../third_party/webrtc/modules/modules.gyp:desktop_capture',
376             'remoting_base',
377             'remoting_breakpad',
378             'remoting_host',
379             'remoting_protocol',
380           ],
381           'defines': [
382             'VERSION=<(version_full)',
383           ],
384           'sources': [
385             'host/curtain_mode.h',
386             'host/curtain_mode_linux.cc',
387             'host/curtain_mode_mac.cc',
388             'host/curtain_mode_win.cc',
389             'host/posix/signal_handler.cc',
390             'host/posix/signal_handler.h',
391           ],
392           'conditions': [
393             ['os_posix != 1', {
394               'sources/': [
395                 ['exclude', '^host/posix/'],
396               ],
397             }],
398           ],  # end of 'conditions'
399         },  # end of target 'remoting_me2me_host_static'
401         {
402           'target_name': 'remoting_host_setup_base',
403           'type': 'static_library',
404           'variables': { 'enable_wexit_time_destructors': 1, },
405           'dependencies': [
406             '../base/base.gyp:base',
407             '../google_apis/google_apis.gyp:google_apis',
408             'remoting_host',
409           ],
410           'defines': [
411             'VERSION=<(version_full)',
412           ],
413           'sources': [
414             'host/setup/daemon_controller.cc',
415             'host/setup/daemon_controller.h',
416             'host/setup/daemon_controller_delegate_linux.cc',
417             'host/setup/daemon_controller_delegate_linux.h',
418             'host/setup/daemon_controller_delegate_mac.h',
419             'host/setup/daemon_controller_delegate_mac.mm',
420             'host/setup/daemon_controller_delegate_win.cc',
421             'host/setup/daemon_controller_delegate_win.h',
422             'host/setup/daemon_installer_win.cc',
423             'host/setup/daemon_installer_win.h',
424             'host/setup/oauth_client.cc',
425             'host/setup/oauth_client.h',
426             'host/setup/oauth_helper.cc',
427             'host/setup/oauth_helper.h',
428             'host/setup/pin_validator.cc',
429             'host/setup/pin_validator.h',
430             'host/setup/service_client.cc',
431             'host/setup/service_client.h',
432             'host/setup/test_util.cc',
433             'host/setup/test_util.h',
434             'host/setup/win/auth_code_getter.cc',
435             'host/setup/win/auth_code_getter.h',
436           ],
437           'conditions': [
438             ['OS=="win"', {
439               'dependencies': [
440                 '../google_update/google_update.gyp:google_update',
441                 'remoting_lib_idl',
442               ],
443               # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
444               'msvs_disabled_warnings': [4267, ],
445             }],
446           ],
447         },  # end of target 'remoting_host_setup_base'
449         {
450           'target_name': 'remoting_host_plugin',
451           'type': 'loadable_module',
452           'variables': { 'enable_wexit_time_destructors': 1, },
453           'product_extension': '<(host_plugin_extension)',
454           'product_prefix': '<(host_plugin_prefix)',
455           'defines': [
456             'HOST_PLUGIN_MIME_TYPE=<(host_plugin_mime_type)',
457           ],
458           'dependencies': [
459             '../base/base.gyp:base_i18n',
460             '../net/net.gyp:net',
461             '../third_party/npapi/npapi.gyp:npapi',
462             'remoting_base',
463             'remoting_host',
464             'remoting_host_setup_base',
465             'remoting_infoplist_strings',
466             'remoting_it2me_host_static',
467             'remoting_protocol',
468             'remoting_resources',
469           ],
470           'sources': [
471             'base/dispatch_win.h',
472             'host/plugin/host_log_handler.cc',
473             'host/plugin/host_log_handler.h',
474             'host/plugin/host_plugin.cc',
475             'host/plugin/host_plugin_utils.cc',
476             'host/plugin/host_plugin_utils.h',
477             'host/plugin/host_script_object.cc',
478             'host/plugin/host_script_object.h',
479             'host/win/core_resource.h',
480           ],
481           'conditions': [
482             ['OS=="mac"', {
483               'mac_bundle': 1,
484               'xcode_settings': {
485                 'CHROMIUM_BUNDLE_ID': '<(mac_bundle_id)',
486                 'INFOPLIST_FILE': 'host/plugin/host_plugin-Info.plist',
487                 'INFOPLIST_PREPROCESS': 'YES',
488                 # TODO(maruel): Use INFOPLIST_PREFIX_HEADER to remove the need to
489                 # duplicate string once
490                 # http://code.google.com/p/gyp/issues/detail?id=243 is fixed.
491                 'INFOPLIST_PREPROCESSOR_DEFINITIONS': 'HOST_PLUGIN_MIME_TYPE="<(host_plugin_mime_type)" VERSION_FULL="<(version_full)" VERSION_SHORT="<(version_short)"',
492               },
493               # TODO(mark): Come up with a fancier way to do this.  It should
494               # only be necessary to list host_plugin-Info.plist once, not the
495               # three times it is listed here.
496               'mac_bundle_resources': [
497                 'host/disconnect_window.xib',
498                 'host/plugin/host_plugin-Info.plist',
499                 'resources/chromoting16.png',
500                 'resources/chromoting48.png',
501                 'resources/chromoting128.png',
502                 '<!@pymod_do_main(remoting_copy_locales -o -p <(OS) -x <(PRODUCT_DIR) <(remoting_locales))',
504                 # Localized strings for 'Info.plist'
505                 '<!@pymod_do_main(remoting_localize --locale_output '
506                     '"<(SHARED_INTERMEDIATE_DIR)/remoting/host_plugin-InfoPlist.strings/@{json_suffix}.lproj/InfoPlist.strings" '
507                     '--print_only <(remoting_locales))',
508               ],
509               'mac_bundle_resources!': [
510                 'host/plugin/host_plugin-Info.plist',
511               ],
512               'conditions': [
513                 ['mac_breakpad==1', {
514                   'variables': {
515                     # A real .dSYM is needed for dump_syms to operate on.
516                     'mac_real_dsym': 1,
517                   },
518                 }],
519               ],  # conditions
520             }],  # OS=="mac"
521             [ 'OS=="win"', {
522               'defines': [
523                 'BINARY=BINARY_HOST_PLUGIN',
524                 'ISOLATION_AWARE_ENABLED=1',
525               ],
526               'dependencies': [
527                 'remoting_lib_idl',
528                 'remoting_windows_resources',
529               ],
530               'include_dirs': [
531                 '<(INTERMEDIATE_DIR)',
532               ],
533               'sources': [
534                 '<(SHARED_INTERMEDIATE_DIR)/remoting/core.rc',
535                 '<(SHARED_INTERMEDIATE_DIR)/remoting/version.rc',
536                 'host/plugin/host_plugin.def',
537               ],
538               'msvs_settings': {
539                 'VCManifestTool': {
540                   'EmbedManifest': 'true',
541                   'AdditionalManifestFiles': [
542                     'host/win/common-controls.manifest',
543                   ],
544                 },
545               },
546             }],
547           ],
548         },  # end of target 'remoting_host_plugin'
549         {
550           'target_name': 'remoting_it2me_host_static',
551           'type': 'static_library',
552           'variables': { 'enable_wexit_time_destructors': 1, },
553           'dependencies': [
554             '../base/base.gyp:base_i18n',
555             '../net/net.gyp:net',
556             'remoting_base',
557             'remoting_host',
558             'remoting_infoplist_strings',
559             'remoting_protocol',
560             'remoting_resources',
561           ],
562           'defines': [
563             'VERSION=<(version_full)',
564           ],
565           'sources': [
566             'host/it2me/it2me_host.cc',
567             'host/it2me/it2me_host.h',
568             'host/it2me/it2me_native_messaging_host.cc',
569             'host/it2me/it2me_native_messaging_host.h',
570           ],
571         },  # end of target 'remoting_it2me_host_static'
573         # Generates native messaging manifest files.
574         {
575           'target_name': 'remoting_native_messaging_manifests',
576           'type': 'none',
577           'conditions': [
578             [ 'OS == "win"', {
579               'variables': {
580                 'me2me_host_path': 'remoting_native_messaging_host.exe',
581                 'it2me_host_path': 'remote_assistance_host.exe',
582               },
583             }],
584             [ 'OS == "mac"', {
585               'variables': {
586                 'me2me_host_bundle_name': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_HOST_BUNDLE_NAME@")',
587                 'native_messaging_host_bundle_name': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_NATIVE_MESSAGING_HOST_BUNDLE_NAME@")',
588                 'remote_assistance_host_bundle_name': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_REMOTE_ASSISTANCE_HOST_BUNDLE_NAME@")',
589                 'me2me_host_path':
590                     '/Library/PrivilegedHelperTools/<(me2me_host_bundle_name)/Contents/MacOS/<(native_messaging_host_bundle_name)/Contents/MacOS/native_messaging_host',
591                 'it2me_host_path':
592                     '/Library/PrivilegedHelperTools/<(me2me_host_bundle_name)/Contents/MacOS/<(remote_assistance_host_bundle_name)/Contents/MacOS/remote_assistance_host',
593               },
594             }],
595             [ 'OS != "mac" and OS != "win"', {
596               'variables': {
597                 'me2me_host_path':
598                     '/opt/google/chrome-remote-desktop/native-messaging-host',
599                 'it2me_host_path':
600                     '/opt/google/chrome-remote-desktop/remote-assistance-host',
601               },
602             }],
603           ],  # conditions
604           'sources': [
605             'host/it2me/com.google.chrome.remote_assistance.json.jinja2',
606             'host/setup/com.google.chrome.remote_desktop.json.jinja2',
607           ],
608           'rules': [{
609             'rule_name': 'generate_manifest',
610             'extension': 'jinja2',
611             'inputs': [
612               '<(remoting_localize_path)',
613               '<(branding_path)',
614             ],
615             'outputs': [
616               '<(PRODUCT_DIR)/remoting/<(RULE_INPUT_ROOT)',
617             ],
618             'action': [
619               'python', '<(remoting_localize_path)',
620               '--define', 'ME2ME_HOST_PATH=<(me2me_host_path)',
621               '--define', 'IT2ME_HOST_PATH=<(it2me_host_path)',
622               '--variables', '<(branding_path)',
623               '--template', '<(RULE_INPUT_PATH)',
624               '--locale_output', '<@(_outputs)',
625               'en',
626             ],
627           }],
628         },  # end of target 'remoting_native_messaging_manifests'
630         {
631           'target_name': 'remoting_infoplist_strings',
632           'type': 'none',
633           'dependencies': [
634             'remoting_resources',
635           ],
636           'sources': [
637             'host/plugin/host_plugin-InfoPlist.strings.jinja2',
638             'host/remoting_me2me_host-InfoPlist.strings.jinja2',
639             'host/mac/me2me_preference_pane-InfoPlist.strings.jinja2',
640             'host/installer/mac/uninstaller/remoting_uninstaller-InfoPlist.strings.jinja2',
641             'host/setup/native_messaging_host-InfoPlist.strings.jinja2',
642             'host/it2me/remote_assistance_host-InfoPlist.strings.jinja2',
643           ],
644           'rules': [{
645             'rule_name': 'generate_strings',
646             'extension': 'jinja2',
647             'inputs': [
648               '<(remoting_localize_path)',
649             ],
650             'outputs': [
651               '<!@pymod_do_main(remoting_localize --locale_output '
652                   '"<(SHARED_INTERMEDIATE_DIR)/remoting/<(RULE_INPUT_ROOT)/@{json_suffix}.lproj/InfoPlist.strings" '
653                   '--print_only <(remoting_locales))',
654             ],
655             'action': [
656               'python', '<(remoting_localize_path)',
657               '--locale_dir', '<(webapp_locale_dir)',
658               '--template', '<(RULE_INPUT_PATH)',
659               '--locale_output',
660               '<(SHARED_INTERMEDIATE_DIR)/remoting/<(RULE_INPUT_ROOT)/@{json_suffix}.lproj/InfoPlist.strings',
661               '<@(remoting_locales)',
662             ]},
663           ],
664         },  # end of target 'remoting_infoplist_strings'
665       ],  # end of 'targets'
666     }],  # 'enable_remoting_host==1'
668     ['OS!="win" and enable_remoting_host==1', {
669       'targets': [
670         {
671           'target_name': 'remoting_me2me_host',
672           'type': 'executable',
673           'variables': { 'enable_wexit_time_destructors': 1, },
674           'dependencies': [
675             '../base/base.gyp:base',
676             '../base/base.gyp:base_i18n',
677             '<(icu_gyp_path):icudata',
678             '../net/net.gyp:net',
679             '../third_party/webrtc/modules/modules.gyp:desktop_capture',
680             'remoting_base',
681             'remoting_breakpad',
682             'remoting_host',
683             'remoting_infoplist_strings',
684             'remoting_me2me_host_static',
685             'remoting_protocol',
686           ],
687           'defines': [
688             'VERSION=<(version_full)',
689           ],
690           'sources': [
691             'host/host_main.cc',
692             'host/host_main.h',
693             'host/remoting_me2me_host.cc',
694           ],
695           'conditions': [
696             ['OS=="mac"', {
697               'mac_bundle': 1,
698               'variables': {
699                  'host_bundle_id': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_HOST_BUNDLE_ID@")',
700               },
701               'xcode_settings': {
702                 'INFOPLIST_FILE': 'host/remoting_me2me_host-Info.plist',
703                 'INFOPLIST_PREPROCESS': 'YES',
704                 'INFOPLIST_PREPROCESSOR_DEFINITIONS': 'VERSION_FULL="<(version_full)" VERSION_SHORT="<(version_short)" BUNDLE_ID="<(host_bundle_id)"',
705               },
706               'mac_bundle_resources': [
707                 '<(PRODUCT_DIR)/icudtl.dat',
708                 'host/disconnect_window.xib',
709                 'host/remoting_me2me_host.icns',
710                 'host/remoting_me2me_host-Info.plist',
711                 '<!@pymod_do_main(remoting_copy_locales -o -p <(OS) -x <(PRODUCT_DIR) <(remoting_locales))',
713                 # Localized strings for 'Info.plist'
714                 '<!@pymod_do_main(remoting_localize --locale_output '
715                     '"<(SHARED_INTERMEDIATE_DIR)/remoting/remoting_me2me_host-InfoPlist.strings/@{json_suffix}.lproj/InfoPlist.strings" '
716                     '--print_only <(remoting_locales))',
717               ],
718               'mac_bundle_resources!': [
719                 'host/remoting_me2me_host-Info.plist',
720               ],
721               'conditions': [
722                 ['mac_breakpad==1', {
723                   'variables': {
724                     # A real .dSYM is needed for dump_syms to operate on.
725                     'mac_real_dsym': 1,
726                   },
727                   'copies': [
728                     {
729                       'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Resources',
730                       'files': [
731                         '<(PRODUCT_DIR)/crash_inspector',
732                         '<(PRODUCT_DIR)/crash_report_sender.app'
733                       ],
734                     },
735                   ],
736                   'dependencies': [
737                     '../breakpad/breakpad.gyp:dump_syms',
738                   ],
739                   'postbuilds': [
740                     {
741                       'postbuild_name': 'Dump Symbols',
742                       'variables': {
743                         'dump_product_syms_path':
744                             'scripts/mac/dump_product_syms',
745                       },
746                       'action': [
747                         '<(dump_product_syms_path)',
748                         '<(version_full)',
749                       ],
750                     },  # end of postbuild 'dump_symbols'
751                   ],  # end of 'postbuilds'
752                 }],  # mac_breakpad==1
753               ],  # conditions
754             }],  # OS=mac
755             ['OS=="linux" and use_allocator!="none"', {
756               'dependencies': [
757                 '../base/allocator/allocator.gyp:allocator',
758               ],
759             }],  # OS=linux
760           ],  # end of 'conditions'
761         },  # end of target 'remoting_me2me_host'
762         {
763           'target_name': 'remoting_me2me_native_messaging_host',
764           'type': 'executable',
765           'product_name': 'native_messaging_host',
766           'variables': { 'enable_wexit_time_destructors': 1, },
767           'dependencies': [
768             '../base/base.gyp:base',
769             'remoting_breakpad',
770             'remoting_host',
771             'remoting_host_setup_base',
772             'remoting_infoplist_strings',
773             'remoting_native_messaging_base',
774           ],
775           'defines': [
776             'VERSION=<(version_full)',
777           ],
778           'sources': [
779             'host/setup/me2me_native_messaging_host.cc',
780             'host/setup/me2me_native_messaging_host.h',
781             'host/setup/me2me_native_messaging_host_entry_point.cc',
782             'host/setup/me2me_native_messaging_host_main.cc',
783             'host/setup/me2me_native_messaging_host_main.h',
784           ],
785           'conditions': [
786             ['OS=="linux" and use_allocator!="none"', {
787               'dependencies': [
788                 '../base/allocator/allocator.gyp:allocator',
789               ],
790             }],
791             ['OS=="mac"', {
792               'mac_bundle': 1,
793               'variables': {
794                  'host_bundle_id': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_NATIVE_MESSAGING_HOST_BUNDLE_ID@")',
795               },
796               'xcode_settings': {
797                 'INFOPLIST_FILE': 'host/setup/native_messaging_host-Info.plist',
798                 'INFOPLIST_PREPROCESS': 'YES',
799                 'INFOPLIST_PREPROCESSOR_DEFINITIONS': 'VERSION_FULL="<(version_full)" VERSION_SHORT="<(version_short)" BUNDLE_ID="<(host_bundle_id)"',
800               },
801               'mac_bundle_resources': [
802                 'host/setup/native_messaging_host-Info.plist',
803                 '<!@pymod_do_main(remoting_copy_locales -o -p <(OS) -x <(PRODUCT_DIR) <(remoting_locales))',
805                 # Localized strings for 'Info.plist'
806                 '<!@pymod_do_main(remoting_localize --locale_output '
807                     '"<(SHARED_INTERMEDIATE_DIR)/remoting/native_messaging_host-InfoPlist.strings/@{json_suffix}.lproj/InfoPlist.strings" '
808                     '--print_only <(remoting_locales))',
809               ],
810               'mac_bundle_resources!': [
811                 'host/setup/native_messaging_host-Info.plist',
812               ],
813               'conditions': [
814                 ['mac_breakpad==1', {
815                   'variables': {
816                     # A real .dSYM is needed for dump_syms to operate on.
817                     'mac_real_dsym': 1,
818                   },
819                   'copies': [
820                     {
821                       'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Resources',
822                       'files': [
823                         '<(PRODUCT_DIR)/crash_inspector',
824                         '<(PRODUCT_DIR)/crash_report_sender.app'
825                       ],
826                     },
827                   ],
828                   'dependencies': [
829                     '../breakpad/breakpad.gyp:dump_syms',
830                   ],
831                   'postbuilds': [
832                     {
833                       'postbuild_name': 'Dump Symbols',
834                       'variables': {
835                         'dump_product_syms_path':
836                             'scripts/mac/dump_product_syms',
837                       },
838                       'action': [
839                         '<(dump_product_syms_path)',
840                         '<(version_full)',
841                       ],
842                     },  # end of postbuild 'dump_symbols'
843                   ],  # end of 'postbuilds'
844                 }],  # mac_breakpad==1
845               ],  # conditions
846             }],  # OS=mac
847           ],
848         },  # end of target 'remoting_me2me_native_messaging_host'
849         {
850           'target_name': 'remoting_it2me_native_messaging_host',
851           'type': 'executable',
852           'product_name': 'remote_assistance_host',
853           'variables': { 'enable_wexit_time_destructors': 1, },
854           'dependencies': [
855             '../base/base.gyp:base',
856             'remoting_base',
857             'remoting_breakpad',
858             'remoting_host',
859             'remoting_it2me_host_static',
860             'remoting_native_messaging_base',
861             'remoting_protocol',
862           ],
863           'defines': [
864             'VERSION=<(version_full)',
865           ],
866           'sources': [
867             'host/it2me/it2me_native_messaging_host_entry_point.cc',
868             'host/it2me/it2me_native_messaging_host_main.cc',
869             'host/it2me/it2me_native_messaging_host_main.h',
870           ],
871           'conditions': [
872             ['OS=="linux"', {
873               'dependencies': [
874                 # Always use GTK on Linux, even for Aura builds.
875                 '../build/linux/system.gyp:gtk',
876               ],
877             }],
878             ['OS=="linux" and use_allocator!="none"', {
879               'dependencies': [
880                 '../base/allocator/allocator.gyp:allocator',
881               ],
882             }],
883             ['OS=="mac"', {
884               'mac_bundle': 1,
885               'variables': {
886                  'host_bundle_id': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_REMOTE_ASSISTANCE_HOST_BUNDLE_ID@")',
887               },
888               'xcode_settings': {
889                 'INFOPLIST_FILE': 'host/it2me/remote_assistance_host-Info.plist',
890                 'INFOPLIST_PREPROCESS': 'YES',
891                 'INFOPLIST_PREPROCESSOR_DEFINITIONS': 'VERSION_FULL="<(version_full)" VERSION_SHORT="<(version_short)" BUNDLE_ID="<(host_bundle_id)"',
892               },
893               'mac_bundle_resources': [
894                 '<(PRODUCT_DIR)/icudtl.dat',
895                 'host/it2me/remote_assistance_host-Info.plist',
896                 '<!@pymod_do_main(remoting_copy_locales -o -p <(OS) -x <(PRODUCT_DIR) <(remoting_locales))',
898                 # Localized strings for 'Info.plist'
899                 '<!@pymod_do_main(remoting_localize --locale_output '
900                     '"<(SHARED_INTERMEDIATE_DIR)/remoting/remote_assistance_host-InfoPlist.strings/@{json_suffix}.lproj/InfoPlist.strings" '
901                     '--print_only <(remoting_locales))',
902               ],
903               'mac_bundle_resources!': [
904                 'host/it2me/remote_assistance_host-Info.plist',
905               ],
906               'conditions': [
907                 ['mac_breakpad==1', {
908                   'variables': {
909                     # A real .dSYM is needed for dump_syms to operate on.
910                     'mac_real_dsym': 1,
911                   },
912                   'copies': [
913                     {
914                       'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Resources',
915                       'files': [
916                         '<(PRODUCT_DIR)/crash_inspector',
917                         '<(PRODUCT_DIR)/crash_report_sender.app'
918                       ],
919                     },
920                   ],
921                   'dependencies': [
922                     '../breakpad/breakpad.gyp:dump_syms',
923                   ],
924                   'postbuilds': [
925                     {
926                       'postbuild_name': 'Dump Symbols',
927                       'variables': {
928                         'dump_product_syms_path':
929                             'scripts/mac/dump_product_syms',
930                       },
931                       'action': [
932                         '<(dump_product_syms_path)',
933                         '<(version_full)',
934                       ],
935                     },  # end of postbuild 'dump_symbols'
936                   ],  # end of 'postbuilds'
937                 }],  # mac_breakpad==1
938               ],  # conditions
939             }],  # OS=mac
940           ],
941         },  # end of target 'remoting_it2me_native_messaging_host'
942       ],  # end of 'targets'
943     }],  # OS!="win"
945   ],  # end of 'conditions'