From 121a759e430beed0ad2f70abe4daa57a0179d579 Mon Sep 17 00:00:00 2001 From: "jj%netscape.com" Date: Tue, 18 Mar 2003 23:18:11 +0000 Subject: [PATCH] changes made on 3/11: added support for License Agreement display on mount. optional argument is an .rsrc binary file which resources will be copied into the disk image using Apple's ResMerger tool. Also enhanced logging. *** nightly automation - not part of the regular build *** ---------------------------------------------------------------------- --- build/package/mac_osx/make-diskimage | 29 +++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/build/package/mac_osx/make-diskimage b/build/package/mac_osx/make-diskimage index c8154ba7498..3a58a857651 100755 --- a/build/package/mac_osx/make-diskimage +++ b/build/package/mac_osx/make-diskimage @@ -39,8 +39,15 @@ # Create a read-only disk image of the contents of a folder # -# Usage: make-diskimage <.dsstore file to use> +# Usage: make-diskimage +# +# +# +# <.dsstore_file> +# # +# tip: use '-null-' for if you only want to +# provide <.dsstore_file> and DMG_DIRNAME=`dirname $1` DMG_DIR=`cd $DMG_DIRNAME; pwd` @@ -50,8 +57,9 @@ SRC_FOLDER=`cd $2; pwd` VOLUME_NAME=$3 # optional arguments -DMG_DSSTORE=$4 -DMG_BKGND_IMG=$5 +EULA_RSRC=$4 +DMG_DSSTORE=$5 +DMG_BKGND_IMG=$6 # Find the size of the folder contents FOLDER_SIZE=`du -s $SRC_FOLDER | sed s/[^0-9].*//` @@ -76,15 +84,14 @@ MOUNT_DIR=`hdid $DMG_TEMP_NAME | grep Apple_HFS | awk '{print $3}'` # copy content echo "copying content to disk image" -echo ditto $SRC_FOLDER ditto -rsrcFork $SRC_FOLDER $MOUNT_DIR # add optional Finder window layout and background image if [ ! -z ${DMG_DSSTORE} ]; then - echo cp ${DMG_DSSTORE} + echo "adding .DS_Store" cp -p ${DMG_DSSTORE} ${MOUNT_DIR}/.DS_Store fi if [ ! -z ${DMG_BKGND_IMG} ]; then - echo cp ${DMG_BKGND_IMG} + echo "adding background image" mkdir ${MOUNT_DIR}/.background cp -p ${DMG_BKGND_IMG} ${MOUNT_DIR}/.background/ fi @@ -97,8 +104,16 @@ echo "unmounting disk image" hdiutil detach $DEV_NAME # convert to read-only image -echo converting disk image to read-only +echo "converting disk image to read-only" hdiutil convert $DMG_TEMP_NAME -format UDRO -o ${DMG_DIR}/${DMG_NAME} rm -f $DMG_TEMP_NAME +# adding EULA resources +if [ ! -z "${EULA_RSRC}" -a "${EULA_RSRC}" != "-null-" ]; then + echo "adding EULA resources" + hdiutil unflatten ${DMG_DIR}/${DMG_NAME} + /Developer/Tools/ResMerger -a ${EULA_RSRC} -o ${DMG_DIR}/${DMG_NAME} + hdiutil flatten ${DMG_DIR}/${DMG_NAME} +fi + echo "disk image done"