diff --git a/src/utils/osx_packaging/BaseMedinriaPackage.sparseimage.gz b/packaging/apple/BaseMedinriaPackage.sparseimage.gz old mode 100644 new mode 100755 similarity index 100% rename from src/utils/osx_packaging/BaseMedinriaPackage.sparseimage.gz rename to packaging/apple/BaseMedinriaPackage.sparseimage.gz diff --git a/packaging/apple/mac_packager.sh.in b/packaging/apple/mac_packager.sh.in index dd3519b7f0..ecf4cf6e71 100755 --- a/packaging/apple/mac_packager.sh.in +++ b/packaging/apple/mac_packager.sh.in @@ -35,13 +35,16 @@ done #Run fancy packaging apple script -\cp -f @medInria_SOURCE_DIR@/utils/osx_packaging/BaseMedinriaPackage.sparseimage.gz @PROJECT_BINARY_DIR@/MedinriaPackage.sparseimage.gz +# Clean volumes if some packaging failed before, Zsh style +for volume in /Volumes/medInria*; do diskutil unmount $volume; done + +\cp -f ${CMAKE_SOURCE_DIR}/packaging/apple/BaseMedinriaPackage.sparseimage.gz @PROJECT_BINARY_DIR@/MedinriaPackage.sparseimage.gz cd @PROJECT_BINARY_DIR@ gunzip -f MedinriaPackage.sparseimage.gz devName=`hdiutil attach -readwrite -noverify -noautoopen MedinriaPackage.sparseimage | egrep '^/dev/' | sed 1q | awk '{print $1}'` -diskutil rename "medInria base" "medInria @MEDINRIA_SUPERBUILD_VERSION@" -\cp -rf @medInria_BINARY_DIR@/bin/TmpInstall/medInria.app /Volumes/"medInria @MEDINRIA_SUPERBUILD_VERSION@"/ +diskutil rename "medInria base" "medInria.@MEDINRIA_SUPERBUILD_VERSION@" +\cp -rf @medInria_BINARY_DIR@/bin/TmpInstall/medInria.app /Volumes/medInria.@MEDINRIA_SUPERBUILD_VERSION@/ sync hdiutil detach $devName