# 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. { 'variables': { 'chromium_code': 1, 'variables': { 'conditions': [ # Enable the multi-process host on Windows by default. ['OS=="win"', { 'remoting_multi_process%': 1, }, { 'remoting_multi_process%': 0, }], ], }, 'remoting_multi_process%': '<(remoting_multi_process)', 'remoting_rdp_session%': 1, 'remoting_localize_path': 'tools/build/remoting_localize.py', # The |major|, |build| and |patch| versions are inherited from Chrome. # Since Chrome's |minor| version is always '0', we replace it with a # Chromoting-specific patch version. # Note that we check both the |chrome_version_path| file and the # |remoting_version_path| so that we can override the Chrome version # numbers if needed. 'version_py_path': '../chrome/tools/build/version.py', 'remoting_version_path': '../remoting/VERSION', 'chrome_version_path': '../chrome/VERSION', 'version_major': ' <@(_outputs)', ], 'message': 'Generating <@(_outputs)', 'msvs_cygwin_shell': 0, }, ], }, # end of target 'remoting_lib_rc' # The only difference between |remoting_console.exe| and # |remoting_host.exe| is that the former is a console application. # |remoting_console.exe| is used for debugging purposes. { 'target_name': 'remoting_console', 'type': 'executable', 'variables': { 'enable_wexit_time_destructors': 1, }, 'defines': [ 'BINARY=BINARY_HOST_ME2ME', ], 'dependencies': [ 'remoting_core', 'remoting_version_resources', ], 'sources': [ '<(SHARED_INTERMEDIATE_DIR)/remoting/version.rc', 'host/win/entry_point.cc', ], 'msvs_settings': { 'VCManifestTool': { 'AdditionalManifestFiles': [ 'host/win/dpi_aware.manifest', ], }, 'VCLinkerTool': { 'EntryPointSymbol': 'HostEntryPoint', 'IgnoreAllDefaultLibraries': 'true', 'SubSystem': '1', # /SUBSYSTEM:CONSOLE }, }, }, # end of target 'remoting_console' { 'target_name': 'remoting_core', 'type': 'shared_library', 'variables': { 'enable_wexit_time_destructors': 1, }, 'defines' : [ '_ATL_APARTMENT_THREADED', '_ATL_CSTRING_EXPLICIT_CONSTRUCTORS', '_ATL_NO_AUTOMATIC_NAMESPACE', '_ATL_NO_EXCEPTIONS', 'BINARY=BINARY_CORE', 'DAEMON_CONTROLLER_CLSID="{<(daemon_controller_clsid)}"', 'RDP_DESKTOP_SESSION_CLSID="{<(rdp_desktop_session_clsid)}"', 'HOST_IMPLEMENTATION', 'ISOLATION_AWARE_ENABLED=1', 'STRICT', 'VERSION=<(version_full)', ], 'dependencies': [ '../base/base.gyp:base', '../base/base.gyp:base_static', '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', '../ipc/ipc.gyp:ipc', '../net/net.gyp:net', '../third_party/webrtc/modules/modules.gyp:desktop_capture', 'remoting_base', 'remoting_breakpad', 'remoting_core_resources', 'remoting_host', 'remoting_host_event_logger', 'remoting_host_logging', 'remoting_host_setup_base', 'remoting_lib_idl', 'remoting_lib_ps', 'remoting_lib_rc', 'remoting_me2me_host_static', 'remoting_native_messaging_base', 'remoting_protocol', 'remoting_version_resources', ], 'sources': [ '<(SHARED_INTERMEDIATE_DIR)/remoting/core.rc', '<(SHARED_INTERMEDIATE_DIR)/remoting/host/chromoting_lib.rc', '<(SHARED_INTERMEDIATE_DIR)/remoting/host/remoting_host_messages.rc', '<(SHARED_INTERMEDIATE_DIR)/remoting/version.rc', 'host/chromoting_messages.cc', 'host/chromoting_messages.h', 'host/config_file_watcher.cc', 'host/config_file_watcher.h', 'host/config_watcher.h', 'host/daemon_process.cc', 'host/daemon_process.h', 'host/daemon_process_win.cc', 'host/desktop_process.cc', 'host/desktop_process.h', 'host/desktop_process_main.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/host_exit_codes.h', 'host/host_exit_codes.cc', 'host/host_export.h', 'host/host_main.cc', 'host/host_main.h', 'host/ipc_constants.cc', 'host/ipc_constants.h', 'host/remoting_me2me_host.cc', 'host/sas_injector.h', 'host/sas_injector_win.cc', 'host/setup/me2me_native_messaging_host_main.cc', 'host/verify_config_window_win.cc', 'host/verify_config_window_win.h', 'host/win/chromoting_module.cc', 'host/win/chromoting_module.h', 'host/win/core.cc', 'host/win/core_resource.h', 'host/win/elevated_controller.cc', 'host/win/elevated_controller.h', 'host/win/host_service.cc', 'host/win/host_service.h', 'host/win/omaha.cc', 'host/win/omaha.h', 'host/win/rdp_desktop_session.cc', 'host/win/rdp_desktop_session.h', 'host/win/unprivileged_process_delegate.cc', 'host/win/unprivileged_process_delegate.h', 'host/win/worker_process_launcher.cc', 'host/win/worker_process_launcher.h', 'host/win/wts_session_process_delegate.cc', 'host/win/wts_session_process_delegate.h', 'host/worker_process_ipc_delegate.h', ], 'msvs_settings': { 'VCManifestTool': { 'EmbedManifest': 'true', 'AdditionalManifestFiles': [ 'host/win/common-controls.manifest', ], }, 'VCLinkerTool': { 'AdditionalDependencies': [ 'comctl32.lib', 'rpcns4.lib', 'rpcrt4.lib', 'uuid.lib', 'wtsapi32.lib', ], 'AdditionalOptions': [ # Export the proxy/stub entry points. Note that the generated # routines have 'Ps' prefix to avoid conflicts with our own # DllMain(). '/EXPORT:DllGetClassObject=PsDllGetClassObject,PRIVATE', '/EXPORT:DllCanUnloadNow=PsDllCanUnloadNow,PRIVATE', '/EXPORT:DllRegisterServer=PsDllRegisterServer,PRIVATE', '/EXPORT:DllUnregisterServer=PsDllUnregisterServer,PRIVATE', ], }, }, }, # end of target 'remoting_core' { 'target_name': 'remoting_core_resources', 'type': 'none', 'dependencies': [ 'remoting_resources', ], 'hard_dependency': 1, 'direct_dependent_settings': { 'include_dirs': [ '<(SHARED_INTERMEDIATE_DIR)', ], }, 'sources': [ 'host/win/core.rc.jinja2' ], 'rules': [ { 'rule_name': 'version', 'extension': 'jinja2', 'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/remoting/core.rc' ], 'action': [ 'python', '<(remoting_localize_path)', '--locale_dir', '<(webapp_locale_dir)', '--template', '<(RULE_INPUT_PATH)', '--output', '<@(_outputs)', '<@(remoting_locales)', ], 'message': 'Localizing the dialogs and strings' }, ], }, # end of target 'remoting_core_resources' { 'target_name': 'remoting_desktop', 'type': 'executable', 'variables': { 'enable_wexit_time_destructors': 1, }, 'defines': [ 'BINARY=BINARY_DESKTOP', ], 'dependencies': [ 'remoting_core', 'remoting_version_resources', ], 'sources': [ '<(SHARED_INTERMEDIATE_DIR)/remoting/version.rc', 'host/win/entry_point.cc', ], 'msvs_settings': { 'VCManifestTool': { 'AdditionalManifestFiles': [ 'host/win/dpi_aware.manifest', ], }, 'VCLinkerTool': { 'EnableUAC': 'true', # Add 'level="requireAdministrator" uiAccess="true"' to # the manifest only for the official builds because it requires # the binary to be signed to work. 'conditions': [ ['buildtype == "Official"', { 'UACExecutionLevel': 2, 'UACUIAccess': 'true', }], ], 'EntryPointSymbol': 'HostEntryPoint', 'IgnoreAllDefaultLibraries': 'true', 'SubSystem': '2', # /SUBSYSTEM:WINDOWS }, }, }, # end of target 'remoting_desktop' { 'target_name': 'remoting_host_exe', 'product_name': 'remoting_host', 'type': 'executable', 'variables': { 'enable_wexit_time_destructors': 1, }, 'defines': [ 'BINARY=BINARY_HOST_ME2ME', ], 'dependencies': [ 'remoting_core', 'remoting_version_resources', ], 'sources': [ '<(SHARED_INTERMEDIATE_DIR)/remoting/version.rc', 'host/win/entry_point.cc', ], 'msvs_settings': { 'VCManifestTool': { 'AdditionalManifestFiles': [ 'host/win/dpi_aware.manifest', ], }, 'VCLinkerTool': { 'EntryPointSymbol': 'HostEntryPoint', 'IgnoreAllDefaultLibraries': 'true', 'ImportLibrary': '$(OutDir)\\lib\\remoting_host_exe.lib', 'OutputFile': '$(OutDir)\\remoting_host.exe', 'SubSystem': '2', # /SUBSYSTEM:WINDOWS }, }, }, # end of target 'remoting_host_exe' { 'target_name': 'remoting_host_messages', 'type': 'none', 'dependencies': [ 'remoting_resources', ], 'hard_dependency': 1, 'direct_dependent_settings': { 'include_dirs': [ '<(SHARED_INTERMEDIATE_DIR)', ], }, 'sources': [ 'host/win/host_messages.mc.jinja2' ], 'rules': [ { 'rule_name': 'localize', 'extension': 'jinja2', 'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/remoting/host/remoting_host_messages.mc', ], 'action': [ 'python', '<(remoting_localize_path)', '--locale_dir', '<(webapp_locale_dir)', '--template', '<(RULE_INPUT_PATH)', '--output', '<@(_outputs)', '<@(remoting_locales)', ], 'message': 'Localizing the event log messages' }, ], }, # end of target 'remoting_host_messages' # Generates localized the version information resources for the Windows # binaries. # The substitution strings are taken from: # - build/util/LASTCHANGE - the last source code revision. # - chrome/VERSION - the major, build & patch versions. # - remoting/VERSION - the chromoting patch version (and overrides # for chrome/VERSION). # - translated webapp strings { 'target_name': 'remoting_version_resources', 'type': 'none', 'dependencies': [ 'remoting_resources', ], 'hard_dependency': 1, 'direct_dependent_settings': { 'include_dirs': [ '<(SHARED_INTERMEDIATE_DIR)', ], }, 'sources': [ 'host/win/version.rc.jinja2' ], 'rules': [ { 'rule_name': 'version', 'extension': 'jinja2', 'variables': { 'lastchange_path': '<(DEPTH)/build/util/LASTCHANGE', }, 'inputs': [ '<(chrome_version_path)', '<(lastchange_path)', '<(remoting_version_path)', ], 'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/remoting/version.rc', ], 'action': [ 'python', '<(remoting_localize_path)', '--variables', '<(chrome_version_path)', # |remoting_version_path| must be after |chrome_version_path| # because it can contain overrides for the version numbers. '--variables', '<(remoting_version_path)', '--variables', '<(lastchange_path)', '--locale_dir', '<(webapp_locale_dir)', '--template', '<(RULE_INPUT_PATH)', '--output', '<@(_outputs)', '<@(remoting_locales)', ], 'message': 'Localizing the version information' }, ], }, # end of target 'remoting_version_resources' ], # end of 'targets' }], # 'OS=="win"' ['OS=="android"', { 'targets': [ { 'target_name': 'remoting_jni_headers', 'type': 'none', 'sources': [ 'android/java/src/org/chromium/chromoting/jni/JniInterface.java', ], 'variables': { 'jni_gen_package': 'remoting', }, 'includes': [ '../build/jni_generator.gypi' ], }, # end of target 'remoting_jni_headers' { 'target_name': 'remoting_client_jni', 'type': 'shared_library', 'dependencies': [ 'remoting_base', 'remoting_client', 'remoting_jingle_glue', 'remoting_jni_headers', 'remoting_protocol', '../google_apis/google_apis.gyp:google_apis', ], 'include_dirs': [ '<(SHARED_INTERMEDIATE_DIR)/remoting', ], 'sources': [ 'client/jni/android_keymap.cc', 'client/jni/android_keymap.h', 'client/jni/chromoting_jni_instance.cc', 'client/jni/chromoting_jni_instance.h', 'client/jni/chromoting_jni_onload.cc', 'client/jni/chromoting_jni_runtime.cc', 'client/jni/chromoting_jni_runtime.h', 'client/jni/jni_frame_consumer.cc', 'client/jni/jni_frame_consumer.h', ], }, # end of target 'remoting_client_jni' { 'target_name': 'remoting_android_resources', 'type': 'none', 'copies': [ { 'destination': '<(SHARED_INTERMEDIATE_DIR)/remoting/android/res/drawable', 'files': [ 'resources/chromoting128.png', 'resources/icon_host.png', ], }, { 'destination': '<(SHARED_INTERMEDIATE_DIR)/remoting/android/res/layout', 'files': [ 'resources/layout/main.xml', 'resources/layout/host.xml', 'resources/layout/pin_dialog.xml', ], }, { 'destination': '<(SHARED_INTERMEDIATE_DIR)/remoting/android/res/menu', 'files': [ 'resources/menu/chromoting_actionbar.xml', 'resources/menu/desktop_actionbar.xml', ], }, { 'destination': '<(SHARED_INTERMEDIATE_DIR)/remoting/android/res/values', 'files': [ 'resources/strings.xml', 'resources/styles.xml', ], }, ], }, # end of target 'remoting_android_resources' { 'target_name': 'remoting_apk', 'type': 'none', 'dependencies': [ 'remoting_client_jni', 'remoting_android_resources', ], 'variables': { 'apk_name': 'Chromoting', 'android_app_version_name': '<(version_full)', 'android_app_version_code': '