From 214a5aa77e4690fce8076eb5edc3a8bf59a56c68 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 4 Jun 2023 09:01:57 +0200 Subject: [PATCH] Try resource dir as library path first Signed-off-by: falkTX --- source/frontend/carla_app.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/source/frontend/carla_app.py b/source/frontend/carla_app.py index 7c9a291ac..9c457ed2d 100644 --- a/source/frontend/carla_app.py +++ b/source/frontend/carla_app.py @@ -68,8 +68,13 @@ class CarlaApplication(): path = "H:\\PawPawBuilds\\targets\\win32\\lib\\qt5\\plugins" QApplication.addLibraryPath(path) + # Try resource dir as library path first + if os.path.exists(os.path.join(pathResources, "styles", "carlastyle.json")): + QApplication.addLibraryPath(pathResources) + stylesDir = pathResources + # Use binary dir as library path - if os.path.exists(pathBinaries): + elif os.path.exists(pathBinaries): QApplication.addLibraryPath(pathBinaries) stylesDir = pathBinaries