chiark / gitweb /
Fixed bug where development version did not found CuraEngine
authornallath <nallath@gmail.com>
Tue, 4 Mar 2014 09:00:55 +0000 (10:00 +0100)
committernallath <nallath@gmail.com>
Tue, 4 Mar 2014 09:00:55 +0000 (10:00 +0100)
Cura/util/sliceEngine.py

index 432038dd2f7da69e3133f85f83fff6b13fd01b64..819b7795c34d3fe8c367476b07e03713259e1050 100644 (file)
@@ -40,7 +40,10 @@ def getEngineFilename():
                return '/usr/bin/CuraEngine'
        if os.path.isfile('/usr/local/bin/CuraEngine'):
                return '/usr/local/bin/CuraEngine'
-       return os.path.abspath(os.path.join(os.path.dirname(__file__), '../..', 'CuraEngine'))
+       tempPath = os.path.abspath(os.path.join(os.path.dirname(__file__), '../..', 'CuraEngine'))
+       if os.path.isdir(tempPath):
+               tempPath = os.path.join(tempPath,'CuraEngine')
+       return tempPath
 
 class EngineResult(object):
        """
@@ -546,4 +549,5 @@ class Engine(object):
                        su.wShowWindow = subprocess.SW_HIDE
                        kwargs['startupinfo'] = su
                        kwargs['creationflags'] = 0x00004000 #BELOW_NORMAL_PRIORITY_CLASS
+               print cmdList
                return subprocess.Popen(cmdList, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, **kwargs)