2 #*************************************************************************
4 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 # Copyright 2008 by Sun Microsystems, Inc.
8 # OpenOffice.org - a multi-platform office productivity suite
10 # $RCSfile: gengal.sh,v $
12 # $Revision: 1.5.288.2 $
14 # This file is part of OpenOffice.org.
16 # OpenOffice.org is free software: you can redistribute it and/or modify
17 # it under the terms of the GNU Lesser General Public License version 3
18 # only, as published by the Free Software Foundation.
20 # OpenOffice.org is distributed in the hope that it will be useful,
21 # but WITHOUT ANY WARRANTY; without even the implied warranty of
22 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 # GNU Lesser General Public License version 3 for more details
24 # (a copy is included in the LICENSE file that accompanied this code).
26 # You should have received a copy of the GNU Lesser General Public License
27 # version 3 along with OpenOffice.org. If not, see
28 # <http://www.openoffice.org/license.html>
29 # for a copy of the LGPLv3 License.
31 #*************************************************************************
34 SAL_ENABLE_FILE_LOCKING
=1
35 export SAL_ENABLE_FILE_LOCKING
37 # resolve installation directory
40 sd_basename
=`basename "$0"`
41 sd_script
=`ls -l "$0" | sed "s/.*${sd_basename} -> //g"`
43 cd "`dirname "$sd_script"`"
51 sd_binary
=`basename "$0"`".bin"
54 # change back directory
57 # check if all required patches are installed
58 if [ -x "$sd_prog/sopatchlevel.sh" ]; then
59 "$sd_prog/sopatchlevel.sh"
65 # set search path for shared libraries
66 sd_platform
=`uname -s`
69 LIBPATH
=${sd_prog}${LIBPATH+:${LIBPATH}}
74 DYLD_LIBRARY_PATH
=${sd_prog}${DYLD_LIBRARY_PATH+:${DYLD_LIBRARY_PATH}}
75 export DYLD_LIBRARY_PATH
79 SHLIB_PATH
=${sd_prog}:/usr
/openwin
/lib
${SHLIB_PATH+:${SHLIB_PATH}}
84 LD_LIBRARYN32_PATH
=${sd_prog}${LD_LIBRARYN32_PATH+:${LD_LIBRARYN32_PATH}}
85 export LD_LIBRARYN32_PATH
89 LD_LIBRARY_PATH
=${sd_prog}${LD_LIBRARY_PATH+:${LD_LIBRARY_PATH}}
90 export LD_LIBRARY_PATH
94 # misc. environment variables
97 # set path so that other apps can be started just by name
101 OOO_INSTALL_PREFIX
=${OOO_INSTALL_PREFIX-$sd_prog/../..}
102 if ! test -e $OOO_INSTALL_PREFIX/basis-link
; then
103 # Hack for vanilla OOo binaries' split install layout
104 OOO_INSTALL_PREFIX
=$OOO_INSTALL_PREFIX/..
/openoffice.org3
107 export OOO_INSTALL_PREFIX
110 exec "$sd_prog/$sd_binary" "$@"