Introduce headless switch for X / cairo / toolkit less build
The plan is to reduce dependencies to be easier to deploy libreoffice server side in headless mode.
This commit is contained in:
committed by
Michael Meeks
parent
a818fa05c3
commit
2130deb2d1
53
configure.in
53
configure.in
@@ -733,6 +733,11 @@ AC_ARG_ENABLE(kde4,
|
|||||||
both KDE3 and KDE4.]),
|
both KDE3 and KDE4.]),
|
||||||
,)
|
,)
|
||||||
|
|
||||||
|
AC_ARG_ENABLE(headless,
|
||||||
|
AS_HELP_STRING([--enable-headless],
|
||||||
|
[Disable building of GUIs to reduce dependencies. Useful for server usage.]),
|
||||||
|
,)
|
||||||
|
|
||||||
AC_ARG_ENABLE(unix-qstart-libpng,
|
AC_ARG_ENABLE(unix-qstart-libpng,
|
||||||
AS_HELP_STRING([--disable-unix-qstart-libpng],
|
AS_HELP_STRING([--disable-unix-qstart-libpng],
|
||||||
[On UNIX systems, we have a faster splash app, that can use libpng to
|
[On UNIX systems, we have a faster splash app, that can use libpng to
|
||||||
@@ -3131,6 +3136,10 @@ solaris*)
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
if test "$enable_headless" = "yes"; then
|
||||||
|
GUIBASE=headless
|
||||||
|
fi
|
||||||
|
|
||||||
INPATH="${OUTPATH}${PROEXT}"
|
INPATH="${OUTPATH}${PROEXT}"
|
||||||
OUTDIR="$SRC_ROOT/solver/$INPATH"
|
OUTDIR="$SRC_ROOT/solver/$INPATH"
|
||||||
SOLARINC="-I. -I$SRC_ROOT/solver/$INPATH/inc/external -I$SRC_ROOT/solver/$INPATH/inc -I$SRC_ROOT/solenv/inc $SOLARINC"
|
SOLARINC="-I. -I$SRC_ROOT/solver/$INPATH/inc/external -I$SRC_ROOT/solver/$INPATH/inc -I$SRC_ROOT/solenv/inc $SOLARINC"
|
||||||
@@ -3369,6 +3378,19 @@ else
|
|||||||
fi
|
fi
|
||||||
AC_SUBST(DISABLE_STRIP)
|
AC_SUBST(DISABLE_STRIP)
|
||||||
|
|
||||||
|
if test "$enable_headless" = "yes"; then
|
||||||
|
# be sure to do not mess with uneeded stuff
|
||||||
|
test_randr=no
|
||||||
|
test_xrender=no
|
||||||
|
test_cups=no
|
||||||
|
test_fontconfig=yes
|
||||||
|
test_gtk=no
|
||||||
|
build_gstreamer=no
|
||||||
|
test_kde=no
|
||||||
|
test_kde4=no
|
||||||
|
test_unix_quickstarter=no
|
||||||
|
fi
|
||||||
|
|
||||||
dnl check for cups support
|
dnl check for cups support
|
||||||
dnl ===================================================================
|
dnl ===================================================================
|
||||||
if test "$test_cups" = "yes"; then
|
if test "$test_cups" = "yes"; then
|
||||||
@@ -7351,7 +7373,12 @@ AC_SUBST(ENABLE_NSPLUGIN)
|
|||||||
dnl ***************************************
|
dnl ***************************************
|
||||||
dnl testing for X libraries and includes...
|
dnl testing for X libraries and includes...
|
||||||
dnl ***************************************
|
dnl ***************************************
|
||||||
if test $_os != Darwin -a $_os != WINNT -a $_os != Android -a $_os != iOS; then
|
WANT_X11="no"
|
||||||
|
if test $_os != Darwin -a $_os != WINNT -a $_os != Android -a $_os != iOS -a "$enable_headless" != "yes"; then
|
||||||
|
WANT_X11="yes"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test WANT_X11 = "yes"; then
|
||||||
AC_PATH_X
|
AC_PATH_X
|
||||||
AC_PATH_XTRA
|
AC_PATH_XTRA
|
||||||
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
|
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
|
||||||
@@ -7404,7 +7431,7 @@ if test "$XINC" != "no_x_includes" -a "$XINC" != "/usr/include" ; then
|
|||||||
fi
|
fi
|
||||||
AC_SUBST(XLIB)
|
AC_SUBST(XLIB)
|
||||||
|
|
||||||
if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$_os" != "Android" -a "$_os" != "iOS"; then
|
if test WANT_X11 = "yes"; then
|
||||||
dnl ===================================================================
|
dnl ===================================================================
|
||||||
dnl Check for Composite.h for Mozilla plugin
|
dnl Check for Composite.h for Mozilla plugin
|
||||||
dnl ===================================================================
|
dnl ===================================================================
|
||||||
@@ -7424,7 +7451,7 @@ dnl ===================================================================
|
|||||||
dnl Check for system Xrender
|
dnl Check for system Xrender
|
||||||
dnl ===================================================================
|
dnl ===================================================================
|
||||||
AC_MSG_CHECKING([whether to use Xrender])
|
AC_MSG_CHECKING([whether to use Xrender])
|
||||||
if test "$test_xrender" = "yes"; then
|
if test WANT_X11 = "yes" -a "$test_xrender" = "yes"; then
|
||||||
AC_MSG_RESULT([yes])
|
AC_MSG_RESULT([yes])
|
||||||
AC_CHECK_LIB([Xrender], [XRenderQueryVersion], [:],
|
AC_CHECK_LIB([Xrender], [XRenderQueryVersion], [:],
|
||||||
[AC_MSG_ERROR(libXrender not found or functional)], [])
|
[AC_MSG_ERROR(libXrender not found or functional)], [])
|
||||||
@@ -7442,7 +7469,7 @@ dnl ===================================================================
|
|||||||
dnl Check for XRandr
|
dnl Check for XRandr
|
||||||
dnl ===================================================================
|
dnl ===================================================================
|
||||||
AC_MSG_CHECKING([whether to enable RandR support])
|
AC_MSG_CHECKING([whether to enable RandR support])
|
||||||
if test "$test_randr" = "yes" -a \( "$enable_randr" = "yes" -o "$enable_randr" = "TRUE" \) ; then
|
if test WANT_X11 = "yes" -a "$test_randr" = "yes" -a \( "$enable_randr" = "yes" -o "$enable_randr" = "TRUE" \) ; then
|
||||||
if test -z "$enable_randr_link" -o "$enable_randr_link" = "no"; then
|
if test -z "$enable_randr_link" -o "$enable_randr_link" = "no"; then
|
||||||
XRANDR_DLOPEN="TRUE"
|
XRANDR_DLOPEN="TRUE"
|
||||||
AC_MSG_RESULT([configured to dlopen libXrandr at runtime])
|
AC_MSG_RESULT([configured to dlopen libXrandr at runtime])
|
||||||
@@ -8080,6 +8107,16 @@ if test "x$enable_kde4" = "xyes"; then
|
|||||||
fi
|
fi
|
||||||
AC_SUBST(ENABLE_KDE4)
|
AC_SUBST(ENABLE_KDE4)
|
||||||
|
|
||||||
|
ENABLE_HEADLESS=""
|
||||||
|
if test "x$enable_headless" = "xyes"; then
|
||||||
|
ENABLE_HEADLESS="TRUE"
|
||||||
|
SCPDEFS="$SCPDEFS -DHEADLESS"
|
||||||
|
R="headless"
|
||||||
|
# this does not work see hack in Library_vcl.mk
|
||||||
|
AC_DEFINE(HEADLESS)
|
||||||
|
fi
|
||||||
|
AC_SUBST(ENABLE_HEADLESS)
|
||||||
|
|
||||||
if test -z "$R"; then
|
if test -z "$R"; then
|
||||||
AC_MSG_RESULT([none])
|
AC_MSG_RESULT([none])
|
||||||
else
|
else
|
||||||
@@ -9739,7 +9776,7 @@ SYSTEM_CAIRO=""
|
|||||||
|
|
||||||
AC_MSG_CHECKING([whether to use the system cairo])
|
AC_MSG_CHECKING([whether to use the system cairo])
|
||||||
|
|
||||||
if test "$with_system_cairo" = "yes"; then
|
if test "$enable_cairo_canvas" = "yes" -a "$with_system_cairo" = "yes"; then
|
||||||
SYSTEM_CAIRO=YES
|
SYSTEM_CAIRO=YES
|
||||||
AC_MSG_RESULT([yes])
|
AC_MSG_RESULT([yes])
|
||||||
|
|
||||||
@@ -9769,8 +9806,10 @@ else
|
|||||||
if test "$ENABLE_LIBRSVG" != NO -o -z "$ENABLE_DIRECTX"; then
|
if test "$ENABLE_LIBRSVG" != NO -o -z "$ENABLE_DIRECTX"; then
|
||||||
BUILD_TYPE="$BUILD_TYPE CAIRO"
|
BUILD_TYPE="$BUILD_TYPE CAIRO"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
BUILD_TYPE="$BUILD_TYPE CAIRO"
|
if test "$enable_cairo_canvas" = "yes"; then
|
||||||
|
BUILD_TYPE="$BUILD_TYPE CAIRO"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@@ -58,11 +58,13 @@ $(eval $(call gb_Executable_add_libs,oosplash,\
|
|||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifneq ($(GUIBASE),headless)
|
||||||
ifeq ($(GUI),UNX)
|
ifeq ($(GUI),UNX)
|
||||||
$(eval $(call gb_Executable_add_libs,oosplash,\
|
$(eval $(call gb_Executable_add_libs,oosplash,\
|
||||||
-lX11 \
|
-lX11 \
|
||||||
))
|
))
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(ENABLE_QUICKSTART_LIBPNG),TRUE)
|
ifeq ($(ENABLE_QUICKSTART_LIBPNG),TRUE)
|
||||||
|
|
||||||
|
@@ -114,6 +114,13 @@ else ifeq ($(OS),ANDROID)
|
|||||||
|
|
||||||
else ifeq ($(OS),IOS)
|
else ifeq ($(OS),IOS)
|
||||||
|
|
||||||
|
else ifeq ($(GUIBASE),headless)
|
||||||
|
|
||||||
|
$(eval $(call gb_Module_add_targets,desktop,\
|
||||||
|
Executable_oosplash \
|
||||||
|
Library_spl_unx \
|
||||||
|
))
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
$(eval $(call gb_Module_add_targets,desktop,\
|
$(eval $(call gb_Module_add_targets,desktop,\
|
||||||
|
@@ -199,7 +199,7 @@ my_components += \
|
|||||||
my_components += pythonloader
|
my_components += pythonloader
|
||||||
.ENDIF
|
.ENDIF
|
||||||
|
|
||||||
.IF "$(OS)" != "WNT" && "$(OS)" != "MACOSX" && "$(OS)" != "IOS" && "$(OS)" != "ANDROID"
|
.IF "$(OS)" != "WNT" && "$(OS)" != "MACOSX" && "$(OS)" != "IOS" && "$(OS)" != "ANDROID" && "$(GUIBASE)" != "headless"
|
||||||
my_components += component/desktop/unx/splash/splash
|
my_components += component/desktop/unx/splash/splash
|
||||||
.ENDIF
|
.ENDIF
|
||||||
|
|
||||||
@@ -324,7 +324,12 @@ my_components += \
|
|||||||
.END
|
.END
|
||||||
.END
|
.END
|
||||||
|
|
||||||
.IF "$(OS)" != "MACOSX" && "$(OS)" != "WNT" && "$(OS)" != "IOS" && "$(OS)" != "ANDROID"
|
.IF "$(GUIBASE)" == "headless"
|
||||||
|
my_components += \
|
||||||
|
component/vcl/vcl.headless
|
||||||
|
.END
|
||||||
|
|
||||||
|
.IF "$(OS)" != "MACOSX" && "$(OS)" != "WNT" && "$(OS)" != "IOS" && "$(OS)" != "ANDROID" && "$(GUIBASE)" != "headless"
|
||||||
my_components += \
|
my_components += \
|
||||||
desktopbe1 \
|
desktopbe1 \
|
||||||
component/vcl/vcl.unx
|
component/vcl/vcl.unx
|
||||||
@@ -354,7 +359,7 @@ my_components += mozbootstrap
|
|||||||
my_components += component/fpicker/source/unx/kde4/fps_kde4
|
my_components += component/fpicker/source/unx/kde4/fps_kde4
|
||||||
.END
|
.END
|
||||||
|
|
||||||
.IF "$(OS)" != "WNT" && "$(OS)" != "ANDROID" && "$(OS)" != "IOS"
|
.IF "$(OS)" != "WNT" && "$(OS)" != "ANDROID" && "$(OS)" != "IOS" && "$(OS)" != "headless"
|
||||||
my_components += cmdmail
|
my_components += cmdmail
|
||||||
.END
|
.END
|
||||||
|
|
||||||
|
@@ -312,6 +312,8 @@ MY_FILES_main += \
|
|||||||
# ?
|
# ?
|
||||||
.ELIF "$(GUIBASE)" == "android"
|
.ELIF "$(GUIBASE)" == "android"
|
||||||
# ?
|
# ?
|
||||||
|
.ELIF "$(GUIBASE)" == "headless"
|
||||||
|
# ?
|
||||||
.ELSE
|
.ELSE
|
||||||
ERROR : unknown-GUIBASE
|
ERROR : unknown-GUIBASE
|
||||||
.END
|
.END
|
||||||
|
@@ -522,7 +522,7 @@ File gid_Brand_File_Bin_Soffice
|
|||||||
#endif
|
#endif
|
||||||
End
|
End
|
||||||
|
|
||||||
#if defined(UNX) && !defined(QUARTZ)
|
#if defined(UNX) && !defined(QUARTZ) && !defined(HEADLESS)
|
||||||
File gid_Brand_File_Bin_Spadmin
|
File gid_Brand_File_Bin_Spadmin
|
||||||
BIN_FILE_BODY;
|
BIN_FILE_BODY;
|
||||||
Dir = gid_Brand_Dir_Program;
|
Dir = gid_Brand_Dir_Program;
|
||||||
|
@@ -548,6 +548,8 @@ SPECIAL_COMPONENT_LIB_FILE( gid_File_Lib_Fps_Office, fps_office.uno )
|
|||||||
SPECIAL_COMPONENT_LIB_FILE( gid_File_Lib_Fpicker, fpicker.uno )
|
SPECIAL_COMPONENT_LIB_FILE( gid_File_Lib_Fpicker, fpicker.uno )
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef HEADLESS
|
||||||
|
|
||||||
#ifndef SYSTEM_CAIRO
|
#ifndef SYSTEM_CAIRO
|
||||||
|
|
||||||
File gid_File_Lib_Cairo
|
File gid_File_Lib_Cairo
|
||||||
@@ -588,6 +590,8 @@ End
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
STD_LIB_FILE( gid_File_Lib_Frm , frm)
|
STD_LIB_FILE( gid_File_Lib_Frm , frm)
|
||||||
|
|
||||||
SPECIAL_COMPONENT_LIB_FILE( gid_File_Lib_Fsstorage, fsstorage.uno )
|
SPECIAL_COMPONENT_LIB_FILE( gid_File_Lib_Fsstorage, fsstorage.uno )
|
||||||
@@ -930,7 +934,7 @@ STD_LIB_FILE(gid_File_Lib_DeploymentMisc, deploymentmisc)
|
|||||||
STD_LIB_FILE( gid_File_Lib_Pl , pl)
|
STD_LIB_FILE( gid_File_Lib_Pl , pl)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(UNX) && ! defined(QUARTZ)
|
#if defined(UNX) && ! defined(QUARTZ) && ! defined(HEADLESS)
|
||||||
File gid_File_Lib_Desktop_Detector
|
File gid_File_Lib_Desktop_Detector
|
||||||
Name = LIBNAME(desktop_detector);
|
Name = LIBNAME(desktop_detector);
|
||||||
LIB_FILE_BODY;
|
LIB_FILE_BODY;
|
||||||
@@ -1156,7 +1160,7 @@ End
|
|||||||
|
|
||||||
STD_LIB_FILE( gid_File_Lib_Sot, sot )
|
STD_LIB_FILE( gid_File_Lib_Sot, sot )
|
||||||
|
|
||||||
#if defined(UNX) && !defined(QUARTZ)
|
#if defined(UNX) && !defined(QUARTZ) && !defined(HEADLESS)
|
||||||
|
|
||||||
File gid_File_Lib_Spa
|
File gid_File_Lib_Spa
|
||||||
Name = LIBNAME(spa);
|
Name = LIBNAME(spa);
|
||||||
@@ -1174,9 +1178,11 @@ File gid_File_Lib_Spell
|
|||||||
Dir = SCP2_OOO_BIN_DIR;
|
Dir = SCP2_OOO_BIN_DIR;
|
||||||
End
|
End
|
||||||
|
|
||||||
|
#if !defined HEADLESS
|
||||||
STD_LIB_FILE( gid_File_Lib_Spl, spl)
|
STD_LIB_FILE( gid_File_Lib_Spl, spl)
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined UNX && !defined MACOSX
|
#if defined UNX && !defined MACOSX && !defined HEADLESS
|
||||||
STD_LIB_FILE( gid_File_Lib_Spl_Unx, spl_unx)
|
STD_LIB_FILE( gid_File_Lib_Spl_Unx, spl_unx)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -1697,6 +1703,7 @@ File gid_File_Lib_Libcroco
|
|||||||
End
|
End
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if ! defined HEADLESS
|
||||||
#if ! defined SYSTEM_PANGO
|
#if ! defined SYSTEM_PANGO
|
||||||
File gid_File_Lib_Libpango
|
File gid_File_Lib_Libpango
|
||||||
LIB_FILE_BODY;
|
LIB_FILE_BODY;
|
||||||
@@ -1727,6 +1734,7 @@ File gid_File_Lib_Libpangowin32
|
|||||||
End
|
End
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#if ! defined SYSTEM_LIBGSF
|
#if ! defined SYSTEM_LIBGSF
|
||||||
File gid_File_Lib_Libgsf
|
File gid_File_Lib_Libgsf
|
||||||
|
@@ -223,7 +223,7 @@ File gid_File_Bin_Senddoc
|
|||||||
#endif
|
#endif
|
||||||
End
|
End
|
||||||
|
|
||||||
#if defined(UNX) && !defined(QUARTZ)
|
#if defined(UNX) && !defined(QUARTZ) && !defined(HEADLESS)
|
||||||
|
|
||||||
File gid_File_Bin_Spadmin_Bin
|
File gid_File_Bin_Spadmin_Bin
|
||||||
BIN_FILE_BODY;
|
BIN_FILE_BODY;
|
||||||
|
@@ -76,7 +76,7 @@ STD_RES_FILE( gid_File_Res_Sd, sd )
|
|||||||
|
|
||||||
STD_RES_FILE( gid_File_Res_Sfx, sfx )
|
STD_RES_FILE( gid_File_Res_Sfx, sfx )
|
||||||
|
|
||||||
#if defined(UNX) && !defined(QUARTZ)
|
#if defined(UNX) && !defined(QUARTZ) && !defined(HEADLESS)
|
||||||
|
|
||||||
STD_RES_FILE( gid_File_Res_Spa, spa )
|
STD_RES_FILE( gid_File_Res_Spa, spa )
|
||||||
|
|
||||||
|
@@ -689,6 +689,7 @@ Module gid_Module_Root_Files_7
|
|||||||
gid_File_Mozilla_Runtime);
|
gid_File_Mozilla_Runtime);
|
||||||
End
|
End
|
||||||
|
|
||||||
|
#ifndef HEADLESS
|
||||||
Module gid_Module_Root_Files_Images
|
Module gid_Module_Root_Files_Images
|
||||||
PackageInfo = "packinfo_office.txt";
|
PackageInfo = "packinfo_office.txt";
|
||||||
ParentID = gid_Module_Root;
|
ParentID = gid_Module_Root;
|
||||||
@@ -719,6 +720,7 @@ Module gid_Module_Root_Files_Images
|
|||||||
#endif
|
#endif
|
||||||
);
|
);
|
||||||
End
|
End
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef WITHOUT_FONTS
|
#ifndef WITHOUT_FONTS
|
||||||
Module gid_Module_Root_Fonts_OOo_Hidden
|
Module gid_Module_Root_Fonts_OOo_Hidden
|
||||||
|
@@ -141,10 +141,12 @@ $(eval $(call gb_Library_add_cxxflags,tk,\
|
|||||||
$(gb_OBJCXXFLAGS)))
|
$(gb_OBJCXXFLAGS)))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifneq ($(GUIBASE),headless)
|
||||||
ifneq (,$(filter LINUX DRAGONFLY OPENBSD FREEBSD NETBSD, $(OS)))
|
ifneq (,$(filter LINUX DRAGONFLY OPENBSD FREEBSD NETBSD, $(OS)))
|
||||||
$(eval $(call gb_Library_add_linked_libs,tk,\
|
$(eval $(call gb_Library_add_linked_libs,tk,\
|
||||||
X11 \
|
X11 \
|
||||||
))
|
))
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
# vim: set noet sw=4 ts=4:
|
# vim: set noet sw=4 ts=4:
|
||||||
|
@@ -36,6 +36,8 @@ else ifeq ($(GUIBASE),android)
|
|||||||
$(eval $(call gb_Library_set_componentfile,vcl,vcl/vcl.android))
|
$(eval $(call gb_Library_set_componentfile,vcl,vcl/vcl.android))
|
||||||
else ifeq ($(OS),IOS)
|
else ifeq ($(OS),IOS)
|
||||||
$(eval $(call gb_Library_set_componentfile,vcl,vcl/vcl.ios))
|
$(eval $(call gb_Library_set_componentfile,vcl,vcl/vcl.ios))
|
||||||
|
else ifeq ($(GUIBASE),headless)
|
||||||
|
$(eval $(call gb_Library_set_componentfile,vcl,vcl/vcl.headless))
|
||||||
else
|
else
|
||||||
$(eval $(call gb_Library_set_componentfile,vcl,vcl/vcl.unx))
|
$(eval $(call gb_Library_set_componentfile,vcl,vcl/vcl.unx))
|
||||||
endif
|
endif
|
||||||
@@ -434,6 +436,64 @@ $(eval $(call gb_Library_use_externals,vcl,\
|
|||||||
))
|
))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(GUIBASE),headless)
|
||||||
|
$(eval $(call gb_Library_add_cxxflags,vcl,\
|
||||||
|
$$(FREETYPE_CFLAGS) \
|
||||||
|
))
|
||||||
|
$(eval $(call gb_Library_add_defs,vcl,\
|
||||||
|
-DHEADLESS \
|
||||||
|
-DSAL_DLLPREFIX=\"$(gb_Library_SYSPRE)\" \
|
||||||
|
-DSAL_DLLPOSTFIX=\"$(gb_Library_OOOEXT)\" \
|
||||||
|
-D_XSALSET_LIBNAME=\"$(call gb_Library_get_runtime_filename,spa)\" \
|
||||||
|
))
|
||||||
|
$(eval $(call gb_Library_add_exception_objects,vcl,\
|
||||||
|
vcl/generic/app/gensys \
|
||||||
|
vcl/generic/app/geninst \
|
||||||
|
vcl/generic/app/gendisp \
|
||||||
|
vcl/generic/print/bitmap_gfx \
|
||||||
|
vcl/generic/print/common_gfx \
|
||||||
|
vcl/generic/print/glyphset \
|
||||||
|
vcl/generic/print/printerjob \
|
||||||
|
vcl/generic/print/psputil \
|
||||||
|
vcl/generic/print/genpspgraphics \
|
||||||
|
vcl/generic/print/genprnpsp \
|
||||||
|
vcl/generic/print/text_gfx \
|
||||||
|
vcl/generic/fontmanager/fontsubst \
|
||||||
|
vcl/generic/glyphs/gcach_ftyp \
|
||||||
|
vcl/generic/glyphs/gcach_layout \
|
||||||
|
vcl/generic/glyphs/gcach_rbmp \
|
||||||
|
vcl/generic/glyphs/glyphcache \
|
||||||
|
vcl/generic/fontmanager/fontcache \
|
||||||
|
vcl/generic/fontmanager/fontconfig \
|
||||||
|
vcl/generic/fontmanager/fontmanager \
|
||||||
|
vcl/generic/fontmanager/helper \
|
||||||
|
vcl/generic/fontmanager/parseAFM \
|
||||||
|
vcl/unx/generic/printer/jobdata \
|
||||||
|
vcl/unx/generic/printer/ppdparser \
|
||||||
|
vcl/null/printerinfomanager \
|
||||||
|
vcl/headless/headlessinst \
|
||||||
|
vcl/headless/svpbmp \
|
||||||
|
vcl/headless/svpdummies \
|
||||||
|
vcl/headless/svpelement \
|
||||||
|
vcl/headless/svpframe \
|
||||||
|
vcl/headless/svpgdi \
|
||||||
|
vcl/headless/svpinst \
|
||||||
|
vcl/headless/svpdata \
|
||||||
|
vcl/headless/svpprn \
|
||||||
|
vcl/headless/svptext \
|
||||||
|
vcl/headless/svpvd \
|
||||||
|
))
|
||||||
|
|
||||||
|
$(eval $(call gb_Library_add_linked_libs,vcl,\
|
||||||
|
basebmp \
|
||||||
|
))
|
||||||
|
|
||||||
|
$(eval $(call gb_Library_use_externals,vcl,\
|
||||||
|
fontconfig \
|
||||||
|
freetype \
|
||||||
|
))
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(GUIBASE),android)
|
ifeq ($(GUIBASE),android)
|
||||||
$(eval $(call gb_Library_add_libs,vcl,\
|
$(eval $(call gb_Library_add_libs,vcl,\
|
||||||
-llog \
|
-llog \
|
||||||
|
@@ -67,6 +67,12 @@ $(eval $(call gb_Module_add_targets,vcl,\
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(GUIBASE),headless)
|
||||||
|
$(eval $(call gb_Module_add_targets,vcl,\
|
||||||
|
Library_vclplug_svp \
|
||||||
|
))
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(GUIBASE),aqua)
|
ifeq ($(GUIBASE),aqua)
|
||||||
$(eval $(call gb_Module_add_targets,vcl,\
|
$(eval $(call gb_Module_add_targets,vcl,\
|
||||||
Package_osx \
|
Package_osx \
|
||||||
|
135
vcl/headless/headlessinst.cxx
Normal file
135
vcl/headless/headlessinst.cxx
Normal file
@@ -0,0 +1,135 @@
|
|||||||
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||||
|
/*
|
||||||
|
* Version: MPL 1.1 / GPLv3+ / LGPLv3+
|
||||||
|
*
|
||||||
|
* The contents of this file are subject to the Mozilla Public License Version
|
||||||
|
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||||
|
* the License or as specified alternatively below. You may obtain a copy of
|
||||||
|
* the License at http://www.mozilla.org/MPL/
|
||||||
|
*
|
||||||
|
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
|
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
|
* for the specific language governing rights and limitations under the
|
||||||
|
* License.
|
||||||
|
*
|
||||||
|
* Major Contributor(s):
|
||||||
|
* Copyright (C) 2012 Novell, Inc.
|
||||||
|
* Michael Meeks <michael.meeks@suse.com> (initial developer)
|
||||||
|
*
|
||||||
|
* All Rights Reserved.
|
||||||
|
*
|
||||||
|
* For minor contributions see the git repository.
|
||||||
|
*
|
||||||
|
* Alternatively, the contents of this file may be used under the terms of
|
||||||
|
* either the GNU General Public License Version 3 or later (the "GPLv3+"), or
|
||||||
|
* the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
|
||||||
|
* in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
|
||||||
|
* instead of those above.
|
||||||
|
*/
|
||||||
|
#include <headless/svpinst.hxx>
|
||||||
|
#include <headless/svpdummies.hxx>
|
||||||
|
#include <generic/gendata.hxx>
|
||||||
|
|
||||||
|
class HeadlessSalInstance : public SvpSalInstance
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
HeadlessSalInstance( SalYieldMutex *pMutex );
|
||||||
|
virtual ~HeadlessSalInstance();
|
||||||
|
|
||||||
|
virtual SalSystem* CreateSalSystem();
|
||||||
|
};
|
||||||
|
|
||||||
|
HeadlessSalInstance::HeadlessSalInstance( SalYieldMutex *pMutex ) :
|
||||||
|
SvpSalInstance( pMutex)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
HeadlessSalInstance::~HeadlessSalInstance()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
class HeadlessSalSystem : public SvpSalSystem {
|
||||||
|
#if 0
|
||||||
|
public:
|
||||||
|
AndroidSalSystem() : SvpSalSystem() {}
|
||||||
|
virtual ~AndroidSalSystem() {}
|
||||||
|
virtual int ShowNativeDialog( const rtl::OUString& rTitle,
|
||||||
|
const rtl::OUString& rMessage,
|
||||||
|
const std::list< rtl::OUString >& rButtons,
|
||||||
|
int nDefButton )
|
||||||
|
{
|
||||||
|
(void)rButtons; (void)nDefButton;
|
||||||
|
__android_log_print(ANDROID_LOG_INFO, "LibreOffice - dialog '%s': '%s'",
|
||||||
|
rtl::OUStringToOString(rTitle, RTL_TEXTENCODING_ASCII_US).getStr(),
|
||||||
|
rtl::OUStringToOString(rMessage, RTL_TEXTENCODING_ASCII_US).getStr());
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
SalSystem *HeadlessSalInstance::CreateSalSystem()
|
||||||
|
{
|
||||||
|
return new HeadlessSalSystem();
|
||||||
|
}
|
||||||
|
|
||||||
|
class HeadlessSalData : public SalGenericData
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
HeadlessSalData( SalInstance *pInstance ) : SalGenericData( SAL_DATA_HEADLESS, pInstance ) {}
|
||||||
|
virtual void ErrorTrapPush() {}
|
||||||
|
virtual bool ErrorTrapPop( bool ) { return false; }
|
||||||
|
};
|
||||||
|
|
||||||
|
// All the interesting stuff is slaved from the AndroidSalInstance
|
||||||
|
void InitSalData() {}
|
||||||
|
void DeInitSalData() {}
|
||||||
|
void InitSalMain() {}
|
||||||
|
void DeInitSalMain() {}
|
||||||
|
|
||||||
|
void SalAbort( const rtl::OUString& rErrorText, bool bDumpCore )
|
||||||
|
{
|
||||||
|
rtl::OUString aError( rErrorText );
|
||||||
|
if( aError.isEmpty() )
|
||||||
|
aError = rtl::OUString::createFromAscii("Unknown application error");
|
||||||
|
::fprintf( stderr, "%s\n", rtl::OUStringToOString(rErrorText, osl_getThreadTextEncoding()).getStr() );
|
||||||
|
|
||||||
|
::fprintf( stderr, "SalAbort: '%s'",
|
||||||
|
rtl::OUStringToOString(aError, RTL_TEXTENCODING_ASCII_US).getStr());
|
||||||
|
if( bDumpCore )
|
||||||
|
abort();
|
||||||
|
else
|
||||||
|
_exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
const OUString& SalGetDesktopEnvironment()
|
||||||
|
{
|
||||||
|
static rtl::OUString aEnv( RTL_CONSTASCII_USTRINGPARAM( "headless" ) );
|
||||||
|
return aEnv;
|
||||||
|
}
|
||||||
|
|
||||||
|
SalData::SalData() :
|
||||||
|
m_pInstance( 0 ),
|
||||||
|
m_pPlugin( 0 ),
|
||||||
|
m_pPIManager(0 )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
SalData::~SalData()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
// This is our main entry point:
|
||||||
|
SalInstance *CreateSalInstance()
|
||||||
|
{
|
||||||
|
HeadlessSalInstance* pInstance = new HeadlessSalInstance( new SalYieldMutex() );
|
||||||
|
new HeadlessSalData( pInstance );
|
||||||
|
return pInstance;
|
||||||
|
}
|
||||||
|
|
||||||
|
void DestroySalInstance( SalInstance *pInst )
|
||||||
|
{
|
||||||
|
pInst->ReleaseYieldMutex();
|
||||||
|
delete pInst;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
@@ -40,7 +40,8 @@ class GtkSalDisplay;
|
|||||||
enum SalGenericDataType { SAL_DATA_GTK, SAL_DATA_GTK3,
|
enum SalGenericDataType { SAL_DATA_GTK, SAL_DATA_GTK3,
|
||||||
SAL_DATA_KDE3, SAL_DATA_KDE4,
|
SAL_DATA_KDE3, SAL_DATA_KDE4,
|
||||||
SAL_DATA_UNX, SAL_DATA_SVP,
|
SAL_DATA_UNX, SAL_DATA_SVP,
|
||||||
SAL_DATA_ANDROID, SAL_DATA_IOS };
|
SAL_DATA_ANDROID, SAL_DATA_IOS,
|
||||||
|
SAL_DATA_HEADLESS };
|
||||||
|
|
||||||
class VCL_DLLPUBLIC SalGenericData : public SalData
|
class VCL_DLLPUBLIC SalGenericData : public SalData
|
||||||
{
|
{
|
||||||
|
@@ -39,6 +39,7 @@
|
|||||||
#include "ios/svsys.h"
|
#include "ios/svsys.h"
|
||||||
#elif defined ANDROID
|
#elif defined ANDROID
|
||||||
#include "android/svsys.h"
|
#include "android/svsys.h"
|
||||||
|
#elif defined HEADLESS
|
||||||
#else
|
#else
|
||||||
#include "unx/svsys.h"
|
#include "unx/svsys.h"
|
||||||
#endif
|
#endif
|
||||||
|
@@ -60,7 +60,11 @@ PrinterInfoManager::PrinterInfoManager( Type eType ) :
|
|||||||
m_bUseIncludeFeature( false ),
|
m_bUseIncludeFeature( false ),
|
||||||
m_bUseJobPatch( true ),
|
m_bUseJobPatch( true ),
|
||||||
m_aSystemDefaultPaper( RTL_CONSTASCII_USTRINGPARAM( "A4" ) ),
|
m_aSystemDefaultPaper( RTL_CONSTASCII_USTRINGPARAM( "A4" ) ),
|
||||||
|
#ifdef HEADLESS
|
||||||
|
m_bDisableCUPS( true )
|
||||||
|
#else
|
||||||
m_bDisableCUPS( false )
|
m_bDisableCUPS( false )
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
// initSystemDefaultPaper();
|
// initSystemDefaultPaper();
|
||||||
}
|
}
|
||||||
|
@@ -53,7 +53,7 @@ static oslModule pCloseModule = NULL;
|
|||||||
static SalInstance* tryInstance( const OUString& rModuleBase, bool bForce = false )
|
static SalInstance* tryInstance( const OUString& rModuleBase, bool bForce = false )
|
||||||
{
|
{
|
||||||
SalInstance* pInst = NULL;
|
SalInstance* pInst = NULL;
|
||||||
#ifndef ANDROID
|
#if !defined(ANDROID) || !defined(HEADLESS)
|
||||||
// Disable gtk3 plugin load except in experimental mode for now.
|
// Disable gtk3 plugin load except in experimental mode for now.
|
||||||
if( !bForce &&
|
if( !bForce &&
|
||||||
rModuleBase.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "gtk3" ) ) &&
|
rModuleBase.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "gtk3" ) ) &&
|
||||||
@@ -129,7 +129,7 @@ static SalInstance* tryInstance( const OUString& rModuleBase, bool bForce = fals
|
|||||||
return pInst;
|
return pInst;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef ANDROID
|
#if !defined(ANDROID) || !defined(HEADLESS)
|
||||||
|
|
||||||
static DesktopType get_desktop_environment()
|
static DesktopType get_desktop_environment()
|
||||||
{
|
{
|
||||||
|
@@ -655,7 +655,7 @@ const PPDParser* PPDParser::getParser( const String& rFile )
|
|||||||
PrinterInfoManager& rMgr = PrinterInfoManager::get();
|
PrinterInfoManager& rMgr = PrinterInfoManager::get();
|
||||||
if( rMgr.getType() == PrinterInfoManager::CUPS )
|
if( rMgr.getType() == PrinterInfoManager::CUPS )
|
||||||
{
|
{
|
||||||
#ifndef ANDROID
|
#if !defined(ANDROID) && !defined(HEADLESS)
|
||||||
pNewParser = const_cast<PPDParser*>(static_cast<CUPSManager&>(rMgr).createCUPSParser( aFile ));
|
pNewParser = const_cast<PPDParser*>(static_cast<CUPSManager&>(rMgr).createCUPSParser( aFile ));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
40
vcl/vcl.headless.component
Normal file
40
vcl/vcl.headless.component
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!--**********************************************************************
|
||||||
|
*
|
||||||
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
|
*
|
||||||
|
* Copyright 2000, 2010 Oracle and/or its affiliates.
|
||||||
|
*
|
||||||
|
* OpenOffice.org - a multi-platform office productivity suite
|
||||||
|
*
|
||||||
|
* This file is part of OpenOffice.org.
|
||||||
|
*
|
||||||
|
* OpenOffice.org is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Lesser General Public License version 3
|
||||||
|
* only, as published by the Free Software Foundation.
|
||||||
|
*
|
||||||
|
* OpenOffice.org is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Lesser General Public License version 3 for more details
|
||||||
|
* (a copy is included in the LICENSE file that accompanied this code).
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
|
* version 3 along with OpenOffice.org. If not, see
|
||||||
|
* <http://www.openoffice.org/license.html>
|
||||||
|
* for a copy of the LGPLv3 License.
|
||||||
|
*
|
||||||
|
**********************************************************************-->
|
||||||
|
|
||||||
|
<component loader="com.sun.star.loader.SharedLibrary" prefix="vcl"
|
||||||
|
xmlns="http://openoffice.org/2010/uno-components">
|
||||||
|
<implementation name="com.sun.star.frame.VCLSessionManagerClient">
|
||||||
|
<service name="com.sun.star.frame.SessionManagerClient"/>
|
||||||
|
</implementation>
|
||||||
|
<implementation name="vcl::DisplayAccess">
|
||||||
|
<service name="com.sun.star.awt.DisplayAccess"/>
|
||||||
|
</implementation>
|
||||||
|
<implementation name="vcl::FontIdentificator">
|
||||||
|
<service name="com.sun.star.awt.FontIdentificator"/>
|
||||||
|
</implementation>
|
||||||
|
</component>
|
Reference in New Issue
Block a user