# # # patch "notes/RELEASE_CHECKLIST" # from [fd275c5c8e05556243dccc14535d3b43020cda34] # to [e3d4d88ff8f42d0dfc0b3b7a048136eba62bb298] # # patch "osx_bundle.sh" # from [5fe72edf53a08c5926994de0e3223a2c01d8a020] # to [06a63d3bbb8848215916004a84478a73d260d2d1] # ============================================================ --- notes/RELEASE_CHECKLIST fd275c5c8e05556243dccc14535d3b43020cda34 +++ notes/RELEASE_CHECKLIST e3d4d88ff8f42d0dfc0b3b7a048136eba62bb298 @@ -45,21 +45,19 @@ 8) DMG release (binary, Mac OS X): 8) DMG release (binary, Mac OS X): - You need to download the deployqt utility and put it into your PATH before - the bundling succeeds. Download the utility here: - http://labs.trolltech.com/blogs/2007/08/23/deploying-mac-applications-without-the-hassle/ + You need the macdeployqt utility which usually comes with newer + Qt binary distributions. $ mtn co -d your.db -r t:guitone-MAJOR.MINOR.BUGFIX guitone-MAJOR.MINOR.BUGFIX $ cd guitone-MAJOR.MINOR.BUGFIX $ lrelease guitone.pro $ qmake -config release && make - $ ./osx_bundle.sh dmg - $ mv bin/guitone.dmg bin/guitone-MAJOR.MINOR.BUGFIX.dmg + $ ./osx_bundle.sh Finally _test_ the binary: Use otool -L to check if all non-system - libraries (Qt*, Sparkle) and the guitone binary itself have set their - dependencies as @executable path. Check if the created disk image is - properly mountable and contains all needed files. + libraries (Qt*) and the guitone binary itself have set their dependencies as + @executable path. Check if the created disk image is properly mountable and + contains all needed files. 9) sftp into address@hidden and create a new directory MAJOR.MINOR.BUGFIX in /www/guitone.thomaskeller.biz/htdocs/releases. ============================================================ --- osx_bundle.sh 5fe72edf53a08c5926994de0e3223a2c01d8a020 +++ osx_bundle.sh 06a63d3bbb8848215916004a84478a73d260d2d1 @@ -1,38 +1,37 @@ #!/bin/bash # -# Creates a distributable application package by including sparkle into -# the bundle and putting the whole thing into a dmg. +# Creates a distributable mac application package. # -# relative path to the directory which contains the created app bundle -BIN_DIR="bin" -# name of the binary -BINARY_NAME="guitone" +if [ -z "$(which macdeployqt 2>/dev/null)" ]; then + echo "'macdeployqt' utility not found" >&2 + exit 1 +fi + # additional files you'd like to get copied to the final dmg -declare -a ADD_FILES=( "README" "README.driver" "COPYING" "NEWS") +declare -a add_files=( "README" "README.driver" "COPYING" "NEWS") +target=guitone +destdir=$(egrep ^DESTDIR $target.pro | sed -e 's/DESTDIR *= *//g') +version=$(egrep ^GUITONE_VERSION $target.pro | perl -ple 's/GUITONE_VERSION *= *"(.+)"/$1/g') -bundle_dir="$BIN_DIR/$BINARY_NAME.app" -bundle_bin="$bundle_dir/Contents/MacOS/$BINARY_NAME" -framework_dir="$bundle_dir/Contents/Frameworks" - -if [ ! -d "$bundle_dir" ]; then - echo "Application bundle not found in bin... exiting." +bundle="$destdir/$target.app" +if [ ! -d "$bundle" ]; then + echo "Application bundle not found" >&2 exit 1 fi -if [ ! -d "$framework_dir" ]; then - mkdir -p "$framework_dir" -fi +echo "Deploying Qt libraries..." +macdeployqt "$bundle" echo "Preparing image directory..." tempdir="/tmp/`basename $0`.$$" mkdir $tempdir -cp -R $bundle_dir $tempdir +cp -R $bundle $tempdir echo "...Bundle copied" address@hidden address@hidden for (( i = 0 ; i < fcount ; i++ )) do - file=${ADD_FILES[$i]} + file=${add_files[$i]} if [ ! -f "$file" ]; then echo "WARNING: $file not found!" else @@ -40,9 +39,11 @@ done echo "...$file copied" fi done + echo "Creating disk image..." -rm -f "$BIN_DIR/$BINARY_NAME.dmg" +dmgfile="$destdir/$target-$version.dmg" +rm -f $dmgfile # format UDBZ: bzip2 compressed (10.4+), UDZ0: zlib compressed (default) -hdiutil create -srcfolder $tempdir -format UDBZ -volname "$BINARY_NAME" "$BIN_DIR/$BINARY_NAME.dmg" +hdiutil create -srcfolder $tempdir -format UDBZ -volname "$target $version" "$dmgfile" rm -rf $tempdir