diff options
Diffstat (limited to 'remoting')
18 files changed, 297 insertions, 40 deletions
diff --git a/remoting/branding_Chrome b/remoting/branding_Chrome index 478d7f3..83f3d8e 100644 --- a/remoting/branding_Chrome +++ b/remoting/branding_Chrome @@ -6,7 +6,13 @@ IT2ME_HOST_DESCRIPTION=Remote Assistance Host for Chrome Remote Desktop MAC_BUNDLE_ID=com.google.Chrome MAC_CREATOR=rimZ MAC_HOST_BUNDLE_ID=com.google.chromeremotedesktop.me2me-host +MAC_HOST_BUNDLE_NAME=ChromeRemoteDesktopHost.bundle +MAC_NATIVE_MESSAGING_HOST_BUNDLE_ID=com.google.chrome.remote_desktop.native-messaging-host +MAC_NATIVE_MESSAGING_HOST_BUNDLE_NAME=NativeMessagingHost.bundle MAC_PREFPANE_BUNDLE_ID=com.google.chromeremotedesktop.preferences +MAC_PREFPANE_BUNDLE_NAME=ChromeRemoteDesktop.prefPane +MAC_REMOTE_ASSISTANCE_HOST_BUNDLE_ID=com.google.chrome.remote_desktop.remote-assistance-host +MAC_REMOTE_ASSISTANCE_HOST_BUNDLE_NAME=RemoteAssistanceHost.bundle MAC_UNINSTALLER_BUNDLE_ID=com.google.chromeremotedesktop.me2me-host-uninstaller MAC_UNINSTALLER_BUNDLE_PREFIX=com.google.pkg MAC_UNINSTALLER_NAME=Chrome Remote Desktop Host Uninstaller diff --git a/remoting/branding_Chromium b/remoting/branding_Chromium index dc945e2..8be8b75 100644 --- a/remoting/branding_Chromium +++ b/remoting/branding_Chromium @@ -6,7 +6,13 @@ IT2ME_HOST_DESCRIPTION=Remote Assistance Host for Chromoting MAC_BUNDLE_ID=org.chromium.Chromium MAC_CREATOR=Cr24 MAC_HOST_BUNDLE_ID=org.chromium.chromoting.me2me-host +MAC_HOST_BUNDLE_NAME=ChromotingHost.bundle +MAC_NATIVE_MESSAGING_HOST_BUNDLE_ID=org.chromium.chromoting.native-messaging-host +MAC_NATIVE_MESSAGING_HOST_BUNDLE_NAME=NativeMessagingHost.bundle MAC_PREFPANE_BUNDLE_ID=org.chromium.remoting.preferences +MAC_PREFPANE_BUNDLE_NAME=Chromoting.prefPane +MAC_REMOTE_ASSISTANCE_HOST_BUNDLE_ID=org.chromium.chromoting.remote-assistance-host +MAC_REMOTE_ASSISTANCE_HOST_NAME=RemoteAssistanceHost.bundle MAC_UNINSTALLER_BUNDLE_ID=org.chromium.chromoting.me2me-host-uninstaller MAC_UNINSTALLER_BUNDLE_PREFIX=org.chromium.pkg MAC_UNINSTALLER_NAME=Chromoting Host Uninstaller diff --git a/remoting/host/constants_mac.cc b/remoting/host/constants_mac.cc index 7491414..2d98723 100644 --- a/remoting/host/constants_mac.cc +++ b/remoting/host/constants_mac.cc @@ -7,6 +7,8 @@ namespace remoting { #define SERVICE_NAME "org.chromium.chromoting" +#define PREFPANE_BUNDLE_NAME "ChromeRemoteDesktop.prefPane" +#define HOST_BUNDLE_NAME "ChromeRemoteDesktopHost.bundle" #define APPLICATIONS_DIR "/Applications/" #define HELPER_TOOLS_DIR "/Library/PrivilegedHelperTools/" @@ -17,14 +19,14 @@ namespace remoting { const char kServiceName[] = SERVICE_NAME; -const char kPrefPaneFileName[] = SERVICE_NAME ".prefPane"; -const char kPrefPaneFilePath[] = PREFERENCE_PANES_DIR SERVICE_NAME ".prefPane"; +const char kPrefPaneFileName[] = PREFPANE_BUNDLE_NAME; +const char kPrefPaneFilePath[] = PREFERENCE_PANES_DIR PREFPANE_BUNDLE_NAME; const char kHostConfigFileName[] = SERVICE_NAME ".json"; const char kHostConfigFilePath[] = HELPER_TOOLS_DIR SERVICE_NAME ".json"; const char kHostHelperScriptPath[] = HELPER_TOOLS_DIR SERVICE_NAME ".me2me.sh"; -const char kHostBinaryPath[] = HELPER_TOOLS_DIR SERVICE_NAME ".me2me_host.app"; +const char kHostBinaryPath[] = HELPER_TOOLS_DIR HOST_BUNDLE_NAME; const char kHostEnabledPath[] = HELPER_TOOLS_DIR SERVICE_NAME ".me2me_enabled"; const char kServicePlistPath[] = LAUNCH_AGENTS_DIR SERVICE_NAME ".plist"; diff --git a/remoting/host/installer/linux/Makefile b/remoting/host/installer/linux/Makefile index ee29505..f136621 100644 --- a/remoting/host/installer/linux/Makefile +++ b/remoting/host/installer/linux/Makefile @@ -16,9 +16,9 @@ ME2ME_PROGNAME = $(BUILD_DIR)/remoting_me2me_host ME2ME_DEBUGFILE = $(ME2ME_PROGNAME).debug START_PROGNAME = $(BUILD_DIR)/remoting_start_host START_DEBUGFILE = $(START_PROGNAME).debug -ME2ME_NM_PROGNAME = $(BUILD_DIR)/remoting_native_messaging_host +ME2ME_NM_PROGNAME = $(BUILD_DIR)/native_messaging_host ME2ME_NM_DEBUGFILE = $(ME2ME_NM_PROGNAME).debug -REMOTE_ASSISTANCE_PROGNAME = $(BUILD_DIR)/remoting_it2me_native_messaging_host +REMOTE_ASSISTANCE_PROGNAME = $(BUILD_DIR)/remote_assistance_host REMOTE_ASSISTANCE_DEBUGFILE = $(REMOTE_ASSISTANCE_PROGNAME).debug all: diff --git a/remoting/host/installer/mac/ChromotingHostService.pkgproj b/remoting/host/installer/mac/ChromotingHostService.pkgproj index 4da41aa..06fec05 100644 --- a/remoting/host/installer/mac/ChromotingHostService.pkgproj +++ b/remoting/host/installer/mac/ChromotingHostService.pkgproj @@ -321,7 +321,7 @@ <key>GID</key> <integer>0</integer> <key>PATH</key> - <string>PreferencePanes/org.chromium.chromoting.prefPane</string> + <string>PreferencePanes/@@PREFPANE_BUNDLE_NAME@@</string> <key>PATH_TYPE</key> <integer>1</integer> <key>PERMISSIONS</key> @@ -404,7 +404,7 @@ <key>GID</key> <integer>0</integer> <key>PATH</key> - <string>PrivilegedHelperTools/org.chromium.chromoting.me2me_host.app</string> + <string>PrivilegedHelperTools/@@HOST_BUNDLE_NAME@@</string> <key>PATH_TYPE</key> <integer>1</integer> <key>PERMISSIONS</key> diff --git a/remoting/host/installer/mac/PrivilegedHelperTools/org.chromium.chromoting.me2me.sh b/remoting/host/installer/mac/PrivilegedHelperTools/org.chromium.chromoting.me2me.sh index bc3ceec..24a229e 100755 --- a/remoting/host/installer/mac/PrivilegedHelperTools/org.chromium.chromoting.me2me.sh +++ b/remoting/host/installer/mac/PrivilegedHelperTools/org.chromium.chromoting.me2me.sh @@ -7,12 +7,14 @@ # Version = @@VERSION@@ NAME=org.chromium.chromoting +HOST_BUNDLE_NAME=ChromeRemoteDesktopHost.bundle +PREFPANE_BUNDLE_NAME=ChromeRemoteDesktop.prefPane CONFIG_DIR=/Library/PrivilegedHelperTools -HOST_EXE=$CONFIG_DIR/$NAME.me2me_host.app/Contents/MacOS/remoting_me2me_host -PLIST_FILE=$CONFIG_DIR/$NAME.me2me_host.app/Contents/Info.plist ENABLED_FILE=$CONFIG_DIR/$NAME.me2me_enabled CONFIG_FILE=$CONFIG_DIR/$NAME.json -PREF_PANE_BUNDLE=/Library/PreferencePanes/$NAME.prefPane +HOST_EXE=$CONFIG_DIR/$HOST_BUNDLE_NAME/Contents/MacOS/remoting_me2me_host +PLIST_FILE=$CONFIG_DIR/$HOST_BUNDLE_NAME/Contents/Info.plist +PREF_PANE_BUNDLE=/Library/PreferencePanes/$PREFPANE_BUNDLE_NAME # The exit code returned by 'wait' when a process is terminated by SIGTERM. SIGTERM_EXIT_CODE=143 diff --git a/remoting/host/installer/mac/do_signing.props b/remoting/host/installer/mac/do_signing.props index ac6b07c..d5ecce8 100644 --- a/remoting/host/installer/mac/do_signing.props +++ b/remoting/host/installer/mac/do_signing.props @@ -1,4 +1,8 @@ -HOST_UNINSTALLER_NAME=@@HOST_UNINSTALLER_NAME@@ -HOST_PKG=@@HOST_PKG@@ -DMG_VOLUME_NAME=@@DMG_VOLUME_NAME@@ DMG_FILE_NAME=@@DMG_FILE_NAME@@ +DMG_VOLUME_NAME=@@DMG_VOLUME_NAME@@ +HOST_BUNDLE_NAME=@@HOST_BUNDLE_NAME@@ +HOST_PKG=@@HOST_PKG@@ +HOST_UNINSTALLER_NAME=@@HOST_UNINSTALLER_NAME@@ +NATIVE_MESSAGING_HOST_BUNDLE_NAME=@@NATIVE_MESSAGING_HOST_BUNDLE_NAME@@ +PREFPANE_BUNDLE_NAME=@@PREFPANE_BUNDLE_NAME@@ +REMOTE_ASSISTANCE_HOST_BUNDLE_NAME=@@REMOTE_ASSISTANCE_HOST_BUNDLE_NAME@@ diff --git a/remoting/host/installer/mac/do_signing.sh b/remoting/host/installer/mac/do_signing.sh index ef9b85d..2e756f9 100755 --- a/remoting/host/installer/mac/do_signing.sh +++ b/remoting/host/installer/mac/do_signing.sh @@ -30,26 +30,36 @@ setup() { # Individually load the properties for this build. Don't 'source' the file # to guard against code accidentally being added to the props file. - HOST_UNINSTALLER_NAME=$(read_property "HOST_UNINSTALLER_NAME") - HOST_PKG=$(read_property "HOST_PKG") DMG_VOLUME_NAME=$(read_property "DMG_VOLUME_NAME") DMG_FILE_NAME=$(read_property "DMG_FILE_NAME") + HOST_BUNDLE_NAME=$(read_property "HOST_BUNDLE_NAME") + HOST_PKG=$(read_property "HOST_PKG") + HOST_UNINSTALLER_NAME=$(read_property "HOST_UNINSTALLER_NAME") + NATIVE_MESSAGING_HOST_BUNDLE_NAME=$(read_property\ + "NATIVE_MESSAGING_HOST_BUNDLE_NAME") + PREFPANE_BUNDLE_NAME=$(read_property "PREFPANE_BUNDLE_NAME") + REMOTE_ASSISTANCE_HOST_BUNDLE_NAME=$(read_property\ + "REMOTE_ASSISTANCE_HOST_BUNDLE_NAME") # Binaries to sign. - ME2ME_HOST='PrivilegedHelperTools/org.chromium.chromoting.me2me_host.app' - ME2ME_NM_HOST="${ME2ME_HOST}/Contents/MacOS/native_messaging_host" - IT2ME_NM_HOST="${ME2ME_HOST}/Contents/MacOS/remote_assistance_host" + ME2ME_HOST="PrivilegedHelperTools/${HOST_BUNDLE_NAME}" + ME2ME_NM_HOST="PrivilegedHelperTools/${HOST_BUNDLE_NAME}/Contents/MacOS/"` + `"${NATIVE_MESSAGING_HOST_BUNDLE_NAME}/Contents/MacOS/"` + `"native_messaging_host" + IT2ME_NM_HOST="PrivilegedHelperTools/${HOST_BUNDLE_NAME}/Contents/MacOS/"` + `"${REMOTE_ASSISTANCE_HOST_BUNDLE_NAME}/Contents/MacOS/"` + `"remote_assistance_host" UNINSTALLER="Applications/${HOST_UNINSTALLER_NAME}.app" - PREFPANE='PreferencePanes/org.chromium.chromoting.prefPane' + PREFPANE="PreferencePanes/${PREFPANE_BUNDLE_NAME}" # The Chromoting Host installer is a meta-package that consists of 3 # components: # * Chromoting Host Service package # * Chromoting Host Uninstaller package # * Keystone package (GoogleSoftwareUpdate - for Official builds only) - PKGPROJ_HOST='ChromotingHost.pkgproj' - PKGPROJ_HOST_SERVICE='ChromotingHostService.pkgproj' - PKGPROJ_HOST_UNINSTALLER='ChromotingHostUninstaller.pkgproj' + PKGPROJ_HOST="ChromotingHost.pkgproj" + PKGPROJ_HOST_SERVICE="ChromotingHostService.pkgproj" + PKGPROJ_HOST_UNINSTALLER="ChromotingHostUninstaller.pkgproj" # Final (user-visible) pkg name. PKG_FINAL="${HOST_PKG}.pkg" @@ -93,7 +103,7 @@ shell_safe_path() { read_property() { local property="${1}" local filename="${PROPS_FILENAME}" - echo `grep "${property}" "${filename}" | tail -n 1 | cut -d "=" -f2-` + echo `grep "\<${property}\>=" "${filename}" | tail -n 1 | cut -d "=" -f2-` } verify_clean_dir() { diff --git a/remoting/host/it2me/remote_assistance_host-Info.plist b/remoting/host/it2me/remote_assistance_host-Info.plist new file mode 100644 index 0000000..f7149131 --- /dev/null +++ b/remoting/host/it2me/remote_assistance_host-Info.plist @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>CFBundleDevelopmentRegion</key> + <string>English</string> + <key>CFBundleExecutable</key> + <string>${EXECUTABLE_NAME}</string> + <key>CFBundleIconFile</key> + <string>remote_assistance_host</string> + <key>CFBundleIdentifier</key> + <string>BUNDLE_ID</string> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundleName</key> + <string>remote_assistance_host</string> + <key>CFBundlePackageType</key> + <string>APPL</string> + <key>CFBundleSignature</key> + <string>????</string> + <key>CFBundleVersion</key> + <string>VERSION_FULL</string> + <key>CFBundleShortVersionString</key> + <string>VERSION_SHORT</string> + <key>LSMinimumSystemVersion</key> + <string>${MACOSX_DEPLOYMENT_TARGET}.0</string> + <key>NSPrincipalClass</key> + <string>CrApplication</string> + <key>LSUIElement</key> + <string>1</string> + <key>BreakpadProduct</key> + <string>Chromoting_Mac</string> + <key>BreakpadVersion</key> + <string>VERSION_FULL</string> +</dict> +</plist> diff --git a/remoting/host/it2me/remote_assistance_host-InfoPlist.strings.jinja2 b/remoting/host/it2me/remote_assistance_host-InfoPlist.strings.jinja2 new file mode 100644 index 0000000..4a650d8 --- /dev/null +++ b/remoting/host/it2me/remote_assistance_host-InfoPlist.strings.jinja2 @@ -0,0 +1 @@ +NSHumanReadableCopyright = "{% trans %}COPYRIGHT{% endtrans %}"; diff --git a/remoting/host/setup/me2me_native_messaging_host_main.cc b/remoting/host/setup/me2me_native_messaging_host_main.cc index 59f198b..5e0e0e2 100644 --- a/remoting/host/setup/me2me_native_messaging_host_main.cc +++ b/remoting/host/setup/me2me_native_messaging_host_main.cc @@ -10,10 +10,16 @@ #include "base/run_loop.h" #include "base/strings/string_number_conversions.h" #include "net/url_request/url_fetcher.h" +#include "remoting/base/breakpad.h" #include "remoting/host/host_exit_codes.h" #include "remoting/host/logging.h" #include "remoting/host/pairing_registry_delegate.h" #include "remoting/host/setup/me2me_native_messaging_host.h" +#include "remoting/host/usage_stats_consent.h" + +#if defined(OS_MACOSX) +#include "base/mac/scoped_nsautorelease_pool.h" +#endif // defined(OS_MACOSX) #if defined(OS_WIN) #include "base/win/registry.h" @@ -54,6 +60,20 @@ bool IsProcessElevated() { #endif // defined(OS_WIN) int StartMe2MeNativeMessagingHost() { +#if defined(OS_MACOSX) + // Needed so we don't leak objects when threads are created. + base::mac::ScopedNSAutoreleasePool pool; +#endif // defined(OS_MACOSX) + +#if defined(REMOTING_ENABLE_BREAKPAD) + // Initialize Breakpad as early as possible. On Mac the command-line needs to + // be initialized first, so that the preference for crash-reporting can be + // looked up in the config file. + if (IsUsageStatsAllowed()) { + InitializeCrashReporting(); + } +#endif // defined(REMOTING_ENABLE_BREAKPAD) + // Mac OS X requires that the main thread be a UI message loop in order to // receive distributed notifications from the System Preferences pane. An // IO thread is needed for the pairing registry and URL context getter. diff --git a/remoting/host/setup/native_messaging_host-Info.plist b/remoting/host/setup/native_messaging_host-Info.plist new file mode 100644 index 0000000..fe01256 --- /dev/null +++ b/remoting/host/setup/native_messaging_host-Info.plist @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>CFBundleDevelopmentRegion</key> + <string>English</string> + <key>CFBundleExecutable</key> + <string>${EXECUTABLE_NAME}</string> + <key>CFBundleIconFile</key> + <string>native_messaging_host</string> + <key>CFBundleIdentifier</key> + <string>BUNDLE_ID</string> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundleName</key> + <string>native_messaging_host</string> + <key>CFBundlePackageType</key> + <string>APPL</string> + <key>CFBundleSignature</key> + <string>????</string> + <key>CFBundleVersion</key> + <string>VERSION_FULL</string> + <key>CFBundleShortVersionString</key> + <string>VERSION_SHORT</string> + <key>LSMinimumSystemVersion</key> + <string>${MACOSX_DEPLOYMENT_TARGET}.0</string> + <key>NSPrincipalClass</key> + <string>CrApplication</string> + <key>LSUIElement</key> + <string>1</string> + <key>BreakpadProduct</key> + <string>Chromoting_Mac</string> + <key>BreakpadVersion</key> + <string>VERSION_FULL</string> +</dict> +</plist> diff --git a/remoting/host/setup/native_messaging_host-InfoPlist.strings.jinja2 b/remoting/host/setup/native_messaging_host-InfoPlist.strings.jinja2 new file mode 100644 index 0000000..4a650d8 --- /dev/null +++ b/remoting/host/setup/native_messaging_host-InfoPlist.strings.jinja2 @@ -0,0 +1 @@ +NSHumanReadableCopyright = "{% trans %}COPYRIGHT{% endtrans %}"; diff --git a/remoting/remoting_host.gypi b/remoting/remoting_host.gypi index 88f3daf..5add1d4 100644 --- a/remoting/remoting_host.gypi +++ b/remoting/remoting_host.gypi @@ -576,10 +576,13 @@ }], [ 'OS == "mac"', { 'variables': { + 'me2me_host_bundle_name': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_HOST_BUNDLE_NAME@")', + 'native_messaging_host_bundle_name': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_NATIVE_MESSAGING_HOST_BUNDLE_NAME@")', + 'remote_assistance_host_bundle_name': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_REMOTE_ASSISTANCE_HOST_BUNDLE_NAME@")', 'me2me_host_path': - '/Library/PrivilegedHelperTools/org.chromium.chromoting.me2me_host.app/Contents/MacOS/native_messaging_host', + '/Library/PrivilegedHelperTools/<(me2me_host_bundle_name)/Contents/MacOS/<(native_messaging_host_bundle_name)/Contents/MacOS/native_messaging_host', 'it2me_host_path': - '/Library/PrivilegedHelperTools/org.chromium.chromoting.me2me_host.app/Contents/MacOS/remote_assistance_host', + '/Library/PrivilegedHelperTools/<(me2me_host_bundle_name)/Contents/MacOS/<(remote_assistance_host_bundle_name)/Contents/MacOS/remote_assistance_host', }, }], [ 'OS != "mac" and OS != "win"', { @@ -628,6 +631,8 @@ 'host/remoting_me2me_host-InfoPlist.strings.jinja2', 'host/mac/me2me_preference_pane-InfoPlist.strings.jinja2', 'host/installer/mac/uninstaller/remoting_uninstaller-InfoPlist.strings.jinja2', + 'host/setup/native_messaging_host-InfoPlist.strings.jinja2', + 'host/it2me/remote_assistance_host-InfoPlist.strings.jinja2', ], 'rules': [{ 'rule_name': 'generate_strings', @@ -751,14 +756,19 @@ { 'target_name': 'remoting_me2me_native_messaging_host', 'type': 'executable', - 'product_name': 'remoting_native_messaging_host', + 'product_name': 'native_messaging_host', 'variables': { 'enable_wexit_time_destructors': 1, }, 'dependencies': [ '../base/base.gyp:base', + 'remoting_breakpad', 'remoting_host', 'remoting_host_setup_base', + 'remoting_infoplist_strings', 'remoting_native_messaging_base', ], + 'defines': [ + 'VERSION=<(version_full)', + ], 'sources': [ 'host/setup/me2me_native_messaging_host.cc', 'host/setup/me2me_native_messaging_host.h', @@ -773,11 +783,68 @@ '../base/allocator/allocator.gyp:allocator', ], }], + ['OS=="mac"', { + 'mac_bundle': 1, + 'variables': { + 'host_bundle_id': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_NATIVE_MESSAGING_HOST_BUNDLE_ID@")', + }, + 'xcode_settings': { + 'INFOPLIST_FILE': 'host/setup/native_messaging_host-Info.plist', + 'INFOPLIST_PREPROCESS': 'YES', + 'INFOPLIST_PREPROCESSOR_DEFINITIONS': 'VERSION_FULL="<(version_full)" VERSION_SHORT="<(version_short)" BUNDLE_ID="<(host_bundle_id)"', + }, + 'mac_bundle_resources': [ + 'host/setup/native_messaging_host-Info.plist', + '<!@pymod_do_main(remoting_copy_locales -o -p <(OS) -x <(PRODUCT_DIR) <(remoting_locales))', + + # Localized strings for 'Info.plist' + '<!@pymod_do_main(remoting_localize --locale_output ' + '"<(SHARED_INTERMEDIATE_DIR)/remoting/native_messaging_host-InfoPlist.strings/@{json_suffix}.lproj/InfoPlist.strings" ' + '--print_only <(remoting_locales))', + ], + 'mac_bundle_resources!': [ + 'host/setup/native_messaging_host-Info.plist', + ], + 'conditions': [ + ['mac_breakpad==1', { + 'variables': { + # A real .dSYM is needed for dump_syms to operate on. + 'mac_real_dsym': 1, + }, + 'copies': [ + { + 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Resources', + 'files': [ + '<(PRODUCT_DIR)/crash_inspector', + '<(PRODUCT_DIR)/crash_report_sender.app' + ], + }, + ], + 'dependencies': [ + '../breakpad/breakpad.gyp:dump_syms', + ], + 'postbuilds': [ + { + 'postbuild_name': 'Dump Symbols', + 'variables': { + 'dump_product_syms_path': + 'scripts/mac/dump_product_syms', + }, + 'action': [ + '<(dump_product_syms_path)', + '<(version_full)', + ], + }, # end of postbuild 'dump_symbols' + ], # end of 'postbuilds' + }], # mac_breakpad==1 + ], # conditions + }], # OS=mac ], }, # end of target 'remoting_me2me_native_messaging_host' { 'target_name': 'remoting_it2me_native_messaging_host', 'type': 'executable', + 'product_name': 'remote_assistance_host', 'variables': { 'enable_wexit_time_destructors': 1, }, 'dependencies': [ '../base/base.gyp:base', @@ -788,6 +855,9 @@ 'remoting_native_messaging_base', 'remoting_protocol', ], + 'defines': [ + 'VERSION=<(version_full)', + ], 'sources': [ 'host/it2me/it2me_native_messaging_host_entry_point.cc', 'host/it2me/it2me_native_messaging_host_main.cc', @@ -806,6 +876,63 @@ '../base/allocator/allocator.gyp:allocator', ], }], + ['OS=="mac"', { + 'mac_bundle': 1, + 'variables': { + 'host_bundle_id': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_REMOTE_ASSISTANCE_HOST_BUNDLE_ID@")', + }, + 'xcode_settings': { + 'INFOPLIST_FILE': 'host/it2me/remote_assistance_host-Info.plist', + 'INFOPLIST_PREPROCESS': 'YES', + 'INFOPLIST_PREPROCESSOR_DEFINITIONS': 'VERSION_FULL="<(version_full)" VERSION_SHORT="<(version_short)" BUNDLE_ID="<(host_bundle_id)"', + }, + 'mac_bundle_resources': [ + '<(PRODUCT_DIR)/icudtl.dat', + 'host/it2me/remote_assistance_host-Info.plist', + '<!@pymod_do_main(remoting_copy_locales -o -p <(OS) -x <(PRODUCT_DIR) <(remoting_locales))', + + # Localized strings for 'Info.plist' + '<!@pymod_do_main(remoting_localize --locale_output ' + '"<(SHARED_INTERMEDIATE_DIR)/remoting/remote_assistance_host-InfoPlist.strings/@{json_suffix}.lproj/InfoPlist.strings" ' + '--print_only <(remoting_locales))', + ], + 'mac_bundle_resources!': [ + 'host/it2me/remote_assistance_host-Info.plist', + ], + 'conditions': [ + ['mac_breakpad==1', { + 'variables': { + # A real .dSYM is needed for dump_syms to operate on. + 'mac_real_dsym': 1, + }, + 'copies': [ + { + 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Resources', + 'files': [ + '<(PRODUCT_DIR)/crash_inspector', + '<(PRODUCT_DIR)/crash_report_sender.app' + ], + }, + ], + 'dependencies': [ + '../breakpad/breakpad.gyp:dump_syms', + ], + 'postbuilds': [ + { + 'postbuild_name': 'Dump Symbols', + 'variables': { + 'dump_product_syms_path': + 'scripts/mac/dump_product_syms', + }, + 'action': [ + '<(dump_product_syms_path)', + '<(version_full)', + ], + }, # end of postbuild 'dump_symbols' + ], # end of 'postbuilds' + }], # mac_breakpad==1 + ], # conditions + }], # OS=mac ], }, # end of target 'remoting_it2me_native_messaging_host' ], # end of 'targets' diff --git a/remoting/remoting_host_linux.gypi b/remoting/remoting_host_linux.gypi index e27faf8..770e764 100644 --- a/remoting/remoting_host_linux.gypi +++ b/remoting/remoting_host_linux.gypi @@ -13,7 +13,8 @@ '<!(echo <(deb_filename) | sed -e "s/.deb$/.changes/")', '<(PRODUCT_DIR)/remoting_me2me_host.debug', '<(PRODUCT_DIR)/remoting_start_host.debug', - '<(PRODUCT_DIR)/remoting_native_messaging_host.debug', + '<(PRODUCT_DIR)/native_messaging_host.debug', + '<(PRODUCT_DIR)/remote_assistance_host.debug', ] }, 'targets': [ diff --git a/remoting/remoting_host_mac.gypi b/remoting/remoting_host_mac.gypi index 79a93bb..61d4a8c 100644 --- a/remoting/remoting_host_mac.gypi +++ b/remoting/remoting_host_mac.gypi @@ -86,6 +86,10 @@ 'host_service_name': '<!(python <(version_py_path) -f <(branding_path) -t "@DAEMON_FILE_NAME@")', 'host_uninstaller_name': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_UNINSTALLER_NAME@")', 'bundle_prefix': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_UNINSTALLER_BUNDLE_PREFIX@")', + 'me2me_host_bundle_name': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_HOST_BUNDLE_NAME@")', + 'prefpane_bundle_name': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_PREFPANE_BUNDLE_NAME@")', + 'native_messaging_host_bundle_name': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_NATIVE_MESSAGING_HOST_BUNDLE_NAME@")', + 'remote_assistance_host_bundle_name': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_REMOTE_ASSISTANCE_HOST_BUNDLE_NAME@")', }, 'actions': [ { @@ -100,20 +104,17 @@ 'generated_files': [ '<(PRODUCT_DIR)/remoting_host_prefpane.prefPane', '<(PRODUCT_DIR)/remoting_me2me_host.app', - '<(PRODUCT_DIR)/remoting_native_messaging_host', - '<(PRODUCT_DIR)/remoting_it2me_native_messaging_host', + '<(PRODUCT_DIR)/native_messaging_host.app', + '<(PRODUCT_DIR)/remote_assistance_host.app', '<(PRODUCT_DIR)/remoting_host_uninstaller.app', '<(PRODUCT_DIR)/remoting/com.google.chrome.remote_desktop.json', '<(PRODUCT_DIR)/remoting/com.google.chrome.remote_assistance.json', ], 'generated_files_dst': [ - 'PreferencePanes/org.chromium.chromoting.prefPane', - - # TODO(sergeyu): Rename org.chromium.chromoting.me2me_host. e.g. - # to com.google.chrome.remote-desktop . - 'PrivilegedHelperTools/org.chromium.chromoting.me2me_host.app', - 'PrivilegedHelperTools/org.chromium.chromoting.me2me_host.app/Contents/MacOS/native_messaging_host', - 'PrivilegedHelperTools/org.chromium.chromoting.me2me_host.app/Contents/MacOS/remote_assistance_host', + 'PreferencePanes/<(prefpane_bundle_name)', + 'PrivilegedHelperTools/<(me2me_host_bundle_name)', + 'PrivilegedHelperTools/<(me2me_host_bundle_name)/Contents/MacOS/<(native_messaging_host_bundle_name)', + 'PrivilegedHelperTools/<(me2me_host_bundle_name)/Contents/MacOS/<(remote_assistance_host_bundle_name)', 'Applications/<(host_uninstaller_name).app', 'Config/com.google.chrome.remote_desktop.json', 'Config/com.google.chrome.remote_assistance.json', @@ -127,6 +128,7 @@ 'VERSION_MAJOR=<(version_major)', 'VERSION_MINOR=<(version_minor)', 'HOST_NAME=<(host_name)', + 'HOST_BUNDLE_NAME=<(me2me_host_bundle_name)', 'HOST_SERVICE_NAME=<(host_service_name)', 'HOST_UNINSTALLER_NAME=<(host_uninstaller_name)', 'HOST_PKG=<(host_name)', @@ -137,6 +139,9 @@ 'BUNDLE_ID_HOST_UNINSTALLER=<(bundle_prefix).<(host_uninstaller_name_nospace)', 'DMG_VOLUME_NAME=<(host_name) <(version_full)', 'DMG_FILE_NAME=<!(echo <(host_name) | sed "s/ //g")-<(version_full)', + 'NATIVE_MESSAGING_HOST_BUNDLE_NAME=<(native_messaging_host_bundle_name)', + 'REMOTE_ASSISTANCE_HOST_BUNDLE_NAME=<(remote_assistance_host_bundle_name)', + 'PREFPANE_BUNDLE_NAME=<(prefpane_bundle_name)', ], 'inputs': [ 'host/installer/build-installer-archive.py', diff --git a/remoting/tools/get_mac_crd_version.sh b/remoting/tools/get_mac_crd_version.sh index dbddb9c..89661c1 100755 --- a/remoting/tools/get_mac_crd_version.sh +++ b/remoting/tools/get_mac_crd_version.sh @@ -4,10 +4,10 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -ME2ME_HOST="/Library/PrivilegedHelperTools/org.chromium.chromoting.me2me_host.app" +ME2ME_HOST="/Library/PrivilegedHelperTools/ChromeRemoteDesktopHost.bundle" UNINSTALLER_CHROME="/Applications/Chrome Remote Desktop Host Uninstaller.app" UNINSTALLER_CHROMIUM="/Applications/Chromoting Host Uninstaller.app" -PREFPANE="/Library/PreferencePanes/org.chromium.chromoting.prefPane" +PREFPANE="/Library/PreferencePanes/ChromeRemoteDesktop.prefPane" KEYSTONE="/Library/Google/GoogleSoftwareUpdate/GoogleSoftwareUpdate.bundle" INFO_PLIST="Contents/Info.plist" diff --git a/remoting/tools/register_local_nm_hosts.sh b/remoting/tools/register_local_nm_hosts.sh index b59bf21..8a0b253 100755 --- a/remoting/tools/register_local_nm_hosts.sh +++ b/remoting/tools/register_local_nm_hosts.sh @@ -34,12 +34,12 @@ register_hosts() { install_manifest \ "${SRC_DIR}/remoting/host/setup/${ME2ME_HOST_NAME}.json.jinja2" \ - "${build_dir}/remoting_native_messaging_host" \ + "${build_dir}/native_messaging_host" \ ME2ME_HOST_PATH "${chrome_data_dir}" install_manifest \ "${SRC_DIR}/remoting/host/it2me/${IT2ME_HOST_NAME}.json.jinja2" \ - "${build_dir}/remoting_it2me_native_messaging_host" \ + "${build_dir}/remote_assistance_host" \ IT2ME_HOST_PATH "${chrome_data_dir}" } |