diff options
author | mdm@chromium.org <mdm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-03 01:13:04 +0000 |
---|---|---|
committer | mdm@chromium.org <mdm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-03 01:13:04 +0000 |
commit | faa38447727e111ab13424e4e6a713e12121e736 (patch) | |
tree | 70f57425b024b13e63dc9d95c202041ba257cb3a | |
parent | e950cba6fb930f86fec5d9c68940db1df13966ef (diff) | |
download | chromium_src-faa38447727e111ab13424e4e6a713e12121e736.zip chromium_src-faa38447727e111ab13424e4e6a713e12121e736.tar.gz chromium_src-faa38447727e111ab13424e4e6a713e12121e736.tar.bz2 |
Linux: include an updated copy of xdg-mime that fixes default browser selection on KDE 4.
This should probably wait until after we branch for M7 this week.
BUG=18106,33842
TEST=default browser selection works in KDE 4 on distributions shipping CVS xdg-mime
Review URL: http://codereview.chromium.org/3258009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58449 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | DEPS | 2 | ||||
-rw-r--r-- | chrome/chrome_exe.gypi | 1 | ||||
-rw-r--r-- | chrome/chrome_installer.gypi | 1 | ||||
-rwxr-xr-x | chrome/tools/build/linux/chrome-wrapper | 23 |
4 files changed, 17 insertions, 10 deletions
@@ -255,7 +255,7 @@ deps_os = { "/trunk/deps/reference_builds/chrome_linux@41515", "src/third_party/xdg-utils": - "/trunk/deps/third_party/xdg-utils@29103", + "/trunk/deps/third_party/xdg-utils@58316", # TODO(ajwong): Move this into the OS-independent block. "src/third_party/yasm/source/patched-yasm": diff --git a/chrome/chrome_exe.gypi b/chrome/chrome_exe.gypi index 054db39..5305513 100644 --- a/chrome/chrome_exe.gypi +++ b/chrome/chrome_exe.gypi @@ -195,6 +195,7 @@ { 'destination': '<(PRODUCT_DIR)', 'files': ['tools/build/linux/chrome-wrapper', + '../third_party/xdg-utils/scripts/xdg-mime', '../third_party/xdg-utils/scripts/xdg-settings', ], # The wrapper script above may need to generate a .desktop file, diff --git a/chrome/chrome_installer.gypi b/chrome/chrome_installer.gypi index aab12c5..d76ac68 100644 --- a/chrome/chrome_installer.gypi +++ b/chrome/chrome_installer.gypi @@ -352,6 +352,7 @@ '<(PRODUCT_DIR)/chrome.pak', '<(PRODUCT_DIR)/chrome_sandbox', '<(PRODUCT_DIR)/libffmpegsumo.so', + '<(PRODUCT_DIR)/xdg-mime', '<(PRODUCT_DIR)/xdg-settings', '<(PRODUCT_DIR)/locales/en-US.pak', ], diff --git a/chrome/tools/build/linux/chrome-wrapper b/chrome/tools/build/linux/chrome-wrapper index 7aeeb7a..090891f 100755 --- a/chrome/tools/build/linux/chrome-wrapper +++ b/chrome/tools/build/linux/chrome-wrapper @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. +# Copyright (c) 2010 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. @@ -10,7 +10,7 @@ DESKTOP="chromium-devel" TITLE="Chromium" -# Check to see if there is a desktop file of the given name +# Check to see if there is a desktop file of the given name. exists_desktop_file() { # Build a search list from $XDG_DATA_HOME and $XDG_DATA_DIRS, the latter # of which can itself be a colon-separated list of directories to search. @@ -21,11 +21,11 @@ exists_desktop_file() { [ "$dir" -a -d "$dir/applications" ] || continue [ -r "$dir/applications/$DESKTOP.desktop" ] && return done - # Didn't find it in the search path + # Didn't find it in the search path. return 1 } -# Checks a file to see if it's a 32 or 64-bit +# Checks a file to see if it's a 32 or 64-bit. check_executable() { out=$(file $(readlink -f $1) 2> /dev/null) echo $out | grep -qs "ELF 32-bit LSB" @@ -41,7 +41,7 @@ check_executable() { echo neither } -# Generate a desktop file that will run this script +# Generate a desktop file that will run this script. generate_desktop_file() { apps="${XDG_DATA_HOME:-$HOME/.local/share}/applications" mkdir -p "$apps" @@ -59,19 +59,24 @@ MimeType=text/html;text/xml;application/xhtml_xml; EOF } -# Let the wrapped binary know that it has been run through the wrapper +# Let the wrapped binary know that it has been run through the wrapper. export CHROME_WRAPPER="`readlink -f "$0"`" export CHROME_DESKTOP="$DESKTOP.desktop" HERE="`dirname "$CHROME_WRAPPER"`" +# We include some xdg utilities next to the binary, and we want to prefer them +# over the system versions because we know they work correctly for us. But if +# our path already exists, we leave it where it is, to allow overriding this. +# (Once distributions have picked up the updated xdg-mime, we can go back to +# appending $HERE rather than prepending.) case ":$PATH:" in *:$HERE:*) - # $PATH already contains $HERE + # $PATH already contains $HERE, leave it where it is. ;; *) - # Append $HERE to $PATH - export PATH="$PATH:$HERE" + # Prepend $HERE to $PATH. + export PATH="$HERE:$PATH" ;; esac |