From 9e615a60ed2136a8cf3a243e61cc78ac14a8d624 Mon Sep 17 00:00:00 2001 From: Daid Date: Thu, 20 Dec 2012 13:03:22 +0100 Subject: [PATCH] Fix the problem with the py2app version of the print window. --- Cura/gui/printWindow.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Cura/gui/printWindow.py b/Cura/gui/printWindow.py index 20ffebc4..3b004e1b 100644 --- a/Cura/gui/printWindow.py +++ b/Cura/gui/printWindow.py @@ -7,6 +7,7 @@ import subprocess import sys import time import platform +import os import power import wx @@ -47,7 +48,12 @@ class printProcessMonitor(): def loadFile(self, filename): if self.handle == None: - cmdList = [sys.executable, sys.argv[0], '-r', filename] + if platform.system() == "Darwin" and hasattr(sys, 'frozen'): + cmdList = [os.path.join(os.path.dirname(sys.executable), 'Cura')] + else: + cmdList = [sys.executable, sys.argv[0]] + cmdList.append('-r') + cmdList.append(filename) if platform.system() == "Darwin": if platform.machine() == 'i386': cmdList.insert(0, 'arch') -- 2.30.2