# # # patch "osx_bundle.sh" # from [92ab4d9c77bd2d5090bd244d69d59d05f534e812] # to [e4cd8c13dd85d7171d259c5e4eb969c21b7ff075] # ============================================================ --- osx_bundle.sh 92ab4d9c77bd2d5090bd244d69d59d05f534e812 +++ osx_bundle.sh e4cd8c13dd85d7171d259c5e4eb969c21b7ff075 @@ -1,17 +1,42 @@ #!/bin/bash # -# This script creates a distributable application package which already +# Create a distributable application package which already # contains the needed Qt4 libraries in order to run the application. # In the end a disk image is created for easy distribution which is put # into the $BIN_DIR. # +# This script is provided "as-is" with no guarantees or whatsoever; if it +# damages your hd, its not my fault =) +# +# The most recent version of this script should be found in the monotone +# repository on http://venge.net in the branch "net.venge.monotone.guitone", +# as guitone (http://guitone.berlios.de) was the software for what I originally +# hacked it together. +# +# Questions, Comments, Donations can go to +# +# Thomas Keller (me AT thomaskeller DOT biz) +# +# Release History: +# +# 1.0 (2006-11-08) - Initial release +# +# +# Configuration start +# + +# relative path to the directory which contains the created app bundle BIN_DIR="guitone/bin" +# name of the binary BINARY_NAME="guitone" +# Qt libraries you've linked against declare -a NEEDED_LIBS=( "QtCore" "QtGui" "QtXml" ) +# additional files you'd like to get copied to the final dmg +declare -a ADD_FILES=( "README" "COPYING" "ChangeLog") # -# configuration end, nothing should be edited from here on +# Configuration end, nothing should be edited from here on # bundle_dir="$BIN_DIR/$BINARY_NAME.app" @@ -72,10 +97,22 @@ find "$framework_dir" | egrep "debug|Hea echo "Removing any debug libraries and headers..." find "$framework_dir" | egrep "debug|Headers" | xargs rm -rf -echo "Creating disk image..." +echo "Preparing image directory..." tempdir="/tmp/`basename $0`.$$" mkdir $tempdir cp -R $bundle_dir $tempdir +echo "...Bundle copied" address@hidden +for (( i = 0 ; i < fcount ; i++ )) do + file=${ADD_FILES[$i]} + if [ ! -f "$file" ]; then + echo "WARNING: $file not found!" + else + cp "$file" $tempdir + echo "...$file copied" + fi +done +echo "Creating disk image..." rm -f "$BIN_DIR/$BINARY_NAME.dmg" # format UDBZ: bzip2 compressed (10.4+), UDZ0: zlib compressed (default) hdiutil create -srcfolder $tempdir -format UDBZ -volname "$BINARY_NAME" "$BIN_DIR/$BINARY_NAME.dmg"