diff options
author | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-23 09:27:33 +0000 |
---|---|---|
committer | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-23 09:27:33 +0000 |
commit | a99efd42b449b113620729493f8ed759871cf936 (patch) | |
tree | 26e22569b50b339503b5e1a26f3c22ee1028656b | |
parent | 02abfeea10fa049bf9cd10fd951dd4c840312d38 (diff) | |
download | chromium_src-a99efd42b449b113620729493f8ed759871cf936.zip chromium_src-a99efd42b449b113620729493f8ed759871cf936.tar.gz chromium_src-a99efd42b449b113620729493f8ed759871cf936.tar.bz2 |
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
-rw-r--r-- | remoting/branding_Chrome | 6 | ||||
-rw-r--r-- | remoting/branding_Chromium | 6 | ||||
-rw-r--r-- | remoting/host/installer/linux/Makefile | 33 | ||||
-rw-r--r-- | remoting/host/it2me/com.google.chrome.remote_assistance.json.jinja2 | 15 | ||||
-rw-r--r-- | remoting/host/setup/com.google.chrome.remote_desktop.json.jinja2 (renamed from remoting/host/setup/me2me_native_messaging_manifest.json) | 4 | ||||
-rw-r--r-- | remoting/remoting.gyp | 250 |
6 files changed, 172 insertions, 142 deletions
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/me2me_native_messaging_manifest.json b/remoting/host/setup/com.google.chrome.remote_desktop.json.jinja2 index d0b2fb1..12cc457 100644 --- a/remoting/host/setup/me2me_native_messaging_manifest.json +++ b/remoting/host/setup/com.google.chrome.remote_desktop.json.jinja2 @@ -1,8 +1,8 @@ { "name": "com.google.chrome.remote_desktop", - "description": "{% trans %}REMOTING_HOST_PLUGIN_NAME{% endtrans %}", + "description": "{{ ME2ME_HOST_DESCRIPTION }}", "type": "stdio", - "path": "{{ ME2ME_NATIVE_MESSAGING_HOST_PATH }}", + "path": "{{ ME2ME_HOST_PATH }}", "allowed_origins": [ "chrome-extension://ljacajndfccfgnfohlgkdphmbnpkjflk/", "chrome-extension://gbchcmhmhahfdphkhkmpfmihenigjmpp/", 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/<!(["<(deb_cmd)", "-p", "-s", "<(DEPTH)"])', - 'packaging_outputs': [ - '<(deb_filename)', - '<!(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', - ] - }, - 'targets': [ + ['OS=="linux" and branding=="Chrome" and chromeos==0', { + 'variables': { + 'build_deb_script': 'host/installer/linux/build-deb.sh', + 'deb_filename': 'host/installer/<!(["<(build_deb_script)", "-p", "-s", "<(DEPTH)"])', + 'packaging_outputs': [ + '<(deb_filename)', + '<!(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', + ] + }, + 'targets': [ + { + # Store the installer package(s) into a zip file so there is a + # consistent filename to reference for build archiving (i.e. in + # FILES.cfg). This also avoids possible conflicts with "wildcard" + # package handling in other build/signing scripts. + 'target_name': 'remoting_me2me_host_archive', + 'type': 'none', + 'dependencies': [ + 'remoting_me2me_host_deb_installer', + ], + 'actions': [ { - # Store the installer package(s) into a zip file so there is a - # consistent filename to reference for build archiving (i.e. in - # FILES.cfg). This also avoids possible conflicts with "wildcard" - # package handling in other build/signing scripts. - 'target_name': 'remoting_me2me_host_archive', - 'type': 'none', - 'dependencies': [ - 'remoting_me2me_host_deb_installer', + 'action_name': 'build_linux_installer_zip', + 'inputs': [ + '<@(packaging_outputs)', ], - 'actions': [ - { - #'variables': { - # 'deb_cmd': 'host/installer/linux/build-deb.sh', - #}, - 'action_name': 'build_linux_installer_zip', - 'inputs': [ - '<@(packaging_outputs)', - ], - 'outputs': [ - '<(PRODUCT_DIR)/remoting-me2me-host-<(OS).zip', - ], - 'action': [ 'zip', '-j', '-0', '<@(_outputs)', '<@(_inputs)' ], - }, + 'outputs': [ + '<(PRODUCT_DIR)/remoting-me2me-host-<(OS).zip', ], + 'action': [ 'zip', '-j', '-0', '<@(_outputs)', '<@(_inputs)' ], }, + ], + }, + { + 'target_name': 'remoting_me2me_host_deb_installer', + 'type': 'none', + 'dependencies': [ + 'remoting_it2me_native_messaging_host', + 'remoting_me2me_host', + 'remoting_me2me_native_messaging_host', + 'remoting_native_messaging_manifests', + 'remoting_resources', + 'remoting_start_host', + ], + 'actions': [ { - 'target_name': 'remoting_me2me_host_deb_installer', - 'type': 'none', - 'dependencies': [ - 'remoting_me2me_host', - 'remoting_start_host', - 'remoting_me2me_native_messaging_host', - 'remoting_me2me_native_messaging_manifest', + 'action_name': 'build_debian_package', + 'inputs': [ + '<(build_deb_script)', + 'host/installer/linux/Makefile', + 'host/installer/linux/debian/chrome-remote-desktop.init', + 'host/installer/linux/debian/chrome-remote-desktop.pam', + 'host/installer/linux/debian/compat', + 'host/installer/linux/debian/control', + 'host/installer/linux/debian/copyright', + 'host/installer/linux/debian/postinst', + 'host/installer/linux/debian/preinst', + 'host/installer/linux/debian/rules', ], - 'actions': [ - { - 'action_name': 'build_debian_package', - 'inputs': [ - '<(deb_cmd)', - 'host/installer/linux/Makefile', - 'host/installer/linux/debian/chrome-remote-desktop.init', - 'host/installer/linux/debian/chrome-remote-desktop.pam', - 'host/installer/linux/debian/compat', - 'host/installer/linux/debian/control', - 'host/installer/linux/debian/copyright', - 'host/installer/linux/debian/postinst', - 'host/installer/linux/debian/preinst', - 'host/installer/linux/debian/rules', - ], - 'outputs': [ - '<@(packaging_outputs)', - ], - 'action': [ '<(deb_cmd)', '-s', '<(DEPTH)' ], - }, + 'outputs': [ + '<@(packaging_outputs)', ], + 'action': [ '<(build_deb_script)', '-s', '<(DEPTH)' ], }, ], - }], + }, ], + }], # OS=="linux" and branding=="Chrome" and chromeos==0 + + ['OS!="win" and enable_remoting_host==1', { 'targets': [ { 'target_name': 'remoting_me2me_host', @@ -1184,7 +1237,7 @@ 'remoting_host_uninstaller', 'remoting_me2me_host', 'remoting_me2me_native_messaging_host', - 'remoting_me2me_native_messaging_manifest', + 'remoting_native_messaging_manifests', ], 'variables': { 'host_name': '<!(python <(version_py_path) -f <(branding_path) -t "@HOST_PLUGIN_FILE_NAME@")', @@ -1851,7 +1904,7 @@ 'remoting_core', 'remoting_desktop', 'remoting_host_exe', - 'remoting_me2me_native_messaging_manifest', + 'remoting_native_messaging_manifests', ], 'compiled_inputs': [ '<(PRODUCT_DIR)/remoting_core.dll', @@ -2204,65 +2257,6 @@ ], }, # end of target 'remoting_webapp' - # Generates 'me2me_native_messaging_manifest.json' to be included in the - # installation. - { - 'target_name': 'remoting_me2me_native_messaging_manifest', - 'type': 'none', - 'dependencies': [ - 'remoting_resources', - ], - 'variables': { - 'input': 'host/setup/me2me_native_messaging_manifest.json', - 'output': '<(PRODUCT_DIR)/remoting/com.google.chrome.remote_desktop.json', - }, - 'target_conditions': [ - ['OS == "win" or OS == "mac" or OS == "linux"', { - 'conditions': [ - [ 'OS == "win"', { - 'variables': { - 'me2me_native_messaging_host_path': 'remoting_host.exe', - }, - }], [ 'OS == "mac"', { - 'variables': { - 'me2me_native_messaging_host_path': '/Library/PrivilegedHelperTools/org.chromium.chromoting.me2me_host.app/Contents/MacOS/native_messaging_host', - }, - }], ['OS == "linux"', { - 'variables': { - 'me2me_native_messaging_host_path': '/opt/google/chrome-remote-desktop/native-messaging-host', - }, - }], ['OS != "linux" and OS != "mac" and OS != "win"', { - 'variables': { - 'me2me_native_messaging_host_path': '/opt/google/chrome-remote-desktop/native-messaging-host', - }, - }], - ], # conditions - 'actions': [ - { - 'action_name': 'generate_manifest', - 'inputs': [ - '<(remoting_localize_path)', - '<(input)', - ], - 'outputs': [ - '<(output)', - ], - 'action': [ - 'python', - '<(remoting_localize_path)', - '--define', 'ME2ME_NATIVE_MESSAGING_HOST_PATH=<(me2me_native_messaging_host_path)', - '--locale_dir', '<(webapp_locale_dir)', - '--template', '<(input)', - '--locale_output', - '<(output)', - 'en', - ], - }, - ], # actions - }, - ], - ], # target_conditions - }, # end of target 'remoting_me2me_native_messaging_manifest' { 'target_name': 'remoting_resources', 'type': 'none', |