Commit 4078fba4 authored by Oswald Buddenhagen's avatar Oswald Buddenhagen Committed by Daniel Molkentin

re-add LD_LIBRARY_PATH script

we need to override RUNPATHs from possible plugins.

due to d7d23226, this should not re-introduce QTCREATORBUG-1646.

unlike in the previous incarnation, we don't replace the binary with the
script, but give the script an extension. this is nicer for packagers
and less confusing in creator's own run configurations. the .desktop
files created by our installers need to be adjusted for that.

Task-number: QTCREATORBUG-5565
Change-Id: Icd2fa55456754a05257376b8288e8bdf423c62db
Reviewed-on: http://codereview.qt.nokia.com/3180Reviewed-by: default avatarQt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: default avatarDaniel Molkentin <daniel.molkentin@nokia.com>
Reviewed-by: default avatarChristian Kamm <christian.d.kamm@nokia.com>
parent 89e284cb
TEMPLATE = app
TARGET = qtcreator.sh
OBJECTS_DIR =
PRE_TARGETDEPS = $$PWD/qtcreator.sh
QMAKE_LINK = cp $$PWD/qtcreator.sh $@ && : IGNORE REST OF LINE:
QMAKE_CLEAN = qtcreator.sh
target.path = /bin
INSTALLS += target
OTHER_FILES = $$PWD/qtcreator.sh
#! /bin/sh
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
# Try readlink(1)
readlink=`type readlink 2>/dev/null` || readlink=
if test -n "$readlink"; then
# We have readlink(1), so we can use it. Assuming GNU readlink (for -f).
me=`readlink -nf "$me"`
else
# No readlink(1), so let's try ls -l
me=`ls -l "$me" | sed 's/^.*-> //'`
base=`dirname "$me"`
me=`makeAbsolute "$me" "$base"`
fi
fi
bindir=`dirname "$me"`
libdir=`cd "$bindir/../lib" ; pwd`
LD_LIBRARY_PATH=$libdir:$libdir/qtcreator${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
export LD_LIBRARY_PATH
exec "$bindir/qtcreator" ${1+"$@"}
......@@ -12,6 +12,7 @@ TEMPLATE = subdirs
CONFIG += ordered
SUBDIRS = src share lib/qtcreator/qtcomponents
unix:!macx:!isEmpty(copydata):SUBDIRS += bin
OTHER_FILES += dist/copyright_template.txt \
dist/changes-1.1.0 \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment