From 3514c01b25dd69477168fef72eefdc684e227185 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Fri, 17 Jun 2022 15:21:30 +0200 Subject: [PATCH 01/24] Remove duplicated code CURA-9352 --- .../Models/MaterialManagementModel.py | 55 ------------------- cura/UltimakerCloud/CloudMaterialSync.py | 4 +- 2 files changed, 2 insertions(+), 57 deletions(-) diff --git a/cura/Machines/Models/MaterialManagementModel.py b/cura/Machines/Models/MaterialManagementModel.py index b2b888f431..7d0cf9ee54 100644 --- a/cura/Machines/Models/MaterialManagementModel.py +++ b/cura/Machines/Models/MaterialManagementModel.py @@ -34,61 +34,6 @@ class MaterialManagementModel(QObject): def __init__(self, parent: Optional[QObject] = None) -> None: super().__init__(parent = parent) self._material_sync = CloudMaterialSync(parent=self) - self._checkIfNewMaterialsWereInstalled() - - def _checkIfNewMaterialsWereInstalled(self) -> None: - """ - Checks whether new material packages were installed in the latest startup. If there were, then it shows - a message prompting the user to sync the materials with their printers. - """ - application = cura.CuraApplication.CuraApplication.getInstance() - for package_id, package_data in application.getPackageManager().getPackagesInstalledOnStartup().items(): - if package_data["package_info"]["package_type"] == "material": - # At least one new material was installed - self._showSyncNewMaterialsMessage() - break - - def _showSyncNewMaterialsMessage(self) -> None: - sync_materials_message = Message( - text = catalog.i18nc("@action:button", - "Please sync the material profiles with your printers before starting to print."), - title = catalog.i18nc("@action:button", "New materials installed"), - message_type = Message.MessageType.WARNING, - lifetime = 0 - ) - - sync_materials_message.addAction( - "sync", - name = catalog.i18nc("@action:button", "Sync materials"), - icon = "", - description = "Sync your newly installed materials with your printers.", - button_align = Message.ActionButtonAlignment.ALIGN_RIGHT - ) - - sync_materials_message.addAction( - "learn_more", - name = catalog.i18nc("@action:button", "Learn more"), - icon = "", - description = "Learn more about syncing your newly installed materials with your printers.", - button_align = Message.ActionButtonAlignment.ALIGN_LEFT, - button_style = Message.ActionButtonStyle.LINK - ) - sync_materials_message.actionTriggered.connect(self._onSyncMaterialsMessageActionTriggered) - - # Show the message only if there are printers that support material export - container_registry = cura.CuraApplication.CuraApplication.getInstance().getContainerRegistry() - global_stacks = container_registry.findContainerStacks(type = "machine") - if any([stack.supportsMaterialExport for stack in global_stacks]): - sync_materials_message.show() - - def _onSyncMaterialsMessageActionTriggered(self, sync_message: Message, sync_message_action: str): - if sync_message_action == "sync": - QDesktopServices.openUrl(QUrl("https://example.com/openSyncAllWindow")) - # self.openSyncAllWindow() - sync_message.hide() - elif sync_message_action == "learn_more": - QDesktopServices.openUrl(QUrl("https://support.ultimaker.com/hc/en-us/articles/360013137919?utm_source=cura&utm_medium=software&utm_campaign=sync-material-printer-message")) - @pyqtSlot("QVariant", result = bool) def canMaterialBeRemoved(self, material_node: "MaterialNode") -> bool: diff --git a/cura/UltimakerCloud/CloudMaterialSync.py b/cura/UltimakerCloud/CloudMaterialSync.py index e2eb50f97e..210fc23898 100644 --- a/cura/UltimakerCloud/CloudMaterialSync.py +++ b/cura/UltimakerCloud/CloudMaterialSync.py @@ -1,4 +1,4 @@ -# Copyright (c) 2021 Ultimaker B.V. +# Copyright (c) 2022 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. from PyQt6.QtCore import pyqtProperty, pyqtSignal, pyqtSlot, QObject, QUrl @@ -18,6 +18,7 @@ if TYPE_CHECKING: from UM.Signal import Signal catalog = i18nCatalog("cura") + class CloudMaterialSync(QObject): """ Handles the synchronisation of material profiles with cloud accounts. @@ -44,7 +45,6 @@ class CloudMaterialSync(QObject): break def openSyncAllWindow(self): - self.reset() if self.sync_all_dialog is None: From 85eb0fedcd1f98a7824a2fb51424318e733d2330 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Fri, 17 Jun 2022 15:50:04 +0200 Subject: [PATCH 02/24] Fix Convex hull decorator tests --- tests/TestConvexHullDecorator.py | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/tests/TestConvexHullDecorator.py b/tests/TestConvexHullDecorator.py index 4205ae3a37..eed5a3a6c3 100644 --- a/tests/TestConvexHullDecorator.py +++ b/tests/TestConvexHullDecorator.py @@ -149,7 +149,7 @@ def test_compute2DConvexHullNoMeshData(convex_hull_decorator): def test_compute2DConvexHullMeshData(convex_hull_decorator): node = SceneNode() mb = MeshBuilder() - mb.addCube(10,10,10) + mb.addCube(10, 10, 10) node.setMeshData(mb.build()) convex_hull_decorator._getSettingProperty = MagicMock(return_value = 0) @@ -157,7 +157,11 @@ def test_compute2DConvexHullMeshData(convex_hull_decorator): with patch("UM.Application.Application.getInstance", MagicMock(return_value=mocked_application)): convex_hull_decorator.setNode(node) - assert convex_hull_decorator._compute2DConvexHull() == Polygon([[5.0,-5.0], [-5.0,-5.0], [-5.0,5.0], [5.0,5.0]]) + mocked_stack = MagicMock() + mocked_stack.getProperty = MagicMock(return_value=1) + convex_hull_decorator._global_stack = mocked_stack + + assert convex_hull_decorator._compute2DConvexHull() == Polygon([[5.0, -5.0], [-5.0, -5.0], [-5.0, 5.0], [5.0, 5.0]]) def test_compute2DConvexHullMeshDataGrouped(convex_hull_decorator): @@ -169,6 +173,9 @@ def test_compute2DConvexHullMeshDataGrouped(convex_hull_decorator): mb = MeshBuilder() mb.addCube(10, 10, 10) node.setMeshData(mb.build()) + mocked_stack = MagicMock() + mocked_stack.getProperty = MagicMock(return_value=1) + convex_hull_decorator._global_stack = mocked_stack convex_hull_decorator._getSettingProperty = MagicMock(return_value=0) @@ -176,6 +183,9 @@ def test_compute2DConvexHullMeshDataGrouped(convex_hull_decorator): convex_hull_decorator.setNode(parent_node) with patch("cura.Settings.ExtruderManager.ExtruderManager.getInstance"): copied_decorator = copy.deepcopy(convex_hull_decorator) + mocked_stack = MagicMock() + mocked_stack.getProperty = MagicMock(return_value=1) + copied_decorator._global_stack = mocked_stack copied_decorator._getSettingProperty = MagicMock(return_value=0) node.addDecorator(copied_decorator) - assert convex_hull_decorator._compute2DConvexHull() == Polygon([[-5.0,5.0], [5.0,5.0], [5.0,-5.0], [-5.0,-5.0]]) \ No newline at end of file + assert convex_hull_decorator._compute2DConvexHull() == Polygon([[-5.0, 5.0], [5.0, 5.0], [5.0, -5.0], [-5.0, -5.0]]) \ No newline at end of file From f474381425112f32ff190629bf0035e23fabd1e8 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Fri, 17 Jun 2022 16:06:24 +0200 Subject: [PATCH 03/24] Fix multiple issues with profiles That's what you get from not having tests running remote. --- resources/definitions/Mark2_for_Ultimaker2.def.json | 4 ---- resources/definitions/elegoo_neptune_2.def.json | 1 - resources/definitions/elegoo_neptune_2D.def.json | 11 +++++------ .../extruders/elegoo_neptune2D_extruder_0.def.json | 2 +- .../extruders/elegoo_neptune2D_extruder_1.def.json | 4 ++-- .../elegoo_neptune_2/elegoo_neptune_2_draft.inst.cfg | 1 - .../elegoo_neptune_2/elegoo_neptune_2_fine.inst.cfg | 1 - .../elegoo_neptune_2/elegoo_neptune_2_normal.inst.cfg | 1 - .../elegoo_neptune_2D_draft.inst.cfg | 1 - .../elegoo_neptune_2D/elegoo_neptune_2D_fine.inst.cfg | 1 - .../elegoo_neptune_2D_normal.inst.cfg | 1 - .../jgaurora_a6/jgaurora_a6_0.28_fast.inst.cfg.txt | 2 +- 12 files changed, 9 insertions(+), 21 deletions(-) diff --git a/resources/definitions/Mark2_for_Ultimaker2.def.json b/resources/definitions/Mark2_for_Ultimaker2.def.json index 55f2f1611e..68498db423 100644 --- a/resources/definitions/Mark2_for_Ultimaker2.def.json +++ b/resources/definitions/Mark2_for_Ultimaker2.def.json @@ -162,10 +162,6 @@ { "default_value": true }, - "jerk_print": - { - "default_value": 12 - }, "jerk_travel": { "value": "jerk_print if magic_spiralize else 20" diff --git a/resources/definitions/elegoo_neptune_2.def.json b/resources/definitions/elegoo_neptune_2.def.json index 76dc16aec4..8e564289f5 100644 --- a/resources/definitions/elegoo_neptune_2.def.json +++ b/resources/definitions/elegoo_neptune_2.def.json @@ -38,7 +38,6 @@ "raft_airgap":{"default_value": 0.25}, "brim_width":{"default_value": 5}, "skin_angles":{"default_value": [45, 135]}, - "infill_pattern":{"default_value": "gyroid"}, "machine_gcode_flavor": {"default_value": "RepRap (Marlin/Sprinter)"}, "machine_start_gcode": {"default_value": ";simage\n;gimage\nG28 ;home\nG92 E0 ;Reset Extruder\nG1 Z4.0 F3000 ;Move Z Axis up\nG92 E0 ;Reset Extruder\nG1 X1.1 Y20 Z0.28 F5000.0 ;Move to start position\nG1 X1.1 Y200.0 Z0.28 F1500.0 E15 ;Draw the first line\nG1 X1.4 Y200.0 Z0.28 F5000.0 ;Move to side a little\nG1 X1.4 Y20 Z0.28 F1500.0 E30 ;Draw the second line\nG92 E0 ;Reset Extruder\nG1 Z2.0 F3000 ;Move Z Axis up"}, "machine_end_gcode": {"default_value": "G91 ;Relative positionning\nG1 E-2 F2700 ;Retract a bit\nG1 E-2 Z0.2 F1600 ;Retract and raise Z\nG1 X5 Y5 F3000 ;Wipe out\nG1 Z10 ;Raise Z more\nG90 ;Absolute positionning\nG1 X0 Y{machine_depth} ;Present print\nM106 S0 ;Turn-off fan\nM104 S0 ;Turn-off hotend\nM140 S0 ;Turn-off bed\nM84 X Y E ;Disable all steppers but Z"} diff --git a/resources/definitions/elegoo_neptune_2D.def.json b/resources/definitions/elegoo_neptune_2D.def.json index ede0eb166c..78e87d6f40 100644 --- a/resources/definitions/elegoo_neptune_2D.def.json +++ b/resources/definitions/elegoo_neptune_2D.def.json @@ -32,10 +32,10 @@ "machine_extruders_share_nozzle": {"default_value": true}, "machine_always_write_active_tool": {"default_value": true}, "prime_blob_enable": {"default_value": false}, - "prime_tower_enable": {"default_value": true}, - "prime_tower_size": {"default_value": 30}, - "prime_tower_min_volume": {"default_value": 90}, - "speed_print": { "value": 60.0 }, + "prime_tower_enable": {"default_value": true}, + "prime_tower_size": {"default_value": 30}, + "prime_tower_min_volume": {"default_value": 90}, + "speed_print": { "value": 60.0 }, "z_seam_type":{"default_value": "back"}, "z_seam_corner":{"default_value": "z_seam_corner_weighted"}, "material_standby_temperature":{"default_value": 200,"settable_per_extruder": false}, @@ -46,8 +46,7 @@ "raft_margin":{"default_value": 5}, "raft_airgap":{"default_value": 0.25}, "brim_width":{"default_value": 5}, - "skin_angles":{"default_value": [45, 135]}, - "infill_pattern":{"default_value": "gyroid"}, + "skin_angles":{"default_value": [45, 135]}, "machine_gcode_flavor": {"default_value": "RepRap (Marlin/Sprinter)"}, "machine_start_gcode": {"default_value": ";simage\n;gimage\nG28 ;home\n;G29 ;Run ABL\n;M420 S1 ;Enable ABL mesh\nG92 E0 ;Reset Extruder\nG1 Z4.0 F3000 ;Move Z Axis up\nG92 E0 ;Reset Extruder\nG1 X2.0 Y20 Z0.28 F5000.0 ;Move to start position\nG1 E90 F1200 ;Load filament\nG92 E0 ;Reset Extruder\nG1 X2.0 Y200.0 Z0.28 F1500.0 E15 ;Draw the first line\nG1 X2.3 Y200.0 Z0.28 F5000.0 ;Move to side a little\nG1 X2.3 Y20 Z0.28 F1500.0 E30 ;Draw the second line\nG92 E0 ;Reset Extruder\nG1 Z2.0 F3000 ;Move Z Axis up"}, "machine_end_gcode": {"default_value": "G91 ;Relative positionning\nG1 E-2 F2700 ;Retract a bit\nG1 E-80 Z0.2 F1600 ;Retract and raise Z\nG1 X5 Y5 F3000 ;Wipe out\nG1 Z10 ;Raise Z more\nG90 ;Absolute positionning\nG1 X0 Y{machine_depth} ;Present print\nM106 S0 ;Turn-off fan\nM104 S0 ;Turn-off hotend\nM140 S0 ;Turn-off bed\nM84 X Y E ;Disable all steppers but Z"} diff --git a/resources/extruders/elegoo_neptune2D_extruder_0.def.json b/resources/extruders/elegoo_neptune2D_extruder_0.def.json index 3c4b0ad64b..ad8dee15e8 100644 --- a/resources/extruders/elegoo_neptune2D_extruder_0.def.json +++ b/resources/extruders/elegoo_neptune2D_extruder_0.def.json @@ -3,7 +3,7 @@ "name": "Extruder 1", "inherits": "fdmextruder", "metadata": { - "machine": "elegoo_neptune_2", + "machine": "elegoo_neptune_2D", "position": "0" }, diff --git a/resources/extruders/elegoo_neptune2D_extruder_1.def.json b/resources/extruders/elegoo_neptune2D_extruder_1.def.json index 7b633cf0d4..f4ec5194c4 100644 --- a/resources/extruders/elegoo_neptune2D_extruder_1.def.json +++ b/resources/extruders/elegoo_neptune2D_extruder_1.def.json @@ -3,8 +3,8 @@ "name": "Extruder 2", "inherits": "fdmextruder", "metadata": { - "machine": "elegoo_neptune_2", - "position": "0" + "machine": "elegoo_neptune_2D", + "position": "1" }, "overrides": { diff --git a/resources/quality/elegoo_neptune_2/elegoo_neptune_2_draft.inst.cfg b/resources/quality/elegoo_neptune_2/elegoo_neptune_2_draft.inst.cfg index 8059065638..92a592c198 100644 --- a/resources/quality/elegoo_neptune_2/elegoo_neptune_2_draft.inst.cfg +++ b/resources/quality/elegoo_neptune_2/elegoo_neptune_2_draft.inst.cfg @@ -32,7 +32,6 @@ speed_travel_layer_0 = 125.0 speed_wall_x = 50.0 top_bottom_thickness = =layer_height_0+layer_height*3 top_layers = =0 if infill_sparse_density == 100 else math.ceil(round(top_thickness / resolveOrValue('layer_height'), 4)) -travel_compensate_overlapping_walls_0_enabled = True wall_0_material_flow = 95 wall_0_wipe_dist = 0.4 wall_thickness = 1.2 diff --git a/resources/quality/elegoo_neptune_2/elegoo_neptune_2_fine.inst.cfg b/resources/quality/elegoo_neptune_2/elegoo_neptune_2_fine.inst.cfg index ea2ed7694e..afaa645b3e 100644 --- a/resources/quality/elegoo_neptune_2/elegoo_neptune_2_fine.inst.cfg +++ b/resources/quality/elegoo_neptune_2/elegoo_neptune_2_fine.inst.cfg @@ -28,7 +28,6 @@ speed_layer_0 = 25.0 speed_travel_layer_0 = 125.0 speed_wall_x = 50.0 top_bottom_thickness = 1 -travel_compensate_overlapping_walls_0_enabled = True wall_0_material_flow = 95 wall_0_wipe_dist = 0.4 wall_thickness = 1.2 diff --git a/resources/quality/elegoo_neptune_2/elegoo_neptune_2_normal.inst.cfg b/resources/quality/elegoo_neptune_2/elegoo_neptune_2_normal.inst.cfg index c43de670d1..bf9c8b8445 100644 --- a/resources/quality/elegoo_neptune_2/elegoo_neptune_2_normal.inst.cfg +++ b/resources/quality/elegoo_neptune_2/elegoo_neptune_2_normal.inst.cfg @@ -35,7 +35,6 @@ speed_travel_layer_0 = 125.0 speed_wall_x = 50.0 support_xy_distance = 0.2 top_bottom_thickness = 1 -travel_compensate_overlapping_walls_0_enabled = True wall_0_inset = 0.2 wall_0_material_flow = 95 wall_0_wipe_dist = 0.4 diff --git a/resources/quality/elegoo_neptune_2D/elegoo_neptune_2D_draft.inst.cfg b/resources/quality/elegoo_neptune_2D/elegoo_neptune_2D_draft.inst.cfg index 16cb188d69..0a5b076baa 100644 --- a/resources/quality/elegoo_neptune_2D/elegoo_neptune_2D_draft.inst.cfg +++ b/resources/quality/elegoo_neptune_2D/elegoo_neptune_2D_draft.inst.cfg @@ -32,7 +32,6 @@ speed_travel_layer_0 = 125.0 speed_wall_x = 50.0 top_bottom_thickness = =layer_height_0+layer_height*3 top_layers = =0 if infill_sparse_density == 100 else math.ceil(round(top_thickness / resolveOrValue('layer_height'), 4)) -travel_compensate_overlapping_walls_0_enabled = True wall_0_material_flow = 95 wall_0_wipe_dist = 0.4 wall_thickness = 1.2 diff --git a/resources/quality/elegoo_neptune_2D/elegoo_neptune_2D_fine.inst.cfg b/resources/quality/elegoo_neptune_2D/elegoo_neptune_2D_fine.inst.cfg index 790cc7aced..7fb24a1a41 100644 --- a/resources/quality/elegoo_neptune_2D/elegoo_neptune_2D_fine.inst.cfg +++ b/resources/quality/elegoo_neptune_2D/elegoo_neptune_2D_fine.inst.cfg @@ -28,7 +28,6 @@ speed_layer_0 = 25.0 speed_travel_layer_0 = 125.0 speed_wall_x = 50.0 top_bottom_thickness = 1 -travel_compensate_overlapping_walls_0_enabled = True wall_0_material_flow = 95 wall_0_wipe_dist = 0.4 wall_thickness = 1.2 diff --git a/resources/quality/elegoo_neptune_2D/elegoo_neptune_2D_normal.inst.cfg b/resources/quality/elegoo_neptune_2D/elegoo_neptune_2D_normal.inst.cfg index 8b09145c1b..2ed5c6ad76 100644 --- a/resources/quality/elegoo_neptune_2D/elegoo_neptune_2D_normal.inst.cfg +++ b/resources/quality/elegoo_neptune_2D/elegoo_neptune_2D_normal.inst.cfg @@ -35,7 +35,6 @@ speed_travel_layer_0 = 125.0 speed_wall_x = 50.0 support_xy_distance = 0.2 top_bottom_thickness = 1 -travel_compensate_overlapping_walls_0_enabled = True wall_0_inset = 0.2 wall_0_material_flow = 95 wall_0_wipe_dist = 0.4 diff --git a/resources/quality/jgaurora_a6/jgaurora_a6_0.28_fast.inst.cfg.txt b/resources/quality/jgaurora_a6/jgaurora_a6_0.28_fast.inst.cfg.txt index 89f09b6a8c..89209e16f0 100644 --- a/resources/quality/jgaurora_a6/jgaurora_a6_0.28_fast.inst.cfg.txt +++ b/resources/quality/jgaurora_a6/jgaurora_a6_0.28_fast.inst.cfg.txt @@ -5,7 +5,7 @@ definition = jgaurora_a6 [metadata] quality_type = fast -setting_version = 19 +setting_version = 20 type = quality weight = -4 global_quality = true From 5b2a4829163e91e92d1447e335e1f165014d1195 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 21 Jun 2022 14:51:09 +0200 Subject: [PATCH 04/24] Add quick script to rename Cura 1 tags Reasons are documented in the file. --- scripts/rename_cura_1_tags.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 scripts/rename_cura_1_tags.sh diff --git a/scripts/rename_cura_1_tags.sh b/scripts/rename_cura_1_tags.sh new file mode 100644 index 0000000000..8391ed08c2 --- /dev/null +++ b/scripts/rename_cura_1_tags.sh @@ -0,0 +1,14 @@ +#Renames tags that were for Legacy Cura to a newer versioning system. +#Those Cura versions used tags based on the year of release. +#We'd like to rename them to be "Cura 1" and have the original version number as sub-version-numbers. +#So Cura 14.04 becomes Cura 1.14.04. + +for i in $(git tag -l) +do + if [[ $i =~ ^1[2-5]\.[0-9][0-9] ]]; then #E.g. 12.04 or 15.06. Note that there is no end-match so anything that starts with this matches. + echo "Renaming tag $i to 1.$i"; + git tag 1.$i $i; #Create new tag (1.x instead of x). + git tag -d $i; #Delete old tag. + git push origin 1.$i :$i #Rename the tag remotely too. + fi +done \ No newline at end of file From ac67dcc045e71b4d35264bb25d00ea667358574d Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 22 Jun 2022 11:52:13 +0200 Subject: [PATCH 05/24] Don't cache PluginRegistry instance Several reasons: * It's bad style, making it harder to test with mocked PluginRegistry since all sorts of objects have copies of the un-mocked object in their fields. * It's causing errors in this case when checkIfRestartNeeded is called before show(). Fixes Sentry issue CURA-3P6. --- plugins/Marketplace/Marketplace.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/plugins/Marketplace/Marketplace.py b/plugins/Marketplace/Marketplace.py index b2c729c2cd..86910f8f4a 100644 --- a/plugins/Marketplace/Marketplace.py +++ b/plugins/Marketplace/Marketplace.py @@ -22,7 +22,6 @@ class Marketplace(Extension, QObject): QObject.__init__(self, parent) Extension.__init__(self) self._window: Optional["QObject"] = None # If the window has been loaded yet, it'll be cached in here. - self._plugin_registry: Optional[PluginRegistry] = None self._package_manager = CuraApplication.getInstance().getPackageManager() self._material_package_list: Optional[RemotePackageList] = None @@ -81,9 +80,9 @@ class Marketplace(Extension, QObject): If the window hadn't been loaded yet into Qt, it will be created lazily. """ if self._window is None: - self._plugin_registry = PluginRegistry.getInstance() - self._plugin_registry.pluginsEnabledOrDisabledChanged.connect(self.checkIfRestartNeeded) - plugin_path = PluginRegistry.getInstance().getPluginPath(self.getPluginId()) + plugin_registry = PluginRegistry.getInstance() + plugin_registry.pluginsEnabledOrDisabledChanged.connect(self.checkIfRestartNeeded) + plugin_path = plugin_registry.getPluginPath(self.getPluginId()) if plugin_path is None: plugin_path = os.path.dirname(__file__) path = os.path.join(plugin_path, "resources", "qml", "Marketplace.qml") @@ -108,7 +107,7 @@ class Marketplace(Extension, QObject): return if self._package_manager.hasPackagesToRemoveOrInstall or \ - cast(PluginRegistry, self._plugin_registry).getCurrentSessionActivationChangedPlugins(): + PluginRegistry.getInstance().getCurrentSessionActivationChangedPlugins(): self._restart_needed = True else: self._restart_needed = False @@ -116,7 +115,7 @@ class Marketplace(Extension, QObject): showRestartNotificationChanged = pyqtSignal() - @pyqtProperty(bool, notify=showRestartNotificationChanged) + @pyqtProperty(bool, notify = showRestartNotificationChanged) def showRestartNotification(self) -> bool: return self._restart_needed From 1df76d8cc5f8662d70550d98878b4e432fc28db1 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 22 Jun 2022 17:00:22 +0200 Subject: [PATCH 06/24] Correct Dutch translations of Marketplace Marketplace is considered a product by Ultimaker, and so it should not be translated. In Dutch this was inconsistently translated (or not translated). Found by one of the translators in CURA-9420. --- resources/i18n/nl_NL/cura.po | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/resources/i18n/nl_NL/cura.po b/resources/i18n/nl_NL/cura.po index 072866aa2a..f9947cef85 100644 --- a/resources/i18n/nl_NL/cura.po +++ b/resources/i18n/nl_NL/cura.po @@ -3457,7 +3457,7 @@ msgid "" "- Back-up and sync your material profiles and plug-ins\n" "- Share ideas and get help from 48,000+ users in the Ultimaker community" msgstr "" -"- Voeg materiaalprofielen en plug-ins toe uit de Marktplaats\n" +"- Voeg materiaalprofielen en plug-ins toe uit de Marketplace\n" "- Maak back-ups van uw materiaalprofielen en plug-ins en synchroniseer deze\n" "- Deel ideeën met 48.000+ gebruikers in de Ultimaker-community of vraag hen om ondersteuning" @@ -4288,7 +4288,7 @@ msgstr "Weet u zeker dat u een nieuw project wilt starten? Hiermee wordt het pla #: /home/trin/Gedeeld/Projects/Cura/resources/qml/MainWindow/MainWindowHeader.qml:135 msgctxt "@action:button" msgid "Marketplace" -msgstr "Marktplaats" +msgstr "Marketplace" #: /home/trin/Gedeeld/Projects/Cura/resources/qml/Menus/ConfigurationMenu/AutoConfiguration.qml:18 msgctxt "@header" @@ -4303,7 +4303,7 @@ msgstr "Deze configuratie is niet beschikbaar omdat %1 niet wordt herkend. Ga na #: /home/trin/Gedeeld/Projects/Cura/resources/qml/Menus/ConfigurationMenu/ConfigurationItem.qml:138 msgctxt "@label" msgid "Marketplace" -msgstr "Marktplaats" +msgstr "Marketplace" #: /home/trin/Gedeeld/Projects/Cura/resources/qml/Menus/ConfigurationMenu/ConfigurationListView.qml:52 msgctxt "@label" @@ -5995,7 +5995,7 @@ msgstr "Release notes" #: /home/trin/Gedeeld/Projects/Cura/resources/qml/WelcomePages/CloudContent.qml:123 msgctxt "@text" msgid "Add material settings and plugins from the Marketplace" -msgstr "Voeg materiaalinstellingen en plugins uit de Marktplaats toe" +msgstr "Voeg materiaalinstellingen en plugins uit de Marketplace toe" #: /home/trin/Gedeeld/Projects/Cura/resources/qml/WelcomePages/CloudContent.qml:149 msgctxt "@text" @@ -6297,7 +6297,7 @@ msgstr "Beheert extensies voor de toepassing en staat browsingextensies toe van #: Marketplace/plugin.json msgctxt "name" msgid "Marketplace" -msgstr "Marktplaats" +msgstr "Marketplace" #: MonitorStage/plugin.json msgctxt "description" @@ -6777,7 +6777,7 @@ msgstr "Röntgenweergave" #~ msgctxt "@title" #~ msgid "Marketplace" -#~ msgstr "Marktplaats" +#~ msgstr "Marketplace" #~ msgctxt "@info" #~ msgid "You will need to restart Cura before changes in packages have effect." @@ -7055,7 +7055,7 @@ msgstr "Röntgenweergave" #~ msgctxt "@action:menu" #~ msgid "&Marketplace" -#~ msgstr "&Marktplaats" +#~ msgstr "&Marketplace" #~ msgctxt "description" #~ msgid "Find, manage and install new Cura packages." From 7fcf876a9102f672d8083c22c8f51887c75ef024 Mon Sep 17 00:00:00 2001 From: naveen <172697+naveensrinivasan@users.noreply.github.com> Date: Sat, 25 Jun 2022 00:31:53 +0000 Subject: [PATCH 07/24] chore: Set permissions for GitHub actions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Restrict the GitHub token permissions only to the required ones; this way, even if the attackers will succeed in compromising your workflow, they won’t be able to do much. - Included permissions for the action. https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs [Keeping your GitHub Actions and workflows secure Part 1: Preventing pwn requests](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/) Signed-off-by: naveen <172697+naveensrinivasan@users.noreply.github.com> --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6dbe51a09e..21a41d53af 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,6 +8,9 @@ on: - '4.*' - 'CURA-*' pull_request: +permissions: + contents: read + jobs: build: runs-on: ubuntu-latest From 96192adce293f7217a2ff6ec95fd085b3b7abbf6 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 27 Jun 2022 11:30:38 +0200 Subject: [PATCH 08/24] Catch wrong cloud responses when it responds with a new file name It could happen if there are bugs in the cloud, e.g. if they strip special characters somewhere. We'd want to know it if they do. But we also don't want Cura to crash if the remote connection is not reliable, or if there's changes/bugs in the future. Fixes Sentry issue CURA-42F. --- .../src/DFFileExportAndUploadManager.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/plugins/DigitalLibrary/src/DFFileExportAndUploadManager.py b/plugins/DigitalLibrary/src/DFFileExportAndUploadManager.py index 69bf4b1233..4defd2f409 100644 --- a/plugins/DigitalLibrary/src/DFFileExportAndUploadManager.py +++ b/plugins/DigitalLibrary/src/DFFileExportAndUploadManager.py @@ -1,5 +1,6 @@ -# Copyright (c) 2021 Ultimaker B.V. +# Copyright (c) 2022 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. + import json import threading from json import JSONDecodeError @@ -135,6 +136,9 @@ class DFFileExportAndUploadManager: else: Logger.log("e", "Wrong response type received. Aborting uploading file to the Digital Library") return + if file_name not in self._file_upload_job_metadata: + Logger.error(f"API response for uploading doesn't match the file name we just uploaded: {file_name} was never uploaded.") + return with self._message_lock: self.progress_message.show() self._file_upload_job_metadata[file_name]["file_upload_response"] = file_upload_response @@ -335,10 +339,11 @@ class DFFileExportAndUploadManager: self._handleNextUploadJob() def _handleNextUploadJob(self): - match self._upload_jobs: - case [job, *jobs]: - job.start() - self._upload_jobs = jobs + try: + job = self._upload_jobs.pop(0) + job.start() + except IndexError: + pass # Empty list, do nothing. def initializeFileUploadJobMetadata(self) -> Dict[str, Any]: metadata = {} From 3eab1c221b7c4e104a349674396c72df1108f460 Mon Sep 17 00:00:00 2001 From: Rijk van Manen Date: Tue, 28 Jun 2022 13:58:45 +0200 Subject: [PATCH 09/24] reduce minimum support xy distance Setting this value smaller could cause scarring when the nozzle offset calibration is not performed. A higher value causes a too big gap between the model and support, resulting in support not being attached to the model on sloped surfaces. PP-185 --- resources/definitions/ultimaker.def.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/definitions/ultimaker.def.json b/resources/definitions/ultimaker.def.json index 1484935191..543f1cda91 100644 --- a/resources/definitions/ultimaker.def.json +++ b/resources/definitions/ultimaker.def.json @@ -239,7 +239,7 @@ "value": "1" }, "support_xy_distance_overhang": { - "value": "wall_line_width_0" + "value": "0.2" }, "minimum_support_area": { "value": "(2 + support_offset)**2" From fd0aaafe353b847486c104e501663bcc70e09ffb Mon Sep 17 00:00:00 2001 From: Rijk van Manen Date: Tue, 28 Jun 2022 14:00:31 +0200 Subject: [PATCH 10/24] increase support horizontal expansion A bigger horizontal expansion is improving the stability of the support structure. Setting the Support Horizontal Expansion > Support X/Y distance causes the support folding around the object, making it way harder to remove and introducing a lot of additional stringing. PP-185 --- resources/definitions/ultimaker.def.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/definitions/ultimaker.def.json b/resources/definitions/ultimaker.def.json index 543f1cda91..c5352f60ef 100644 --- a/resources/definitions/ultimaker.def.json +++ b/resources/definitions/ultimaker.def.json @@ -233,7 +233,7 @@ "value": "2*layer_height" }, "support_offset": { - "value": "2*line_width if support_interface_enable else 0" + "value": "support_xy_distance if support_interface_enable else 0" }, "support_xy_distance": { "value": "1" From cb07fefdf2b5a79e26dadc887c90c2538ec5c378 Mon Sep 17 00:00:00 2001 From: Rijk van Manen Date: Tue, 28 Jun 2022 14:03:01 +0200 Subject: [PATCH 11/24] increase retract distance of PVA to default PVA is stringing a lot due to the too small retract distance. This oozed material is causing under extrusion elsewhere, reducing the strength of the support. Too long retractions could cause reliability issues as well. However, since we reduced the number of retractions by ~40% for the smaller models (for bigger models it is ~0%, but then it is also not relevant since a lot of material is printed in between) with the new settings of PP-108 increasing the retract distance to 6.5mm is safe. PP-185 --- resources/variants/ultimaker3_bb0.8.inst.cfg | 1 - resources/variants/ultimaker3_bb04.inst.cfg | 1 - resources/variants/ultimaker3_extended_bb0.8.inst.cfg | 1 - resources/variants/ultimaker3_extended_bb04.inst.cfg | 1 - resources/variants/ultimaker_s3_bb0.8.inst.cfg | 1 - resources/variants/ultimaker_s3_bb04.inst.cfg | 1 - resources/variants/ultimaker_s5_bb0.8.inst.cfg | 1 - resources/variants/ultimaker_s5_bb04.inst.cfg | 1 - 8 files changed, 8 deletions(-) diff --git a/resources/variants/ultimaker3_bb0.8.inst.cfg b/resources/variants/ultimaker3_bb0.8.inst.cfg index bb31e90aaf..d0cc437b1b 100644 --- a/resources/variants/ultimaker3_bb0.8.inst.cfg +++ b/resources/variants/ultimaker3_bb0.8.inst.cfg @@ -43,7 +43,6 @@ raft_interface_thickness = 0.2 raft_margin = 10 raft_speed = 25 raft_surface_layers = 1 -retraction_amount = 4.5 retraction_hop = 2 retraction_hop_only_when_collides = True retraction_min_travel = =line_width * 3 diff --git a/resources/variants/ultimaker3_bb04.inst.cfg b/resources/variants/ultimaker3_bb04.inst.cfg index 675dde693d..49837e24ea 100644 --- a/resources/variants/ultimaker3_bb04.inst.cfg +++ b/resources/variants/ultimaker3_bb04.inst.cfg @@ -20,7 +20,6 @@ machine_nozzle_tip_outer_diameter = 1.0 raft_base_speed = 20 raft_interface_speed = 20 raft_speed = 25 -retraction_amount = 4.5 retraction_min_travel = =3 * line_width speed_layer_0 = 20 speed_prime_tower = =math.ceil(speed_print * 10 / 35) diff --git a/resources/variants/ultimaker3_extended_bb0.8.inst.cfg b/resources/variants/ultimaker3_extended_bb0.8.inst.cfg index d9a6762732..205ae4b0f2 100644 --- a/resources/variants/ultimaker3_extended_bb0.8.inst.cfg +++ b/resources/variants/ultimaker3_extended_bb0.8.inst.cfg @@ -43,7 +43,6 @@ raft_interface_thickness = 0.2 raft_margin = 10 raft_speed = 25 raft_surface_layers = 1 -retraction_amount = 4.5 retraction_hop = 2 retraction_hop_only_when_collides = True retraction_min_travel = =line_width * 3 diff --git a/resources/variants/ultimaker3_extended_bb04.inst.cfg b/resources/variants/ultimaker3_extended_bb04.inst.cfg index d9a2e78fdb..94a687c951 100644 --- a/resources/variants/ultimaker3_extended_bb04.inst.cfg +++ b/resources/variants/ultimaker3_extended_bb04.inst.cfg @@ -20,7 +20,6 @@ machine_nozzle_tip_outer_diameter = 1.0 raft_base_speed = 20 raft_interface_speed = 20 raft_speed = 25 -retraction_amount = 4.5 retraction_min_travel = =3 * line_width speed_layer_0 = 20 speed_prime_tower = =math.ceil(speed_print * 10 / 35) diff --git a/resources/variants/ultimaker_s3_bb0.8.inst.cfg b/resources/variants/ultimaker_s3_bb0.8.inst.cfg index ae728bfe3a..60dfcafd33 100644 --- a/resources/variants/ultimaker_s3_bb0.8.inst.cfg +++ b/resources/variants/ultimaker_s3_bb0.8.inst.cfg @@ -42,7 +42,6 @@ raft_interface_thickness = 0.2 raft_margin = 10 raft_speed = 25 raft_surface_layers = 1 -retraction_amount = 4.5 retraction_hop = 2 retraction_hop_only_when_collides = True retraction_min_travel = =line_width * 3 diff --git a/resources/variants/ultimaker_s3_bb04.inst.cfg b/resources/variants/ultimaker_s3_bb04.inst.cfg index c2145a92b1..526f724eea 100644 --- a/resources/variants/ultimaker_s3_bb04.inst.cfg +++ b/resources/variants/ultimaker_s3_bb04.inst.cfg @@ -20,7 +20,6 @@ machine_nozzle_tip_outer_diameter = 1.0 raft_base_speed = 20 raft_interface_speed = 20 raft_speed = 25 -retraction_amount = 4.5 retraction_min_travel = =3 * line_width speed_layer_0 = 20 speed_prime_tower = =math.ceil(speed_print * 10 / 35) diff --git a/resources/variants/ultimaker_s5_bb0.8.inst.cfg b/resources/variants/ultimaker_s5_bb0.8.inst.cfg index bf5802de0d..4e9d687d8a 100644 --- a/resources/variants/ultimaker_s5_bb0.8.inst.cfg +++ b/resources/variants/ultimaker_s5_bb0.8.inst.cfg @@ -42,7 +42,6 @@ raft_interface_thickness = 0.2 raft_margin = 10 raft_speed = 25 raft_surface_layers = 1 -retraction_amount = 4.5 retraction_hop = 2 retraction_hop_only_when_collides = True retraction_min_travel = =line_width * 3 diff --git a/resources/variants/ultimaker_s5_bb04.inst.cfg b/resources/variants/ultimaker_s5_bb04.inst.cfg index dec114757b..18770b1c4d 100644 --- a/resources/variants/ultimaker_s5_bb04.inst.cfg +++ b/resources/variants/ultimaker_s5_bb04.inst.cfg @@ -20,7 +20,6 @@ machine_nozzle_tip_outer_diameter = 1.0 raft_base_speed = 20 raft_interface_speed = 20 raft_speed = 25 -retraction_amount = 4.5 retraction_min_travel = =3 * line_width speed_layer_0 = 20 speed_prime_tower = =math.ceil(speed_print * 10 / 35) From c9b3f600d567ca083ab1fda268bc793e4dc09243 Mon Sep 17 00:00:00 2001 From: Rijk van Manen Date: Tue, 28 Jun 2022 14:28:14 +0200 Subject: [PATCH 12/24] default ultimaker values result in warnings With the updated support settings of PP-108 some settings results in warnings. The warning limits are changed to avoid this. PP-185. --- resources/definitions/fdmprinter.def.json | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index c34216572d..4b1bc374b0 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -4910,7 +4910,7 @@ "default_value": 0, "type": "int", "minimum_value": "0", - "maximum_value_warning": "1 if (support_pattern == 'cross' or support_pattern == 'lines' or support_pattern == 'zigzag' or support_pattern == 'concentric') else 5", + "maximum_value_warning": "1 if (support_pattern == 'cross' or support_pattern == 'lines' or support_pattern == 'concentric') else 5", "maximum_value": "999999 if support_line_distance == 0 else (20 - math.log(support_line_distance) / math.log(2))", "enabled": "(support_enable or support_meshes_present) and support_infill_rate > 0", "limit_to_extruder": "support_infill_extruder_nr", @@ -4939,7 +4939,7 @@ "type": "float", "default_value": 0.0, "minimum_value": "0", - "maximum_value_warning": "5", + "maximum_value_warning": "10", "enabled": "(support_enable or support_meshes_present) and support_structure == 'normal'", "limit_to_extruder": "support_infill_extruder_nr", "settable_per_mesh": true @@ -5191,7 +5191,6 @@ "type": "float", "default_value": 1.0, "minimum_value": "0", - "minimum_value_warning": "minimum_support_area", "limit_to_extruder": "support_interface_extruder_nr", "enabled": "support_interface_enable and (support_enable or support_meshes_present)", "settable_per_mesh": true, @@ -5206,7 +5205,6 @@ "default_value": 1.0, "value": "extruderValue(support_roof_extruder_nr, 'minimum_interface_area')", "minimum_value": "0", - "minimum_value_warning": "minimum_support_area", "limit_to_extruder": "support_roof_extruder_nr", "enabled": "support_roof_enable and (support_enable or support_meshes_present)", "settable_per_mesh": true @@ -5220,7 +5218,6 @@ "default_value": 1.0, "value": "extruderValue(support_bottom_extruder_nr, 'minimum_interface_area')", "minimum_value": "0", - "minimum_value_warning": "minimum_support_area", "limit_to_extruder": "support_bottom_extruder_nr", "enabled": "support_bottom_enable and (support_enable or support_meshes_present)", "settable_per_mesh": true From 03398f327551470642a4dfd0af9baef40829cf73 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 29 Jun 2022 10:31:35 +0200 Subject: [PATCH 13/24] Add more extensive descriptions for about page entries The translators had lots of questions about these. So I'm adding more extensive descriptions for them for any future translators. --- resources/qml/Dialogs/AboutDialog.qml | 68 +++++++++++++-------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/resources/qml/Dialogs/AboutDialog.qml b/resources/qml/Dialogs/AboutDialog.qml index 6687da572d..614d9ddf60 100644 --- a/resources/qml/Dialogs/AboutDialog.qml +++ b/resources/qml/Dialogs/AboutDialog.qml @@ -133,49 +133,49 @@ UM.Dialog { //Do NOT add dependencies of our dependencies here, nor CI-dependencies! //Ultimaker's own projects and forks. - projectsModel.append({ name: "Cura", description: catalog.i18nc("@label", "Graphical user interface"), license: "LGPLv3", url: "https://github.com/Ultimaker/Cura" }); - projectsModel.append({ name: "Uranium", description: catalog.i18nc("@label", "Application framework"), license: "LGPLv3", url: "https://github.com/Ultimaker/Uranium" }); - projectsModel.append({ name: "CuraEngine", description: catalog.i18nc("@label", "G-code generator"), license: "AGPLv3", url: "https://github.com/Ultimaker/CuraEngine" }); - projectsModel.append({ name: "libArcus", description: catalog.i18nc("@label", "Interprocess communication library"), license: "LGPLv3", url: "https://github.com/Ultimaker/libArcus" }); - projectsModel.append({ name: "pynest2d", description: catalog.i18nc("@label", "Python bindings for libnest2d"), license: "LGPL", url: "https://github.com/Ultimaker/pynest2d" }); - projectsModel.append({ name: "libnest2d", description: catalog.i18nc("@label", "Polygon packing library, developed by Prusa Research"), license: "LGPL", url: "https://github.com/tamasmeszaros/libnest2d" }); - projectsModel.append({ name: "libSavitar", description: catalog.i18nc("@label", "Support library for handling 3MF files"), license: "LGPLv3", url: "https://github.com/ultimaker/libsavitar" }); - projectsModel.append({ name: "libCharon", description: catalog.i18nc("@label", "Support library for file metadata and streaming"), license: "LGPLv3", url: "https://github.com/ultimaker/libcharon" }); + projectsModel.append({ name: "Cura", description: catalog.i18nc("@label Description for application component", "Graphical user interface"), license: "LGPLv3", url: "https://github.com/Ultimaker/Cura" }); + projectsModel.append({ name: "Uranium", description: catalog.i18nc("@label Description for application component", "Application framework"), license: "LGPLv3", url: "https://github.com/Ultimaker/Uranium" }); + projectsModel.append({ name: "CuraEngine", description: catalog.i18nc("@label Description for application component", "G-code generator"), license: "AGPLv3", url: "https://github.com/Ultimaker/CuraEngine" }); + projectsModel.append({ name: "libArcus", description: catalog.i18nc("@label Description for application component", "Interprocess communication library"), license: "LGPLv3", url: "https://github.com/Ultimaker/libArcus" }); + projectsModel.append({ name: "pynest2d", description: catalog.i18nc("@label Description for application component", "Python bindings for libnest2d"), license: "LGPL", url: "https://github.com/Ultimaker/pynest2d" }); + projectsModel.append({ name: "libnest2d", description: catalog.i18nc("@label Description for application component", "Polygon packing library, developed by Prusa Research"), license: "LGPL", url: "https://github.com/tamasmeszaros/libnest2d" }); + projectsModel.append({ name: "libSavitar", description: catalog.i18nc("@label Description for application component", "Support library for handling 3MF files"), license: "LGPLv3", url: "https://github.com/ultimaker/libsavitar" }); + projectsModel.append({ name: "libCharon", description: catalog.i18nc("@label Description for application component", "Support library for file metadata and streaming"), license: "LGPLv3", url: "https://github.com/ultimaker/libcharon" }); //Direct dependencies of the front-end. - projectsModel.append({ name: "Python", description: catalog.i18nc("@label", "Programming language"), license: "Python", url: "http://python.org/" }); - projectsModel.append({ name: "Qt6", description: catalog.i18nc("@label", "GUI framework"), license: "LGPLv3", url: "https://www.qt.io/" }); - projectsModel.append({ name: "PyQt", description: catalog.i18nc("@label", "GUI framework bindings"), license: "GPL", url: "https://riverbankcomputing.com/software/pyqt" }); - projectsModel.append({ name: "SIP", description: catalog.i18nc("@label", "C/C++ Binding library"), license: "GPL", url: "https://riverbankcomputing.com/software/sip" }); - projectsModel.append({ name: "Protobuf", description: catalog.i18nc("@label", "Data interchange format"), license: "BSD", url: "https://developers.google.com/protocol-buffers" }); + projectsModel.append({ name: "Python", description: catalog.i18nc("@label Description for application dependency", "Programming language"), license: "Python", url: "http://python.org/" }); + projectsModel.append({ name: "Qt6", description: catalog.i18nc("@label Description for application dependency", "GUI framework"), license: "LGPLv3", url: "https://www.qt.io/" }); + projectsModel.append({ name: "PyQt", description: catalog.i18nc("@label Description for application dependency", "GUI framework bindings"), license: "GPL", url: "https://riverbankcomputing.com/software/pyqt" }); + projectsModel.append({ name: "SIP", description: catalog.i18nc("@label Description for application dependency", "C/C++ Binding library"), license: "GPL", url: "https://riverbankcomputing.com/software/sip" }); + projectsModel.append({ name: "Protobuf", description: catalog.i18nc("@label Description for application dependency", "Data interchange format"), license: "BSD", url: "https://developers.google.com/protocol-buffers" }); projectsModel.append({ name: "Noto Sans", description: catalog.i18nc("@label", "Font"), license: "Apache 2.0", url: "https://www.google.com/get/noto/" }); //CuraEngine's dependencies. - projectsModel.append({ name: "Clipper", description: catalog.i18nc("@label", "Polygon clipping library"), license: "Boost", url: "http://www.angusj.com/delphi/clipper.php" }); - projectsModel.append({ name: "RapidJSON", description: catalog.i18nc("@label", "JSON parser"), license: "MIT", url: "https://rapidjson.org/" }); - projectsModel.append({ name: "STB", description: catalog.i18nc("@label", "Utility functions, including an image loader"), license: "Public Domain", url: "https://github.com/nothings/stb" }); - projectsModel.append({ name: "Boost", description: catalog.i18nc("@label", "Utility library, including Voronoi generation"), license: "Boost", url: "https://www.boost.org/" }); + projectsModel.append({ name: "Clipper", description: catalog.i18nc("@label Description for application dependency", "Polygon clipping library"), license: "Boost", url: "http://www.angusj.com/delphi/clipper.php" }); + projectsModel.append({ name: "RapidJSON", description: catalog.i18nc("@label Description for application dependency", "JSON parser"), license: "MIT", url: "https://rapidjson.org/" }); + projectsModel.append({ name: "STB", description: catalog.i18nc("@label Description for application dependency", "Utility functions, including an image loader"), license: "Public Domain", url: "https://github.com/nothings/stb" }); + projectsModel.append({ name: "Boost", description: catalog.i18nc("@label Description for application dependency", "Utility library, including Voronoi generation"), license: "Boost", url: "https://www.boost.org/" }); //Python modules. - projectsModel.append({ name: "Certifi", description: catalog.i18nc("@label", "Root Certificates for validating SSL trustworthiness"), license: "MPL", url: "https://github.com/certifi/python-certifi" }); - projectsModel.append({ name: "Cryptography", description: catalog.i18nc("@label", "Root Certificates for validating SSL trustworthiness"), license: "APACHE and BSD", url: "https://cryptography.io/" }); - projectsModel.append({ name: "Future", description: catalog.i18nc("@label", "Compatibility between Python 2 and 3"), license: "MIT", url: "https://python-future.org/" }); - projectsModel.append({ name: "keyring", description: catalog.i18nc("@label", "Support library for system keyring access"), license: "MIT", url: "https://github.com/jaraco/keyring" }); - projectsModel.append({ name: "NumPy", description: catalog.i18nc("@label", "Support library for faster math"), license: "BSD", url: "http://www.numpy.org/" }); - projectsModel.append({ name: "NumPy-STL", description: catalog.i18nc("@label", "Support library for handling STL files"), license: "BSD", url: "https://github.com/WoLpH/numpy-stl" }); - projectsModel.append({ name: "PyClipper", description: catalog.i18nc("@label", "Python bindings for Clipper"), license: "MIT", url: "https://github.com/fonttools/pyclipper" }); - projectsModel.append({ name: "PySerial", description: catalog.i18nc("@label", "Serial communication library"), license: "Python", url: "http://pyserial.sourceforge.net/" }); - projectsModel.append({ name: "SciPy", description: catalog.i18nc("@label", "Support library for scientific computing"), license: "BSD-new", url: "https://www.scipy.org/" }); - projectsModel.append({ name: "Sentry", description: catalog.i18nc("@Label", "Python Error tracking library"), license: "BSD 2-Clause 'Simplified'", url: "https://sentry.io/for/python/" }); - projectsModel.append({ name: "Trimesh", description: catalog.i18nc("@label", "Support library for handling triangular meshes"), license: "MIT", url: "https://trimsh.org" }); - projectsModel.append({ name: "python-zeroconf", description: catalog.i18nc("@label", "ZeroConf discovery library"), license: "LGPL", url: "https://github.com/jstasiak/python-zeroconf" }); + projectsModel.append({ name: "Certifi", description: catalog.i18nc("@label Description for application dependency", "Root Certificates for validating SSL trustworthiness"), license: "MPL", url: "https://github.com/certifi/python-certifi" }); + projectsModel.append({ name: "Cryptography", description: catalog.i18nc("@label Description for application dependency", "Root Certificates for validating SSL trustworthiness"), license: "APACHE and BSD", url: "https://cryptography.io/" }); + projectsModel.append({ name: "Future", description: catalog.i18nc("@label Description for application dependency", "Compatibility between Python 2 and 3"), license: "MIT", url: "https://python-future.org/" }); + projectsModel.append({ name: "keyring", description: catalog.i18nc("@label Description for application dependency", "Support library for system keyring access"), license: "MIT", url: "https://github.com/jaraco/keyring" }); + projectsModel.append({ name: "NumPy", description: catalog.i18nc("@label Description for application dependency", "Support library for faster math"), license: "BSD", url: "http://www.numpy.org/" }); + projectsModel.append({ name: "NumPy-STL", description: catalog.i18nc("@label Description for application dependency", "Support library for handling STL files"), license: "BSD", url: "https://github.com/WoLpH/numpy-stl" }); + projectsModel.append({ name: "PyClipper", description: catalog.i18nc("@label Description for application dependency", "Python bindings for Clipper"), license: "MIT", url: "https://github.com/fonttools/pyclipper" }); + projectsModel.append({ name: "PySerial", description: catalog.i18nc("@label Description for application dependency", "Serial communication library"), license: "Python", url: "http://pyserial.sourceforge.net/" }); + projectsModel.append({ name: "SciPy", description: catalog.i18nc("@label Description for application dependency", "Support library for scientific computing"), license: "BSD-new", url: "https://www.scipy.org/" }); + projectsModel.append({ name: "Sentry", description: catalog.i18nc("@Label Description for application dependency", "Python Error tracking library"), license: "BSD 2-Clause 'Simplified'", url: "https://sentry.io/for/python/" }); + projectsModel.append({ name: "Trimesh", description: catalog.i18nc("@label Description for application dependency", "Support library for handling triangular meshes"), license: "MIT", url: "https://trimsh.org" }); + projectsModel.append({ name: "python-zeroconf", description: catalog.i18nc("@label Description for application dependency", "ZeroConf discovery library"), license: "LGPL", url: "https://github.com/jstasiak/python-zeroconf" }); //Building/packaging. - projectsModel.append({ name: "CMake", description: catalog.i18nc("@label", "Universal build system configuration"), license: "BSD 3-Clause", url: "https://cmake.org/" }); - projectsModel.append({ name: "Conan", description: catalog.i18nc("@label", "Dependency and package manager"), license: "MIT", url: "https://conan.io/" }); - projectsModel.append({ name: "Pyinstaller", description: catalog.i18nc("@label", "Packaging Python-applications"), license: "GPLv2", url: "https://pyinstaller.org/" }); - projectsModel.append({ name: "AppImageKit", description: catalog.i18nc("@label", "Linux cross-distribution application deployment"), license: "MIT", url: "https://github.com/AppImage/AppImageKit" }); - projectsModel.append({ name: "NSIS", description: catalog.i18nc("@label", "Generating Windows installers"), license: "Zlib", url: "https://nsis.sourceforge.io/" }); + projectsModel.append({ name: "CMake", description: catalog.i18nc("@label Description for development tool", "Universal build system configuration"), license: "BSD 3-Clause", url: "https://cmake.org/" }); + projectsModel.append({ name: "Conan", description: catalog.i18nc("@label Description for development tool", "Dependency and package manager"), license: "MIT", url: "https://conan.io/" }); + projectsModel.append({ name: "Pyinstaller", description: catalog.i18nc("@label Description for development tool", "Packaging Python-applications"), license: "GPLv2", url: "https://pyinstaller.org/" }); + projectsModel.append({ name: "AppImageKit", description: catalog.i18nc("@label Description for development tool", "Linux cross-distribution application deployment"), license: "MIT", url: "https://github.com/AppImage/AppImageKit" }); + projectsModel.append({ name: "NSIS", description: catalog.i18nc("@label Description for development tool", "Generating Windows installers"), license: "Zlib", url: "https://nsis.sourceforge.io/" }); } } From 52294dbc3817cd45cd8b3bc75690f2b54f4ac34d Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Thu, 30 Jun 2022 18:46:06 +0200 Subject: [PATCH 14/24] Create cura-installer.yml Manually trigger workflow which will create an installer --- .github/workflows/cura-installer.yml | 98 ++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 .github/workflows/cura-installer.yml diff --git a/.github/workflows/cura-installer.yml b/.github/workflows/cura-installer.yml new file mode 100644 index 0000000000..cdc1306d45 --- /dev/null +++ b/.github/workflows/cura-installer.yml @@ -0,0 +1,98 @@ +name: Cura Installer + +on: + workflow_dispatch: + inputs: + cura_conan_version: + description: 'Cura Conan Version' + default: 'cura/latest@ultimaker/testing' + required: true +env: + CONAN_LOGIN_USERNAME_CURA: ${{ secrets.CONAN_USER }} + CONAN_PASSWORD_CURA: ${{ secrets.CONAN_PASS }} + CONAN_LOGIN_USERNAME_CURA_CE: ${{ secrets.CONAN_USER }} + CONAN_PASSWORD_CURA_CE: ${{ secrets.CONAN_PASS }} + CONAN_LOG_RUN_TO_OUTPUT: 1 + CONAN_LOGGING_LEVEL: ${{ inputs.conan_logging_level }} + CONAN_NON_INTERACTIVE: 1 + +jobs: + conan-package-create: + strategy: + matrix: + version: [10, 12, 14] + os: [ubuntu-20.04, windows-2022, macos-10.15] + + runs-on: {{ matrix.os }} + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup Python and pip + uses: actions/setup-python@v4 + with: + python-version: '3.10.4' + cache: 'pip' + cache-dependency-path: .github/workflows/requirements-conan-package.txt + + - name: Install Python requirements and Create default Conan profile + run: | + pip install -r .github/workflows/requirements-conan-package.txt + conan profile new default --detect + + - name: Use Conan download cache (Bash) + if: ${{ runner.os != 'Windows' }} + run: conan config set storage.download_cache="$HOME/.conan/conan_download_cache" + + - name: Use Conan download cache (Powershell) + if: ${{ runner.os == 'Windows' }} + run: conan config set storage.download_cache="C:\Users\runneradmin\.conan\conan_download_cache" + + - name: Cache Conan local repository packages (Bash) + uses: actions/cache@v3 + if: ${{ runner.os != 'Windows' }} + with: + path: | + $HOME/.conan/data + $HOME/.conan/conan_download_cache + key: conan-${{ runner.os }}-${{ runner.arch }} + + - name: Cache Conan local repository packages (Powershell) + uses: actions/cache@v3 + if: ${{ runner.os == 'Windows' }} + with: + path: | + C:\Users\runneradmin\.conan\data + C:\.conan + C:\Users\runneradmin\.conan\conan_download_cache + key: conan-${{ runner.os }}-${{ runner.arch }} + + - name: Install MacOS system requirements + if: ${{ runner.os == 'Macos' }} + run: brew install autoconf automake ninja + + - name: Install Linux system requirements + if: ${{ runner.os == 'Linux' }} + run: sudo apt install build-essential checkinstall zlib1g-dev libssl-dev ninja-build autoconf libx11-dev libx11-xcb-dev libfontenc-dev libice-dev libsm-dev libxau-dev libxaw7-dev libxcomposite-dev libxcursor-dev libxdamage-dev libxdmcp-dev libxext-dev libxfixes-dev libxi-dev libxinerama-dev libxkbfile-dev libxmu-dev libxmuu-dev libxpm-dev libxrandr-dev libxrender-dev libxres-dev libxss-dev libxt-dev libxtst-dev libxv-dev libxvmc-dev libxxf86vm-dev xtrans-dev libxcb-render0-dev libxcb-render-util0-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-image0-dev libxcb-keysyms1-dev libxcb-randr0-dev libxcb-shape0-dev libxcb-sync-dev libxcb-xfixes0-dev libxcb-xinerama0-dev xkb-data libxcb-dri3-dev uuid-dev libxcb-util-dev -y + + - name: Clean Conan local cache + if: ${{ inputs.conan_clean_local_cache }} + run: conan remove "*" -f + + - name: Get Conan configuration from branch + if: ${{ inputs.conan_config_branch != '' }} + run: conan config install https://github.com/Ultimaker/conan-config.git -a "-b ${{ inputs.conan_config_branch }}" + + - name: Get Conan configuration + if: ${{ inputs.conan_config_branch == '' }} + run: conan config install https://github.com/Ultimaker/conan-config.git + + - name: Create the Packages + run: conan install ${{ inputs.cura_conan_version }} --build=missing --update -g VirtualPythonEnv + + - name: Upload the Package(s) + if: always() + run: | + conan upload "*" -r cura --all -c + conan upload "*" -r cura-ce -c From 94af0ad9062d8e879739a0a1d5ec8f056f601dfe Mon Sep 17 00:00:00 2001 From: "j.spijker@ultimaker.com" Date: Thu, 30 Jun 2022 22:38:23 +0200 Subject: [PATCH 15/24] repurposed old cura-build-env workflow Contributes to CURA-9365 --- .github/workflows/cura-installer.yml | 98 ++++++++++++++++++++++++---- 1 file changed, 86 insertions(+), 12 deletions(-) diff --git a/.github/workflows/cura-installer.yml b/.github/workflows/cura-installer.yml index cdc1306d45..7a26fd7a00 100644 --- a/.github/workflows/cura-installer.yml +++ b/.github/workflows/cura-installer.yml @@ -1,12 +1,37 @@ name: Cura Installer on: - workflow_dispatch: - inputs: - cura_conan_version: - description: 'Cura Conan Version' - default: 'cura/latest@ultimaker/testing' - required: true + workflow_dispatch: + inputs: + cura_conan_version: + description: 'Cura Conan Version' + # Fixme: default to cura/latest@testing (which is main) + default: 'cura/latest@ultimaker/stable' + required: true + conan_config: + description: 'Conan config branch to use' + default: '' + required: true + enterprise: + description: 'Build Cura as an Enterprise edition' + required: true + default: false + type: boolean + staging: + description: 'Use staging API' + required: true + default: false + type: boolean + installer: + description: 'Create the installer' + required: true + default: false + type: boolean + +# Run the nightly at 5:25 UTC on working days + schedule: + - cron: '*/25 5 * * 1-5' + env: CONAN_LOGIN_USERNAME_CURA: ${{ secrets.CONAN_USER }} CONAN_PASSWORD_CURA: ${{ secrets.CONAN_PASS }} @@ -15,15 +40,18 @@ env: CONAN_LOG_RUN_TO_OUTPUT: 1 CONAN_LOGGING_LEVEL: ${{ inputs.conan_logging_level }} CONAN_NON_INTERACTIVE: 1 + CODESIGN_IDENTITY: ${{ secrets.CODESIGN_IDENTITY }} + NOTARIZE_USER: ${{ secrets.NOTARIZE_USER }} + NOTARIZE_PASSWORD: ${{ secrets.NOTARIZE_PASSWORD }} jobs: - conan-package-create: + cura-installer-create: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false matrix: - version: [10, 12, 14] - os: [ubuntu-20.04, windows-2022, macos-10.15] - - runs-on: {{ matrix.os }} + os: [ macos-10.15, windows-2022, ubuntu-20.04 ] steps: - name: Checkout @@ -89,10 +117,56 @@ jobs: run: conan config install https://github.com/Ultimaker/conan-config.git - name: Create the Packages - run: conan install ${{ inputs.cura_conan_version }} --build=missing --update -g VirtualPythonEnv + run: conan install ${{ inputs.cura_conan_version }} --build=missing --update -if cura_inst -g VirtualPythonEnv -o cura:enterprise=${{ inputs.enterprise }} -o cura:staging=${{ inputs.staging }} - name: Upload the Package(s) if: always() run: | conan upload "*" -r cura --all -c conan upload "*" -r cura-ce -c + + - name: Set Environment variables for Cura (bash) + if: ${{ runner.os != 'Windows' }} + run: | + . activate_github_actions_env.sh + working-directory: cura_inst + + - name: Set Environment variables for Cura (Powershell) + if: ${{ runner.os == 'Windows' }} + run: | + .\activate_github_actions_env.ps1 + working-directory: cura_inst + + - name: Create the Cura dist + run: pyinstaller Ultimaker-Cura.spec + + - name: Archive the artifacts (bash) + if: ${{ github.event.inputs.installer == 'false' && runner.os != 'Windows' }} + run: tar -zcf "./Ultimaker-Cura-${{ needs.get-semver.outputs.semver_full }}-${{ runner.os }}-${{ runner.arch }}.tar.gz" "./Ultimaker-Cura/" + working-directory: dist + + - name: Archive the artifacts (Powershell) + if: ${{ github.event.inputs.installer == 'false' && runner.os == 'Windows' }} + run: Compress-Archive -Path ".\Ultimaker-Cura" -DestinationPath ".\Ultimaker-Cura-${{ needs.get-semver.outputs.semver_full }}-${{ runner.os }}-${{ runner.arch }}.zip" + working-directory: dist + +# FIXME: When the NSIS resources and scripts are to Cura repo and packaged +# - name: Create the Windows exe installer (Powershell) +# if: ${{ github.event.inputs.installer == 'true' && runner.os == 'Windows' }} +# run: | +# python "$Env:GITHUB_WORKSPACE\packaging\NSIS\nsis-configurator.py" um_path "$Env:GITHUB_WORKSPACE\packaging\NSIS\Ultimaker-Cura.nsi.jinja" "Ultimaker Cura" "Ultimaker-Cura.exe" "${{ needs.get-semver.outputs.semver_major }}" "${{ needs.get-semver.outputs.semver_minor }}" "${{ needs.get-semver.outputs.semver_patch }}" "0" "Ultimaker B.V." "https://ultimaker.com" "$Env:GITHUB_WORKSPACE\packaging\cura_license.txt" "LZMA" "$Env:GITHUB_WORKSPACE\packaging\cura_banner_nsis.bmp" "$Env:GITHUB_WORKSPACE\packaging\Cura.ico" "Ultimaker-Cura-${{ needs.get-semver.outputs.semver_full }}-${{ runner.os }}-${{ runner.arch }}.exe" +# makensis /V2 /P4 Ultimaker-Cura.nsi +# working-directory: dist + + - name: Upload the artifacts + uses: actions/upload-artifact@v3 + with: + name: Ultimaker-Cura-${{ needs.get-semver.outputs.semver_full }}-${{ runner.os }}-${{ runner.arch }} + path: | + dist/*.tar.gz + dist/*.zip + dist/*.exe + dist/*.msi + dist/*.dmg + dist/*.AppImage + retention-days: 2 From df09a6824cbd5665e0c08b97a92a4dc4f41c9afa Mon Sep 17 00:00:00 2001 From: "j.spijker@ultimaker.com" Date: Thu, 30 Jun 2022 22:41:45 +0200 Subject: [PATCH 16/24] default conan config should not be required Contributes to CURA-9365 --- .github/workflows/cura-installer.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cura-installer.yml b/.github/workflows/cura-installer.yml index 7a26fd7a00..ebad7b3389 100644 --- a/.github/workflows/cura-installer.yml +++ b/.github/workflows/cura-installer.yml @@ -11,7 +11,7 @@ on: conan_config: description: 'Conan config branch to use' default: '' - required: true + required: false enterprise: description: 'Build Cura as an Enterprise edition' required: true From 839554ce02786386671d4dff62489b8995e273df Mon Sep 17 00:00:00 2001 From: "j.spijker@ultimaker.com" Date: Thu, 30 Jun 2022 22:44:46 +0200 Subject: [PATCH 17/24] Add runner pip requirements Contributes to CURA-9365 --- .github/workflows/requirements-conan-package.txt | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .github/workflows/requirements-conan-package.txt diff --git a/.github/workflows/requirements-conan-package.txt b/.github/workflows/requirements-conan-package.txt new file mode 100644 index 0000000000..c6b564e450 --- /dev/null +++ b/.github/workflows/requirements-conan-package.txt @@ -0,0 +1,2 @@ +conan +sip==6.5.1 From c04511d433099f05220a471c0afc914923bf8a9c Mon Sep 17 00:00:00 2001 From: "j.spijker@ultimaker.com" Date: Thu, 30 Jun 2022 23:02:48 +0200 Subject: [PATCH 18/24] run at 3:25 UTC Contributes to CURA-9365 --- .github/workflows/cura-installer.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cura-installer.yml b/.github/workflows/cura-installer.yml index ebad7b3389..9b99947295 100644 --- a/.github/workflows/cura-installer.yml +++ b/.github/workflows/cura-installer.yml @@ -30,7 +30,7 @@ on: # Run the nightly at 5:25 UTC on working days schedule: - - cron: '*/25 5 * * 1-5' + - cron: '25 3 * * 1-5' env: CONAN_LOGIN_USERNAME_CURA: ${{ secrets.CONAN_USER }} From 79508b552e8ee0a8db96e7b964eb1667c95e2dcd Mon Sep 17 00:00:00 2001 From: "j.spijker@ultimaker.com" Date: Thu, 30 Jun 2022 23:16:02 +0200 Subject: [PATCH 19/24] Use correct paths and extension for activation script Contributes to CURA-9365 --- .github/workflows/cura-installer.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cura-installer.yml b/.github/workflows/cura-installer.yml index 9b99947295..0780f0ea15 100644 --- a/.github/workflows/cura-installer.yml +++ b/.github/workflows/cura-installer.yml @@ -117,7 +117,7 @@ jobs: run: conan config install https://github.com/Ultimaker/conan-config.git - name: Create the Packages - run: conan install ${{ inputs.cura_conan_version }} --build=missing --update -if cura_inst -g VirtualPythonEnv -o cura:enterprise=${{ inputs.enterprise }} -o cura:staging=${{ inputs.staging }} + run: conan install ${{ inputs.cura_conan_version }} --build=missing --update -c tools.env.virtualenv:powershell=True -if cura_inst -g VirtualPythonEnv -o cura:enterprise=${{ inputs.enterprise }} -o cura:staging=${{ inputs.staging }} - name: Upload the Package(s) if: always() @@ -129,13 +129,13 @@ jobs: if: ${{ runner.os != 'Windows' }} run: | . activate_github_actions_env.sh - working-directory: cura_inst + working-directory: cura_inst\bin - name: Set Environment variables for Cura (Powershell) if: ${{ runner.os == 'Windows' }} run: | .\activate_github_actions_env.ps1 - working-directory: cura_inst + working-directory: cura_inst\Scripts - name: Create the Cura dist run: pyinstaller Ultimaker-Cura.spec From 44bda180f3d0ce6d855ecf560c95db402927bf10 Mon Sep 17 00:00:00 2001 From: "j.spijker@ultimaker.com" Date: Thu, 30 Jun 2022 23:41:26 +0200 Subject: [PATCH 20/24] Fixed path for activation script Contributes to CURA-9365 --- .github/workflows/cura-installer.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/cura-installer.yml b/.github/workflows/cura-installer.yml index 0780f0ea15..106a178e69 100644 --- a/.github/workflows/cura-installer.yml +++ b/.github/workflows/cura-installer.yml @@ -127,15 +127,11 @@ jobs: - name: Set Environment variables for Cura (bash) if: ${{ runner.os != 'Windows' }} - run: | - . activate_github_actions_env.sh - working-directory: cura_inst\bin + run: . ./cura_inst/bin/activate_github_actions_env.sh - name: Set Environment variables for Cura (Powershell) if: ${{ runner.os == 'Windows' }} - run: | - .\activate_github_actions_env.ps1 - working-directory: cura_inst\Scripts + run: .\cura_inst\Scripts\activate_github_actions_env.ps1 - name: Create the Cura dist run: pyinstaller Ultimaker-Cura.spec From d1b3e25440ad00f49f9165b3c5fa97958d594ac1 Mon Sep 17 00:00:00 2001 From: "j.spijker@ultimaker.com" Date: Thu, 30 Jun 2022 23:43:41 +0200 Subject: [PATCH 21/24] Fixed path for pyinstaller spec file Contributes to CURA-9365 --- .github/workflows/cura-installer.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cura-installer.yml b/.github/workflows/cura-installer.yml index 106a178e69..a78d1c2c0e 100644 --- a/.github/workflows/cura-installer.yml +++ b/.github/workflows/cura-installer.yml @@ -134,7 +134,7 @@ jobs: run: .\cura_inst\Scripts\activate_github_actions_env.ps1 - name: Create the Cura dist - run: pyinstaller Ultimaker-Cura.spec + run: pyinstaller ./cura_inst/Ultimaker-Cura.spec - name: Archive the artifacts (bash) if: ${{ github.event.inputs.installer == 'false' && runner.os != 'Windows' }} From 05d52860a0dcc22c5d31387bb2e884770f07f228 Mon Sep 17 00:00:00 2001 From: "j.spijker@ultimaker.com" Date: Fri, 1 Jul 2022 15:21:48 +0200 Subject: [PATCH 22/24] sync workflow with 5.1 Contributes to CURA-9365 --- .github/workflows/cura-installer.yml | 91 +++++++++++++++++++++------- 1 file changed, 69 insertions(+), 22 deletions(-) diff --git a/.github/workflows/cura-installer.yml b/.github/workflows/cura-installer.yml index a78d1c2c0e..69ffddfd30 100644 --- a/.github/workflows/cura-installer.yml +++ b/.github/workflows/cura-installer.yml @@ -41,8 +41,13 @@ env: CONAN_LOGGING_LEVEL: ${{ inputs.conan_logging_level }} CONAN_NON_INTERACTIVE: 1 CODESIGN_IDENTITY: ${{ secrets.CODESIGN_IDENTITY }} - NOTARIZE_USER: ${{ secrets.NOTARIZE_USER }} - NOTARIZE_PASSWORD: ${{ secrets.NOTARIZE_PASSWORD }} + MAC_NOTARIZE_USER: ${{ secrets.MAC_NOTARIZE_USER }} + MAC_NOTARIZE_PASS: ${{ secrets.MAC_NOTARIZE_PASS }} + MACOS_CERT_P12: ${{ secrets.MACOS_CERT_P12 }} + MACOS_CERT_PASS: ${{ secrets.MACOS_CERT_PASS }} + MACOS_CERT_USER: ${{ secrets.MACOS_CERT_USER }} + GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} + MACOS_CERT_PASSPHRASE: ${{ secrets.$MACOS_CERT_PASSPHRASE }} jobs: cura-installer-create: @@ -60,7 +65,7 @@ jobs: - name: Setup Python and pip uses: actions/setup-python@v4 with: - python-version: '3.10.4' + python-version: '3.10.x' cache: 'pip' cache-dependency-path: .github/workflows/requirements-conan-package.txt @@ -102,7 +107,23 @@ jobs: - name: Install Linux system requirements if: ${{ runner.os == 'Linux' }} - run: sudo apt install build-essential checkinstall zlib1g-dev libssl-dev ninja-build autoconf libx11-dev libx11-xcb-dev libfontenc-dev libice-dev libsm-dev libxau-dev libxaw7-dev libxcomposite-dev libxcursor-dev libxdamage-dev libxdmcp-dev libxext-dev libxfixes-dev libxi-dev libxinerama-dev libxkbfile-dev libxmu-dev libxmuu-dev libxpm-dev libxrandr-dev libxrender-dev libxres-dev libxss-dev libxt-dev libxtst-dev libxv-dev libxvmc-dev libxxf86vm-dev xtrans-dev libxcb-render0-dev libxcb-render-util0-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-image0-dev libxcb-keysyms1-dev libxcb-randr0-dev libxcb-shape0-dev libxcb-sync-dev libxcb-xfixes0-dev libxcb-xinerama0-dev xkb-data libxcb-dri3-dev uuid-dev libxcb-util-dev -y + run: | + sudo apt install build-essential checkinstall zlib1g-dev libssl-dev ninja-build autoconf libx11-dev libx11-xcb-dev libfontenc-dev libice-dev libsm-dev libxau-dev libxaw7-dev libxcomposite-dev libxcursor-dev libxdamage-dev libxdmcp-dev libxext-dev libxfixes-dev libxi-dev libxinerama-dev libxkbfile-dev libxmu-dev libxmuu-dev libxpm-dev libxrandr-dev libxrender-dev libxres-dev libxss-dev libxt-dev libxtst-dev libxv-dev libxvmc-dev libxxf86vm-dev xtrans-dev libxcb-render0-dev libxcb-render-util0-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-image0-dev libxcb-keysyms1-dev libxcb-randr0-dev libxcb-shape0-dev libxcb-sync-dev libxcb-xfixes0-dev libxcb-xinerama0-dev xkb-data libxcb-dri3-dev uuid-dev libxcb-util-dev -y + wget --no-check-certificate --quiet https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage -O $GITHUB_WORKSPACE/appimagetool + chmod +x $GITHUB_WORKSPACE/appimagetool + echo "APPIMAGETOOL_LOCATION=$GITHUB_WORKSPACE/appimagetool" >> $GITHUB_ENV + + - name: Configure GPG Key Linux (Bash) + if: ${{ runner.os == 'Linux' }} + run: echo -n "$GPG_PRIVATE_KEY" | base64 --decode | gpg --import + + - name: Configure Macos keychain (Bash) + if: ${{ runner.os == 'Macos' }} + run: | + CERTIFICATE_PATH=$RUNNER_TEMP/um_keychain.p12 + echo -n "$MACOS_CERT_P12" | base64 --decode --output $CERTIFICATE_PATH + security import $CERTIFICATE_PATH -p $MACOS_CERT_PASSPHRASE -A + security unlock -p $MACOS_CERT_USER $CERTIFICATE_PATH - name: Clean Conan local cache if: ${{ inputs.conan_clean_local_cache }} @@ -119,45 +140,70 @@ jobs: - name: Create the Packages run: conan install ${{ inputs.cura_conan_version }} --build=missing --update -c tools.env.virtualenv:powershell=True -if cura_inst -g VirtualPythonEnv -o cura:enterprise=${{ inputs.enterprise }} -o cura:staging=${{ inputs.staging }} - - name: Upload the Package(s) - if: always() - run: | - conan upload "*" -r cura --all -c - conan upload "*" -r cura-ce -c - - name: Set Environment variables for Cura (bash) if: ${{ runner.os != 'Windows' }} - run: . ./cura_inst/bin/activate_github_actions_env.sh + run: | + . ./cura_inst/bin/activate_github_actions_env.sh + . ./cura_inst/bin/activate_github_actions_version_env.sh - name: Set Environment variables for Cura (Powershell) if: ${{ runner.os == 'Windows' }} - run: .\cura_inst\Scripts\activate_github_actions_env.ps1 + run: | + .\cura_inst\Scripts\activate_github_actions_env.ps1 + .\cura_inst\Scripts\activate_github_actions_version_env.ps1 - name: Create the Cura dist run: pyinstaller ./cura_inst/Ultimaker-Cura.spec - name: Archive the artifacts (bash) if: ${{ github.event.inputs.installer == 'false' && runner.os != 'Windows' }} - run: tar -zcf "./Ultimaker-Cura-${{ needs.get-semver.outputs.semver_full }}-${{ runner.os }}-${{ runner.arch }}.tar.gz" "./Ultimaker-Cura/" + run: tar -zcf "./Ultimaker-Cura-$CURA_VERSION_FULL-${{ runner.os }}-${{ runner.arch }}.tar.gz" "./Ultimaker-Cura/" working-directory: dist - name: Archive the artifacts (Powershell) if: ${{ github.event.inputs.installer == 'false' && runner.os == 'Windows' }} - run: Compress-Archive -Path ".\Ultimaker-Cura" -DestinationPath ".\Ultimaker-Cura-${{ needs.get-semver.outputs.semver_full }}-${{ runner.os }}-${{ runner.arch }}.zip" + run: Compress-Archive -Path ".\Ultimaker-Cura" -DestinationPath ".\Ultimaker-Cura-$Env:CURA_VERSION_FULL-${{ runner.os }}-${{ runner.arch }}.zip" working-directory: dist -# FIXME: When the NSIS resources and scripts are to Cura repo and packaged -# - name: Create the Windows exe installer (Powershell) -# if: ${{ github.event.inputs.installer == 'true' && runner.os == 'Windows' }} -# run: | -# python "$Env:GITHUB_WORKSPACE\packaging\NSIS\nsis-configurator.py" um_path "$Env:GITHUB_WORKSPACE\packaging\NSIS\Ultimaker-Cura.nsi.jinja" "Ultimaker Cura" "Ultimaker-Cura.exe" "${{ needs.get-semver.outputs.semver_major }}" "${{ needs.get-semver.outputs.semver_minor }}" "${{ needs.get-semver.outputs.semver_patch }}" "0" "Ultimaker B.V." "https://ultimaker.com" "$Env:GITHUB_WORKSPACE\packaging\cura_license.txt" "LZMA" "$Env:GITHUB_WORKSPACE\packaging\cura_banner_nsis.bmp" "$Env:GITHUB_WORKSPACE\packaging\Cura.ico" "Ultimaker-Cura-${{ needs.get-semver.outputs.semver_full }}-${{ runner.os }}-${{ runner.arch }}.exe" -# makensis /V2 /P4 Ultimaker-Cura.nsi -# working-directory: dist + - name: Create the Windows exe installer (Powershell) + if: ${{ github.event.inputs.installer == 'true' && runner.os == 'Windows' }} + run: | + python ..\cura_inst\packaging\NSIS\nsis-configurator.py ".\Ultimaker-Cura" "..\cura_inst\packaging\NSIS\Ultimaker-Cura.nsi.jinja" "Ultimaker Cura" "Ultimaker-Cura.exe" "$Env:CURA_VERSION_MAJOR" "$Env:CURA_VERSION_MINOR" "$Env:CURA_VERSION_PATCH" "$Env:CURA_VERSION_BUILD" "Ultimaker B.V." "https://ultimaker.com" "..\cura_inst\packaging\cura_license.txt" "LZMA" "..\cura_inst\packaging\NSIS\cura_banner_nsis.bmp" "..\cura_inst\packaging\icons\Cura.ico" "Ultimaker-Cura-$Env:CURA_VERSION_FULL-${{ runner.os }}-${{ runner.arch }}.exe" + makensis /V2 /P4 Ultimaker-Cura.nsi + working-directory: dist + + - name: Create the Linux AppImage (Bash) + if: ${{ github.event.inputs.installer == 'true' && runner.os == 'Linux' }} + run: python ../cura_inst/packaging/AppImage/create_appimage.py ./Ultimaker-Cura $CURA_VERSION_FULL + working-directory: dist + + - name: Create the MacOS dmg (Bash) alternative + if: ${{ github.event.inputs.installer == 'true' && runner.os == 'Macos' }} + run: create-dmg --window-pos 640 360 --volicon "../cura_inst/packaging/icons/VolumeIcons_Cura.icns" --window-size 690 503 --icon-size 90 --icon "Ultimaker-Cura.app" 169 272 --app-drop-link 520 272 --eula "../cura_inst/packaging/cura_license.txt" --background "../cura_inst/packaging/icons/cura_background_dmg.png" --rez Rez "./Ultimaker-Cura.dmg" "./Ultimaker-Cura.app" + working-directory: dist + + - name: Sign the MacOS dmg (Bash) alternative + if: ${{ github.event.inputs.installer == 'true' && runner.os == 'Macos' }} + run: codesign -s "$CODESIGN_IDENTITY" --timestamp -i "nl.ultimaker.cura.dmg" "./Ultimaker-Cura.dmg" + working-directory: dist + + - name: Notarize the MacOS dmg (Bash) alternative + if: ${{ github.event.inputs.installer == 'true' && runner.os == 'Macos' }} + run: xcrun altool --notarize-app --primary-bundle-id "nl.ultimaker.cura" --username "$MAC_NOTARIZE_USER" --password "$MAC_NOTARIZE_PASS" --file "./Ultimaker-Cura.dmg" + working-directory: dist + + - name: Create the MacOS dmg (Bash) + if: ${{ github.event.inputs.installer == 'true' && runner.os == 'Macos' }} + run: python ../cura_inst/packaging/dmg/dmg_sign_notarize.py + working-directory: dist + env: + SOURCE_DIR: ${{ env.GITHUB_WORKSPACE }}/cura_inst + DIST_DIR: ${{ env.GITHUB_WORKSPACE }}/dist - name: Upload the artifacts uses: actions/upload-artifact@v3 with: - name: Ultimaker-Cura-${{ needs.get-semver.outputs.semver_full }}-${{ runner.os }}-${{ runner.arch }} + name: Ultimaker-Cura-${{ env.CURA_VERSION_FULL }}-${{ runner.os }}-${{ runner.arch }} path: | dist/*.tar.gz dist/*.zip @@ -165,4 +211,5 @@ jobs: dist/*.msi dist/*.dmg dist/*.AppImage + dist/*.asc retention-days: 2 From 74bfd75f7485a0e6d557d3fd8d9867e62e2272e7 Mon Sep 17 00:00:00 2001 From: "j.spijker@ultimaker.com" Date: Fri, 1 Jul 2022 15:23:22 +0200 Subject: [PATCH 23/24] fixed $ sign Contributes to CURA-9365 --- .github/workflows/cura-installer.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cura-installer.yml b/.github/workflows/cura-installer.yml index 69ffddfd30..11e9b4979b 100644 --- a/.github/workflows/cura-installer.yml +++ b/.github/workflows/cura-installer.yml @@ -47,7 +47,7 @@ env: MACOS_CERT_PASS: ${{ secrets.MACOS_CERT_PASS }} MACOS_CERT_USER: ${{ secrets.MACOS_CERT_USER }} GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} - MACOS_CERT_PASSPHRASE: ${{ secrets.$MACOS_CERT_PASSPHRASE }} + MACOS_CERT_PASSPHRASE: ${{ secrets.MACOS_CERT_PASSPHRASE }} jobs: cura-installer-create: From d301e9a807b2edbb23684d6d34c8d85d51653275 Mon Sep 17 00:00:00 2001 From: Rijk van Manen Date: Wed, 6 Jul 2022 17:08:54 +0200 Subject: [PATCH 24/24] increase printing temperature BAM 0.1 layerheight reduced printing temperature for BAM 0.1mm layer height profile causes extrusion issues. No drawback for increasing to the default printing temperature are found. PP-190 --- .../quality/ultimaker3/um3_aa0.4_BAM_Normal_Quality.inst.cfg | 1 - .../quality/ultimaker_s3/um_s3_aa0.4_BAM_Normal_Quality.inst.cfg | 1 - .../quality/ultimaker_s5/um_s5_aa0.4_BAM_Normal_Quality.inst.cfg | 1 - 3 files changed, 3 deletions(-) diff --git a/resources/quality/ultimaker3/um3_aa0.4_BAM_Normal_Quality.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_BAM_Normal_Quality.inst.cfg index b3cb9eb2f7..5c2f5635fc 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_BAM_Normal_Quality.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_BAM_Normal_Quality.inst.cfg @@ -18,7 +18,6 @@ cool_fan_speed_max = =cool_fan_speed cool_min_speed = 7 machine_nozzle_cool_down_speed = 0.75 machine_nozzle_heat_up_speed = 1.6 -material_print_temperature = =default_material_print_temperature - 10 prime_tower_enable = =min(extruderValues('material_surface_energy')) < 100 skin_overlap = 10 speed_layer_0 = =math.ceil(speed_print * 20 / 70) diff --git a/resources/quality/ultimaker_s3/um_s3_aa0.4_BAM_Normal_Quality.inst.cfg b/resources/quality/ultimaker_s3/um_s3_aa0.4_BAM_Normal_Quality.inst.cfg index 13e07744b1..97b9e33f60 100644 --- a/resources/quality/ultimaker_s3/um_s3_aa0.4_BAM_Normal_Quality.inst.cfg +++ b/resources/quality/ultimaker_s3/um_s3_aa0.4_BAM_Normal_Quality.inst.cfg @@ -18,7 +18,6 @@ cool_fan_speed_max = =cool_fan_speed cool_min_speed = 7 machine_nozzle_cool_down_speed = 0.75 machine_nozzle_heat_up_speed = 1.6 -material_print_temperature = =default_material_print_temperature - 10 # prime_tower_enable: see CURA-4248 prime_tower_enable = =min(extruderValues('material_surface_energy')) < 100 skin_overlap = 10 diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.4_BAM_Normal_Quality.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.4_BAM_Normal_Quality.inst.cfg index d63710b4b6..def9d111c1 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.4_BAM_Normal_Quality.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.4_BAM_Normal_Quality.inst.cfg @@ -18,7 +18,6 @@ cool_fan_speed_max = =cool_fan_speed cool_min_speed = 7 machine_nozzle_cool_down_speed = 0.75 machine_nozzle_heat_up_speed = 1.6 -material_print_temperature = =default_material_print_temperature - 10 # prime_tower_enable: see CURA-4248 prime_tower_enable = =min(extruderValues('material_surface_energy')) < 100 skin_overlap = 10