From 70f5dede95fbf5f7c4760fe7748175f0ba984f01 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Mon, 18 May 2015 15:01:40 +0200 Subject: [PATCH] Add standard Cura install directories to resource and plugin paths Contributes to #41 Contributes to #42 --- src/CuraApplication.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/CuraApplication.py b/src/CuraApplication.py index 99b206cd19..73b8b69955 100644 --- a/src/CuraApplication.py +++ b/src/CuraApplication.py @@ -35,6 +35,7 @@ from . import PrintInformation from PyQt5.QtCore import pyqtSlot, QUrl, Qt, pyqtSignal, pyqtProperty from PyQt5.QtGui import QColor +import platform import sys import os.path import numpy @@ -42,6 +43,7 @@ numpy.seterr(all="ignore") class CuraApplication(QtApplication): def __init__(self): + Resources.addResourcePath(os.path.join(QtApplication.getInstallPrefix(), "share", "cura")) if not hasattr(sys, "frozen"): Resources.addResourcePath(os.path.join(os.path.abspath(os.path.dirname(__file__)), "..")) @@ -72,6 +74,7 @@ class CuraApplication(QtApplication): ## Handle loading of all plugin types (and the backend explicitly) # \sa PluginRegistery def _loadPlugins(self): + self._plugin_registry.addPluginLocation(os.path.join(QtApplication.getInstallPrefix(), "lib", "cura")) if not hasattr(sys, "frozen"): self._plugin_registry.addPluginLocation(os.path.join(os.path.abspath(os.path.dirname(__file__)), "..", "plugins"))