loolwsd/LOOLWSD.cpp      |    6 +++++-
 loolwsd/Makefile.am      |    6 +++++-
 loolwsd/loolwsd.spec.in  |    3 ++-
 loolwsd/test/Makefile.am |    2 +-
 4 files changed, 13 insertions(+), 4 deletions(-)

New commits:
commit 1f560af63aa3de02053243f553871b04f935430d
Author: Andras Timar <andras.ti...@collabora.com>
Date:   Thu Apr 14 14:43:13 2016 +0200

    loolwsd: discovery.xml to datadir

diff --git a/loolwsd/LOOLWSD.cpp b/loolwsd/LOOLWSD.cpp
index d1ac7ac..ac16540 100644
--- a/loolwsd/LOOLWSD.cpp
+++ b/loolwsd/LOOLWSD.cpp
@@ -643,7 +643,11 @@ private:
         DOMParser parser;
         DOMWriter writer;
 
-        const std::string discoveryPath = 
Path(Application::instance().commandPath()).parent().toString() + 
"discovery.xml";
+        std::string discoveryPath = 
Path(Application::instance().commandPath()).parent().toString() + 
"discovery.xml";
+        if (!File(discoveryPath).exists())
+        {
+            discoveryPath = LOOLWSD_DATADIR "/discovery.xml";
+        }
         const std::string mediaType = "text/xml";
         const std::string action = "action";
         const std::string urlsrc = "urlsrc";
diff --git a/loolwsd/Makefile.am b/loolwsd/Makefile.am
index 98be956..07d7843 100644
--- a/loolwsd/Makefile.am
+++ b/loolwsd/Makefile.am
@@ -2,7 +2,11 @@ SUBDIRS = . test
 
 bin_PROGRAMS = loolwsd loolforkit loolmap loolmount
 
-dist_bin_SCRIPTS = loolwsd-systemplate-setup discovery.xml
+dist_bin_SCRIPTS = loolwsd-systemplate-setup
+
+loolwsddatadir = @LOOLWSD_DATADIR@
+
+loolwsddata_DATA = discovery.xml
 
 ACLOCAL_AMFLAGS = -I m4
 
diff --git a/loolwsd/loolwsd.spec.in b/loolwsd/loolwsd.spec.in
index ad6206a..b7392cc 100644
--- a/loolwsd/loolwsd.spec.in
+++ b/loolwsd/loolwsd.spec.in
@@ -62,7 +62,8 @@ echo "0 0 */1 * * root find /var/cache/loolwsd -name 
\"*.png\" -a -atime +10 -ex
 /usr/bin/loolwsd-systemplate-setup
 /usr/bin/loolmap
 /usr/bin/loolforkit
-/usr/bin/discovery.xml
+/usr/bin/loolmount
+/usr/share/loolwsd/discovery.xml
 %{_unitdir}/loolwsd.service
 /var/adm/fillup-templates/sysconfig.loolwsd
 /etc/cron.d/loolwsd.cron
commit b3e610eba002fffe3e18c5a45615f9f059cb4ab7
Author: Andras Timar <andras.ti...@collabora.com>
Date:   Thu Apr 14 14:06:09 2016 +0200

    loolwsd: do not install unit test shared libs

diff --git a/loolwsd/test/Makefile.am b/loolwsd/test/Makefile.am
index 144b9e0..cbeb4cc 100644
--- a/loolwsd/test/Makefile.am
+++ b/loolwsd/test/Makefile.am
@@ -4,7 +4,7 @@ check_PROGRAMS = test
 
 AM_CXXFLAGS = $(CPPUNIT_CFLAGS)
 
-lib_LTLIBRARIES = \
+check_LTLIBRARIES = \
        unit-timeout.la unit-prefork.la \
         unit-storage.la unit-fonts.la
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to