From 3c779f018acee649e99ed51192785682aba3ad47 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 2 Aug 2014 02:18:23 +0100 Subject: [PATCH] Fix some paths --- source/carla_shared.py | 4 ++-- source/carla_style.py | 7 +++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/source/carla_shared.py b/source/carla_shared.py index 055eef4b0..267042502 100644 --- a/source/carla_shared.py +++ b/source/carla_shared.py @@ -527,8 +527,8 @@ def initHost(initName, libPrefix = None, failError = True): elif CWDl.endswith("resources"): if CWDl.endswith("native-plugins%sresources" % os.sep): gCarla.pathBinaries = os.path.abspath(os.path.join(CWD, "..", "..", "..", "..", "bin")) - elif "carla-native.lv2" in sys.argv[0]: - gCarla.pathBinaries = os.path.abspath(os.path.join(CWD, "..", "..", "..", "lib", "lv2", "carla-native.lv2")) + elif "carla-native.lv2" in sys.argv[0].lower(): + gCarla.pathBinaries = os.path.abspath(os.path.join(CWD, "..", "..", "..", "lv2", "carla-native.lv2")) else: gCarla.pathBinaries = os.path.abspath(os.path.join(CWD, "..")) diff --git a/source/carla_style.py b/source/carla_style.py index d3736a1da..440f74c22 100644 --- a/source/carla_style.py +++ b/source/carla_style.py @@ -62,6 +62,9 @@ class CarlaApplication(object): elif CWDl.endswith("source"): stylesDir = os.path.abspath(os.path.join(CWD, "..", "bin")) + elif CWDl.endswith("bin") or os.path.isfile(sys.path[0]): + stylesDir = CWD + if stylesDir and os.path.exists(stylesDir): QApplication.addLibraryPath(stylesDir) @@ -77,10 +80,6 @@ class CarlaApplication(object): self._createApp(appName) return - # fix Qt5 not finding plarform dir on Mac and Windows - if MACOS or WINDOWS: - QApplication.addLibraryPath(CWD) - # set style QApplication.setStyle("carla" if stylesDir else "fusion")