diff options
author | Michael Meeks <michael.meeks@novell.com> | 2011-03-21 15:00:18 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@novell.com> | 2011-03-21 21:18:41 +0000 |
commit | cda1a3fa9c2e6008706b2aaa58929242a59144f6 (patch) | |
tree | b9d0b568b215edf9f2a5f277ca37cf681f5a2dae /desktop/scripts | |
parent | 273ea24a16997b279b7d9969c25497cf55773fac (diff) |
re-work start process to enable earlier splash and faster start
Diffstat (limited to 'desktop/scripts')
-rwxr-xr-x | desktop/scripts/soffice.sh | 123 |
1 files changed, 15 insertions, 108 deletions
diff --git a/desktop/scripts/soffice.sh b/desktop/scripts/soffice.sh index 236ffd43fa3c..6379412ead05 100755 --- a/desktop/scripts/soffice.sh +++ b/desktop/scripts/soffice.sh @@ -39,6 +39,19 @@ export SAL_ENABLE_FILE_LOCKING # working on your system. # SAL_NOOPENGL=true; export SAL_NOOPENGL +unset XENVIRONMENT + +# uncomment line below to disable anti aliasing of fonts +# SAL_ANTIALIAS_DISABLE=true; export SAL_ANTIALIAS_DISABLE + +# uncomment line below if you encounter problems starting soffice on your system +# SAL_NO_XINITTHREADS=true; export SAL_NO_XINITTHREADS + +# read database entries for Adabas D +if [ -f /etc/adabasrc ]; then + . /etc/adabasrc +fi + # The following is needed on Linux PPC with IBM j2sdk142: #@# export JITC_PROCESSOR_TYPE=6 @@ -66,8 +79,6 @@ if [ "$VALGRIND" != "" ]; then export G_SLICE fi -sd_binary=`basename "$0" | sed 's/libreoffice/soffice/g'`.bin - case "`uname -s`" in NetBSD|OpenBSD|FreeBSD|DragonFly) # this is a temporary hack until we can live with the default search paths @@ -86,109 +97,5 @@ AIX) ;; esac -#collect all bootstrap variables specified on the command line -#so that they can be passed as arguments to javaldx later on -for arg in $@ -do - case "$arg" in - -env:*) BOOTSTRAPVARS=$BOOTSTRAPVARS" ""$arg";; - esac -done - -# test for availability of the fast external splash -for arg in $@; do - case "$arg" in - --nologo|-nologo|--no-oosplash|-no-oosplash|--version|-version|--help|-help|-h|-\?) - no_oosplash=y - ;; - esac -done - -# Setup our app as oosplash, but try to avoid executing pagein, -# and other expensive environment setup pieces wherever possible -# for a second started office -if [ "$sd_binary" = "soffice.bin" -a -x "$sd_prog/oosplash.bin" ] && [ "$no_oosplash" != "y" ] ; then - sd_binary="oosplash.bin" - - # try to connect to a running instance early - if $VALGRINDCHECK "$sd_prog/$sd_binary" -qsend-and-report "$@" ; then - exit 0 - fi -fi - -# pagein -sd_pagein_args=@pagein-common -for sd_arg in "$@"; do - case ${sd_arg} in - --calc|-calc) - sd_pagein_args="${sd_pagein_args} @pagein-calc" - break; - ;; - --draw|-draw) - sd_pagein_args="${sd_pagein_args} @pagein-draw" - break; - ;; - --impress|-impress) - sd_pagein_args="${sd_pagein_args} @pagein-impress" - break; - ;; - --writer|-writer) - sd_pagein_args="${sd_pagein_args} @pagein-writer" - break; - ;; - esac -done -"$sd_prog/../basis-link/program/pagein" -L"$sd_prog/../basis-link/program" \ - ${sd_pagein_args} - -# extend the ld_library_path for java: javaldx checks the sofficerc for us -if [ -x "$sd_prog/../basis-link/ure-link/bin/javaldx" ] ; then - my_path=`"$sd_prog/../basis-link/ure-link/bin/javaldx" $BOOTSTRAPVARS \ - "-env:INIFILENAME=vnd.sun.star.pathname:$sd_prog/redirectrc"` - if [ -n "$my_path" ] ; then - sd_platform=`uname -s` - case $sd_platform in - AIX) - LIBPATH=$my_path${LIBPATH:+:$LIBPATH} - export LIBPATH - ;; - *) - LD_LIBRARY_PATH=$my_path${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} - export LD_LIBRARY_PATH - ;; - esac - fi -fi - -unset XENVIRONMENT - -# uncomment line below to disable anti aliasing of fonts -# SAL_ANTIALIAS_DISABLE=true; export SAL_ANTIALIAS_DISABLE - -# uncomment line below if you encounter problems starting soffice on your system -# SAL_NO_XINITTHREADS=true; export SAL_NO_XINITTHREADS - -# read database entries for Adabas D -if [ -f /etc/adabasrc ]; then - . /etc/adabasrc -fi - -# execute soffice binary -$VALGRINDCHECK "$sd_prog/$sd_binary" "$@" & -trap 'kill -9 $!' TERM -wait $! -sd_ret=$? - -while [ $sd_ret -eq 79 -o $sd_ret -eq 81 ] -do - if [ $sd_ret -eq 79 ]; then - $VALGRINDCHECK "$sd_prog/$sd_binary" ""$BOOTSTRAPVARS"" & - elif [ $sd_ret -eq 81 ]; then - $VALGRINDCHECK "$sd_prog/$sd_binary" "$@" & - fi - - wait $! - sd_ret=$? -done - -exit $sd_ret +# oosplash does the rest: forcing pages in, javaldx etc. are +exec $VALGRINDCHECK "$sd_prog/oosplash.bin" "$@" |