diff --git a/LogarithmPlotter/logarithmplotter.py b/LogarithmPlotter/logarithmplotter.py index f1354bd..0072aec 100644 --- a/LogarithmPlotter/logarithmplotter.py +++ b/LogarithmPlotter/logarithmplotter.py @@ -37,8 +37,15 @@ from webbrowser import open as openWeb tmpfile = mkstemp(suffix='.png')[1] pwd = getcwd() -from . import config, __VERSION__ -from .update import check_for_updates +chdir(path.dirname(path.realpath(__file__))) + +from sys import path as sys_path +if path.realpath(path.join(getcwd(), "..")) not in sys_path: + sys_path.append(path.realpath(path.join(getcwd(), ".."))) + + +from LogarithmPlotter import config, __VERSION__ +from LogarithmPlotter.update import check_for_updates config.init() @@ -136,7 +143,6 @@ class Helper(QObject): openWeb(url) def run(): - chdir(path.dirname(path.realpath(__file__))) environ["QT_QUICK_CONTROLS_STYLE"] = { "linux": get_linux_theme(), diff --git a/build-macosx.sh b/build-macosx.sh index 197550c..5e17dff 100755 --- a/build-macosx.sh +++ b/build-macosx.sh @@ -17,6 +17,6 @@ pyinstaller --add-data "LogarithmPlotter/qml:qml" \ --icon=mac/logarithmplotter.icns \ --osx-bundle-identifier eu.ad5001.LogarithmPlotter \ -n LogarithmPlotter \ - LogarithmPlotter/__init__.py + LogarithmPlotter/logarithmplotter.py cp mac/Info.plist dist/LogarithmPlotter.app/Contents/Info.plist