Not sure if I'm making any sloppy mistakes here, but this basic procedure worked for me (Qt 4.7.3, Qwt 6.0.2 svn 1225, examples/curvdemo1), gleaned from http://doc.qt.digia.com/stable/deployment-mac.html.
Step 1: add Qt libraries as "private frameworks"
/Developers/Tools/Qt/macdeployqt examples/bin/curvdemo1.app
/Developers/Tools/Qt/macdeployqt examples/bin/curvdemo1.app
To copy to clipboard, switch view to plain text mode
Step 2: add qwt to the app bundle (I think the curvdemo1 binary's dependencies get migrated correctly - i.e., you don't have to run install_name_tool on curvdemo1 - but you can always run this before Step 1 to be sure)
cp -R lib/qwt.framework examples/bin/curvdemo1.app/Contents/Frameworks
cp -R lib/qwt.framework examples/bin/curvdemo1.app/Contents/Frameworks
To copy to clipboard, switch view to plain text mode
Step 3: fix qwt's dependencies (determine by using "otool -L" on qwt)
install_name_tool -id @executable_path/../Frameworks/qwt.framework/Versions/6/qwt examples/bin/curvdemo1.app/Contents/Frameworks/qwt.framework/Versions/6/qwt
install_name_tool -change QtSvg.framework/Versions/4/QtSvg @executable_path/../QtSvg.framework/Versions/4/QtSvg examples/bin/curvdemo1.app/Contents/Frameworks/qwt.framework/Versions/6/qwt
# and repeat "install_name_tool -change" line for QtCore and QtGui
install_name_tool -id @executable_path/../Frameworks/qwt.framework/Versions/6/qwt examples/bin/curvdemo1.app/Contents/Frameworks/qwt.framework/Versions/6/qwt
install_name_tool -change QtSvg.framework/Versions/4/QtSvg @executable_path/../QtSvg.framework/Versions/4/QtSvg examples/bin/curvdemo1.app/Contents/Frameworks/qwt.framework/Versions/6/qwt
# and repeat "install_name_tool -change" line for QtCore and QtGui
To copy to clipboard, switch view to plain text mode
Expected result: user can double click on curvdemo1.app without installing anything on a clean computer
Bookmarks