Added support for MacOSX. Changed to run soffice instead of soffice.bin as soffice.bin is not executable on MacOSX.
This commit is contained in:
parent
59e0a22ed3
commit
48dce82650
@ -20,7 +20,14 @@ if not is_found_uno:
|
|||||||
cand = os.path.dirname(cand)
|
cand = os.path.dirname(cand)
|
||||||
if os.path.exists(os.path.join(cand, "uno.py")):
|
if os.path.exists(os.path.join(cand, "uno.py")):
|
||||||
sys.path.append(cand)
|
sys.path.append(cand)
|
||||||
|
is_found_uno = True
|
||||||
break
|
break
|
||||||
|
# For uno.py on MacOS
|
||||||
|
if not is_found_uno:
|
||||||
|
cand = "/Applications/OpenOffice.app/Contents/MacOS"
|
||||||
|
if os.path.exists(os.path.join(cand, "uno.py")):
|
||||||
|
sys.path.append(cand)
|
||||||
|
is_found_uno = True
|
||||||
import uno
|
import uno
|
||||||
from com.sun.star.connection import NoConnectException
|
from com.sun.star.connection import NoConnectException
|
||||||
|
|
||||||
@ -274,7 +281,7 @@ class OpenOffice:
|
|||||||
time.sleep(2)
|
time.sleep(2)
|
||||||
return
|
return
|
||||||
os.setsid()
|
os.setsid()
|
||||||
ooexec = os.path.join(os.path.dirname(uno.__file__), "soffice.bin")
|
ooexec = os.path.join(os.path.dirname(uno.__file__), "soffice")
|
||||||
try:
|
try:
|
||||||
os.execl(
|
os.execl(
|
||||||
ooexec, ooexec,
|
ooexec, ooexec,
|
||||||
|
Loading…
Reference in New Issue
Block a user