From 2cf1f2243983f59174a534021d0505896be22872 Mon Sep 17 00:00:00 2001 From: Andras Timar Date: Mon, 20 Mar 2017 19:07:01 +0100 Subject: [PATCH] Use LO_PATH instead of hardcoded path as config default Change-Id: I0d6ce9e7938e2521e764978526fe2d9ce632c992 --- Makefile.am | 2 +- configure.ac | 12 ++++++------ loolwsd.xml.in | 2 +- wsd/LOOLWSD.cpp | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Makefile.am b/Makefile.am index 3add0d129..0ad5a1f0b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -153,7 +153,7 @@ shared_headers = common/Common.hpp \ common/IoUtil.hpp \ common/FileUtil.hpp \ common/Log.hpp \ - common/LOOLWebSocket.hpp \ + common/LOOLWebSocket.hpp \ common/Protocol.hpp \ common/Session.hpp \ common/Unit.hpp \ diff --git a/configure.ac b/configure.ac index b389d6919..dfd709539 100644 --- a/configure.ac +++ b/configure.ac @@ -166,31 +166,30 @@ AS_IF([test -n "$with_lokit_path"], [CPPFLAGS="$CPPFLAGS -I${with_lokit_path}"]) lokit_msg="$with_lokit_path" -dnl -dnl lo_path is not required; but useful for testing. -dnl -LO_PATH= +LO_PATH="/usr/lib64/libreoffice" JAIL_PATH=not-set SYSTEMPLATE_PATH=not-set have_lo_path=false AC_MSG_CHECKING([whether to run tests against a LibreOffice]) if test -n "$with_lo_path"; then + LO_PATH="$with_lo_path" version_file="$with_lo_path/program/versionrc" if test -f $version_file; then - LO_PATH="$with_lo_path" JAILS_PATH="\${abs_top_builddir}/jails" SYSTEMPLATE_PATH="\${abs_top_builddir}/systemplate" have_lo_path=true lo_msg="test against $LO_PATH" AC_MSG_RESULT([yes]) else - AC_MSG_ERROR([LibreOffice install looks dodgy, missing $version_file]) + lo_msg="no integration tests" + AC_MSG_RESULT([no]) fi else lo_msg="no integration tests" AC_MSG_RESULT([no]) fi AC_SUBST(LO_PATH) +AC_DEFINE_UNQUOTED([LO_PATH],["$LO_PATH"],[Path to LibreOffice installation]) AC_SUBST(JAILS_PATH) AC_SUBST(SYSTEMPLATE_PATH) AM_CONDITIONAL(HAVE_LO_PATH,[test "$have_lo_path" = "true"]) @@ -326,6 +325,7 @@ AC_LANG_POP echo " Configuration: LOKit path ${lokit_msg} + LO path $LO_PATH LO integration tests ${lo_msg} SSL support $ssl_msg Debug & low security $debug_msg diff --git a/loolwsd.xml.in b/loolwsd.xml.in index 360bde1c4..20fc0dd62 100644 --- a/loolwsd.xml.in +++ b/loolwsd.xml.in @@ -5,7 +5,7 @@ - + diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp index f7e0f6e76..ba13caba8 100644 --- a/wsd/LOOLWSD.cpp +++ b/wsd/LOOLWSD.cpp @@ -643,7 +643,7 @@ void LOOLWSD::initialize(Application& self) static const std::map DefAppConfig = { { "tile_cache_path", LOOLWSD_CACHEDIR }, { "sys_template_path", "systemplate" }, - { "lo_template_path", "/opt/collaboraoffice5.3" }, + { "lo_template_path", LO_PATH }, { "child_root_path", "jails" }, { "lo_jail_subpath", "lo" }, { "server_name", "" },