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: soffice.sh,v $
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 # STAR_PROFILE_LOCKING_DISABLED=1
35 # export STAR_PROFILE_LOCKING_DISABLED
38 # file locking now enabled by default
39 SAL_ENABLE_FILE_LOCKING
=1
40 export SAL_ENABLE_FILE_LOCKING
42 # Uncomment the line below if you suspect that OpenGL is not
43 # working on your system.
44 # SAL_NOOPENGL=true; export SAL_NOOPENGL
46 # the following test is needed on Linux PPC with IBM j2sdk142
47 if [ "`uname -s`" = "Linux" -a "`uname -m`" = "ppc" ] ; then
49 export JITC_PROCESSOR_TYPE
52 # resolve installation directory
55 sd_basename
=`basename "$0"`
56 sd_script
=`ls -l "$0" | sed "s/.*${sd_basename} -> //g"`
58 cd "`dirname "$sd_script"`"
65 sd_binary
=`basename "$0"`.bin
67 #collect all bootstrap variables specified on the command line
68 #so that they can be passed as arguments to javaldx later on
72 -env:*) BOOTSTRAPVARS
=$BOOTSTRAPVARS" ""$arg";;
77 sd_pagein_args
=@pagein-common
78 for sd_arg
in "$@"; do
81 sd_pagein_args
="${sd_pagein_args} @pagein-calc"
85 sd_pagein_args
="${sd_pagein_args} @pagein-draw"
89 sd_pagein_args
="${sd_pagein_args} @pagein-impress"
93 sd_pagein_args
="${sd_pagein_args} @pagein-writer"
98 "$sd_prog/../basis-link/program/pagein" -L"$sd_prog/../basis-link/program" \
101 # extend the ld_library_path for java: javaldx checks the sofficerc for us
102 if [ -x "$sd_prog/../basis-link/ure-link/bin/javaldx" ] ; then
103 my_path
=`"$sd_prog/../basis-link/ure-link/bin/javaldx" $BOOTSTRAPVARS \
104 "-env:INIFILENAME=vnd.sun.star.pathname:$sd_prog/redirectrc"`
105 if [ -n "$my_path" ] ; then
106 LD_LIBRARY_PATH
=$my_path${LD_LIBRARY_PATH+:$LD_LIBRARY_PATH}
107 export LD_LIBRARY_PATH
113 # uncomment line below to disable anti aliasing of fonts
114 # SAL_ANTIALIAS_DISABLE=true; export SAL_ANTIALIAS_DISABLE
116 # uncomment line below if you encounter problems starting soffice on your system
117 # SAL_NO_XINITTHREADS=true; export SAL_NO_XINITTHREADS
119 # read database entries for Adabas D
120 if [ -f /etc
/adabasrc
]; then
124 # Set PATH so that crash_report is found:
125 PATH
=$sd_prog${PATH+:$PATH}
128 PYTHONPATH
=$sd_prog/..
/basis-link
/program
${PYTHONPATH+:$PYTHONPATH}
131 # test for availability of the fast external splash
133 if [ "$arg" = "-nologo" -o "$arg" = "-no-oosplash" ]; then
137 if [ "$sd_binary" = "soffice.bin" -a -x "$sd_prog/oosplash.bin" ] && [ "$no_oosplash" != "y" ] ; then
138 sd_binary
="oosplash.bin"
141 # execute soffice binary
142 "$sd_prog/$sd_binary" "$@" &
143 trap 'kill -9 $!' TERM
148 "$sd_prog/$sd_binary" ""$BOOTSTRAPVARS"" &