forked from openlp/openlp
Use AppLocation to figure out what directory the server is in
This commit is contained in:
parent
ad06ef5285
commit
34520d6dbe
@ -25,7 +25,7 @@ import os
|
|||||||
import time
|
import time
|
||||||
from subprocess import Popen
|
from subprocess import Popen
|
||||||
|
|
||||||
from openlp.core.common import is_macosx, Registry, delete_file
|
from openlp.core.common import AppLocation, Registry, delete_file, is_macosx
|
||||||
|
|
||||||
if is_macosx() and os.path.exists('/Applications/LibreOffice.app'):
|
if is_macosx() and os.path.exists('/Applications/LibreOffice.app'):
|
||||||
macuno_available = True
|
macuno_available = True
|
||||||
@ -66,7 +66,8 @@ class MacLOController(PresentationController):
|
|||||||
Start a LibreOfficeServer
|
Start a LibreOfficeServer
|
||||||
"""
|
"""
|
||||||
libreoffice_python = '/Applications/LibreOffice.app/Contents/Resources/python'
|
libreoffice_python = '/Applications/LibreOffice.app/Contents/Resources/python'
|
||||||
libreoffice_server = os.path.join(os.path.dirname(__file__), 'libreofficeserver.py')
|
libreoffice_server = os.path.join(AppLocation.get_directory(AppLocation.PluginsDir),
|
||||||
|
'lib', 'libreofficeserver.py')
|
||||||
if os.path.exists(libreoffice_python):
|
if os.path.exists(libreoffice_python):
|
||||||
self.server_process = Popen([libreoffice_python, libreoffice_server])
|
self.server_process = Popen([libreoffice_python, libreoffice_server])
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user