From 5ffe46cac65506b61049ed81776ddb163cf45538 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Thu, 3 Sep 2015 10:13:08 -0700 Subject: [PATCH 1/8] Fix setup.py to woprk for 15.10 --- setup.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/setup.py b/setup.py index 08b1564c16..f5b3c3e106 100644 --- a/setup.py +++ b/setup.py @@ -5,6 +5,7 @@ from distutils.core import setup import py2exe import UM import UM.Qt +import cura import os import re import shutil @@ -22,7 +23,7 @@ def copytree(src, dst, symlinks=False, ignore=None): else: shutil.copy2(s, d) -includes = ["sip", "ctypes", "UM", "PyQt5.QtNetwork", "PyQt5._QOpenGLFunctions_2_0", "serial", "Arcus", "google", "google.protobuf", "google.protobuf.descriptor", "xml.etree", "xml.etree.ElementTree", "cura"] +includes = ["sip", "ctypes", "UM", "PyQt5.QtNetwork", "PyQt5._QOpenGLFunctions_2_0", "serial", "Arcus", "google", "google.protobuf", "google.protobuf.descriptor", "xml.etree", "xml.etree.ElementTree", "cura", "cura.OneAtATimeIterator"] # Include all the UM modules in the includes. As py2exe fails to properly find all the dependencies due to the plugin architecture. for dirpath, dirnames, filenames in os.walk(os.path.dirname(UM.__file__)): if "__" in dirpath: @@ -41,9 +42,9 @@ print("Removing previous distribution package") shutil.rmtree("dist", True) setup(name="Cura", - version="15.05.97", + version="15.09.80", author="Ultimaker", - author_email="d.braam@ultimaker.com", + author_email="a.hiemstra@ultimaker.com", url="http://software.ultimaker.com/", license="GNU AFFERO GENERAL PUBLIC LICENSE (AGPL)", scripts=["cura_app.py"], @@ -54,9 +55,9 @@ setup(name="Cura", print("Coping Cura plugins.") shutil.copytree(os.path.dirname(UM.__file__) + "/../plugins", "dist/plugins", ignore = shutil.ignore_patterns("ConsoleLogger", "OBJWriter", "MLPWriter", "MLPReader")) for path in os.listdir("plugins"): - shutil.copytree("plugins/" + path, "dist/plugins/" + path) + copytree("plugins/" + path, "dist/plugins/" + path) print("Coping resources.") -shutil.copytree(os.path.dirname(UM.__file__) + "/../resources", "dist/resources") +copytree(os.path.dirname(UM.__file__) + "/../resources", "dist/resources") copytree("resources", "dist/resources") print("Coping Uranium QML.") shutil.copytree(os.path.dirname(UM.__file__) + "/Qt/qml/UM", "dist/qml/UM") From 73ec6e9f1c6f3347ab8c05db5aa7abba762fa8d1 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Thu, 3 Sep 2015 10:13:47 -0700 Subject: [PATCH 2/8] Use resolvedUrl since that does give the right path for qml files --- resources/qml/AddMachineWizard.qml | 2 +- resources/qml/WizardPages/AddMachine.qml | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/resources/qml/AddMachineWizard.qml b/resources/qml/AddMachineWizard.qml index 22b5e67a74..1c743834de 100644 --- a/resources/qml/AddMachineWizard.qml +++ b/resources/qml/AddMachineWizard.qml @@ -22,7 +22,7 @@ UM.Wizard firstRun: false Component.onCompleted: { - base.appendPage(UM.Resources.getPath(Cura.ResourceTypes.QmlFiles, "WizardPages/AddMachine.qml"), catalog.i18nc("@title", "Add Printer")); + base.appendPage(Qt.resolvedUrl("WizardPages/AddMachine.qml"), catalog.i18nc("@title", "Add Printer")); base.currentPage = 0; } diff --git a/resources/qml/WizardPages/AddMachine.qml b/resources/qml/WizardPages/AddMachine.qml index 826a9bc0d7..0719e0b593 100644 --- a/resources/qml/WizardPages/AddMachine.qml +++ b/resources/qml/WizardPages/AddMachine.qml @@ -203,16 +203,16 @@ Item console.log(pages[i]) switch(pages[i]) { case "SelectUpgradedParts": - base.wizard.appendPage(UM.Resources.getPath(Cura.ResourceTypes.QmlFiles, "WizardPages/SelectUpgradedParts.qml"), catalog.i18nc("@title", "Select Upgraded Parts")); + base.wizard.appendPage(Qt.resolvedUrl("SelectUpgradedParts.qml"), catalog.i18nc("@title", "Select Upgraded Parts")); break; case "UpgradeFirmware": - base.wizard.appendPage(UM.Resources.getPath(Cura.ResourceTypes.QmlFiles, "WizardPages/UpgradeFirmware.qml"), catalog.i18nc("@title", "Upgrade Firmware")); + base.wizard.appendPage(Qt.resolvedUrl("UpgradeFirmware.qml"), catalog.i18nc("@title", "Upgrade Firmware")); break; case "UltimakerCheckup": - base.wizard.appendPage(UM.Resources.getPath(Cura.ResourceTypes.QmlFiles, "WizardPages/UltimakerCheckup.qml"), catalog.i18nc("@title", "Check Printer")); + base.wizard.appendPage(Qt.resolvedUrl("UltimakerCheckup.qml"), catalog.i18nc("@title", "Check Printer")); break; case "BedLeveling": - base.wizard.appendPage(UM.Resources.getPath(Cura.ResourceTypes.QmlFiles, "WizardPages/Bedleveling.qml"), catalog.i18nc("@title", "Bed Levelling")); + base.wizard.appendPage(Qt.resolvedUrl("Bedleveling.qml"), catalog.i18nc("@title", "Bed Levelling")); break; default: break; From 690bd7b86112be4b020632db03f951c3264f50bc Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Thu, 3 Sep 2015 10:14:17 -0700 Subject: [PATCH 3/8] Fix add machine pages for UMO/+ --- resources/machines/ultimaker_original.json | 10 +++++----- resources/machines/ultimaker_original_plus.json | 1 - 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/resources/machines/ultimaker_original.json b/resources/machines/ultimaker_original.json index 555c7e7363..ca3ea7f3e3 100644 --- a/resources/machines/ultimaker_original.json +++ b/resources/machines/ultimaker_original.json @@ -9,11 +9,11 @@ "inherits": "fdmprinter.json", - "add_pages": [ - {"page": "SelectUpgradedParts", "title": "Select Upgraded Parts"}, - {"page": "UpgradeFirmware", "title": "Upgrade Ultimaker Firmware"}, - {"page": "UltimakerCheckup", "title": "Ultimaker Checkup"}, - {"page": "Bedleveling", "title": "Bedleveling Wizard"} + "pages": [ + "SelectUpgradedParts", + "UpgradeFirmware", + "UltimakerCheckup", + "BedLeveling" ], "machine_extruder_trains": [ diff --git a/resources/machines/ultimaker_original_plus.json b/resources/machines/ultimaker_original_plus.json index baed0ca3aa..4bb4b94a45 100644 --- a/resources/machines/ultimaker_original_plus.json +++ b/resources/machines/ultimaker_original_plus.json @@ -11,7 +11,6 @@ "inherits": "ultimaker_original.json", "pages": [ - "SelectUpgradedParts", "UpgradeFirmware", "UltimakerCheckup", "BedLeveling" From 7083ffd351a3feb00d0230a64619e07efaa943f5 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Thu, 3 Sep 2015 10:14:45 -0700 Subject: [PATCH 4/8] Use a minimum size for the save button --- resources/qml/SaveButton.qml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/resources/qml/SaveButton.qml b/resources/qml/SaveButton.qml index 50808f9777..4b0770d652 100644 --- a/resources/qml/SaveButton.qml +++ b/resources/qml/SaveButton.qml @@ -193,14 +193,21 @@ Rectangle { color: control.hovered ? UM.Theme.colors.load_save_button_hover : UM.Theme.colors.load_save_button Behavior on color { ColorAnimation { duration: 50; } } width: { + var w = 0; if (base.width*0.55 > actualLabel.width + (UM.Theme.sizes.default_margin.width * 2)){ saveToButton.resizedWidth = base.width*0.55 - return base.width*0.55 + w = base.width*0.55 } else { saveToButton.resizedWidth = actualLabel.width + (UM.Theme.sizes.default_margin.width * 2) - return actualLabel.width + (UM.Theme.sizes.default_margin.width * 2) + w = actualLabel.width + (UM.Theme.sizes.default_margin.width * 2) } + + if(w < base.width * 0.55) { + w = base.width * 0.55; + } + + return w; } Label { id: actualLabel From b610f276d96b3f9a5d8236f2fdbde255a16ddf2e Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Thu, 3 Sep 2015 10:15:24 -0700 Subject: [PATCH 5/8] Use a better icon for file associations --- installer.nsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/installer.nsi b/installer.nsi index ec6da5f8e4..037d7b3233 100644 --- a/installer.nsi +++ b/installer.nsi @@ -128,7 +128,7 @@ SectionEnd Section "Open STL files with Cura" WriteRegStr HKCR .stl "" "Cura STL model file" DeleteRegValue HKCR .stl "Content Type" - WriteRegStr HKCR "Cura STL model file\DefaultIcon" "" "$INSTDIR\resources\stl.ico,0" + WriteRegStr HKCR "Cura STL model file\DefaultIcon" "" "$INSTDIR\Cura.exe,0" WriteRegStr HKCR "Cura STL model file\shell" "" "open" WriteRegStr HKCR "Cura STL model file\shell\open\command" "" '"$INSTDIR\Cura.exe" "%1"' SectionEnd @@ -136,7 +136,7 @@ SectionEnd Section /o "Open OBJ files with Cura" WriteRegStr HKCR .obj "" "Cura OBJ model file" DeleteRegValue HKCR .obj "Content Type" - WriteRegStr HKCR "Cura OBJ model file\DefaultIcon" "" "$INSTDIR\resources\stl.ico,0" + WriteRegStr HKCR "Cura OBJ model file\DefaultIcon" "" "$INSTDIR\Cura.exe,0" WriteRegStr HKCR "Cura OBJ model file\shell" "" "open" WriteRegStr HKCR "Cura OBJ model file\shell\open\command" "" '"$INSTDIR\Cura.exe" "%1"' SectionEnd From b0fa51692e42df6f756ebb00a45112060c1e5acc Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Thu, 3 Sep 2015 10:16:13 -0700 Subject: [PATCH 6/8] Add Install Arduino Drivers section to installer --- installer.nsi | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/installer.nsi b/installer.nsi index 037d7b3233..0a2a4874a7 100644 --- a/installer.nsi +++ b/installer.nsi @@ -111,19 +111,19 @@ Section "Install Visual Studio 2010 Redistributable" SectionEnd -;Section "Install Arduino Drivers" -; ; Set output path to the driver directory. -; SetOutPath "$INSTDIR\drivers\" -; File /r "drivers\" -; -; ${If} ${RunningX64} -; IfSilent +2 -; ExecWait '"$INSTDIR\drivers\dpinst64.exe" /lm' -; ${Else} -; IfSilent +2 -; ExecWait '"$INSTDIR\drivers\dpinst32.exe" /lm' -; ${EndIf} -;SectionEnd +Section "Install Arduino Drivers" + ; Set output path to the driver directory. + SetOutPath "$INSTDIR\drivers\" + File /r "drivers\" + + ${If} ${RunningX64} + IfSilent +2 + ExecWait '"$INSTDIR\drivers\dpinst64.exe" /lm' + ${Else} + IfSilent +2 + ExecWait '"$INSTDIR\drivers\dpinst32.exe" /lm' + ${EndIf} +SectionEnd Section "Open STL files with Cura" WriteRegStr HKCR .stl "" "Cura STL model file" From 0448d765fb019c561401c1616859a7712340ab09 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Thu, 3 Sep 2015 10:16:57 -0700 Subject: [PATCH 7/8] Show the same changelog as changelog plugin in installer --- installer.nsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/installer.nsi b/installer.nsi index 0a2a4874a7..f32553ae12 100644 --- a/installer.nsi +++ b/installer.nsi @@ -45,7 +45,7 @@ SetCompressor /SOLID lzma !define MUI_FINISHPAGE_RUN_FUNCTION "LaunchLink" ;Add an option to show release notes -!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\release_notes.txt" +!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\plugins\ChangeLogPlugin\changelog.txt" ; Pages ;!insertmacro MUI_PAGE_WELCOME From 267cd4a99dcb0503f165f32fd8eb92042df7e896 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Thu, 3 Sep 2015 10:18:10 -0700 Subject: [PATCH 8/8] Set installer version 15.09.80 --- installer.nsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/installer.nsi b/installer.nsi index f32553ae12..79704eece8 100644 --- a/installer.nsi +++ b/installer.nsi @@ -1,5 +1,5 @@ !ifndef VERSION - !define VERSION '15.05.97' + !define VERSION '15.09.80' !endif ; The name of the installer