Require atleast cx-Freeze 4.2, because older versions cause problems with character encodings.
This commit is contained in:
parent
a9ed300675
commit
fa1fcfebc8
1 changed files with 14 additions and 5 deletions
|
@ -1,13 +1,22 @@
|
||||||
import sys
|
import sys
|
||||||
from cx_Freeze import setup, Executable
|
try:
|
||||||
|
import cx_Freeze
|
||||||
|
except:
|
||||||
|
print "ERROR: You need cx-Freeze installed to build this package"
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
freezeVersion = map(int, cx_Freeze.version.split('.'))
|
||||||
|
if freezeVersion[0] < 4 or freezeVersion[0] == 4 and freezeVersion[1] < 2:
|
||||||
|
print "ERROR: Your cx-Freeze version is too old to use with Cura."
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
sys.path.append('./cura_sf/')
|
sys.path.append('./cura_sf/')
|
||||||
|
|
||||||
# Dependencies are automatically detected, but it might need fine tuning.
|
# Dependencies are automatically detected, but it might need fine tuning.
|
||||||
build_exe_options = {"packages": [
|
build_exe_options = {"packages": [
|
||||||
'encodings.utf_8',
|
'encodings.utf_8',
|
||||||
"OpenGL", "OpenGL.arrays", "OpenGL.platform",
|
"OpenGL", "OpenGL.arrays", "OpenGL.platform", "OpenGL.GLU",
|
||||||
], "excludes": [], "optimize": 0, "include_files": [
|
], "excludes": ['Tkinter', 'tcl'], "optimize": 0, "include_files": [
|
||||||
('images', 'images'),
|
('images', 'images'),
|
||||||
('cura.py', 'cura.py'),
|
('cura.py', 'cura.py'),
|
||||||
('__init__.py', '__init__.py'),
|
('__init__.py', '__init__.py'),
|
||||||
|
@ -21,9 +30,9 @@ base = None
|
||||||
if sys.platform == "win32":
|
if sys.platform == "win32":
|
||||||
base = "Win32GUI"
|
base = "Win32GUI"
|
||||||
|
|
||||||
setup( name = "Cura",
|
cx_Freeze.setup( name = "Cura",
|
||||||
version = "RC5",
|
version = "RC5",
|
||||||
description = "Cura",
|
description = "Cura",
|
||||||
options = {"build_exe": build_exe_options},
|
options = {"build_exe": build_exe_options},
|
||||||
executables = [Executable("cura.py", base=base)])
|
executables = [cx_Freeze.Executable("cura.py", base=base)])
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue