[cura] Added CuraEngine patch

Miro Hrončok churchyard at fedoraproject.org
Wed Oct 16 12:13:16 UTC 2013


commit 8265affecdc98bdc8d5b876c2b499277f1ac7e50
Author: Miro Hrončok <miro at hroncok.cz>
Date:   Wed Oct 16 14:12:44 2013 +0200

    Added CuraEngine patch

 cura-CuraEngine.patch |   23 +++++++++++++++++++++++
 cura.spec             |    4 ++++
 2 files changed, 27 insertions(+), 0 deletions(-)
---
diff --git a/cura-CuraEngine.patch b/cura-CuraEngine.patch
new file mode 100644
index 0000000..50fd2ca
--- /dev/null
+++ b/cura-CuraEngine.patch
@@ -0,0 +1,23 @@
+diff --git a/util/sliceEngine.py b/util/sliceEngine.py
+index 8944b05..461dc62 100644
+--- a/util/sliceEngine.py
++++ b/util/sliceEngine.py
+@@ -17,17 +17,7 @@ from Cura.util import profile
+ from Cura.util import version
+ 
+ def getEngineFilename():
+-	if platform.system() == 'Windows':
+-		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__), '../..', 'CuraEngine.exe'))
+-	if hasattr(sys, 'frozen'):
+-		return os.path.abspath(os.path.join(os.path.dirname(__file__), '../../../../..', 'CuraEngine'))
+-	if os.path.isfile('/usr/bin/CuraEngine'):
+-		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'))
++	return '/usr/bin/CuraEngine'
+ 
+ def getTempFilename():
+ 	warnings.simplefilter('ignore')
diff --git a/cura.spec b/cura.spec
index ab5efab..1e64a44 100644
--- a/cura.spec
+++ b/cura.spec
@@ -21,6 +21,9 @@ Source3:        %{name}-stripper.sh
 # SyntaxError: from __future__ imports must occur at the beginning of the file
 Patch0:         %{name}-future-import-first.patch
 
+# Use systems CuraEngine
+Patch1:         %{name}-CuraEngine.patch
+
 BuildArch:      noarch
 BuildRequires:  python2-devel
 BuildRequires:  dos2unix
@@ -46,6 +49,7 @@ settings and send this G-Code to the 3D printer for printing.
 %prep
 %setup -qn Cura-%{version}/Cura
 %patch0 -p1
+%patch1 -p1
 
 dos2unix resources/example/Attribution.txt
 


More information about the scm-commits mailing list