Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(258)

Unified Diff: chrome/tools/test/reference_build/chrome_linux/chrome-wrapper

Issue 877003: Updating the Chromium reference build on Linux. The continuous build... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/tools/test/reference_build/chrome_linux/chrome-wrapper
===================================================================
--- chrome/tools/test/reference_build/chrome_linux/chrome-wrapper (revision 33840)
+++ chrome/tools/test/reference_build/chrome_linux/chrome-wrapper (working copy)
@@ -25,6 +25,22 @@
return 1
}
+# 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"
+ if [ $? = 0 ]; then
+ echo 32
+ return
+ fi
+ echo $out | grep -qs "ELF 64-bit LSB"
+ if [ $? = 0 ]; then
+ echo 64
+ return
+ fi
+ echo neither
+}
+
# Generate a desktop file that will run this script
generate_desktop_file() {
apps="${XDG_DATA_HOME:-$HOME/.local/share}/applications"
@@ -62,6 +78,51 @@
# Always use our ffmpeg and other shared libs.
export LD_LIBRARY_PATH="$HERE:$HERE/lib:$HERE/lib.target:$LD_LIBRARY_PATH"
+MISSING_LIBS=$(ldd "$HERE/chrome" 2> /dev/null |grep "not found$" | cut -d" " -f 1|sed 's/\t//')
+CHROME_ARCH=$(check_executable "$HERE/chrome")
+uname -m | grep -qs x86_64
+if [ $? = 1 ]; then
+ LIBDIRS="/lib /lib32 /usr/lib /usr/lib32"
+else
+ LIBDIRS="/lib64 /lib /usr/lib64 /usr/lib"
+fi
+
+echo $MISSING_LIBS | grep -qs libbz2.so.1.0
+if [ $? = 0 ]; then
+ for dir in $LIBDIRS
+ do
+ if [ -e "$dir/libbz2.so.1" ]; then
+ LIB_ARCH=$(check_executable "$dir/libbz2.so.1")
+ if [ "$CHROME_ARCH" = "$LIB_ARCH" ]; then
+ ln -snf "$dir/libbz2.so.1" "$HERE/libbz2.so.1.0"
+ break;
+ fi
+ fi
+ done
+fi
+
+for lib in libnspr4.so.0d libnss3.so.1d libnssutil3.so.1d libplc4.so.0d libplds4.so.0d libsmime3.so.1d libssl3.so.1d
+do
+ echo $MISSING_LIBS | grep -qs $lib
+ if [ $? = 0 ]; then
+ reallib=$(echo $lib | sed 's/\.[01]d$//')
+ for dir in $LIBDIRS
+ do
+ if [ -e "$dir/$reallib" ]; then
+ LIB_ARCH=$(check_executable "$dir/$reallib")
+ if [ "$CHROME_ARCH" = "$LIB_ARCH" ]; then
+ ln -snf "$dir/$reallib" "$HERE/$lib"
+ break;
+ fi
+ fi
+ done
+ fi
+done
+
+# Custom version string for this release. This can be used to add a downstream
+# vendor string or release channel information.
+export CHROME_VERSION_EXTRA="custom"
+
exists_desktop_file || generate_desktop_file
exec "$HERE/chrome" "$@"
Property changes on: chrome/tools/test/reference_build/chrome_linux/chrome-wrapper
___________________________________________________________________
Name: svn:eol-style
+ LF

Powered by Google App Engine
This is Rietveld 408576698