From e97ccaa7fdbbd6dab9552abb6013395e638e4891 Mon Sep 17 00:00:00 2001 From: helge Date: Wed, 28 Sep 2005 20:35:56 +0000 Subject: [PATCH] work on osx packaging git-svn-id: http://svn.opengroupware.org/SOPE/trunk@1140 e4a50df8-12e2-0310-a44c-efbce7f8a7e3 --- maintenance/make-osxdmg.sh | 32 ++++++++++++++++++++++++++++---- maintenance/make-osxmpkg.sh | 11 +++++++---- 2 files changed, 35 insertions(+), 8 deletions(-) diff --git a/maintenance/make-osxdmg.sh b/maintenance/make-osxdmg.sh index 9089a9a8..ee42a302 100755 --- a/maintenance/make-osxdmg.sh +++ b/maintenance/make-osxdmg.sh @@ -9,9 +9,11 @@ DMG_NAME="$1" BIN_DIR="$2" VOLUME_NAME="$3" +REL_DMG="${DMG_NAME}.dmg" + ORG_DIR="$PWD" -EXTRA_SIZE=4096 +EXTRA_SIZE=2048 # ****************************** usage ******************************** @@ -56,8 +58,9 @@ function setupDisk() { DST_IMG="$1" if test -e "${DST_IMG}"; then - echo " deleting old dmg ..." + echo -n " deleting old dmg .." rm "${DST_IMG}" + echo ".. ok." fi hdiutil create -size ${SIZE_KB}k ${DST_IMG} -layout NONE @@ -78,8 +81,19 @@ function ejectDisk() { function convertToReadOnlyCompressedImage() { SRC_DMG="$1" DST_DMG="$2" + + if test -e "${DST_DMG}"; then + echo -n " deleting old release dmg .." + rm "${DST_DMG}" + echo ".. ok." + fi + + #echo -n " converting ${SRC_DMG} to readonly/zip ${DST_DMG} .." + # convert .dmg into read-only zlib (-9) compressed release version - hdiutil convert -format UDZO ${SRC_DMG} -o ${DST_DMG} -imagekey zlib-level=9 + hdiutil convert -format UDZO "${SRC_DMG}" \ + -o ${DST_DMG} -imagekey zlib-level=9 + #echo ".. done." } function internetEnableDiskImage() { @@ -98,21 +112,31 @@ echo "Building MacOSX DMG ${DMG_NAME}.dmg for $BIN_DIR .." calcSize; echo " size: ${SIZE_KB}K" +echo "" setupDisk "${DMG_NAME}-build-$$.dmg" +echo "" echo -n " coping content to disk .." cd $BIN_DIR gnutar cf - . | ( cd "/Volumes/${VOLUME_NAME}" ; gnutar xf - ) cd $ORG_DIR echo ".. done." +echo "" # once again eject, to synchronize ejectDisk; +echo "" -REL_DMG="${DMG_NAME}.dmg" convertToReadOnlyCompressedImage "${DMG_NAME}-build-$$.dmg" "${REL_DMG}" +echo "" internetEnableDiskImage "${REL_DMG}" +echo "" # delete src image +echo -n " deleting temporary build dmg .." rm -f "${DMG_NAME}-build-$$.dmg" +echo ".. ok." + +echo "built dmg:" +ls -la "${REL_DMG}" diff --git a/maintenance/make-osxmpkg.sh b/maintenance/make-osxmpkg.sh index 529fac7c..e598be75 100755 --- a/maintenance/make-osxmpkg.sh +++ b/maintenance/make-osxmpkg.sh @@ -249,7 +249,8 @@ function genInfoFile() { echo >>$F "Version ${PKG_VERSION}" echo >>$F "Description ${PKG_VERSION}" - echo >>$F "PackageLocation ../" + # TODO: find documentation for this one + # echo >>$F "PackageLocation ../Packages" echo >>$F "FastInstall NO" echo >>$F "Require Reboot NO" # TODO: consolidate @@ -274,9 +275,11 @@ function genInfoFile() { #echo >>$F "Install Fat YES" # TODO: consolidate echo >>$F "LibrarySubdirectory Standard" - - ln -s ${PKG_RSRC_DIR}/English.lproj/${PKG_NAME}.info \ - ${PKG_RSRC_DIR}/English.lproj/Install.info + + GIOLDDIR="$PWD" + cd "${PKG_RSRC_DIR}/English.lproj/" + ln -s "${PKG_NAME}.info" Install.info + cd "$GIOLDDIR" echo ".. done." } -- 2.39.5