CURA-5296 Better finding for packages.json

This commit is contained in:
Ian Paschal 2018-05-14 14:44:40 +02:00
parent 757824ae93
commit dd14a8e685
2 changed files with 4 additions and 4 deletions

View file

@ -151,7 +151,9 @@ class CuraApplication(QtApplication):
Resources.addSearchPath(os.path.join(QtApplication.getInstallPrefix(), "share", "cura", "resources")) Resources.addSearchPath(os.path.join(QtApplication.getInstallPrefix(), "share", "cura", "resources"))
if not hasattr(sys, "frozen"): if not hasattr(sys, "frozen"):
Resources.addSearchPath(os.path.join(os.path.abspath(os.path.dirname(__file__)), "..", "resources")) 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._use_gui = True
self._open_file_queue = [] # Files to open when plug-ins are loaded. self._open_file_queue = [] # Files to open when plug-ins are loaded.

View file

@ -30,9 +30,7 @@ class CuraPackageManager(QObject):
# JSON file that keeps track of all installed packages. # JSON file that keeps track of all installed packages.
self._bundled_package_management_file_path = os.path.join( self._bundled_package_management_file_path = os.path.join(
os.path.dirname(os.path.abspath(__file__)), os.path.abspath(Resources.getBundledResourcesPath()),
"..",
"resources",
"packages.json" "packages.json"
) )
self._user_package_management_file_path = os.path.join( self._user_package_management_file_path = os.path.join(