2011-08-18 13:03:12 +02:00
|
|
|
#! /bin/sh
|
|
|
|
|
2016-02-17 10:04:34 +01:00
|
|
|
# Use this script if you add paths to LD_LIBRARY_PATH
|
|
|
|
# that contain libraries that conflict with the
|
|
|
|
# libraries that Qt Creator depends on.
|
|
|
|
|
2011-08-18 13:03:12 +02:00
|
|
|
makeAbsolute() {
|
|
|
|
case $1 in
|
|
|
|
/*)
|
|
|
|
# already absolute, return it
|
|
|
|
echo "$1"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
# relative, prepend $2 made absolute
|
|
|
|
echo `makeAbsolute "$2" "$PWD"`/"$1" | sed 's,/\.$,,'
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
}
|
|
|
|
|
|
|
|
me=`which "$0"` # Search $PATH if necessary
|
|
|
|
if test -L "$me"; then
|
2016-09-27 13:28:45 +02:00
|
|
|
# Try GNU readlink(1)
|
|
|
|
nme=`readlink -nf "$me" 2>/dev/null`
|
|
|
|
if test -n "$nme"; then
|
|
|
|
me=$nme
|
2011-08-18 13:03:12 +02:00
|
|
|
else
|
2016-09-27 13:28:45 +02:00
|
|
|
# No GNU readlink(1), so let's try ls -l
|
2011-08-18 13:03:12 +02:00
|
|
|
base=`dirname "$me"`
|
2016-09-27 13:21:32 +02:00
|
|
|
me=`ls -l "$me" | sed 's/^.*-> //'`
|
2011-08-18 13:03:12 +02:00
|
|
|
me=`makeAbsolute "$me" "$base"`
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
bindir=`dirname "$me"`
|
|
|
|
libdir=`cd "$bindir/../lib" ; pwd`
|
2016-02-17 10:04:34 +01:00
|
|
|
# Add path to deployed Qt libraries in package
|
|
|
|
qtlibdir=$libdir/Qt/lib
|
|
|
|
if test -d "$qtlibdir"; then
|
|
|
|
qtlibpath=:$qtlibdir
|
|
|
|
fi
|
|
|
|
# Add Qt Creator library path
|
2018-08-09 11:31:41 +02:00
|
|
|
_ORIGINAL_LD_LIBRARY_PATH=$LD_LIBRARY_PATH
|
2016-02-17 10:04:34 +01:00
|
|
|
LD_LIBRARY_PATH=$libdir:$libdir/qtcreator$qtlibpath${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
|
2011-08-18 13:03:12 +02:00
|
|
|
export LD_LIBRARY_PATH
|
2018-08-09 11:31:41 +02:00
|
|
|
exec "$bindir/qtcreator" -user-library-path "$_ORIGINAL_LD_LIBRARY_PATH" ${1+"$@"}
|