# # # patch "guitone.pro" # from [4ff05a820e37db0f3f853c3779bf2ad19ea3e910] # to [d67375db8600ebbcde7ab52d6a81b0f72da43354] # # patch "osx_bundle.sh" # from [260c9d291af70f34f0b7ac37bacb1764d616693d] # to [3bea9cdf45f05ab8a937ed60e568f6061b3aae0c] # ============================================================ --- guitone.pro 4ff05a820e37db0f3f853c3779bf2ad19ea3e910 +++ guitone.pro d67375db8600ebbcde7ab52d6a81b0f72da43354 @@ -197,9 +197,9 @@ macx { sed -e s/@@version@@/$${GUITONE_VERSION}/g \ < res/osx/Info.plist.in > bin/guitone.app/Contents/Info.plist - # add x86, ppc or both to build for either or both platforms (universal)^ - CONFIG += x86 #ppc - + # add x86, ppc archs for universal release builds + CONFIG(release, debug|release):CONFIG += x86 ppc + # do not try to build a universal binary if precompiled headers # are enabled (this will fail badly) contains(CONFIG, precompile_header):contains(CONFIG, x86):contains(CONFIG, ppc) { ============================================================ --- osx_bundle.sh 260c9d291af70f34f0b7ac37bacb1764d616693d +++ osx_bundle.sh 3bea9cdf45f05ab8a937ed60e568f6061b3aae0c @@ -36,6 +36,8 @@ SPARKLE_FRAMEWORK=/Library/Frameworks/Sp declare -a ADD_FILES=( "README" "COPYING" "NEWS") # sparkle framework SPARKLE_FRAMEWORK=/Library/Frameworks/Sparkle.framework +# absolute path to the directory containing the Qt frameworks +QT_FRAMEWORK_DIR="/Library/Frameworks" # # Configuration end, nothing should be edited from here on @@ -45,15 +47,6 @@ framework_dir="$bundle_dir/Contents/Fram bundle_bin="$bundle_dir/Contents/MacOS/$BINARY_NAME" framework_dir="$bundle_dir/Contents/Frameworks" -if [ -z $QTDIR ]; then - echo "\$QTDIR environment variable not found... exiting." - exit 1 -fi - -# canonicalize QtDir, unfortunately this bash has no realpath() implementation -# so we need to use perl for this -QTDIR=`perl -e "use Cwd 'realpath'; print realpath('$QTDIR');"` - if [ ! -d "$bundle_dir" ]; then echo "Application bundle not found in bin... exiting." exit 1 @@ -73,13 +66,13 @@ do lib=${NEEDED_LIBS[$i]} echo "Processing $lib..." - if [ ! -d "$QTDIR/lib/$lib.framework" ]; then - echo "Couldn't find $lib.framework in $QTDIR." + if [ ! -d "$QT_FRAMEWORK_DIR/$lib.framework" ]; then + echo "Couldn't find $lib.framework in $QT_FRAMEWORK_DIR." exit 1 fi rm -rf "$framework_dir/$lib.framework" - cp -fR "$QTDIR/lib/$lib.framework" "$framework_dir" + cp -fR "$QT_FRAMEWORK_DIR/$lib.framework" "$framework_dir" echo "...$lib copied." install_name_tool \ @@ -88,12 +81,12 @@ do # other Qt libs depend at least on QtCore if [ "$lib" != "QtCore" ]; then - install_name_tool -change "$QTDIR/lib/QtCore.framework/Versions/4/QtCore" \ + install_name_tool -change "QtCore.framework/Versions/4/QtCore" \ "@executable_path/../Frameworks/QtCore.framework/Versions/4/QtCore" \ "$framework_dir/$lib.framework/Versions/Current/$lib" fi - install_name_tool -change "$QTDIR/lib/$lib.framework/Versions/4/$lib" \ + install_name_tool -change "$lib.framework/Versions/4/$lib" \ "@executable_path/../Frameworks/$lib.framework/Versions/4/$lib" \ "$bundle_bin" @@ -126,7 +119,7 @@ if [ "$1" = "dmg" ]; then echo "WARNING: $file not found!" else cp "$file" $tempdir - echo "...$file copied" + echo "...$file copied" fi done echo "Creating disk image..."