From: Daid Date: Mon, 29 Oct 2012 09:23:41 +0000 (+0100) Subject: Fixes for macOS packing. X-Git-Tag: 13.03~224 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=e662a4214f0121603aea9b8cb78bc27f0f829a69;p=cura.git Fixes for macOS packing. --- diff --git a/Cura/gui/mainWindow.py b/Cura/gui/mainWindow.py index 48603c14..ca6cc04d 100644 --- a/Cura/gui/mainWindow.py +++ b/Cura/gui/mainWindow.py @@ -35,7 +35,7 @@ def main(): os.makedirs(os.path.dirname(exampleFile)) except: pass - for filename in glob.glob(os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'example'))): + for filename in glob.glob(os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'example', '*.*'))): shutil.copy(filename, os.path.join(os.path.dirname(exampleFile), os.path.basename(filename))) profile.putPreference('lastFile', exampleFile) configWizard.configWizard() diff --git a/package.sh b/package.sh index 3cf71dc3..bb9c283b 100755 --- a/package.sh +++ b/package.sh @@ -16,7 +16,7 @@ BUILD_TARGET=${1:-all} ##Do we need to create the final archive ARCHIVE_FOR_DISTRIBUTION=1 ##Which version name are we appending to the final archive -BUILD_NAME=12.10 +BUILD_NAME=12.10_RC4 TARGET_DIR=Cura-${BUILD_NAME}-${BUILD_TARGET} ##Which versions of external programs to use @@ -209,7 +209,8 @@ if (( ${ARCHIVE_FOR_DISTRIBUTION} )); then echo "Building osx app" mkdir -p scripts/osx64/Cura.app/Contents/Resources mkdir -p scripts/osx64/Cura.app/Contents/Pkgs - rm -rf scripts/osx64/Cura.app/Contents/Resources/* + rm -rf scripts/osx64/Cura.app/Contents/Resources/Cura + rm -rf scripts/osx64/Cura.app/Contents/Resources/pypy cp -a ${TARGET_DIR}/* scripts/osx64/Cura.app/Contents/Resources cp python-2.7.3-macosx10.6.dmg scripts/osx64/Cura.app/Contents/Pkgs cp numpy-1.6.2-py2.7-python.org-macosx10.3.dmg scripts/osx64/Cura.app/Contents/Pkgs @@ -218,6 +219,14 @@ if (( ${ARCHIVE_FOR_DISTRIBUTION} )); then cp wxPython2.9-osx-2.9.4.0-cocoa-py2.7.dmg scripts/osx64/Cura.app/Contents/Pkgs cd scripts/osx64 $TAR cfp - Cura.app | gzip --best -c > ../../${TARGET_DIR}.tar.gz + hdiutil detach /Volumes/Cura\ -\ Ultimaker/ + rm -rf Cura.dmg.sparseimage + hdiutil convert DmgTemplateCompressed.dmg -format UDSP -o Cura.dmg + hdiutil resize -size 500m Cura.dmg.sparseimage + hdiutil attach Cura.dmg.sparseimage + cp -a Cura.app /Volumes/Cura\ -\ Ultimaker/Cura/ + hdiutil detach /Volumes/Cura\ -\ Ultimaker + hdiutil convert Cura.dmg.sparseimage -format UDZO -imagekey zlib-level=9 -ov -o ../../${TARGET_DIR}.dmg else echo "Archiving to ${TARGET_DIR}.tar.gz" $TAR cfp - ${TARGET_DIR} | gzip --best -c > ${TARGET_DIR}.tar.gz diff --git a/scripts/osx64/DmgTemplateCompressed.dmg b/scripts/osx64/DmgTemplateCompressed.dmg new file mode 100644 index 00000000..8a047675 Binary files /dev/null and b/scripts/osx64/DmgTemplateCompressed.dmg differ