From 34520d6dbe18bd028f8938c994f01580f25a9609 Mon Sep 17 00:00:00 2001 From: Raoul Snyman Date: Sat, 26 Nov 2016 00:01:15 +0200 Subject: [PATCH] Use AppLocation to figure out what directory the server is in --- openlp/plugins/presentations/lib/maclocontroller.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/openlp/plugins/presentations/lib/maclocontroller.py b/openlp/plugins/presentations/lib/maclocontroller.py index c60d642cd..6403581ad 100644 --- a/openlp/plugins/presentations/lib/maclocontroller.py +++ b/openlp/plugins/presentations/lib/maclocontroller.py @@ -25,7 +25,7 @@ import os import time 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'): macuno_available = True @@ -66,7 +66,8 @@ class MacLOController(PresentationController): Start a LibreOfficeServer """ 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): self.server_process = Popen([libreoffice_python, libreoffice_server])