]> git.pld-linux.org Git - packages/cura.git/blob - cura-no-firmware.patch
- rel 2; compile py files (so py_postclean won't delete all our files)
[packages/cura.git] / cura-no-firmware.patch
1 diff -urN Cura-15.02.1.org/Cura/gui/firmwareInstall.py Cura-15.02.1/Cura/gui/firmwareInstall.py
2 --- Cura-15.02.1.org/Cura/gui/firmwareInstall.py        2015-02-18 21:22:48.000000000 +0100
3 +++ Cura-15.02.1/Cura/gui/firmwareInstall.py    2015-05-14 22:37:20.963865640 +0200
4 @@ -17,47 +17,6 @@
5  from Cura.util import resources
6  
7  def getDefaultFirmware(machineIndex = None):
8 -       machine_type = profile.getMachineSetting('machine_type', machineIndex)
9 -       extruders = profile.getMachineSettingFloat('extruder_amount', machineIndex)
10 -       heated_bed = profile.getMachineSetting('has_heated_bed', machineIndex) == 'True'
11 -       baudrate = 250000
12 -       if sys.platform.startswith('linux'):
13 -               baudrate = 115200
14 -       if machine_type == 'ultimaker':
15 -               name = 'MarlinUltimaker'
16 -               if extruders > 2:
17 -                       return None
18 -               if heated_bed:
19 -                       name += '-HBK'
20 -               name += '-%d' % (baudrate)
21 -               if extruders > 1:
22 -                       name += '-dual'
23 -               return resources.getPathForFirmware(name + '.hex')
24 -
25 -       if machine_type == 'ultimaker_plus':
26 -               name = 'MarlinUltimaker-UMOP-%d' % (baudrate)
27 -               if extruders > 2:
28 -                       return None
29 -               if extruders > 1:
30 -                       name += '-dual'
31 -               return resources.getPathForFirmware(name + '.hex')
32 -
33 -       if machine_type == 'ultimaker2':
34 -               if extruders > 2:
35 -                       return None
36 -               if extruders > 1:
37 -                       return resources.getPathForFirmware("MarlinUltimaker2-dual.hex")
38 -               return resources.getPathForFirmware("MarlinUltimaker2.hex")
39 -       if machine_type == 'ultimaker2go':
40 -               return resources.getPathForFirmware("MarlinUltimaker2go.hex")
41 -       if machine_type == 'ultimaker2extended':
42 -               if extruders > 2:
43 -                       return None
44 -               if extruders > 1:
45 -                       return resources.getPathForFirmware("MarlinUltimaker2extended-dual.hex")
46 -               return resources.getPathForFirmware("MarlinUltimaker2extended.hex")
47 -       if machine_type == 'Witbox':
48 -               return resources.getPathForFirmware("MarlinWitbox.hex")
49         return None
50  
51  class InstallFirmware(wx.Dialog):
52 @@ -68,7 +27,7 @@
53                 if filename is None:
54                         filename = getDefaultFirmware(machineIndex)
55                 if filename is None:
56 -                       wx.MessageBox(_("I am sorry, but Cura does not ship with a default firmware for your machine configuration."), _("Firmware update"), wx.OK | wx.ICON_ERROR)
57 +                       wx.MessageBox(_("I am sorry, but Cura on Fedora does not ship firmware for technical reasons. Please go download it and install it as custom firmware instead."), _("Firmware update"), wx.OK | wx.ICON_ERROR)
58                         self.Destroy()
59                         return
60                 self._machine_type = profile.getMachineSetting('machine_type', machineIndex)
61 diff -urN Cura-15.02.1.org/Cura/gui/mainWindow.py Cura-15.02.1/Cura/gui/mainWindow.py
62 --- Cura-15.02.1.org/Cura/gui/mainWindow.py     2015-02-18 21:22:48.000000000 +0100
63 +++ Cura-15.02.1/Cura/gui/mainWindow.py 2015-05-14 22:37:36.827577248 +0200
64 @@ -375,7 +375,6 @@
65                         self.splitter.SetSashPosition(self.normalSashPos, True)
66                         # Enabled sash
67                         self.splitter.SetSashSize(4)
68 -               self.defaultFirmwareInstallMenuItem.Enable(firmwareInstall.getDefaultFirmware() is not None)
69                 if profile.getMachineSetting('machine_type').startswith('ultimaker2'):
70                         self.bedLevelWizardMenuItem.Enable(False)
71                         self.headOffsetWizardMenuItem.Enable(False)
72 @@ -483,9 +482,6 @@
73                 #Add tools for machines.
74                 self.machineMenu.AppendSeparator()
75  
76 -               self.defaultFirmwareInstallMenuItem = self.machineMenu.Append(-1, _("Install default firmware..."))
77 -               self.Bind(wx.EVT_MENU, self.OnDefaultMarlinFirmware, self.defaultFirmwareInstallMenuItem)
78 -
79                 i = self.machineMenu.Append(-1, _("Install custom firmware..."))
80                 self.Bind(wx.EVT_MENU, self.OnCustomFirmware, i)
81  
This page took 0.074649 seconds and 3 git commands to generate.