Fix the default example path, and add support for version file in frozen build.
parent
dd95ea7cc0
commit
58746b11a2
|
@ -150,7 +150,7 @@ G92 E0
|
||||||
}
|
}
|
||||||
preferencesDefaultSettings = {
|
preferencesDefaultSettings = {
|
||||||
'startMode': 'Simple',
|
'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_width': '205',
|
||||||
'machine_depth': '205',
|
'machine_depth': '205',
|
||||||
'machine_height': '200',
|
'machine_height': '200',
|
||||||
|
|
|
@ -1,10 +1,15 @@
|
||||||
from __future__ import absolute_import
|
from __future__ import absolute_import
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
import sys
|
||||||
|
from Cura.util import resources
|
||||||
|
|
||||||
def getVersion(getGitVersion = True):
|
def getVersion(getGitVersion = True):
|
||||||
gitPath = os.path.abspath(os.path.join(os.path.split(os.path.abspath(__file__))[0], "../../.git"))
|
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 os.path.exists(gitPath):
|
||||||
if not getGitVersion:
|
if not getGitVersion:
|
||||||
return "dev"
|
return "dev"
|
||||||
|
|
|
@ -106,6 +106,9 @@ if [ "$BUILD_TARGET" = "darwin" ]; then
|
||||||
#For now, just copy all of Cura so pypy can find it
|
#For now, just copy all of Cura so pypy can find it
|
||||||
cp -a Cura scripts/darwin/dist/Cura.app/Contents/Resources/
|
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
|
cd scripts/darwin
|
||||||
|
|
||||||
# Install QuickLook plugin
|
# Install QuickLook plugin
|
||||||
|
|
Loading…
Reference in New Issue