updated on Thu Jan 26 00:18:00 UTC 2012
[aur-mirror.git] / dbdesigner / dbdesigner
blobe0790f6fee542e041b4104448151d8712161eda8
1 #!/bin/sh
3 # Starts DBDesigner4
4 # This script was adapted from original "startdbd" for Archlinux
6 # verify existence of application folder
7 app_path=/opt/DBDesigner4
8 if [ ! -d $app_path ]; then
9 echo -e "Error: DBDesigner4 folder \'$app_path\' not found!"
10 exit 1
13 # verify existence of executable
14 if [ ! -f $app_path/DBDesigner4 ]; then
15 echo -e "Error: DBDesigner4 executable \'$app_path/DBDesigner4\' not found!"
16 exit 1
19 # verify existence of library folder and libraries of DBDesigner4 and Kylixlibs
20 if [ $(uname -m) == x86_64 ]; then
21 app_ld_path=/usr/lib32/DBDesigner4
22 kylix_ld_path=/usr/lib32/kylix3
23 else # i686 expected
24 app_ld_path=/usr/lib/DBDesigner4
25 kylix_ld_path=/usr/lib/kylix3
27 if [ ! -f "$app_ld_path/bplrtl.so.6.9.0" ]; then
28 echo -e "Error: DBDesigner4 library folder \'$app_ld_path\' not found!"
29 exit 1
31 if [ ! -f "$kylix_ld_path/libborqt-6.9-qt2.3.so" ]; then
32 echo -e "Error: Kylixlibs folder \'$kylix_ld_path\' not found!"
33 exit 1
36 # First check to see if we have an LD_LIBRARY_PATH environment variable
37 if [ -n "$LD_LIBRARY_PATH" ]; then
38 # we do, so prepend our path first
39 export LD_LIBRARY_PATH="$app_ld_path:$kylix_ld_path:$LD_LIBRARY_PATH"
40 else
41 # we do not, so we will create the env var.
42 export LD_LIBRARY_PATH="$app_ld_path:$kylix_ld_path"
45 # make sure we have something specified for the LANG environment variable
46 if [ -z "$LANG" ]; then
47 # set LANG to an appropriate value
48 export LANG=en_US
51 if [ ! -d ~/.DBDesigner4 ]; then
52 mkdir ~/.DBDesigner4
55 ## Note: These two require old and unavailable libs (Ex: libXft.so.1)
56 ## around the Internet. Therefore, had to disabilitate even if
57 ## it sacrifices fonts' smoothness.
59 #use the original qt files
60 #export CLX_USE_LIBQT=yes
62 #QT smooth fonts
63 #export QT_XFT=true
65 # now run the application, passing any parameters that where specified.
66 echo Starting DBDesigner4 ...
67 $app_path/DBDesigner4 $* 2> ~/.DBDesigner4/DBD4.log