chiark / gitweb /
Merge branch 'SteamEngine' of github.com:daid/Cura into SteamEngine
authordaid303 <daid303@gmail.com>
Thu, 18 Apr 2013 14:02:35 +0000 (16:02 +0200)
committerdaid303 <daid303@gmail.com>
Thu, 18 Apr 2013 14:02:35 +0000 (16:02 +0200)
Cura/util/sliceEngine.py
package.sh

index 75a1f81c30c458ca0f05233ba2de2c648a275926..eafa941778824b088e1ae8abd9e89570fa8bb012 100644 (file)
@@ -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:
index 93d442d960ebae58bf03574c939a6f2dcede365f..ea9ec2f499b1f3936291c019db0dea5f5ec20332 100755 (executable)
@@ -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