From ed61cb913f0a18fc8a3b0053c613c994837ac0e1 Mon Sep 17 00:00:00 2001 From: Daid Date: Thu, 20 Dec 2012 11:52:23 +0100 Subject: [PATCH] First step to fixing the use of pypy for slicing in the macos.app --- Cura/util/sliceRun.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Cura/util/sliceRun.py b/Cura/util/sliceRun.py index 7ec7fa1c..4f71aab9 100644 --- a/Cura/util/sliceRun.py +++ b/Cura/util/sliceRun.py @@ -11,6 +11,7 @@ if not hasattr(sys, 'frozen'): sys.path.append(cura_sf_path) from Cura.cura_sf.skeinforge_application.skeinforge_utilities import skeinforge_craft +from Cura.util import resources from Cura.util import profile #How long does each step take compared to the others. This is used to make a better scaled progress bar, and guess time left. @@ -44,7 +45,10 @@ def getPyPyExe(): pypyExe = os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(__file__)), "../../pypy/pypy.exe")) else: exeName = "pypy" - pypyExe = os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(__file__)), "../../pypy/bin/pypy")) + if hasattr(sys, 'frozen'): + pypyExe = os.path.normpath(os.path.join(resources.resourceBasePath, "pypy/bin/pypy")) + else: + pypyExe = os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(__file__)), "../../pypy/bin/pypy")) if os.path.exists(pypyExe): return pypyExe -- 2.30.2