diff deploy/osx/deploy.sh @ 256:f649f6066e4d

* OS/X deployment fixes
author Chris Cannam
date Wed, 12 Jan 2011 15:02:11 +0000
parents 41ae9544a255
children 7057a4dcac3e
line wrap: on
line diff
--- a/deploy/osx/deploy.sh	Wed Jan 12 13:08:39 2011 +0000
+++ b/deploy/osx/deploy.sh	Wed Jan 12 15:02:11 2011 +0000
@@ -18,6 +18,31 @@
 echo "Done: check $app.app 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"
+
+install_name_tool -change QtCore.framework/Versions/4/QtCore @executable_path/../Frameworks/QtCore "$app.app/Contents/MacOS/$app"
+install_name_tool -change QtGui.framework/Versions/4/QtGui @executable_path/../Frameworks/QtGui "$app.app/Contents/MacOS/$app"
+install_name_tool -change QtNetwork.framework/Versions/4/QtNetwork @executable_path/../Frameworks/QtNetwork "$app.app/Contents/MacOS/$app"
+
+install_name_tool -change QtCore.framework/Versions/4/QtCore @loader_path/QtCore "$app.app/Contents/Frameworks/QtGui"
+install_name_tool -change QtCore.framework/Versions/4/QtCore @loader_path/QtCore "$app.app/Contents/Frameworks/QtNetwork"
+
+install_name_tool -change QtCore.framework/Versions/4/QtCore @loader_path/../../Frameworks/QtCore "$app.app/Contents/MacOS/PyQt4/QtCore.so"
+install_name_tool -change QtCore.framework/Versions/4/QtCore @loader_path/../../Frameworks/QtCore "$app.app/Contents/MacOS/PyQt4/QtGui.so"
+install_name_tool -change QtCore.framework/Versions/4/QtCore @loader_path/../../Frameworks/QtGui "$app.app/Contents/MacOS/PyQt4/QtGui.so"
+
+echo "Done: be sure to run the app and see that it works!"
+
+echo
 echo "Making dmg..."
 
 hdiutil create -srcfolder "$app".app "$app"-"$version".dmg -volname "$app"-"$version"