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