Hi,
I tried to deploy the imageformats plugin along with my application - following your hint - but I'm still encountering the same problem as before.
I strictly followed the procedure suggested on the QtAssistant, ie:
- I've modified my main.cpp file, adding the following code immediately after the creation of the QApplication:
dir.cdUp();
dir.cd("plugins");
QDir dir(QApplication::applicationDirPath());
dir.cdUp();
dir.cd("plugins");
QApplication::setLibraryPaths(QStringList(dir.absolutePath()));
To copy to clipboard, switch view to plain text mode
- I've built my application in Release modality.
- I've included QtGui and QtCore in my application (through the "deployqt" utility).
- I've copied the files contained in /path/to/Qt/plugins/imageformats to myapplication.app/Contents/plugins/imageformats.
- I've linked the jpeg plugin to the frameworks contained in the bundle, using exactly these instructions:
install_name_tool -change /Library/Frameworks/QtGui.framework/Versions/4/QtGui @executable_path/../Frameworks/QtGui.framework/Versions/4/QtGui MAVs_A1.app/Contents/plugins/imageformats/libqjpeg.dylib
install_name_tool -change /Library/Frameworks/QtCore.framework/Versions/4/QtCore @executable_path/../Frameworks/QtCore.framework/Versions/4/QtCore MAVs_A1.app/Contents/plugins/imageformats/libqjpeg.dylib
install_name_tool -change /Library/Frameworks/QtGui.framework/Versions/4/QtGui @executable_path/../Frameworks/QtGui.framework/Versions/4/QtGui MAVs_A1.app/Contents/plugins/imageformats/libqjpeg.dylib
install_name_tool -change /Library/Frameworks/QtCore.framework/Versions/4/QtCore @executable_path/../Frameworks/QtCore.framework/Versions/4/QtCore MAVs_A1.app/Contents/plugins/imageformats/libqjpeg.dylib
To copy to clipboard, switch view to plain text mode
The application works but without images... :-(
Cheers,
Fabio
Bookmarks