From 6eeaab3c12fe0d60f8e841927cb7b209b482d916 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 13 Feb 2018 11:45:49 +0100 Subject: [PATCH] Add plug-in locations with different lib suffixes Or suffices if you want to go the Latin way. Fixes #3195. --- cura/CuraApplication.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 4ff39b84a4..87bc4532a8 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -12,6 +12,7 @@ from UM.Math.Vector import Vector from UM.Math.Quaternion import Quaternion from UM.Math.AxisAlignedBox import AxisAlignedBox from UM.Math.Matrix import Matrix +from UM.Platform import Platform from UM.Resources import Resources from UM.Scene.ToolHandle import ToolHandle from UM.Scene.Iterator.DepthFirstIterator import DepthFirstIterator @@ -588,7 +589,13 @@ class CuraApplication(QtApplication): def _loadPlugins(self): self._plugin_registry.addType("profile_reader", self._addProfileReader) self._plugin_registry.addType("profile_writer", self._addProfileWriter) - self._plugin_registry.addPluginLocation(os.path.join(QtApplication.getInstallPrefix(), "lib", "cura")) + + if Platform.isLinux(): + lib_suffixes = {"", "64", "32", "x32"} #A few common ones on different distributions. + else: + lib_suffixes = {""} + for suffix in lib_suffixes: + self._plugin_registry.addPluginLocation(os.path.join(QtApplication.getInstallPrefix(), "lib" + suffix, "cura")) if not hasattr(sys, "frozen"): self._plugin_registry.addPluginLocation(os.path.join(os.path.abspath(os.path.dirname(__file__)), "..", "plugins")) self._plugin_registry.loadPlugin("ConsoleLogger")