From a99efd42b449b113620729493f8ed759871cf936 Mon Sep 17 00:00:00 2001 From: "sergeyu@chromium.org" Date: Thu, 23 Jan 2014 09:27:33 +0000 Subject: Package It2Me Native Messaging host on Linux. BUG=309844 Review URL: https://codereview.chromium.org/130133003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@246545 0039d316-1c4b-4281-b951-d872f2087c98 --- remoting/branding_Chrome | 6 +- remoting/branding_Chromium | 6 +- remoting/host/installer/linux/Makefile | 33 ++- ...com.google.chrome.remote_assistance.json.jinja2 | 15 ++ .../com.google.chrome.remote_desktop.json.jinja2 | 15 ++ .../setup/me2me_native_messaging_manifest.json | 15 -- remoting/remoting.gyp | 250 ++++++++++----------- 7 files changed, 185 insertions(+), 155 deletions(-) create mode 100644 remoting/host/it2me/com.google.chrome.remote_assistance.json.jinja2 create mode 100644 remoting/host/setup/com.google.chrome.remote_desktop.json.jinja2 delete mode 100644 remoting/host/setup/me2me_native_messaging_manifest.json diff --git a/remoting/branding_Chrome b/remoting/branding_Chrome index eef334d..54bb024 100644 --- a/remoting/branding_Chrome +++ b/remoting/branding_Chrome @@ -1,10 +1,12 @@ APK_FILE_NAME=ChromeRemoteDesktop DAEMON_FILE_NAME=Chrome Remote Desktop Host Service HOST_PLUGIN_FILE_NAME=Chrome Remote Desktop Host +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_PREFPANE_BUNDLE_ID=com.google.chromeremotedesktop.preferences -MAC_UNINSTALLER_NAME=Chrome Remote Desktop Host Uninstaller -MAC_UNINSTALLER_BUNDLE_PREFIX=com.google.pkg 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 +ME2ME_HOST_DESCRIPTION=Chrome Remote Desktop Host diff --git a/remoting/branding_Chromium b/remoting/branding_Chromium index ce0559b..d72b36c 100644 --- a/remoting/branding_Chromium +++ b/remoting/branding_Chromium @@ -1,10 +1,12 @@ APK_FILE_NAME=Chromoting DAEMON_FILE_NAME=Chromoting Host Service HOST_PLUGIN_FILE_NAME=Chromoting Host +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_PREFPANE_BUNDLE_ID=org.chromium.remoting.preferences -MAC_UNINSTALLER_NAME=Chromoting Host Uninstaller -MAC_UNINSTALLER_BUNDLE_PREFIX=org.chromium.pkg MAC_UNINSTALLER_BUNDLE_ID=org.chromium.chromoting.me2me-host-uninstaller +MAC_UNINSTALLER_BUNDLE_PREFIX=org.chromium.pkg +MAC_UNINSTALLER_NAME=Chromoting Host Uninstaller +ME2ME_HOST_DESCRIPTION=Chromoting Host diff --git a/remoting/host/installer/linux/Makefile b/remoting/host/installer/linux/Makefile index dd45d26..fd56052 100644 --- a/remoting/host/installer/linux/Makefile +++ b/remoting/host/installer/linux/Makefile @@ -10,27 +10,34 @@ TOOLS = $(SRC)/remoting/tools RELEASE = $(SRC)/out/Release INSTALL_DIR = $(DESTDIR)/opt/google/chrome-remote-desktop -CHROME_MANIFEST_DIR = $(DESTDIR)/etc/opt/chrome/native-messaging-hosts +NATIVE_MESSAGING_DIR = $(DESTDIR)/etc/opt/chrome/native-messaging-hosts ME2ME_PROGNAME = $(RELEASE)/remoting_me2me_host ME2ME_DEBUGFILE = $(ME2ME_PROGNAME).debug START_PROGNAME = $(RELEASE)/remoting_start_host START_DEBUGFILE = $(START_PROGNAME).debug -NM_PROGNAME = $(RELEASE)/remoting_native_messaging_host -NM_DEBUGFILE = $(NM_PROGNAME).debug +ME2ME_NM_PROGNAME = $(RELEASE)/remoting_native_messaging_host +ME2ME_NM_DEBUGFILE = $(ME2ME_NM_PROGNAME).debug +REMOTE_ASSISTANCE_PROGNAME = $(RELEASE)/remoting_it2me_native_messaging_host +REMOTE_ASSISTANCE_DEBUGFILE = $(REMOTE_ASSISTANCE_PROGNAME).debug all: install: install -d "$(INSTALL_DIR)" - install -d "$(CHROME_MANIFEST_DIR)" + install -d "$(NATIVE_MESSAGING_DIR)" install "$(TOOLS)/me2me_virtual_host.py" \ "$(INSTALL_DIR)/chrome-remote-desktop" install "$(TOOLS)/is-remoting-session" "$(INSTALL_DIR)" - install "$(RELEASE)/remoting/com.google.chrome.remote_desktop.json" \ - -m 0644 "$(CHROME_MANIFEST_DIR)" + install -m 0644 \ + "$(RELEASE)/remoting/com.google.chrome.remote_desktop.json" \ + "$(NATIVE_MESSAGING_DIR)/com.google.chrome.remote_desktop.json" + + install -m 0644 \ + "$(RELEASE)/remoting/com.google.chrome.remote_assistance.json" \ + "$(NATIVE_MESSAGING_DIR)/com.google.chrome.remote_assistance.json" eu-strip -f "$(ME2ME_DEBUGFILE)" "$(ME2ME_PROGNAME)" install "$(ME2ME_PROGNAME)" \ @@ -39,5 +46,15 @@ install: eu-strip -f "$(START_DEBUGFILE)" "$(START_PROGNAME)" install "$(START_PROGNAME)" "$(INSTALL_DIR)/start-host" - eu-strip -f "$(NM_DEBUGFILE)" "$(NM_PROGNAME)" - install "$(NM_PROGNAME)" "$(INSTALL_DIR)/native-messaging-host" + eu-strip -f "$(ME2ME_NM_DEBUGFILE)" "$(ME2ME_NM_PROGNAME)" + install "$(ME2ME_NM_PROGNAME)" "$(INSTALL_DIR)/native-messaging-host" + + eu-strip -f "$(REMOTE_ASSISTANCE_DEBUGFILE)" \ + "$(REMOTE_ASSISTANCE_PROGNAME)" + install "$(REMOTE_ASSISTANCE_PROGNAME)" \ + "$(INSTALL_DIR)/remote-assistance-host" + + for locale in $(ls $(RELEASE)/remoting_locales); do \ + install "$(RELEASE)/remoting_locales/$locale \ + "$(INSTALL_DIR)/remoting_locales/$locale; \ + done diff --git a/remoting/host/it2me/com.google.chrome.remote_assistance.json.jinja2 b/remoting/host/it2me/com.google.chrome.remote_assistance.json.jinja2 new file mode 100644 index 0000000..aab034b --- /dev/null +++ b/remoting/host/it2me/com.google.chrome.remote_assistance.json.jinja2 @@ -0,0 +1,15 @@ +{ + "name": "com.google.chrome.remote_assistance", + "description": "{{ IT2ME_HOST_DESCRIPTION }}", + "type": "stdio", + "path": "{{ IT2ME_HOST_PATH }}", + "allowed_origins": [ + "chrome-extension://ljacajndfccfgnfohlgkdphmbnpkjflk/", + "chrome-extension://gbchcmhmhahfdphkhkmpfmihenigjmpp/", + "chrome-extension://kgngmbheleoaphbjbaiobfdepmghbfah/", + "chrome-extension://odkaodonbgfohohmklejpjiejmcipmib/", + "chrome-extension://ojoimpklfciegopdfgeenehpalipignm/", + "chrome-extension://dokpleeekgeeiehdhmdkeimnkmoifgdd/", + "chrome-extension://ajoainacpilcemgiakehflpbkbfipojk/" + ] +} diff --git a/remoting/host/setup/com.google.chrome.remote_desktop.json.jinja2 b/remoting/host/setup/com.google.chrome.remote_desktop.json.jinja2 new file mode 100644 index 0000000..12cc457 --- /dev/null +++ b/remoting/host/setup/com.google.chrome.remote_desktop.json.jinja2 @@ -0,0 +1,15 @@ +{ + "name": "com.google.chrome.remote_desktop", + "description": "{{ ME2ME_HOST_DESCRIPTION }}", + "type": "stdio", + "path": "{{ ME2ME_HOST_PATH }}", + "allowed_origins": [ + "chrome-extension://ljacajndfccfgnfohlgkdphmbnpkjflk/", + "chrome-extension://gbchcmhmhahfdphkhkmpfmihenigjmpp/", + "chrome-extension://kgngmbheleoaphbjbaiobfdepmghbfah/", + "chrome-extension://odkaodonbgfohohmklejpjiejmcipmib/", + "chrome-extension://ojoimpklfciegopdfgeenehpalipignm/", + "chrome-extension://dokpleeekgeeiehdhmdkeimnkmoifgdd/", + "chrome-extension://ajoainacpilcemgiakehflpbkbfipojk/" + ] +} diff --git a/remoting/host/setup/me2me_native_messaging_manifest.json b/remoting/host/setup/me2me_native_messaging_manifest.json deleted file mode 100644 index d0b2fb1..0000000 --- a/remoting/host/setup/me2me_native_messaging_manifest.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "name": "com.google.chrome.remote_desktop", - "description": "{% trans %}REMOTING_HOST_PLUGIN_NAME{% endtrans %}", - "type": "stdio", - "path": "{{ ME2ME_NATIVE_MESSAGING_HOST_PATH }}", - "allowed_origins": [ - "chrome-extension://ljacajndfccfgnfohlgkdphmbnpkjflk/", - "chrome-extension://gbchcmhmhahfdphkhkmpfmihenigjmpp/", - "chrome-extension://kgngmbheleoaphbjbaiobfdepmghbfah/", - "chrome-extension://odkaodonbgfohohmklejpjiejmcipmib/", - "chrome-extension://ojoimpklfciegopdfgeenehpalipignm/", - "chrome-extension://dokpleeekgeeiehdhmdkeimnkmoifgdd/", - "chrome-extension://ajoainacpilcemgiakehflpbkbfipojk/" - ] -} diff --git a/remoting/remoting.gyp b/remoting/remoting.gyp index 96533bf..51a2213 100644 --- a/remoting/remoting.gyp +++ b/remoting/remoting.gyp @@ -780,6 +780,62 @@ }], ], }, # end of target 'remoting_it2me_native_messaging_host' + + # Generates native messaging manifest files. + { + 'target_name': 'remoting_native_messaging_manifests', + 'type': 'none', + 'conditions': [ + [ 'OS == "win"', { + 'variables': { + 'me2me_host_path': 'remoting_host.exe', + 'it2me_host_path': 'remoting_assistance_host.exe', + }, + }], + [ 'OS == "mac"', { + 'variables': { + 'me2me_host_path': + '/Library/PrivilegedHelperTools/org.chromium.chromoting.me2me_host.app/Contents/MacOS/native_messaging_host', + 'it2me_host_path': + '/Library/PrivilegedHelperTools/org.chromium.chromoting.me2me_host.app/Contents/MacOS/remote_assistance_host', + }, + }], + [ 'OS != "mac" and OS != "win"', { + 'variables': { + 'me2me_host_path': + '/opt/google/chrome-remote-desktop/native-messaging-host', + 'it2me_host_path': + '/opt/google/chrome-remote-desktop/remote-assistance-host', + }, + }], + ], # conditions + 'sources': [ + 'host/it2me/com.google.chrome.remote_assistance.json.jinja2', + 'host/setup/com.google.chrome.remote_desktop.json.jinja2', + ], + 'rules': [{ + 'rule_name': 'generate_manifest', + 'extension': 'jinja2', + 'inputs': [ + '<(remoting_localize_path)', + '<(branding_path)', + '<(RULE_INPUT_PATH)', + ], + 'outputs': [ + '<(PRODUCT_DIR)/remoting/<(RULE_INPUT_ROOT)', + ], + 'action': [ + 'python', '<(remoting_localize_path)', + '--define', 'ME2ME_HOST_PATH=<(me2me_host_path)', + '--define', 'IT2ME_HOST_PATH=<(me2me_host_path)', + '--variables', '<(branding_path)', + '--template', '<(RULE_INPUT_PATH)', + '--locale_output', '<@(_outputs)', + 'en', + ], + }], + }, # end of target 'remoting_native_messaging_manifests' + { 'target_name': 'remoting_infoplist_strings', 'type': 'none', @@ -799,8 +855,7 @@ '--print_only <(remoting_locales))', ], 'action': [ - 'python', - '<(remoting_localize_path)', + 'python', '<(remoting_localize_path)', '--locale_dir', '<(webapp_locale_dir)', '--template', 'host/plugin/host_plugin-InfoPlist.strings.jinja2', '--locale_output', @@ -876,81 +931,79 @@ ], # end of 'targets' }], # 'enable_remoting_host==1' - ['OS!="win" and enable_remoting_host==1', { - 'conditions': [ - ['OS=="linux" and branding=="Chrome" and chromeos==0', { - 'variables': { - 'deb_cmd': 'host/installer/linux/build-deb.sh', - 'deb_filename': 'host/installer/