From 009364ad6ab6d56ff27c62a85cb08e3d19062a7c Mon Sep 17 00:00:00 2001 From: Ilya Kulakov Date: Thu, 13 Dec 2012 15:51:45 +0700 Subject: [PATCH 1/3] Do not import splashScreen when platform is darwin. --- Cura/gui/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cura/gui/app.py b/Cura/gui/app.py index cd7a2e84..ef5856e8 100644 --- a/Cura/gui/app.py +++ b/Cura/gui/app.py @@ -10,7 +10,6 @@ import warnings #Only import the _core to save import time import wx._core -from Cura.gui import splashScreen from Cura.util import profile class CuraApp(wx.App): @@ -27,6 +26,7 @@ class CuraApp(wx.App): #Do not show a splashscreen on OSX, as by Apple guidelines self.afterSplashCallback() else: + from Cura.gui import splashScreen self.splash = splashScreen.splashScreen(self.afterSplashCallback) def MacOpenFile(self, path): From 8ee80a5e346d5b952f3abacc21878da14c13c9f5 Mon Sep 17 00:00:00 2001 From: Ilya Kulakov Date: Thu, 13 Dec 2012 20:37:46 +0700 Subject: [PATCH 2/3] Make app an owner of file formats. Since Cura works with file formats designed for exporting it makes sense to be an Owner of such files, since Cura prints them. --- setup.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index bde74778..1cf22659 100644 --- a/setup.py +++ b/setup.py @@ -18,19 +18,19 @@ if sys.platform.startswith('darwin'): { u'CFBundleTypeRole': u'Viewer', u'LSItemContentTypes': [u'com.pleasantsoftware.uti.stl'], - u'LSHandlerRank': u'Alternate', + u'LSHandlerRank': u'Owner', }, { u'CFBundleTypeRole': u'Viewer', u'LSItemContentTypes': [u'org.khronos.collada.digital-asset-exchange'], - u'LSHandlerRank': u'Alternate' + u'LSHandlerRank': u'Owner' }, { u'CFBundleTypeName': u'Wavefront 3D Object', u'CFBundleTypeExtensions': [u'obj'], u'CFBundleTypeMIMETypes': [u'application/obj-3d'], u'CFBundleTypeRole': u'Viewer', - u'LSHandlerRank': u'Alternate' + u'LSHandlerRank': u'Owner' } ], u'UTImportedTypeDeclarations': [ From 4a6a1f34fc67e4b917483a048e7040022b745d9b Mon Sep 17 00:00:00 2001 From: Ilya Kulakov Date: Thu, 13 Dec 2012 20:38:11 +0700 Subject: [PATCH 3/3] Fix resulted archive was wrong in Mac OS X. --- package.sh | 42 +++++++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/package.sh b/package.sh index 57726525..89745cc1 100755 --- a/package.sh +++ b/package.sh @@ -66,6 +66,25 @@ if [ "$BUILD_TARGET" = "all" ]; then exit fi +# Change working directory to the directory the script is in +# http://stackoverflow.com/a/246128 +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +cd $SCRIPT_DIR + +checkTool git "git: http://git-scm.com/" +checkTool curl "curl: http://curl.haxx.se/" +if [ $BUILD_TARGET = "win32" ]; then + #Check if we have 7zip, needed to extract and packup a bunch of packages for windows. + checkTool 7z "7zip: http://www.7-zip.org/" +fi +#For building under MacOS we need gnutar instead of tar +if [ -z `which gnutar` ]; then + TAR=tar +else + TAR=gnutar +fi + + ############################# # Darwin ############################# @@ -88,7 +107,9 @@ if [ "$BUILD_TARGET" = "darwin" ]; then cp -a STLQuickLook.qlgenerator dist/Cura.app/Contents/Library/QuickLook/ # Archive app - $TAR cfp - dist/Cura.app | gzip --best -c > ../../${TARGET_DIR}.tar.gz + cd dist + $TAR cfp - Cura.app | gzip --best -c > ../../../${TARGET_DIR}.tar.gz + cd .. # Create sparse image for distribution hdiutil detach /Volumes/Cura\ -\ Ultimaker/ @@ -102,28 +123,11 @@ if [ "$BUILD_TARGET" = "darwin" ]; then exit fi + ############################# # Rest ############################# -# Change working directory to the directory the script is in -# http://stackoverflow.com/a/246128 -SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -cd $SCRIPT_DIR - -checkTool git "git: http://git-scm.com/" -checkTool curl "curl: http://curl.haxx.se/" -if [ $BUILD_TARGET = "win32" ]; then - #Check if we have 7zip, needed to extract and packup a bunch of packages for windows. - checkTool 7z "7zip: http://www.7-zip.org/" -fi -#For building under MacOS we need gnutar instead of tar -if [ -z `which gnutar` ]; then - TAR=tar -else - TAR=gnutar -fi - ############################# # Download all needed files. #############################