summaryrefslogtreecommitdiff
blob: 3ab3e829908014c40e973682c9d5de97c0e1cfe4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
diff --git a/desktop/scripts/soffice.sh b/desktop/scripts/soffice.sh
index a259bf6..672fa23 100755
--- a/desktop/scripts/soffice.sh
+++ b/desktop/scripts/soffice.sh
@@ -139,6 +139,9 @@ if echo "$checks" | grep -q "cc" ; then
     exit 1;
 fi
 
+PYTHONPATH=$sd_prog${PYTHONPATH+:$PYTHONPATH}
+export PYTHONPATH
+
 case "`uname -s`" in
 NetBSD|OpenBSD|DragonFly)
 # this is a temporary hack until we can live with the default search paths

--- a/pyuno/source/module/uno.py 2016-08-07 20:57:51.653712240 -0400
+++ b/pyuno/source/module/uno.py 2016-08-07 20:59:33.958896861 -0400
@@ -16,11 +16,16 @@
 #   except in compliance with the License. You may obtain a copy of
 #   the License at http://www.apache.org/licenses/LICENSE-2.0 .
 #
+import os
 import pyuno
 import sys
 import traceback
 import warnings

+sys.path.append('%eprefix%/usr/%libdir%/libreoffice/program')
+if getattr(os.environ, 'URE_BOOTSTRAP', None) is None:
+    os.environ['URE_BOOTSTRAP'] = "vnd.sun.star.pathname:%eprefix%/usr/%libdir%/libreoffice/program/fundamentalrc"
+
 # since on Windows sal3.dll no longer calls WSAStartup
 import socket

diff --git a/pyuno/source/officehelper.py b/pyuno/source/officehelper.py
index 99d3b03..704edab 100755
--- a/pyuno/source/officehelper.py
+++ b/pyuno/source/officehelper.py
@@ -44,7 +44,7 @@ def bootstrap():
         if "UNO_PATH" in os.environ:
             sOffice = os.environ["UNO_PATH"]
         else:
-            sOffice = "" # lets hope for the best
+            sOffice = "%eprefix%/usr/%libdir%/libreoffice/program"
         sOffice = os.path.join(sOffice, "soffice")
         if platform.startswith("win"): 
             sOffice += ".exe"