# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. { 'includes': [ 'remoting_host_linux.gypi', 'remoting_host_mac.gypi', 'remoting_host_win.gypi', ], 'variables': { 'conditions': [ # Remoting host is supported only on Windows, OSX and Linux (with X11). ['OS=="win" or OS=="mac" or (OS=="linux" and chromeos==0 and use_x11==1)', { 'enable_remoting_host': 1, }, { 'enable_remoting_host': 0, }], ], }, 'conditions': [ ['enable_remoting_host==1', { 'targets': [ { 'target_name': 'remoting_host', 'type': 'static_library', 'variables': { 'enable_wexit_time_destructors': 1, }, 'dependencies': [ 'remoting_base', 'remoting_protocol', 'remoting_resources', '../crypto/crypto.gyp:crypto', '../google_apis/google_apis.gyp:google_apis', '../ipc/ipc.gyp:ipc', '../third_party/webrtc/modules/modules.gyp:desktop_capture', '../ui/events/events.gyp:dom4_keycode_converter', ], 'defines': [ 'VERSION=<(version_full)', ], 'sources': [ 'host/audio_capturer.cc', 'host/audio_capturer.h', 'host/audio_capturer_linux.cc', 'host/audio_capturer_linux.h', 'host/audio_capturer_mac.cc', 'host/audio_capturer_win.cc', 'host/audio_capturer_win.h', 'host/audio_scheduler.cc', 'host/audio_scheduler.h', 'host/audio_silence_detector.cc', 'host/audio_silence_detector.h', 'host/basic_desktop_environment.cc', 'host/basic_desktop_environment.h', 'host/branding.cc', 'host/branding.h', 'host/capture_scheduler.cc', 'host/capture_scheduler.h', 'host/chromoting_host.cc', 'host/chromoting_host.h', 'host/chromoting_host_context.cc', 'host/chromoting_host_context.h', 'host/chromoting_messages.cc', 'host/chromoting_messages.h', 'host/chromoting_param_traits.cc', 'host/chromoting_param_traits.h', 'host/client_session.cc', 'host/client_session.h', 'host/client_session_control.h', 'host/clipboard.h', 'host/clipboard_mac.mm', 'host/clipboard_win.cc', 'host/clipboard_x11.cc', 'host/config_file_watcher.cc', 'host/config_file_watcher.h', 'host/config_watcher.h', 'host/constants_mac.cc', 'host/constants_mac.h', 'host/continue_window.cc', 'host/continue_window.h', 'host/continue_window_linux.cc', 'host/continue_window_mac.mm', 'host/continue_window_win.cc', 'host/daemon_process.cc', 'host/daemon_process.h', 'host/daemon_process_win.cc', 'host/desktop_environment.h', 'host/desktop_process.cc', 'host/desktop_process.h', 'host/desktop_resizer.h', 'host/desktop_resizer_linux.cc', 'host/desktop_session.cc', 'host/desktop_session.h', 'host/desktop_session_agent.cc', 'host/desktop_session_agent.h', 'host/desktop_session_win.cc', 'host/desktop_session_win.h', 'host/desktop_resizer_mac.cc', 'host/desktop_resizer_win.cc', 'host/desktop_session_connector.h', 'host/desktop_session_proxy.cc', 'host/desktop_session_proxy.h', 'host/desktop_shape_tracker.h', 'host/desktop_shape_tracker_mac.cc', 'host/desktop_shape_tracker_win.cc', 'host/desktop_shape_tracker_x11.cc', 'host/disconnect_window_linux.cc', 'host/disconnect_window_mac.h', 'host/disconnect_window_mac.mm', 'host/disconnect_window_win.cc', 'host/dns_blackhole_checker.cc', 'host/dns_blackhole_checker.h', 'host/heartbeat_sender.cc', 'host/heartbeat_sender.h', 'host/host_change_notification_listener.cc', 'host/host_change_notification_listener.h', 'host/host_config.cc', 'host/host_config.h', 'host/host_event_logger.h', 'host/host_event_logger_posix.cc', 'host/host_event_logger_win.cc', 'host/host_exit_codes.cc', 'host/host_exit_codes.h', 'host/host_export.h', 'host/host_secret.cc', 'host/host_secret.h', 'host/host_status_monitor.h', 'host/host_status_observer.h', 'host/host_status_sender.cc', 'host/host_status_sender.h', 'host/host_window.h', 'host/host_window_proxy.cc', 'host/host_window_proxy.h', 'host/in_memory_host_config.cc', 'host/in_memory_host_config.h', 'host/input_injector.h', 'host/input_injector_linux.cc', 'host/input_injector_mac.cc', 'host/input_injector_win.cc', 'host/ipc_audio_capturer.cc', 'host/ipc_audio_capturer.h', 'host/ipc_constants.cc', 'host/ipc_constants.h', 'host/ipc_desktop_environment.cc', 'host/ipc_desktop_environment.h', 'host/ipc_host_event_logger.cc', 'host/ipc_host_event_logger.h', 'host/ipc_input_injector.cc', 'host/ipc_input_injector.h', 'host/ipc_screen_controls.cc', 'host/ipc_screen_controls.h', 'host/ipc_util.h', 'host/ipc_util_posix.cc', 'host/ipc_util_win.cc', 'host/ipc_video_frame_capturer.cc', 'host/ipc_video_frame_capturer.h', 'host/it2me_desktop_environment.cc', 'host/it2me_desktop_environment.h', 'host/json_host_config.cc', 'host/json_host_config.h', 'host/linux/audio_pipe_reader.cc', 'host/linux/audio_pipe_reader.h', 'host/linux/x11_util.cc', 'host/linux/x11_util.h', 'host/linux/x_server_clipboard.cc', 'host/linux/x_server_clipboard.h', 'host/local_input_monitor.h', 'host/local_input_monitor_linux.cc', 'host/local_input_monitor_mac.mm', 'host/local_input_monitor_win.cc', 'host/log_to_server.cc', 'host/log_to_server.h', 'host/logging.h', 'host/logging_posix.cc', 'host/logging_win.cc', 'host/me2me_desktop_environment.cc', 'host/me2me_desktop_environment.h', 'host/mouse_clamping_filter.cc', 'host/mouse_clamping_filter.h', 'host/pairing_registry_delegate.cc', 'host/pairing_registry_delegate.h', 'host/pairing_registry_delegate_linux.cc', 'host/pairing_registry_delegate_linux.h', 'host/pairing_registry_delegate_mac.cc', 'host/pairing_registry_delegate_win.cc', 'host/pairing_registry_delegate_win.h', 'host/pam_authorization_factory_posix.cc', 'host/pam_authorization_factory_posix.h', 'host/pin_hash.cc', 'host/pin_hash.h', 'host/policy_hack/policy_watcher.cc', 'host/policy_hack/policy_watcher.h', 'host/policy_hack/policy_watcher_linux.cc', 'host/policy_hack/policy_watcher_mac.mm', 'host/policy_hack/policy_watcher_win.cc', 'host/register_support_host_request.cc', 'host/register_support_host_request.h', 'host/remote_input_filter.cc', 'host/remote_input_filter.h', 'host/resizing_host_observer.cc', 'host/resizing_host_observer.h', 'host/sas_injector.h', 'host/sas_injector_win.cc', 'host/screen_controls.h', 'host/screen_resolution.cc', 'host/screen_resolution.h', 'host/server_log_entry.cc', 'host/server_log_entry.h', 'host/service_urls.cc', 'host/service_urls.h', 'host/session_manager_factory.cc', 'host/session_manager_factory.h', 'host/shaped_screen_capturer.cc', 'host/shaped_screen_capturer.h', 'host/signaling_connector.cc', 'host/signaling_connector.h', 'host/token_validator_factory_impl.cc', 'host/token_validator_factory_impl.h', 'host/usage_stats_consent.h', 'host/usage_stats_consent_mac.cc', 'host/usage_stats_consent_win.cc', 'host/username.cc', 'host/username.h', 'host/video_scheduler.cc', 'host/video_scheduler.h', 'host/win/com_security.cc', 'host/win/com_security.h', 'host/win/launch_process_with_token.cc', 'host/win/launch_process_with_token.h', 'host/win/omaha.cc', 'host/win/omaha.h', 'host/win/rdp_client.cc', 'host/win/rdp_client.h', 'host/win/rdp_client_window.cc', 'host/win/rdp_client_window.h', 'host/win/com_imported_mstscax.tlh', 'host/win/security_descriptor.cc', 'host/win/security_descriptor.h', 'host/win/session_desktop_environment.cc', 'host/win/session_desktop_environment.h', 'host/win/session_input_injector.cc', 'host/win/session_input_injector.h', 'host/win/window_station_and_desktop.cc', 'host/win/window_station_and_desktop.h', 'host/win/wts_terminal_monitor.cc', 'host/win/wts_terminal_monitor.h', 'host/win/wts_terminal_observer.h', ], 'conditions': [ ['OS=="linux"', { 'dependencies': [ # Always use GTK on Linux, even for Aura builds. '../build/linux/system.gyp:gtk', ], 'link_settings': { 'libraries': [ '-lX11', '-lXext', '-lXfixes', '-lXtst', '-lXi', '-lXrandr', '-lpam', ], }, }], ['OS=="mac"', { 'dependencies': [ '../third_party/google_toolbox_for_mac/google_toolbox_for_mac.gyp:google_toolbox_for_mac', ], 'link_settings': { 'libraries': [ '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework', 'libpam.a', ], }, }], ['OS=="win"', { 'defines': [ '_ATL_NO_EXCEPTIONS', 'ISOLATION_AWARE_ENABLED=1', ], 'dependencies': [ '../sandbox/sandbox.gyp:sandbox', 'remoting_host_messages', ], 'msvs_settings': { 'VCCLCompilerTool': { # /MP conflicts with #import directive so we limit the number # of processes to spawn to 1. 'AdditionalOptions': ['/MP1'], }, }, 'variables': { 'output_dir': '<(SHARED_INTERMEDIATE_DIR)/remoting/host', }, 'sources': [ '<(output_dir)/remoting_host_messages.mc', ], 'include_dirs': [ '<(output_dir)', ], 'direct_dependent_settings': { 'include_dirs': [ '<(output_dir)', ], }, 'rules': [{ # Rule to run the message compiler. 'rule_name': 'message_compiler', 'extension': 'mc', 'inputs': [ '<(RULE_INPUT_PATH)' ], 'outputs': [ '<(output_dir)/<(RULE_INPUT_ROOT).h', '<(output_dir)/<(RULE_INPUT_ROOT).rc', ], 'action': [ 'mc.exe', '-h', '<(output_dir)', '-r', '<(output_dir)/.', '-u', '<(RULE_INPUT_PATH)', ], 'process_outputs_as_sources': 1, 'message': 'Running message compiler on <(RULE_INPUT_PATH)', }], }], ], }, # end of target 'remoting_host' { 'target_name': 'remoting_native_messaging_base', 'type': 'static_library', 'variables': { 'enable_wexit_time_destructors': 1, }, 'dependencies': [ '../base/base.gyp:base', ], 'sources': [ 'host/native_messaging/native_messaging_channel.cc', 'host/native_messaging/native_messaging_channel.h', 'host/native_messaging/native_messaging_reader.cc', 'host/native_messaging/native_messaging_reader.h', 'host/native_messaging/native_messaging_writer.cc', 'host/native_messaging/native_messaging_writer.h', ], }, # end of target 'remoting_native_messaging_base' { 'target_name': 'remoting_me2me_host_static', 'type': 'static_library', 'variables': { 'enable_wexit_time_destructors': 1, }, 'dependencies': [ '../base/base.gyp:base', '../base/base.gyp:base_i18n', '../net/net.gyp:net', '../third_party/webrtc/modules/modules.gyp:desktop_capture', 'remoting_base', 'remoting_breakpad', 'remoting_host', 'remoting_protocol', ], 'defines': [ 'VERSION=<(version_full)', ], 'sources': [ 'host/curtain_mode.h', 'host/curtain_mode_linux.cc', 'host/curtain_mode_mac.cc', 'host/curtain_mode_win.cc', 'host/posix/signal_handler.cc', 'host/posix/signal_handler.h', ], 'conditions': [ ['os_posix != 1', { 'sources/': [ ['exclude', '^host/posix/'], ], }], ], # end of 'conditions' }, # end of target 'remoting_me2me_host_static' { 'target_name': 'remoting_host_setup_base', 'type': 'static_library', 'variables': { 'enable_wexit_time_destructors': 1, }, 'dependencies': [ '../base/base.gyp:base', '../google_apis/google_apis.gyp:google_apis', 'remoting_host', ], 'defines': [ 'VERSION=<(version_full)', ], 'sources': [ 'host/setup/daemon_controller.cc', 'host/setup/daemon_controller.h', 'host/setup/daemon_controller_delegate_linux.cc', 'host/setup/daemon_controller_delegate_linux.h', 'host/setup/daemon_controller_delegate_mac.h', 'host/setup/daemon_controller_delegate_mac.mm', 'host/setup/daemon_controller_delegate_win.cc', 'host/setup/daemon_controller_delegate_win.h', 'host/setup/daemon_installer_win.cc', 'host/setup/daemon_installer_win.h', 'host/setup/me2me_native_messaging_host.cc', 'host/setup/me2me_native_messaging_host.h', 'host/setup/oauth_client.cc', 'host/setup/oauth_client.h', 'host/setup/oauth_helper.cc', 'host/setup/oauth_helper.h', 'host/setup/pin_validator.cc', 'host/setup/pin_validator.h', 'host/setup/service_client.cc', 'host/setup/service_client.h', 'host/setup/test_util.cc', 'host/setup/test_util.h', 'host/setup/win/auth_code_getter.cc', 'host/setup/win/auth_code_getter.h', ], 'conditions': [ ['OS=="win"', { 'dependencies': [ '../google_update/google_update.gyp:google_update', 'remoting_lib_idl', ], # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. 'msvs_disabled_warnings': [4267, ], }], ], }, # end of target 'remoting_host_setup_base' { 'target_name': 'remoting_host_plugin', 'type': 'loadable_module', 'variables': { 'enable_wexit_time_destructors': 1, }, 'product_extension': '<(host_plugin_extension)', 'product_prefix': '<(host_plugin_prefix)', 'defines': [ 'HOST_PLUGIN_MIME_TYPE=<(host_plugin_mime_type)', ], 'dependencies': [ '../base/base.gyp:base_i18n', '../net/net.gyp:net', '../third_party/npapi/npapi.gyp:npapi', 'remoting_base', 'remoting_host', 'remoting_host_setup_base', 'remoting_infoplist_strings', 'remoting_it2me_host_static', 'remoting_protocol', 'remoting_resources', ], 'sources': [ 'base/dispatch_win.h', 'host/plugin/host_log_handler.cc', 'host/plugin/host_log_handler.h', 'host/plugin/host_plugin.cc', 'host/plugin/host_plugin_utils.cc', 'host/plugin/host_plugin_utils.h', 'host/plugin/host_script_object.cc', 'host/plugin/host_script_object.h', 'host/win/core_resource.h', ], 'conditions': [ ['OS=="mac"', { 'mac_bundle': 1, 'xcode_settings': { 'CHROMIUM_BUNDLE_ID': '<(mac_bundle_id)', 'INFOPLIST_FILE': 'host/plugin/host_plugin-Info.plist', 'INFOPLIST_PREPROCESS': 'YES', # TODO(maruel): Use INFOPLIST_PREFIX_HEADER to remove the need to # duplicate string once # http://code.google.com/p/gyp/issues/detail?id=243 is fixed. 'INFOPLIST_PREPROCESSOR_DEFINITIONS': 'HOST_PLUGIN_MIME_TYPE="<(host_plugin_mime_type)" VERSION_FULL="<(version_full)" VERSION_SHORT="<(version_short)"', }, # TODO(mark): Come up with a fancier way to do this. It should # only be necessary to list host_plugin-Info.plist once, not the # three times it is listed here. 'mac_bundle_resources': [ 'host/disconnect_window.xib', 'host/plugin/host_plugin-Info.plist', 'resources/chromoting16.png', 'resources/chromoting48.png', 'resources/chromoting128.png', '