Fix the default example path, and add support for version file in frozen build.

master
daid303 2012-12-24 11:55:00 +01:00
parent dd95ea7cc0
commit 58746b11a2
3 changed files with 10 additions and 2 deletions

View File

@ -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',

View File

@ -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"

View File

@ -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