Kaydet (Commit) cda1a3fa authored tarafından Michael Meeks's avatar Michael Meeks

re-work start process to enable earlier splash and faster start

üst 273ea24a
......@@ -20,9 +20,9 @@ dt desktop\win32\source\rebase nmake - w dt_rebase dt_inc NULL
dt desktop\os2\source\applauncher nmake - p dt_applauncher dt_inc NULL
dt desktop\unx\source\officeloader nmake - u dt_officeloader_unx dt_inc NULL
dt desktop\unx\source nmake - u dt_uwrapper dt_inc NULL
dt desktop\unx\splash nmake - u dt_usplash dt_inc NULL
dt desktop\source\pagein nmake - u dt_pagein dt_inc NULL
dt desktop\source\pkgchk\unopkg nmake - all dt_unopkg dt_dp_misc dt_app dt_inc dt_guiloader.w NULL
dt desktop\unx\splash nmake - u dt_usplash dt_pagein.u dt_inc NULL
dt desktop\source\deployment nmake - all dt_deployment dt_dp_manager dt_dp_registry dt_dp_registry_package dt_dp_registry_executable dt_dp_registry_help dt_dp_registry_script dt_dp_registry_sfwk dt_dp_registry_component dt_dp_registry_configuration dt_dp_unopkg dt_inc dt_dp_misc NULL
dt desktop\source\deployment\misc nmake - all dt_dp_misc dt_inc NULL
dt desktop\source\deployment\unopkg nmake - all dt_dp_unopkg dt_inc NULL
......
......@@ -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" "$@"
......@@ -45,6 +45,7 @@ LIBSALCPPRT=$(0)
OBJFILES= \
$(OBJ)$/pagein.obj \
$(OBJ)$/pagein-main.obj \
$(OBJ)$/file_image_unx.obj
APP1TARGET=$(TARGET)
......@@ -77,24 +78,28 @@ UREMISCPATH=..$/ure-link$/share$/misc
$(MISC)$/$(TARGET)-calc : makefile.mk
@echo Making: $@
@-echo $(DLLPRE)sc$(DFTDLLPOST) > $@
@-echo $(DLLPRE)scui$(DFTDLLPOST) >> $@
@-echo $(DLLPRE)svx$(DFTDLLPOST) >> $@
@-echo $(DLLPRE)svxcore$(DFTDLLPOST) >> $@
$(MISC)$/$(TARGET)-draw : makefile.mk
@echo Making: $@
@-echo $(DLLPRE)sd$(DFTDLLPOST) > $@
@-echo $(DLLPRE)sdui$(DFTDLLPOST) >> $@
@-echo $(DLLPRE)svx$(DFTDLLPOST) >> $@
@-echo $(DLLPRE)svxcore$(DFTDLLPOST) >> $@
$(MISC)$/$(TARGET)-impress : makefile.mk
@echo Making: $@
@-echo $(DLLPRE)sd$(DFTDLLPOST) > $@
@-echo $(DLLPRE)sdui$(DFTDLLPOST) >> $@
@-echo $(DLLPRE)svx$(DFTDLLPOST) >> $@
@-echo $(DLLPRE)svxcore$(DFTDLLPOST) >> $@
$(MISC)$/$(TARGET)-writer : makefile.mk
@echo Making: $@
@-echo $(DLLPRE)sw$(DFTDLLPOST) > $@
@-echo $(DLLPRE)swui$(DFTDLLPOST) >> $@
@-echo $(DLLPRE)svx$(DFTDLLPOST) >> $@
@-echo $(DLLPRE)svxcore$(DFTDLLPOST) >> $@
......
#include <stdio.h>
/*
* De-coupled to allow pagein to be re-used in the unx
* splash / quick-starter
*/
extern int pagein_execute (int argc, char **argv);
int main (int argc, char **argv)
{
return pagein_execute (argc, argv);
}
......@@ -58,8 +58,10 @@ cleanup_and_leave:
return (result);
}
extern int pagein_execute (int argc, char **argv);
/* main */
int main (int argc, char **argv)
int pagein_execute (int argc, char **argv)
{
int i, v = 0;
size_t nfiles = 0, nbytes = 0;
......@@ -103,7 +105,6 @@ int main (int argc, char **argv)
continue;
}
if ((argv[i][0] == '@') && ((fp = fopen (argv[i], "r")) == 0))
{
char path[1024];
......
......@@ -32,33 +32,31 @@ NO_DEFAULT_STL=TRUE
.INCLUDE : settings.mk
.IF "$(ENABLE_UNIX_QUICKSTARTER)"!="TRUE"
dummy:
@echo "Unix quickstarter disabled"
.ELSE
.IF "$(ENABLE_QUICKSTART_LIBPNG)"!="TRUE"
CFLAGS+=-DENABLE_QUICKSTART_LIBPNG
.ENDIF
STDLIB=
CFLAGS+=$(LIBPNG_CFLAGS)
OBJFILES= \
$(OBJ)$/splashx.obj \
$(OBJ)$/start.obj
PAGEIN_OBJS= \
$(OBJ)$/pagein.obj \
$(OBJ)$/file_image_unx.obj
APP1TARGET = $(TARGET)
APP1RPATH = BRAND
APP1OBJS = $(OBJFILES)
APP1OBJS = $(OBJFILES) $(PAGEIN_OBJS)
APP1LIBSALCPPRT=
APP1CODETYPE = C
APP1STDLIBS = $(SALLIB) -lX11 $(LIBPNG_LIBS)
APP1STDLIBS = $(STDLIBGUIMT) $(SALLIB) $(LIBPNG_LIBS)
.IF "$(OS)"=="SOLARIS"
APP1STDLIBS+= -lsocket
.ENDIF
.ENDIF # ENABLE_UNIX_QUICKSTARTER
# --- Targets ------------------------------------------------------
.INCLUDE : target.mk
......@@ -25,6 +25,9 @@
* in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
* instead of those above.
*/
#ifdef ENABLE_QUICKSTART_LIBPNG
#include <X11/Xlib.h>
#include <X11/Xatom.h>
#include <X11/Xutil.h>
......@@ -620,4 +623,28 @@ void splash_close_window()
bitmap_rows = NULL;
}
#else /* not ENABLE_QUICKSTART_LIBPNG */
/* Stubs that will never be called in this case */
int splash_load_bmp( const char *filename )
{
return 1;
}
void splash_setup( int barc[3], int framec[3], int posx, int posy, int w, int h )
{
}
int splash_create_window( int argc, char** argv )
{
return 1;
}
void splash_close_window()
{
}
void splash_draw_progress( int progress )
{
}
#endif // ENABLE_QUICKSTART_LIBPNG
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment