From: daid303 Date: Thu, 18 Apr 2013 14:02:35 +0000 (+0200) Subject: Merge branch 'SteamEngine' of github.com:daid/Cura into SteamEngine X-Git-Tag: 13.05~82 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=9ad154a96f221f0b4fe9983727ddf3ea57e3adb5;hp=c8cfcb2b38b9c4af9ecdb5799697ea2dc6426ae9;p=cura.git Merge branch 'SteamEngine' of github.com:daid/Cura into SteamEngine --- diff --git a/Cura/util/sliceEngine.py b/Cura/util/sliceEngine.py index 75a1f81c..eafa9417 100644 --- a/Cura/util/sliceEngine.py +++ b/Cura/util/sliceEngine.py @@ -6,6 +6,7 @@ import warnings import threading import traceback import platform +import sys from Cura.util import profile @@ -14,6 +15,8 @@ def getEngineFilename(): if os.path.exists('C:/Software/Cura_SteamEngine/_bin/Release/Cura_SteamEngine.exe'): return 'C:/Software/Cura_SteamEngine/_bin/Release/Cura_SteamEngine.exe' return os.path.abspath(os.path.join(os.path.dirname(__file__), '../..', 'SteamEngine.exe')) + if hasattr(sys, 'frozen'): + return os.path.abspath(os.path.join(os.path.dirname(__file__), '../../../../..', 'SteamEngine')) return os.path.abspath(os.path.join(os.path.dirname(__file__), '../..', 'SteamEngine')) def getTempFilename(): @@ -34,8 +37,14 @@ class Slicer(object): def cleanup(self): self.abortSlicer() - os.remove(self._binaryStorageFilename) - os.remove(self._exportFilename) + try: + os.remove(self._binaryStorageFilename) + except: + pass + try: + os.remove(self._exportFilename) + except: + pass def abortSlicer(self): if self._process is not None: diff --git a/package.sh b/package.sh index 93d442d9..ea9ec2f4 100755 --- a/package.sh +++ b/package.sh @@ -17,7 +17,7 @@ BUILD_TARGET=${1:-all} ##Do we need to create the final archive ARCHIVE_FOR_DISTRIBUTION=1 ##Which version name are we appending to the final archive -BUILD_NAME=13.03 +BUILD_NAME=13.04-SteamEngine TARGET_DIR=Cura-${BUILD_NAME}-${BUILD_TARGET} ##Which versions of external programs to use @@ -103,14 +103,9 @@ if [ "$BUILD_TARGET" = "darwin" ]; then exit 1 fi - downloadURL https://bitbucket.org/pypy/pypy/downloads/pypy-${PYPY_VERSION}-osx64.tar.bz2 - $TAR -xjf pypy-${PYPY_VERSION}-osx64.tar.bz2 - mv pypy-${PYPY_VERSION} scripts/darwin/dist/Cura.app/Contents/Resources/pypy - #For now, just copy all of Cura so pypy can find it - cp -a Cura scripts/darwin/dist/Cura.app/Contents/Resources/ - #Add cura version file (should read the version from the bundle with pyobjc, but will figure that out later) echo $BUILD_NAME > scripts/darwin/dist/Cura.app/Contents/Resources/version + cp SteamEngine scripts/darwin/dist/Cura.app/Contents/Resources/SteamEngine cd scripts/darwin