PDA

View Full Version : Deploy Qt application on Mac OS X 10.4 Tiger



mourad
22nd March 2008, 12:31
Hello everyone, I’ve ported my application from windows to mac and it works. I’ve deployed it by proceeding as the Trolltech document inhttp://doc.trolltech.com/4.3/deployment-mac.html but when I tested the bundle on an other mac it doesn’t lunch.
I’m on Mac OS X 10.4.6 Tiger and using Qt 4.3.2. I tested it on Mac OS X 10.4.10 Tiger. Here are the steps I've done :

cd /Projets/Deploy_Autonome/autonome/buid/Release/Autonome.app/Contents
mkdir Frameworks
cp -R /Volumes/Dev/Library/Frameworks/QtCore.framework Frameworks
cp -R /Volumes/Dev/Library/Frameworks/QtGui.framework Frameworks
cp -R /Volumes/Dev/Library/Frameworks/QtSql.framework Frameworks
cp -R /Volumes/Dev/Library/Frameworks/Qt3Support.framework Frameworks
cp -R /Volumes/Dev/Library/Frameworks/QtXml.framework Frameworks
cp -R /Volumes/Dev/Library/Frameworks/QtNetwork.framework Frameworks


install_name_tool -id @executable_path/../Frameworks/QtCore.framework/Versions/4.0/QtCore Autonome.app/Contents/Frameworks/QtCore.framework/Versions/4.0/QtCore
install_name_tool -id @executable_path/../Frameworks/QtGui.framework/Versions/4.0/QtGui Autonome.app/Contents/Frameworks/QtGui.framework/Versions/4.0/QtGui
install_name_tool -id @executable_path/../Frameworks/QtSql.framework/Versions/4.0/QtSql Autonome.app/Contents/Frameworks/QtSql.framework/Versions/4.0/QtSql
install_name_tool -id @executable_path/../Frameworks/Qt3Support.framework/Versions/4.0/Qt3Support Autonome.app/Contents/Frameworks/Qt3Support.framework/Versions/4.0/Qt3Support
install_name_tool -id @executable_path/../Frameworks/QtXml.framework/Versions/4.0/QtXml Autonome.app/Contents/Frameworks/QtXml.framework/Versions/4.0/QtXml
install_name_tool -id @executable_path/../Frameworks/QtNetwork.framework/Versions/4.0/QtNetwork Autonome.app/Contents/Frameworks/QtNetwork.framework/Versions/4.0/QtNetwork


install_name_tool -change /Volumes/Dev/Library/Frameworks/QtCore.framework/Versions/4.0/QtCore @executable_path/../Frameworks/QtCore.framework/Versions/4.0/QtCore Autonome.app/Contents/MacOs/Autonome
install_name_tool -change /Volumes/Dev/Library/Frameworks/QtGui.framework/Versions/4.0/QtGui @executable_path/../Frameworks/QtGui.framework/Versions/4.0/QtGui Autonome.app/Contents/MacOs/Autonome
install_name_tool -change /Volumes/Dev/Library/Frameworks/QtSql.framework/Versions/4.0/QtSql @executable_path/../Frameworks/QtSql.framework/Versions/4.0/QtSql Autonome.app/Contents/MacOs/Autonome
install_name_tool -change /Volumes/Dev/Library/Frameworks/Qt3Support.framework/Versions/4.0/Qt3Support @executable_path/../Frameworks/Qt3Support.framework/Versions/4.0/Qt3Support Autonome.app/Contents/MacOs/Autonome
install_name_tool -change /Volumes/Dev/Library/Frameworks/QtXml.framework/Versions/4.0/QtXml @executable_path/../Frameworks/QtXml.framework/Versions/4.0/QtXml Autonome.app/Contents/MacOs/Autonome
install_name_tool -change /Volumes/Dev/Library/Frameworks/QtNetwork.framework/Versions/4.0/QtNetwork @executable_path/../Frameworks/QtNetwork.framework/Versions/4.0/QtNetwork Autonome.app/Contents/MacOs/Autonome


install_name_tool -change /Volumes/Dev/Library/Frameworks/QtCore.framework/Versions/4.0/QtCore @executable_path/../Frameworks/QtCore.framework/Versions/4.0/QtCore Autonome.app/Contents/Frameworks/QtGui.framework/Versions/4.0/QtGui
install_name_tool -change /Volumes/Dev/Library/Frameworks/QtCore.framework/Versions/4.0/QtCore @executable_path/../Frameworks/QtCore.framework/Versions/4.0/QtCore Autonome.app/Contents/Frameworks/QtSql.framework/Versions/4.0/QtSql
install_name_tool -change /Volumes/Dev/Library/Frameworks/QtCore.framework/Versions/4.0/QtCore @executable_path/../Frameworks/QtCore.framework/Versions/4.0/QtCore Autonome.app/Contents/Frameworks/Qt3Support.framework/Versions/4.0/Qt3Support
install_name_tool -change /Volumes/Dev/Library/Frameworks/QtCore.framework/Versions/4.0/QtCore @executable_path/../Frameworks/QtCore.framework/Versions/4.0/QtCore Autonome.app/Contents/Frameworks/QtXml.framework/Versions/4.0/QtXml
install_name_tool -change /Volumes/Dev/Library/Frameworks/QtCore.framework/Versions/4.0/QtCore @executable_path/../Frameworks/QtCore.framework/Versions/4.0/QtCore Autonome.app/Contents/Frameworks/QtNetwork.framework/Versions/4.0/QtNetwork
PLUGINS:

mkdir Autonome.app/Contents/plugins
cp /Volumes/Dev/Developer/Applications/Qt/plugins/sqldrivers/libqsqlibase.dylib Autonome.app/Contents/plugins
install_name_tool -change /Volumes/Dev/Library/Frameworks/QtCore.framework/Versions/4.0/QtCore @executable_path/../Frameworks/QtCore.framework/Versions/4.0/QtCore Autonome.app/Contents/plugins/libqsqlibase.dylib
install_name_tool -change /Volumes/Dev/Library/Frameworks/QtGui.framework/Versions/4.0/QtGui @executable_path/../Frameworks/QtGui.framework/Versions/4.0/QtGui Autonome.app/Contents/plugins/libqsqlibase.dylib
install_name_tool -change /Volumes/Dev/Library/Frameworks/Qt3Support.framework/Versions/4.0/Qt3Support @executable_path/../Frameworks/QtSql.framework/Versions/4.0/QtSql Autonome.app/Contents/plugins/libqsqlibase.dylib
install_name_tool -change /Volumes/Dev/Library/Frameworks/QtSql.framework/Versions/4.0/QtSql @executable_path/../Frameworks/Qt3Support.framework/Versions/4.0/Qt3Support Autonome.app/Contents/plugins/libqsqlibase.dylib
install_name_tool -change /Volumes/Dev/Library/Frameworks/QtXml.framework/Versions/4.0/QtXml @executable_path/../Frameworks/QtXml.framework/Versions/4.0/QtXml Autonome.app/Contents/plugins/libqsqlibase.dylib
install_name_tool -change /Volumes/Dev/Library/Frameworks/QtNetwork.framework/Versions/4.0/QtNetwork @executable_path/../Frameworks/QtNetwork.framework/Versions/4.0/QtNetwork Autonome.app/Contents/plugins/libqsqlibase.dylib

Can anyone tell me where I’m wrong and how to proceed?
Many thanks.
Regurads, Mourad.

December
30th March 2008, 16:20
http://wiki.qtcentre.org/index.php?title=Mac_OSX_Deployment_Script

Take a look there. Thats what worked for me.