chiark / gitweb /
Attempt to fix the problem where some Mac users have Cura crash on startup. Fix this...
authordaid <daid303@gmail.com>
Thu, 10 Jul 2014 07:15:29 +0000 (09:15 +0200)
committerdaid <daid303@gmail.com>
Thu, 10 Jul 2014 07:15:29 +0000 (09:15 +0200)
Cura/util/profile.py
package.sh

index c424b688dc7d666668885f01bfceb824369e23e0..05d74278bbe1326bbf3e6c420b71b2495160da54 100644 (file)
@@ -198,7 +198,7 @@ setting('retraction_combing',       True, bool,  'expert',   _('Retraction')).se
 setting('retraction_minimal_extrusion',0.02, float,'expert', _('Retraction')).setRange(0).setLabel(_("Minimal extrusion before retracting (mm)"), _("The minimal amount of extrusion that needs to be done before retracting again if a retraction needs to happen before this minimal is reached the retraction is ignored.\nThis avoids retracting a lot on the same piece of filament which flattens the filament and causes grinding issues."))
 setting('retraction_hop',            0.0, float, 'expert',   _('Retraction')).setRange(0).setLabel(_("Z hop when retracting (mm)"), _("When a retraction is done, the head is lifted by this amount to travel over the print. A value of 0.075 works well. This feature has a lot of positive effect on delta towers."))
 setting('bottom_thickness',          0.3, float, 'advanced', _('Quality')).setRange(0).setLabel(_("Initial layer thickness (mm)"), _("Layer thickness of the bottom layer. A thicker bottom layer makes sticking to the bed easier. Set to 0.0 to have the bottom layer thickness the same as the other layers."))
-setting('layer0_width_factor',       100, float, 'advanced', _('Quality')).setRange(50, 300).setLabel(_("Initial layer line with (%)"), _("Extra width factor for the extrusion on the first layer, on some printers it's good to have wider extrusion on the first layer to get better bed adhesion."))
+setting('layer0_width_factor',       100, float, 'advanced', _('Quality')).setRange(50, 300).setLabel(_("Initial layer line width (%)"), _("Extra width factor for the extrusion on the first layer, on some printers it's good to have wider extrusion on the first layer to get better bed adhesion."))
 setting('object_sink',               0.0, float, 'advanced', _('Quality')).setRange(0).setLabel(_("Cut off object bottom (mm)"), _("Sinks the object into the platform, this can be used for objects that do not have a flat bottom and thus create a too small first layer."))
 #setting('enable_skin',             False, bool,  'advanced', _('Quality')).setLabel(_("Duplicate outlines"), _("Skin prints the outer lines of the prints twice, each time with half the thickness. This gives the illusion of a higher print quality."))
 setting('overlap_dual',             0.15, float, 'advanced', _('Quality')).setLabel(_("Dual extrusion overlap (mm)"), _("Add a certain amount of overlapping extrusion on dual-extrusion prints. This bonds the different colors together."))
@@ -601,6 +601,8 @@ def getBasePath():
                #If we have a frozen python install, we need to step out of the library.zip
                if hasattr(sys, 'frozen'):
                        basePath = os.path.normpath(os.path.join(basePath, ".."))
+       elif platform.system() == "Darwin":
+               basePath = os.path.expanduser('~/Library/Application Support/Cura/%s' % version.getVersion(False))
        else:
                basePath = os.path.expanduser('~/.cura/%s' % version.getVersion(False))
        if not os.path.isdir(basePath):
@@ -696,7 +698,10 @@ def saveProfile(filename, allMachines = False):
                        else:
                                profileParser.set('profile', set.getName(), set.getValue().encode('utf-8'))
 
-       profileParser.write(open(filename, 'w'))
+       try:
+               profileParser.write(open(filename, 'w'))
+       except:
+               print "Failed to write profile file: %s" % (filename)
 
 def resetProfile():
        """ Reset the profile for the current machine to default. """
@@ -899,7 +904,10 @@ def savePreferences(filename):
                        if set.isMachineSetting():
                                parser.set('machine_%d' % (n), set.getName(), set.getValue(n).encode('utf-8'))
                n += 1
-       parser.write(open(filename, 'w'))
+       try:
+               parser.write(open(filename, 'w'))
+       except:
+               print "Failed to write preferences file: %s" % (filename)
 
 def getPreference(name):
        if name in tempOverride:
index a4ba1b222ca606f0ebbb094c6bb8dbbf9c3e2de1..5feb8e2c09eae36930c36fe0f86b85d71d29a866 100755 (executable)
@@ -18,7 +18,7 @@ BUILD_TARGET=${1:-none}
 ##Do we need to create the final archive
 ARCHIVE_FOR_DISTRIBUTION=1
 ##Which version name are we appending to the final archive
-export BUILD_NAME=14.07
+export BUILD_NAME=14.07-MAC-TEST
 TARGET_DIR=Cura-${BUILD_NAME}-${BUILD_TARGET}
 
 ##Which versions of external programs to use