summaryrefslogtreecommitdiffstats
path: root/gtk2/kgtk2-wrapper.cmake
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-09 20:27:19 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-09 20:27:19 +0000
commitc6ca83d07d95e076b09bd802f66ba72d363b0235 (patch)
treef13000febb0c9c5a5da621b4bba53ba3eace022e /gtk2/kgtk2-wrapper.cmake
downloadkgtk-qt3-c6ca83d07d95e076b09bd802f66ba72d363b0235.tar.gz
kgtk-qt3-c6ca83d07d95e076b09bd802f66ba72d363b0235.zip
* Added kgtk-qt3
* Slight kpowersave message cleanup git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kgtk-qt3@1173604 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'gtk2/kgtk2-wrapper.cmake')
-rwxr-xr-xgtk2/kgtk2-wrapper.cmake33
1 files changed, 33 insertions, 0 deletions
diff --git a/gtk2/kgtk2-wrapper.cmake b/gtk2/kgtk2-wrapper.cmake
new file mode 100755
index 0000000..46865b7
--- /dev/null
+++ b/gtk2/kgtk2-wrapper.cmake
@@ -0,0 +1,33 @@
+#!/bin/bash
+
+#
+# This script is part of the KGtk package.
+#
+# (C) Craig Drummond, 2007
+#
+#
+# --
+# Released under the GPL v2 or later
+# --
+#
+
+if [ "`locale | grep 'LANG=' | grep -i 'utf-8' | wc -l`" = "0" ] ; then
+ export G_BROKEN_FILENAMES=1
+fi
+
+app=`basename $0`
+
+if [ "$app" = "kgtk2-wrapper" ] ; then
+ LD_PRELOAD=@CMAKE_INSTALL_PREFIX@/lib/kgtk/libkgtk2.so:$LD_PRELOAD "$@"
+else
+ dir=`dirname $0`
+ oldPath=$PATH
+ PATH=`echo $PATH | sed s:$dir::g`
+ real=`which $app`
+ PATH=$oldPath
+
+ if [ "$real" != "" ] && [ "`dirname $real`" != "$dir" ] ; then
+ LD_PRELOAD=@CMAKE_INSTALL_PREFIX@/lib@LIB_SUFFIX@/kgtk/libkgtk2.so:$LD_PRELOAD $real "$@"
+ fi
+fi