Refactor the profile and Cura specific import/export code, put the cura stuff in Cura itself.

Contributes to CURA-1667 Profile import/export
This commit is contained in:
Simon Edwards 2016-06-14 11:44:11 +02:00
parent c0b31d85fa
commit 175b5429b4
3 changed files with 173 additions and 2 deletions

View file

@ -34,6 +34,7 @@ sys.excepthook = exceptHook
# tries to create PyQt objects on a non-main thread.
import Arcus #@UnusedImport
import cura.CuraApplication
import cura.CuraContainerRegistry
if sys.platform == "win32" and hasattr(sys, "frozen"):
dirpath = os.path.expanduser("~/AppData/Local/cura/")
@ -41,5 +42,8 @@ if sys.platform == "win32" and hasattr(sys, "frozen"):
sys.stdout = open(os.path.join(dirpath, "stdout.log"), "w")
sys.stderr = open(os.path.join(dirpath, "stderr.log"), "w")
# Force an instance of CuraContainerRegistry to be created and reused later.
cura.CuraContainerRegistry.CuraContainerRegistry.getInstance()
app = cura.CuraApplication.CuraApplication.getInstance()
app.run()