Pass in the correct scale factor when retrieving the icon from the shell.
[chromium-blink-merge.git] / remoting / remoting_host.gypi
blobcc68f3f074ae0349281634183bb3fd50f50d29bc
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/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_util.cc',
120             'host/gnubby_util.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'
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'
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'
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'
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))',
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'
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_path':
580                     '/Library/PrivilegedHelperTools/org.chromium.chromoting.me2me_host.app/Contents/MacOS/native_messaging_host',
581                 'it2me_host_path':
582                     '/Library/PrivilegedHelperTools/org.chromium.chromoting.me2me_host.app/Contents/MacOS/remote_assistance_host',
583               },
584             }],
585             [ 'OS != "mac" and OS != "win"', {
586               'variables': {
587                 'me2me_host_path':
588                     '/opt/google/chrome-remote-desktop/native-messaging-host',
589                 'it2me_host_path':
590                     '/opt/google/chrome-remote-desktop/remote-assistance-host',
591               },
592             }],
593           ],  # conditions
594           'sources': [
595             'host/it2me/com.google.chrome.remote_assistance.json.jinja2',
596             'host/setup/com.google.chrome.remote_desktop.json.jinja2',
597           ],
598           'rules': [{
599             'rule_name': 'generate_manifest',
600             'extension': 'jinja2',
601             'inputs': [
602               '<(remoting_localize_path)',
603               '<(branding_path)',
604             ],
605             'outputs': [
606               '<(PRODUCT_DIR)/remoting/<(RULE_INPUT_ROOT)',
607             ],
608             'action': [
609               'python', '<(remoting_localize_path)',
610               '--define', 'ME2ME_HOST_PATH=<(me2me_host_path)',
611               '--define', 'IT2ME_HOST_PATH=<(it2me_host_path)',
612               '--variables', '<(branding_path)',
613               '--template', '<(RULE_INPUT_PATH)',
614               '--locale_output', '<@(_outputs)',
615               'en',
616             ],
617           }],
618         },  # end of target 'remoting_native_messaging_manifests'
620         {
621           'target_name': 'remoting_infoplist_strings',
622           'type': 'none',
623           'dependencies': [
624             'remoting_resources',
625           ],
626           'sources': [
627             'host/plugin/host_plugin-InfoPlist.strings.jinja2',
628             'host/remoting_me2me_host-InfoPlist.strings.jinja2',
629             'host/mac/me2me_preference_pane-InfoPlist.strings.jinja2',
630             'host/installer/mac/uninstaller/remoting_uninstaller-InfoPlist.strings.jinja2',
631           ],
632           'rules': [{
633             'rule_name': 'generate_strings',
634             'extension': 'jinja2',
635             'inputs': [
636               '<(remoting_localize_path)',
637             ],
638             'outputs': [
639               '<!@pymod_do_main(remoting_localize --locale_output '
640                   '"<(SHARED_INTERMEDIATE_DIR)/remoting/<(RULE_INPUT_ROOT)/@{json_suffix}.lproj/InfoPlist.strings" '
641                   '--print_only <(remoting_locales))',
642             ],
643             'action': [
644               'python', '<(remoting_localize_path)',
645               '--locale_dir', '<(webapp_locale_dir)',
646               '--template', '<(RULE_INPUT_PATH)',
647               '--locale_output',
648               '<(SHARED_INTERMEDIATE_DIR)/remoting/<(RULE_INPUT_ROOT)/@{json_suffix}.lproj/InfoPlist.strings',
649               '<@(remoting_locales)',
650             ]},
651           ],
652         },  # end of target 'remoting_infoplist_strings'
653       ],  # end of 'targets'
654     }],  # 'enable_remoting_host==1'
656     ['OS!="win" and enable_remoting_host==1', {
657       'targets': [
658         {
659           'target_name': 'remoting_me2me_host',
660           'type': 'executable',
661           'variables': { 'enable_wexit_time_destructors': 1, },
662           'dependencies': [
663             '../base/base.gyp:base',
664             '../base/base.gyp:base_i18n',
665             '<(icu_gyp_path):icudata',
666             '../net/net.gyp:net',
667             '../third_party/webrtc/modules/modules.gyp:desktop_capture',
668             'remoting_base',
669             'remoting_breakpad',
670             'remoting_host',
671             'remoting_infoplist_strings',
672             'remoting_me2me_host_static',
673             'remoting_protocol',
674           ],
675           'defines': [
676             'VERSION=<(version_full)',
677           ],
678           'sources': [
679             'host/host_main.cc',
680             'host/host_main.h',
681             'host/remoting_me2me_host.cc',
682           ],
683           'conditions': [
684             ['OS=="mac"', {
685               'mac_bundle': 1,
686               'variables': {
687                  'host_bundle_id': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_HOST_BUNDLE_ID@")',
688               },
689               'xcode_settings': {
690                 'INFOPLIST_FILE': 'host/remoting_me2me_host-Info.plist',
691                 'INFOPLIST_PREPROCESS': 'YES',
692                 'INFOPLIST_PREPROCESSOR_DEFINITIONS': 'VERSION_FULL="<(version_full)" VERSION_SHORT="<(version_short)" BUNDLE_ID="<(host_bundle_id)"',
693               },
694               'mac_bundle_resources': [
695                 '<(PRODUCT_DIR)/icudtl.dat',
696                 'host/disconnect_window.xib',
697                 'host/remoting_me2me_host.icns',
698                 'host/remoting_me2me_host-Info.plist',
699                 '<!@pymod_do_main(remoting_copy_locales -o -p <(OS) -x <(PRODUCT_DIR) <(remoting_locales))',
701                 # Localized strings for 'Info.plist'
702                 '<!@pymod_do_main(remoting_localize --locale_output '
703                     '"<(SHARED_INTERMEDIATE_DIR)/remoting/remoting_me2me_host-InfoPlist.strings/@{json_suffix}.lproj/InfoPlist.strings" '
704                     '--print_only <(remoting_locales))',
705               ],
706               'mac_bundle_resources!': [
707                 'host/remoting_me2me_host-Info.plist',
708               ],
709               'conditions': [
710                 ['mac_breakpad==1', {
711                   'variables': {
712                     # A real .dSYM is needed for dump_syms to operate on.
713                     'mac_real_dsym': 1,
714                   },
715                   'copies': [
716                     {
717                       'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Resources',
718                       'files': [
719                         '<(PRODUCT_DIR)/crash_inspector',
720                         '<(PRODUCT_DIR)/crash_report_sender.app'
721                       ],
722                     },
723                   ],
724                   'dependencies': [
725                     '../breakpad/breakpad.gyp:dump_syms',
726                   ],
727                   'postbuilds': [
728                     {
729                       'postbuild_name': 'Dump Symbols',
730                       'variables': {
731                         'dump_product_syms_path':
732                             'scripts/mac/dump_product_syms',
733                       },
734                       'action': [
735                         '<(dump_product_syms_path)',
736                         '<(version_full)',
737                       ],
738                     },  # end of postbuild 'dump_symbols'
739                   ],  # end of 'postbuilds'
740                 }],  # mac_breakpad==1
741               ],  # conditions
742             }],  # OS=mac
743             # TODO(dmikurube): Kill linux_use_tcmalloc. http://crbug.com/345554
744             ['OS=="linux" and ((use_allocator!="none" and use_allocator!="see_use_tcmalloc") or (use_allocator=="see_use_tcmalloc" and linux_use_tcmalloc==1))', {
745               'dependencies': [
746                 '../base/allocator/allocator.gyp:allocator',
747               ],
748             }],  # OS=linux
749           ],  # end of 'conditions'
750         },  # end of target 'remoting_me2me_host'
751         {
752           'target_name': 'remoting_me2me_native_messaging_host',
753           'type': 'executable',
754           'product_name': 'remoting_native_messaging_host',
755           'variables': { 'enable_wexit_time_destructors': 1, },
756           'dependencies': [
757             '../base/base.gyp:base',
758             'remoting_host',
759             'remoting_host_setup_base',
760             'remoting_native_messaging_base',
761           ],
762           'sources': [
763             'host/setup/me2me_native_messaging_host.cc',
764             'host/setup/me2me_native_messaging_host.h',
765             'host/setup/me2me_native_messaging_host_entry_point.cc',
766             'host/setup/me2me_native_messaging_host_main.cc',
767             'host/setup/me2me_native_messaging_host_main.h',
768           ],
769           'conditions': [
770             # TODO(dmikurube): Kill linux_use_tcmalloc. http://crbug.com/345554
771             ['OS=="linux" and ((use_allocator!="none" and use_allocator!="see_use_tcmalloc") or (use_allocator=="see_use_tcmalloc" and linux_use_tcmalloc==1))', {
772               'dependencies': [
773                 '../base/allocator/allocator.gyp:allocator',
774               ],
775             }],
776           ],
777         },  # end of target 'remoting_me2me_native_messaging_host'
778         {
779           'target_name': 'remoting_it2me_native_messaging_host',
780           'type': 'executable',
781           'variables': { 'enable_wexit_time_destructors': 1, },
782           'dependencies': [
783             '../base/base.gyp:base',
784             'remoting_base',
785             'remoting_breakpad',
786             'remoting_host',
787             'remoting_it2me_host_static',
788             'remoting_native_messaging_base',
789             'remoting_protocol',
790           ],
791           'sources': [
792             'host/it2me/it2me_native_messaging_host_entry_point.cc',
793             'host/it2me/it2me_native_messaging_host_main.cc',
794             'host/it2me/it2me_native_messaging_host_main.h',
795           ],
796           'conditions': [
797             ['OS=="linux"', {
798               'dependencies': [
799                 # Always use GTK on Linux, even for Aura builds.
800                 '../build/linux/system.gyp:gtk',
801               ],
802             }],
803             # TODO(dmikurube): Kill linux_use_tcmalloc. http://crbug.com/345554
804             ['OS=="linux" and ((use_allocator!="none" and use_allocator!="see_use_tcmalloc") or (use_allocator=="see_use_tcmalloc" and linux_use_tcmalloc==1))', {
805               'dependencies': [
806                 '../base/allocator/allocator.gyp:allocator',
807               ],
808             }],
809           ],
810         },  # end of target 'remoting_it2me_native_messaging_host'
811       ],  # end of 'targets'
812     }],  # OS!="win"
814   ],  # end of 'conditions'