diff deploy/osx/deploy.sh @ 335:aa852b477e4d

More OS/X deployment: Try to set shared library dependencies separately for each source arch
author Chris Cannam
date Wed, 02 Mar 2011 15:58:34 +0000
parents 806e9cb9ce61
children ce4d06d87a39
line wrap: on
line diff
--- a/deploy/osx/deploy.sh	Wed Mar 02 13:27:32 2011 +0000
+++ b/deploy/osx/deploy.sh	Wed Mar 02 15:58:34 2011 +0000
@@ -19,37 +19,17 @@
 perl -p -e "s/EASYHG_VERSION/$bundleVersion/" deploy/osx/Info.plist \
     > "$app".app/Contents/Info.plist
 
-echo "Done: check $app.app for sanity please"
+echo "Done: check $app.app/Contents/Info.plist for sanity please"
 
-echo
-echo "I expect you to have already copied QtCore, QtNetwork and QtGui to "
-echo "$app.app/Contents/Frameworks and PyQt4/QtCore.so and PyQt4/QtGui.so to "
-echo "$app.app/Contents/MacOS -- expect errors to follow if they're missing"
-echo
-
-echo "Fixing up loader paths in binaries..."
-
-install_name_tool -id QtCore "$app.app/Contents/Frameworks/QtCore"
-install_name_tool -id QtGui "$app.app/Contents/Frameworks/QtGui"
-install_name_tool -id QtNetwork "$app.app/Contents/Frameworks/QtNetwork"
-
-for fwk in QtCore QtGui QtNetwork; do
-	find "$app.app" -type f -print | while read x; do
-		current=$(otool -L "$x" | grep "$fwk.framework/" | awk '{ print $1; }')
-		[ -z "$current" ] && continue
-		echo "$x has $current"
-		relative=$(echo "$x" | sed -e "s,$app.app/Contents/,," \
-			-e 's,[^/]*/,../,g' -e 's,/[^/]*$,/Frameworks/'"$fwk"',' )
-		echo "replacing with relative path $relative"
-		install_name_tool -change "$current" "@loader_path/$relative" "$x"
-	done
-done
-
-echo "Done: be sure to run the app and see that it works!"
+bash deploy/osx/paths.sh "$app"
 
 echo
 echo "Making dmg..."
 
-hdiutil create -srcfolder "$app".app "$app"-"$version".dmg -volname "$app"-"$version"
+mkdir "$app"-"$version" &&
+	ln -s /Applications "$app"-"$version"/Applications &&
+	cp -rp "$app".app "$app"-"$version"/ &&
+	hdiutil create -srcfolder "$app"-"$version" "$app"-"$version".dmg -volname "$app"-"$version" && 
+	rm -r "$app"-"$version"
 
 echo "Done"