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