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