chiark / gitweb /
Merge tag '15.01-RC1' into upstream
authorYouness Alaoui <kakaroto@kakaroto.homelinux.net>
Tue, 3 Mar 2015 18:15:48 +0000 (13:15 -0500)
committerYouness Alaoui <kakaroto@kakaroto.homelinux.net>
Tue, 3 Mar 2015 18:15:48 +0000 (13:15 -0500)
Conflicts:
Cura/util/sliceEngine.py

Cura/util/sliceEngine.py
package.sh

index d1b49ec4442bbaccdf44f680c63386e13da7de7b..e19b1a7413ee630b5c6b0182a96227fe0c27267f 100644 (file)
@@ -287,6 +287,17 @@ class Engine(object):
        def runEngine(self, scene):
                if len(scene.objects()) < 1:
                        return
+               self._thread = threading.Thread(target=self._runEngine, args=(scene, self._thread, pluginInfo.getPostProcessPluginConfig()))
+               self._thread.daemon = True
+               self._thread.start()
+
+       def _runEngine(self, scene, old_thread, pluginConfig):
+               if old_thread is not None:
+                       if self._process is not None:
+                               self._process.terminate()
+                       old_thread.join()
+               self._callback(-1.0)
+
                extruderCount = 1
                for obj in scene.objects():
                        if scene.checkPlatform(obj):
@@ -358,25 +369,17 @@ class Engine(object):
                                commandList += ['$' * len(obj._meshList)]
                                self._objCount += 1
                modelHash = hash.hexdigest()
-               if self._objCount > 0:
-                       self._thread = threading.Thread(target=self._watchProcess, args=(commandList, self._thread, engineModelData, modelHash, pluginInfo.getPostProcessPluginConfig()))
-                       self._thread.daemon = True
-                       self._thread.start()
+               if self._objCount < 1:
+                       return
+               if self._thread != threading.currentThread():
+                       return
 
-       def _watchProcess(self, commandList, oldThread, engineModelData, modelHash, pluginConfig):
-               if oldThread is not None:
-                       if self._process is not None:
-                               self._process.terminate()
-                       oldThread.join()
-               self._callback(-1.0)
                self._modelData = engineModelData
                try:
                        self._process = self._runEngineProcess(commandList)
                except OSError:
                        traceback.print_exc()
                        return
-               if self._thread != threading.currentThread():
-                       self._process.terminate()
 
                self._result = EngineResult()
                self._result.addLog('Running: %s' % (' '.join(commandList)))
@@ -390,6 +393,8 @@ class Engine(object):
                try:
                        data = self._process.stdout.read(4096)
                        while len(data) > 0:
+                               if self._thread != threading.currentThread():
+                                       self._process.terminate()
                                self._result._gcodeData.write(data)
                                data = self._process.stdout.read(4096)
 
index c16205b3611826a476950f74be4fe4e1c3888323..72557fc6bc1364fb03416d1f3244224bf8b931b0 100755 (executable)
@@ -19,7 +19,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.12
+export BUILD_NAME=15.01-RC1
 TARGET_DIR=Cura-${BUILD_NAME}-${BUILD_TARGET}
 
 ##Revision