diff --git a/.gitignore b/.gitignore index 8c4a076..65f3bfa 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ *.tar.bz2 *.tar.gz +*.7z *.pyc *.zip *.exe @@ -22,3 +23,5 @@ object.png scripts/darwin/dist/* scripts/darwin/build/* scripts/darwin/Cura.dmg.sparseimage +scripts/win32/dist/* +log.txt diff --git a/Cura/gui/mainWindow.py b/Cura/gui/mainWindow.py index ebb1c8c..9a6e436 100644 --- a/Cura/gui/mainWindow.py +++ b/Cura/gui/mainWindow.py @@ -273,7 +273,7 @@ class mainWindow(wx.Frame): spp = sliceProgessPanel.sliceProgessPanel(self, self, self.filelist) self.sizer.Add(spp, (len(self.progressPanelList)+2,0), span=(1, 3 + self.extruderCount), flag=wx.EXPAND) self.sizer.Layout() - newSize = self.GetSize(); + newSize = self.GetSize() newSize.IncBy(0, spp.GetSize().GetHeight()) if newSize.GetWidth() < wx.GetDisplaySize()[0]: self.SetSize(newSize) @@ -292,7 +292,7 @@ class mainWindow(wx.Frame): def removeSliceProgress(self, spp): self.progressPanelList.remove(spp) - newSize = self.GetSize(); + newSize = self.GetSize() newSize.IncBy(0, -spp.GetSize().GetHeight()) if newSize.GetWidth() < wx.GetDisplaySize()[0]: self.SetSize(newSize) diff --git a/Cura/util/profile.py b/Cura/util/profile.py index 869dd4e..f27227a 100644 --- a/Cura/util/profile.py +++ b/Cura/util/profile.py @@ -150,7 +150,7 @@ G92 E0 } preferencesDefaultSettings = { 'startMode': 'Simple', - 'lastFile': os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'example', 'UltimakerRobot_support.stl')), + 'lastFile': os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'resources', 'example', 'UltimakerRobot_support.stl')), 'machine_width': '205', 'machine_depth': '205', 'machine_height': '200', @@ -397,7 +397,7 @@ def calculateEdgeWidth(): if wallThickness < nozzleSize: return wallThickness - lineCount = int(wallThickness / nozzleSize) + lineCount = int(wallThickness / nozzleSize + 0.0001) lineWidth = wallThickness / lineCount lineWidthAlt = wallThickness / (lineCount + 1) if lineWidth > nozzleSize * 1.5: diff --git a/Cura/util/version.py b/Cura/util/version.py index ce3c934..93117f7 100644 --- a/Cura/util/version.py +++ b/Cura/util/version.py @@ -1,10 +1,15 @@ from __future__ import absolute_import import os +import sys +from Cura.util import resources def getVersion(getGitVersion = True): gitPath = os.path.abspath(os.path.join(os.path.split(os.path.abspath(__file__))[0], "../../.git")) - versionFile = os.path.abspath(os.path.join(os.path.split(os.path.abspath(__file__))[0], "../version")) + if hasattr(sys, 'frozen'): + versionFile = os.path.normpath(os.path.join(resources.resourceBasePath, "version")) + else: + versionFile = os.path.abspath(os.path.join(os.path.split(os.path.abspath(__file__))[0], "../version")) if os.path.exists(gitPath): if not getGitVersion: return "dev" diff --git a/package.sh b/package.sh index 074377c..12693f1 100755 --- a/package.sh +++ b/package.sh @@ -106,6 +106,9 @@ if [ "$BUILD_TARGET" = "darwin" ]; then #For now, just copy all of Cura so pypy can find it cp -a Cura scripts/darwin/dist/Cura.app/Contents/Resources/ + #Add cura version file (should read the version from the bundle with pyobjc, but will figure that out later) + echo $BUILD_NAME > scripts/darwin/dist/Cura.app/Contents/Resources/version + cd scripts/darwin # Install QuickLook plugin @@ -150,6 +153,9 @@ if [ $BUILD_TARGET = "win32" ]; then downloadURL http://www.uwe-sieber.de/files/ejectmedia.zip #Get pypy downloadURL https://bitbucket.org/pypy/pypy/downloads/pypy-${PYPY_VERSION}-win32.zip + #Get the power module for python + rm -rf Power + git clone https://github.com/GreatFruitOmsk/Power else downloadURL https://bitbucket.org/pypy/pypy/downloads/pypy-${PYPY_VERSION}-${BUILD_TARGET}.tar.bz2 fi @@ -183,10 +189,13 @@ if [ $BUILD_TARGET = "win32" ]; then mv PURELIB/OpenGL ${TARGET_DIR}/python/Lib mv PURELIB/comtypes ${TARGET_DIR}/python/Lib mv PLATLIB/numpy ${TARGET_DIR}/python/Lib + mv Power/power ${TARGET_DIR}/python/Lib mv VideoCapture-0.9-5/Python27/DLLs/vidcap.pyd ${TARGET_DIR}/python/DLLs mv ffmpeg-20120927-git-13f0cd6-win32-static/bin/ffmpeg.exe ${TARGET_DIR}/Cura/ mv ffmpeg-20120927-git-13f0cd6-win32-static/licenses ${TARGET_DIR}/Cura/ffmpeg-licenses/ mv Win32/EjectMedia.exe ${TARGET_DIR}/Cura/ + + rm -rf Power/ rm -rf \$_OUTDIR rm -rf PURELIB rm -rf PLATLIB diff --git a/scripts/darwin/STLQuickLook.qlgenerator.dSYM/Contents/Info.plist b/scripts/darwin/STLQuickLook.qlgenerator.dSYM/Contents/Info.plist new file mode 100644 index 0000000..e20e02b --- /dev/null +++ b/scripts/darwin/STLQuickLook.qlgenerator.dSYM/Contents/Info.plist @@ -0,0 +1,20 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleIdentifier + com.apple.xcode.dsym.com.pleasantsoftware.qlgenerator.STLQuickLook + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + dSYM + CFBundleSignature + ???? + CFBundleShortVersionString + 1.1 + CFBundleVersion + 2 + + diff --git a/scripts/darwin/STLQuickLook.qlgenerator.dSYM/Contents/Resources/DWARF/STLQuickLook b/scripts/darwin/STLQuickLook.qlgenerator.dSYM/Contents/Resources/DWARF/STLQuickLook new file mode 100644 index 0000000..f2dec2f Binary files /dev/null and b/scripts/darwin/STLQuickLook.qlgenerator.dSYM/Contents/Resources/DWARF/STLQuickLook differ diff --git a/scripts/darwin/STLQuickLook.qlgenerator/Contents/MacOS/STLQuickLook b/scripts/darwin/STLQuickLook.qlgenerator/Contents/MacOS/STLQuickLook index f004690..02dbeba 100755 Binary files a/scripts/darwin/STLQuickLook.qlgenerator/Contents/MacOS/STLQuickLook and b/scripts/darwin/STLQuickLook.qlgenerator/Contents/MacOS/STLQuickLook differ diff --git a/scripts/darwin/STLQuickLook.qlgenerator/Contents/Resources/stlTagImage.png b/scripts/darwin/STLQuickLook.qlgenerator/Contents/Resources/stlTagImage.png old mode 100755 new mode 100644 diff --git a/scripts/win32/cura.bat b/scripts/win32/cura.bat index 42771b2..3f10541 100644 --- a/scripts/win32/cura.bat +++ b/scripts/win32/cura.bat @@ -1,2 +1,2 @@ -@python\python.exe Cura\cura.py %* +@python\python.exe -m Cura.cura %* diff --git a/scripts/win32/printrun.bat b/scripts/win32/printrun.bat deleted file mode 100644 index e174179..0000000 --- a/scripts/win32/printrun.bat +++ /dev/null @@ -1 +0,0 @@ -@python\python.exe printrun\pronterface.py