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