summarylogtreecommitdiffstats
path: root/dbdesigner
diff options
context:
space:
mode:
authornashgul2015-10-14 16:31:29 +0200
committernashgul2015-10-14 16:31:29 +0200
commit8e5965aee4d2291d7fe6829806a464ac34dbcb75 (patch)
treecc617dd9f8edce0dc400cc57537aa793b65bd42d /dbdesigner
downloadaur-8e5965aee4d2291d7fe6829806a464ac34dbcb75.tar.gz
Initial import
Diffstat (limited to 'dbdesigner')
-rwxr-xr-xdbdesigner67
1 files changed, 67 insertions, 0 deletions
diff --git a/dbdesigner b/dbdesigner
new file mode 100755
index 000000000000..7a6440bd5d5b
--- /dev/null
+++ b/dbdesigner
@@ -0,0 +1,67 @@
+#!/bin/bash
+#
+# Starts DBDesigner4
+# This script was adapted from original "startdbd" for Archlinux
+
+# verify existence of application folder
+app_path=/opt/DBDesigner4
+if [ ! -d $app_path ]; then
+ echo -e "Error: DBDesigner4 folder \'$app_path\' not found!"
+ exit 1
+fi
+
+# verify existence of executable
+if [ ! -f $app_path/DBDesigner4 ]; then
+ echo -e "Error: DBDesigner4 executable \'$app_path/DBDesigner4\' not found!"
+ exit 1
+fi
+
+# verify existence of library folder and libraries of DBDesigner4 and Kylixlibs
+if [ $(uname -m) == x86_64 ]; then
+ app_ld_path=/usr/lib32/DBDesigner4
+ kylix_ld_path=/usr/lib32/kylix3
+else # i686 expected
+ app_ld_path=/usr/lib/DBDesigner4
+ kylix_ld_path=/usr/lib/kylix3
+fi
+if [ ! -f "$app_ld_path/bplrtl.so.6.9.0" ]; then
+ echo -e "Error: DBDesigner4 library folder \'$app_ld_path\' not found!"
+ exit 1
+fi
+if [ ! -f "$kylix_ld_path/libborqt-6.9-qt2.3.so" ]; then
+ echo -e "Error: Kylixlibs folder \'$kylix_ld_path\' not found!"
+ exit 1
+fi
+
+# First check to see if we have an LD_LIBRARY_PATH environment variable
+if [ -n "$LD_LIBRARY_PATH" ]; then
+# we do, so prepend our path first
+ export LD_LIBRARY_PATH="$app_ld_path:$kylix_ld_path:$LD_LIBRARY_PATH"
+else
+ # we do not, so we will create the env var.
+ export LD_LIBRARY_PATH="$app_ld_path:$kylix_ld_path"
+fi
+
+# make sure we have something specified for the LANG environment variable
+if [ -z "$LANG" ]; then
+ # set LANG to an appropriate value
+ export LANG=en_US
+fi
+
+if [ ! -d ~/.DBDesigner4 ]; then
+ mkdir ~/.DBDesigner4
+fi
+
+## Note: These two require old and unavailable libs (Ex: libXft.so.1)
+## around the Internet. Therefore, had to disabilitate even if
+## it sacrifices fonts' smoothness.
+##
+#use the original qt files
+#export CLX_USE_LIBQT=yes
+#
+#QT smooth fonts
+#export QT_XFT=true
+
+# now run the application, passing any parameters that where specified.
+echo Starting DBDesigner4 ...
+$app_path/DBDesigner4 $* 2> ~/.DBDesigner4/DBD4.log