diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index c8e49b186d..80390c907f 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -153,7 +153,6 @@ class CuraApplication(QtApplication): if not hasattr(sys, "frozen"): resource_path = os.path.join(os.path.abspath(os.path.dirname(__file__)), "..", "resources") Resources.addSearchPath(resource_path) - Resources.setBundledResourcesPath(resource_path) self._use_gui = True self._open_file_queue = [] # Files to open when plug-ins are loaded. diff --git a/cura/CuraPackageManager.py b/cura/CuraPackageManager.py index 2b91081e4d..69378ffade 100644 --- a/cura/CuraPackageManager.py +++ b/cura/CuraPackageManager.py @@ -28,15 +28,14 @@ class CuraPackageManager(QObject): self._container_registry = self._application.getContainerRegistry() self._plugin_registry = self._application.getPluginRegistry() - # JSON file that keeps track of all installed packages. - self._bundled_package_management_file_path = os.path.join( - os.path.abspath(Resources.getBundledResourcesPath()), - "packages.json" - ) - self._user_package_management_file_path = os.path.join( - os.path.abspath(Resources.getDataStoragePath()), - "packages.json" - ) + #JSON files that keep track of all installed packages. + for search_path in Resources.getSearchPaths(): + candidate_bundled_path = os.path.join(search_path, "bundled_packages.json") + if os.path.exists(candidate_bundled_path): + self._bundled_package_management_file_path = candidate_bundled_path + candidate_user_path = os.path.join(search_path, "packages.json") + if os.path.exists(candidate_user_path): + self._user_package_management_file_path = candidate_user_path self._bundled_package_dict = {} # A dict of all bundled packages self._installed_package_dict = {} # A dict of all installed packages diff --git a/resources/packages.json b/resources/bundled_packages.json similarity index 100% rename from resources/packages.json rename to resources/bundled_packages.json