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.
7 'remoting_host_linux.gypi',
8 'remoting_host_mac.gypi',
9 'remoting_host_win.gypi',
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,
18 'enable_remoting_host': 0,
24 ['enable_remoting_host==1', {
27 'target_name': 'remoting_host',
28 'type': 'static_library',
29 'variables': { 'enable_wexit_time_destructors': 1, },
34 '../crypto/crypto.gyp:crypto',
35 '../google_apis/google_apis.gyp:google_apis',
37 '../third_party/webrtc/modules/modules.gyp:desktop_capture',
38 '../ui/events/events.gyp:dom4_keycode_converter',
41 'VERSION=<(version_full)',
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',
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',
73 'host/clipboard_mac.mm',
74 'host/clipboard_win.cc',
75 'host/clipboard_x11.cc',
76 'host/config_file_watcher.cc',
77 'host/config_file_watcher.h',
78 'host/config_watcher.h',
79 'host/constants_mac.cc',
80 'host/constants_mac.h',
81 'host/continue_window.cc',
82 'host/continue_window.h',
83 'host/continue_window_linux.cc',
84 'host/continue_window_mac.mm',
85 'host/continue_window_win.cc',
86 'host/daemon_process.cc',
87 'host/daemon_process.h',
88 'host/daemon_process_win.cc',
89 'host/desktop_environment.h',
90 'host/desktop_process.cc',
91 'host/desktop_process.h',
92 'host/desktop_resizer.h',
93 'host/desktop_resizer_linux.cc',
94 'host/desktop_session.cc',
95 'host/desktop_session.h',
96 'host/desktop_session_agent.cc',
97 'host/desktop_session_agent.h',
98 'host/desktop_session_win.cc',
99 'host/desktop_session_win.h',
100 'host/desktop_resizer_mac.cc',
101 'host/desktop_resizer_win.cc',
102 'host/desktop_session_connector.h',
103 'host/desktop_session_proxy.cc',
104 'host/desktop_session_proxy.h',
105 'host/desktop_shape_tracker.h',
106 'host/desktop_shape_tracker_mac.cc',
107 'host/desktop_shape_tracker_win.cc',
108 'host/desktop_shape_tracker_x11.cc',
109 'host/disconnect_window_linux.cc',
110 'host/disconnect_window_mac.h',
111 'host/disconnect_window_mac.mm',
112 'host/disconnect_window_win.cc',
113 'host/dns_blackhole_checker.cc',
114 'host/dns_blackhole_checker.h',
115 'host/heartbeat_sender.cc',
116 'host/heartbeat_sender.h',
117 'host/host_change_notification_listener.cc',
118 'host/host_change_notification_listener.h',
119 'host/host_config.cc',
120 'host/host_config.h',
121 'host/host_event_logger.h',
122 'host/host_event_logger_posix.cc',
123 'host/host_event_logger_win.cc',
124 'host/host_exit_codes.cc',
125 'host/host_exit_codes.h',
126 'host/host_export.h',
127 'host/host_secret.cc',
128 'host/host_secret.h',
129 'host/host_status_monitor.h',
130 'host/host_status_observer.h',
131 'host/host_status_sender.cc',
132 'host/host_status_sender.h',
133 'host/host_window.h',
134 'host/host_window_proxy.cc',
135 'host/host_window_proxy.h',
136 'host/in_memory_host_config.cc',
137 'host/in_memory_host_config.h',
138 'host/input_injector.h',
139 'host/input_injector_linux.cc',
140 'host/input_injector_mac.cc',
141 'host/input_injector_win.cc',
142 'host/ipc_audio_capturer.cc',
143 'host/ipc_audio_capturer.h',
144 'host/ipc_constants.cc',
145 'host/ipc_constants.h',
146 'host/ipc_desktop_environment.cc',
147 'host/ipc_desktop_environment.h',
148 'host/ipc_host_event_logger.cc',
149 'host/ipc_host_event_logger.h',
150 'host/ipc_input_injector.cc',
151 'host/ipc_input_injector.h',
152 'host/ipc_mouse_cursor_monitor.cc',
153 'host/ipc_mouse_cursor_monitor.h',
154 'host/ipc_screen_controls.cc',
155 'host/ipc_screen_controls.h',
157 'host/ipc_util_posix.cc',
158 'host/ipc_util_win.cc',
159 'host/ipc_video_frame_capturer.cc',
160 'host/ipc_video_frame_capturer.h',
161 'host/it2me_desktop_environment.cc',
162 'host/it2me_desktop_environment.h',
163 'host/json_host_config.cc',
164 'host/json_host_config.h',
165 'host/linux/audio_pipe_reader.cc',
166 'host/linux/audio_pipe_reader.h',
167 'host/linux/x11_util.cc',
168 'host/linux/x11_util.h',
169 'host/linux/x_server_clipboard.cc',
170 'host/linux/x_server_clipboard.h',
171 'host/local_input_monitor.h',
172 'host/local_input_monitor_linux.cc',
173 'host/local_input_monitor_mac.mm',
174 'host/local_input_monitor_win.cc',
175 'host/log_to_server.cc',
176 'host/log_to_server.h',
178 'host/logging_posix.cc',
179 'host/logging_win.cc',
180 'host/me2me_desktop_environment.cc',
181 'host/me2me_desktop_environment.h',
182 'host/mouse_clamping_filter.cc',
183 'host/mouse_clamping_filter.h',
184 'host/pairing_registry_delegate.cc',
185 'host/pairing_registry_delegate.h',
186 'host/pairing_registry_delegate_linux.cc',
187 'host/pairing_registry_delegate_linux.h',
188 'host/pairing_registry_delegate_mac.cc',
189 'host/pairing_registry_delegate_win.cc',
190 'host/pairing_registry_delegate_win.h',
191 'host/pam_authorization_factory_posix.cc',
192 'host/pam_authorization_factory_posix.h',
195 'host/policy_hack/policy_watcher.cc',
196 'host/policy_hack/policy_watcher.h',
197 'host/policy_hack/policy_watcher_linux.cc',
198 'host/policy_hack/policy_watcher_mac.mm',
199 'host/policy_hack/policy_watcher_win.cc',
200 'host/register_support_host_request.cc',
201 'host/register_support_host_request.h',
202 'host/remote_input_filter.cc',
203 'host/remote_input_filter.h',
204 'host/resizing_host_observer.cc',
205 'host/resizing_host_observer.h',
206 'host/sas_injector.h',
207 'host/sas_injector_win.cc',
208 'host/screen_controls.h',
209 'host/screen_resolution.cc',
210 'host/screen_resolution.h',
211 'host/server_log_entry.cc',
212 'host/server_log_entry.h',
213 'host/service_urls.cc',
214 'host/service_urls.h',
215 'host/session_manager_factory.cc',
216 'host/session_manager_factory.h',
217 'host/shaped_screen_capturer.cc',
218 'host/shaped_screen_capturer.h',
219 'host/signaling_connector.cc',
220 'host/signaling_connector.h',
221 'host/token_validator_factory_impl.cc',
222 'host/token_validator_factory_impl.h',
223 'host/usage_stats_consent.h',
224 'host/usage_stats_consent_mac.cc',
225 'host/usage_stats_consent_win.cc',
228 'host/video_scheduler.cc',
229 'host/video_scheduler.h',
230 'host/win/com_security.cc',
231 'host/win/com_security.h',
232 'host/win/launch_process_with_token.cc',
233 'host/win/launch_process_with_token.h',
236 'host/win/rdp_client.cc',
237 'host/win/rdp_client.h',
238 'host/win/rdp_client_window.cc',
239 'host/win/rdp_client_window.h',
240 'host/win/com_imported_mstscax.tlh',
241 'host/win/security_descriptor.cc',
242 'host/win/security_descriptor.h',
243 'host/win/session_desktop_environment.cc',
244 'host/win/session_desktop_environment.h',
245 'host/win/session_input_injector.cc',
246 'host/win/session_input_injector.h',
247 'host/win/window_station_and_desktop.cc',
248 'host/win/window_station_and_desktop.h',
249 'host/win/wts_terminal_monitor.cc',
250 'host/win/wts_terminal_monitor.h',
251 'host/win/wts_terminal_observer.h',
256 # Always use GTK on Linux, even for Aura builds.
257 '../build/linux/system.gyp:gtk',
273 '../third_party/google_toolbox_for_mac/google_toolbox_for_mac.gyp:google_toolbox_for_mac',
277 '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework',
284 '_ATL_NO_EXCEPTIONS',
285 'ISOLATION_AWARE_ENABLED=1',
288 '../sandbox/sandbox.gyp:sandbox',
289 'remoting_host_messages',
292 'VCCLCompilerTool': {
293 # /MP conflicts with #import directive so we limit the number
294 # of processes to spawn to 1.
295 'AdditionalOptions': ['/MP1'],
299 'output_dir': '<(SHARED_INTERMEDIATE_DIR)/remoting/host',
302 '<(output_dir)/remoting_host_messages.mc',
307 'direct_dependent_settings': {
313 # Rule to run the message compiler.
314 'rule_name': 'message_compiler',
316 'inputs': [ '<(RULE_INPUT_PATH)' ],
318 '<(output_dir)/<(RULE_INPUT_ROOT).h',
319 '<(output_dir)/<(RULE_INPUT_ROOT).rc',
323 '-h', '<(output_dir)',
324 '-r', '<(output_dir)/.',
326 '<(RULE_INPUT_PATH)',
328 'process_outputs_as_sources': 1,
329 'message': 'Running message compiler on <(RULE_INPUT_PATH)',
333 }, # end of target 'remoting_host'
336 'target_name': 'remoting_native_messaging_base',
337 'type': 'static_library',
338 'variables': { 'enable_wexit_time_destructors': 1, },
340 '../base/base.gyp:base',
343 'host/native_messaging/native_messaging_channel.cc',
344 'host/native_messaging/native_messaging_channel.h',
345 'host/native_messaging/native_messaging_reader.cc',
346 'host/native_messaging/native_messaging_reader.h',
347 'host/native_messaging/native_messaging_writer.cc',
348 'host/native_messaging/native_messaging_writer.h',
350 }, # end of target 'remoting_native_messaging_base'
353 'target_name': 'remoting_me2me_host_static',
354 'type': 'static_library',
355 'variables': { 'enable_wexit_time_destructors': 1, },
357 '../base/base.gyp:base',
358 '../base/base.gyp:base_i18n',
359 '../net/net.gyp:net',
360 '../third_party/webrtc/modules/modules.gyp:desktop_capture',
367 'VERSION=<(version_full)',
370 'host/curtain_mode.h',
371 'host/curtain_mode_linux.cc',
372 'host/curtain_mode_mac.cc',
373 'host/curtain_mode_win.cc',
374 'host/posix/signal_handler.cc',
375 'host/posix/signal_handler.h',
380 ['exclude', '^host/posix/'],
383 ], # end of 'conditions'
384 }, # end of target 'remoting_me2me_host_static'
387 'target_name': 'remoting_host_setup_base',
388 'type': 'static_library',
389 'variables': { 'enable_wexit_time_destructors': 1, },
391 '../base/base.gyp:base',
392 '../google_apis/google_apis.gyp:google_apis',
396 'VERSION=<(version_full)',
399 'host/setup/daemon_controller.cc',
400 'host/setup/daemon_controller.h',
401 'host/setup/daemon_controller_delegate_linux.cc',
402 'host/setup/daemon_controller_delegate_linux.h',
403 'host/setup/daemon_controller_delegate_mac.h',
404 'host/setup/daemon_controller_delegate_mac.mm',
405 'host/setup/daemon_controller_delegate_win.cc',
406 'host/setup/daemon_controller_delegate_win.h',
407 'host/setup/daemon_installer_win.cc',
408 'host/setup/daemon_installer_win.h',
409 'host/setup/me2me_native_messaging_host.cc',
410 'host/setup/me2me_native_messaging_host.h',
411 'host/setup/oauth_client.cc',
412 'host/setup/oauth_client.h',
413 'host/setup/oauth_helper.cc',
414 'host/setup/oauth_helper.h',
415 'host/setup/pin_validator.cc',
416 'host/setup/pin_validator.h',
417 'host/setup/service_client.cc',
418 'host/setup/service_client.h',
419 'host/setup/test_util.cc',
420 'host/setup/test_util.h',
421 'host/setup/win/auth_code_getter.cc',
422 'host/setup/win/auth_code_getter.h',
427 '../google_update/google_update.gyp:google_update',
430 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
431 'msvs_disabled_warnings': [4267, ],
434 }, # end of target 'remoting_host_setup_base'
437 'target_name': 'remoting_host_plugin',
438 'type': 'loadable_module',
439 'variables': { 'enable_wexit_time_destructors': 1, },
440 'product_extension': '<(host_plugin_extension)',
441 'product_prefix': '<(host_plugin_prefix)',
443 'HOST_PLUGIN_MIME_TYPE=<(host_plugin_mime_type)',
446 '../base/base.gyp:base_i18n',
447 '../net/net.gyp:net',
448 '../third_party/npapi/npapi.gyp:npapi',
451 'remoting_host_setup_base',
452 'remoting_infoplist_strings',
453 'remoting_it2me_host_static',
455 'remoting_resources',
458 'base/dispatch_win.h',
459 'host/plugin/host_log_handler.cc',
460 'host/plugin/host_log_handler.h',
461 'host/plugin/host_plugin.cc',
462 'host/plugin/host_plugin_utils.cc',
463 'host/plugin/host_plugin_utils.h',
464 'host/plugin/host_script_object.cc',
465 'host/plugin/host_script_object.h',
466 'host/win/core_resource.h',
472 'CHROMIUM_BUNDLE_ID': '<(mac_bundle_id)',
473 'INFOPLIST_FILE': 'host/plugin/host_plugin-Info.plist',
474 'INFOPLIST_PREPROCESS': 'YES',
475 # TODO(maruel): Use INFOPLIST_PREFIX_HEADER to remove the need to
476 # duplicate string once
477 # http://code.google.com/p/gyp/issues/detail?id=243 is fixed.
478 'INFOPLIST_PREPROCESSOR_DEFINITIONS': 'HOST_PLUGIN_MIME_TYPE="<(host_plugin_mime_type)" VERSION_FULL="<(version_full)" VERSION_SHORT="<(version_short)"',
480 # TODO(mark): Come up with a fancier way to do this. It should
481 # only be necessary to list host_plugin-Info.plist once, not the
482 # three times it is listed here.
483 'mac_bundle_resources': [
484 'host/disconnect_window.xib',
485 'host/plugin/host_plugin-Info.plist',
486 'resources/chromoting16.png',
487 'resources/chromoting48.png',
488 'resources/chromoting128.png',
489 '<!@pymod_do_main(remoting_copy_locales -o -p <(OS) -x <(PRODUCT_DIR) <(remoting_locales))',
491 # Localized strings for 'Info.plist'
492 '<!@pymod_do_main(remoting_localize --locale_output '
493 '"<(SHARED_INTERMEDIATE_DIR)/remoting/host_plugin-InfoPlist.strings/@{json_suffix}.lproj/InfoPlist.strings" '
494 '--print_only <(remoting_locales))',
496 'mac_bundle_resources!': [
497 'host/plugin/host_plugin-Info.plist',
500 ['mac_breakpad==1', {
502 # A real .dSYM is needed for dump_syms to operate on.
510 'BINARY=BINARY_HOST_PLUGIN',
511 'ISOLATION_AWARE_ENABLED=1',
515 'remoting_windows_resources',
518 '<(INTERMEDIATE_DIR)',
521 '<(SHARED_INTERMEDIATE_DIR)/remoting/core.rc',
522 '<(SHARED_INTERMEDIATE_DIR)/remoting/version.rc',
523 'host/plugin/host_plugin.def',
527 'EmbedManifest': 'true',
528 'AdditionalManifestFiles': [
529 'host/win/common-controls.manifest',
535 }, # end of target 'remoting_host_plugin'
537 'target_name': 'remoting_it2me_host_static',
538 'type': 'static_library',
539 'variables': { 'enable_wexit_time_destructors': 1, },
541 '../base/base.gyp:base_i18n',
542 '../net/net.gyp:net',
545 'remoting_infoplist_strings',
547 'remoting_resources',
550 'VERSION=<(version_full)',
553 'host/it2me/it2me_host.cc',
554 'host/it2me/it2me_host.h',
555 'host/it2me/it2me_native_messaging_host.cc',
556 'host/it2me/it2me_native_messaging_host.h',
558 }, # end of target 'remoting_it2me_host_static'
560 'target_name': 'remoting_it2me_native_messaging_host',
561 'type': 'executable',
562 'variables': { 'enable_wexit_time_destructors': 1, },
564 '../base/base.gyp:base',
567 'remoting_it2me_host_static',
568 'remoting_native_messaging_base',
572 'host/it2me/it2me_native_messaging_host_main.cc',
575 ['OS=="linux" and linux_use_tcmalloc==1', {
577 '../base/allocator/allocator.gyp:allocator',
581 }, # end of target 'remoting_it2me_native_messaging_host'
583 # Generates native messaging manifest files.
585 'target_name': 'remoting_native_messaging_manifests',
590 'me2me_host_path': 'remoting_host.exe',
591 'it2me_host_path': 'remoting_assistance_host.exe',
597 '/Library/PrivilegedHelperTools/org.chromium.chromoting.me2me_host.app/Contents/MacOS/native_messaging_host',
599 '/Library/PrivilegedHelperTools/org.chromium.chromoting.me2me_host.app/Contents/MacOS/remote_assistance_host',
602 [ 'OS != "mac" and OS != "win"', {
605 '/opt/google/chrome-remote-desktop/native-messaging-host',
607 '/opt/google/chrome-remote-desktop/remote-assistance-host',
612 'host/it2me/com.google.chrome.remote_assistance.json.jinja2',
613 'host/setup/com.google.chrome.remote_desktop.json.jinja2',
616 'rule_name': 'generate_manifest',
617 'extension': 'jinja2',
619 '<(remoting_localize_path)',
621 '<(RULE_INPUT_PATH)',
624 '<(PRODUCT_DIR)/remoting/<(RULE_INPUT_ROOT)',
627 'python', '<(remoting_localize_path)',
628 '--define', 'ME2ME_HOST_PATH=<(me2me_host_path)',
629 '--define', 'IT2ME_HOST_PATH=<(me2me_host_path)',
630 '--variables', '<(branding_path)',
631 '--template', '<(RULE_INPUT_PATH)',
632 '--locale_output', '<@(_outputs)',
636 }, # end of target 'remoting_native_messaging_manifests'
639 'target_name': 'remoting_infoplist_strings',
642 'remoting_resources',
645 'host/plugin/host_plugin-InfoPlist.strings.jinja2',
646 'host/remoting_me2me_host-InfoPlist.strings.jinja2',
647 'host/mac/me2me_preference_pane-InfoPlist.strings.jinja2',
648 'host/installer/mac/uninstaller/remoting_uninstaller-InfoPlist.strings.jinja2',
651 'rule_name': 'generate_strings',
652 'extension': 'jinja2',
654 '<(remoting_localize_path)',
655 '<(RULE_INPUT_PATH)',
658 '<!@pymod_do_main(remoting_localize --locale_output '
659 '"<(SHARED_INTERMEDIATE_DIR)/remoting/<(RULE_INPUT_ROOT)/@{json_suffix}.lproj/InfoPlist.strings" '
660 '--print_only <(remoting_locales))',
663 'python', '<(remoting_localize_path)',
664 '--locale_dir', '<(webapp_locale_dir)',
665 '--template', '<(RULE_INPUT_PATH)',
667 '<(SHARED_INTERMEDIATE_DIR)/remoting/<(RULE_INPUT_ROOT)/@{json_suffix}.lproj/InfoPlist.strings',
668 '<@(remoting_locales)',
671 }, # end of target 'remoting_infoplist_strings'
672 ], # end of 'targets'
673 }], # 'enable_remoting_host==1'
675 ['OS!="win" and enable_remoting_host==1', {
678 'target_name': 'remoting_me2me_host',
679 'type': 'executable',
680 'variables': { 'enable_wexit_time_destructors': 1, },
682 '../base/base.gyp:base',
683 '../base/base.gyp:base_i18n',
684 '<(icu_gyp_path):icudata',
685 '../net/net.gyp:net',
686 '../third_party/webrtc/modules/modules.gyp:desktop_capture',
690 'remoting_infoplist_strings',
691 'remoting_me2me_host_static',
695 'VERSION=<(version_full)',
700 'host/remoting_me2me_host.cc',
706 'host_bundle_id': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_HOST_BUNDLE_ID@")',
709 'INFOPLIST_FILE': 'host/remoting_me2me_host-Info.plist',
710 'INFOPLIST_PREPROCESS': 'YES',
711 'INFOPLIST_PREPROCESSOR_DEFINITIONS': 'VERSION_FULL="<(version_full)" VERSION_SHORT="<(version_short)" BUNDLE_ID="<(host_bundle_id)"',
713 'mac_bundle_resources': [
714 '<(PRODUCT_DIR)/icudtl.dat',
715 'host/disconnect_window.xib',
716 'host/remoting_me2me_host.icns',
717 'host/remoting_me2me_host-Info.plist',
718 '<!@pymod_do_main(remoting_copy_locales -o -p <(OS) -x <(PRODUCT_DIR) <(remoting_locales))',
720 # Localized strings for 'Info.plist'
721 '<!@pymod_do_main(remoting_localize --locale_output '
722 '"<(SHARED_INTERMEDIATE_DIR)/remoting/remoting_me2me_host-InfoPlist.strings/@{json_suffix}.lproj/InfoPlist.strings" '
723 '--print_only <(remoting_locales))',
725 'mac_bundle_resources!': [
726 'host/remoting_me2me_host-Info.plist',
729 ['mac_breakpad==1', {
731 # A real .dSYM is needed for dump_syms to operate on.
736 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Resources',
738 '<(PRODUCT_DIR)/crash_inspector',
739 '<(PRODUCT_DIR)/crash_report_sender.app'
744 '../breakpad/breakpad.gyp:dump_syms',
748 'postbuild_name': 'Dump Symbols',
750 'dump_product_syms_path':
751 'scripts/mac/dump_product_syms',
754 '<(dump_product_syms_path)',
757 }, # end of postbuild 'dump_symbols'
758 ], # end of 'postbuilds'
759 }], # mac_breakpad==1
762 ['OS=="linux" and linux_use_tcmalloc==1', {
764 '../base/allocator/allocator.gyp:allocator',
767 ], # end of 'conditions'
768 }, # end of target 'remoting_me2me_host'
770 'target_name': 'remoting_me2me_native_messaging_host',
771 'type': 'executable',
772 'product_name': 'remoting_native_messaging_host',
773 'variables': { 'enable_wexit_time_destructors': 1, },
775 '../base/base.gyp:base',
777 'remoting_host_setup_base',
778 'remoting_native_messaging_base',
781 'host/setup/me2me_native_messaging_host_main.cc',
784 ['OS=="linux" and linux_use_tcmalloc==1', {
786 '../base/allocator/allocator.gyp:allocator',
790 }, # end of target 'remoting_me2me_native_messaging_host'
791 ], # end of 'targets'
794 ], # end of 'conditions'