mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-05 19:36:07 +08:00
Added setup.py script for cx_Freeze, which I hope will help building a proper MacOS version. However, the frozen executable is not working correctly yet.
This commit is contained in:
parent
5b7e60e163
commit
a93fde841c
23
Cura/setup.py
Normal file
23
Cura/setup.py
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
import sys
|
||||||
|
from cx_Freeze import setup, Executable
|
||||||
|
|
||||||
|
sys.path.append('./cura_sf/')
|
||||||
|
|
||||||
|
# Dependencies are automatically detected, but it might need fine tuning.
|
||||||
|
build_exe_options = {"packages": [
|
||||||
|
'encodings.utf_8',
|
||||||
|
"OpenGL", "OpenGL.arrays", "OpenGL.platform",
|
||||||
|
], "excludes": [], "optimize": 0}
|
||||||
|
|
||||||
|
# GUI applications require a different base on Windows (the default is for a
|
||||||
|
# console application).
|
||||||
|
base = None
|
||||||
|
if sys.platform == "win32":
|
||||||
|
base = "Win32GUI"
|
||||||
|
|
||||||
|
setup( name = "Cura",
|
||||||
|
version = "RC5",
|
||||||
|
description = "Cura",
|
||||||
|
options = {"build_exe": build_exe_options},
|
||||||
|
executables = [Executable("cura.py", base=base)])
|
||||||
|
|
@ -22,10 +22,11 @@ class gcode(object):
|
|||||||
self.progressCallback = None
|
self.progressCallback = None
|
||||||
|
|
||||||
def load(self, filename):
|
def load(self, filename):
|
||||||
self._fileSize = os.stat(filename).st_size
|
if os.path.isfile(filename):
|
||||||
gcodeFile = open(filename, 'r')
|
self._fileSize = os.stat(filename).st_size
|
||||||
self._load(gcodeFile)
|
gcodeFile = open(filename, 'r')
|
||||||
gcodeFile.close()
|
self._load(gcodeFile)
|
||||||
|
gcodeFile.close()
|
||||||
|
|
||||||
def loadList(self, l):
|
def loadList(self, l):
|
||||||
self._load(l)
|
self._load(l)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user