Solved Error deploying Qt application on OS X
-
man insall_name_tool
explains all options. -
Here config target from qwt ...
You can also chance the qmake from qwt and build a static lib..unix { QWT_INSTALL_PREFIX = /usr/local/qwt-$$QWT_VERSION # QWT_INSTALL_PREFIX = /usr/local/qwt-$$QWT_VERSION-qt-$$QT_VERSION } /usr/local/qwt-6.1.3
or adapt th script from https://raw.githubusercontent.com/pehohlva/xhtml_edit_qedit_base/master/mac_bundle/grep.sh
-
Also my best simply solution is:
/// on qwt macdeployqt say: macdeployqt radio.app ERROR: no file at "/Library/Frameworks/qwt.framework/Versions/6/qwt.framework/Versions/6/qwt"
Also i tested:
console: sudo mkdir -p /Library/Frameworks/qwt.framework/Versions/6/qwt.framework/Versions/6/ after you make a symply bridge as virtual link. ln -s /usr/local/qwt-6.1.3/lib/qwt.framework/Versions/Current/qwt \ /Library/Frameworks/qwt.framework/Versions/6/qwt.framework/Versions/6/qwt
at end :
macdeployqt radio.app
make a super job and link & copy all in the bundle :-)
by by ... -
@patrik08 I have tried it and it worked (at least the message it's gone). As I understand it doesn't fix the problem directly but it's a great workaround.
The only problem is that now I'm getting the following errors when trying to run
macdeployqt MyApplication.app -dmg
:ERROR: file copy failed from "/Users/kelvinsp/Qt5.3.2/5.3/clang_64/lib/QtSvg.framework/Contents/Info.plist" ERROR: to "MyApplication.app/Contents/Frameworks/QtSvg.framework/Resources/Info.plist" QIODevice::read (QFile, "MyApplication.app/Contents/Frameworks/QtSvg.framework/Resources/Info.plist"): device not open QIODevice::write (QFile, "MyApplication.app/Contents/Frameworks/QtSvg.framework/Resources/Info.plist"): device not open ERROR: file copy failed from "/Users/kelvinsp/Qt5.3.2/5.3/clang_64/lib/QtWidgets.framework/Contents/Info.plist" ERROR: to "MyApplication.app/Contents/Frameworks/QtWidgets.framework/Resources/Info.plist" QIODevice::read (QFile, "MyApplication.app/Contents/Frameworks/QtWidgets.framework/Resources/Info.plist"): device not open QIODevice::write (QFile, "MyApplication.app/Contents/Frameworks/QtWidgets.framework/Resources/Info.plist"): device not open ERROR: file copy failed from "/Users/kelvinsp/Qt5.3.2/5.3/clang_64/lib/QtGui.framework/Contents/Info.plist" ERROR: to "MyApplication.app/Contents/Frameworks/QtGui.framework/Resources/Info.plist" QIODevice::read (QFile, "MyApplication.app/Contents/Frameworks/QtGui.framework/Resources/Info.plist"): device not open QIODevice::write (QFile, "MyApplication.app/Contents/Frameworks/QtGui.framework/Resources/Info.plist"): device not open ERROR: file copy failed from "/Users/kelvinsp/Qt5.3.2/5.3/clang_64/lib/QtCore.framework/Contents/Info.plist" ERROR: to "MyApplication.app/Contents/Frameworks/QtCore.framework/Resources/Info.plist" QIODevice::read (QFile, "MyApplication.app/Contents/Frameworks/QtCore.framework/Resources/Info.plist"): device not open QIODevice::write (QFile, "MyApplication.app/Contents/Frameworks/QtCore.framework/Resources/Info.plist"): device not open ERROR: file copy failed from "/Users/kelvinsp/Qt5.3.2/5.3/clang_64/lib/QtPrintSupport.framework/Contents/Info.plist" ERROR: to "MyApplication.app/Contents/Frameworks/QtPrintSupport.framework/Resources/Info.plist" QIODevice::read (QFile, "MyApplication.app/Contents/Frameworks/QtPrintSupport.framework/Resources/Info.plist"): device not open QIODevice::write (QFile, "MyApplication.app/Contents/Frameworks/QtPrintSupport.framework/Resources/Info.plist"): device not open ERROR: file copy failed from "/Users/kelvinsp/Qt5.3.2/5.3/clang_64/lib/QtSql.framework/Contents/Info.plist" ERROR: to "MyApplication.app/Contents/Frameworks/QtSql.framework/Resources/Info.plist" QIODevice::read (QFile, "MyApplication.app/Contents/Frameworks/QtSql.framework/Resources/Info.plist"): device not open QIODevice::write (QFile, "MyApplication.app/Contents/Frameworks/QtSql.framework/Resources/Info.plist"): device not open ERROR: file copy failed from "/Users/kelvinsp/Qt5.3.2/5.3/clang_64/lib/QtOpenGL.framework/Contents/Info.plist" ERROR: to "MyApplication.app/Contents/Frameworks/QtOpenGL.framework/Resources/Info.plist" QIODevice::read (QFile, "MyApplication.app/Contents/Frameworks/QtOpenGL.framework/Resources/Info.plist"): device not open QIODevice::write (QFile, "MyApplication.app/Contents/Frameworks/QtOpenGL.framework/Resources/Info.plist"): device not open ERROR: file copy failed from "/Users/kelvinsp/Qt5.3.2/5.3/clang_64/lib/QtConcurrent.framework/Contents/Info.plist" ERROR: to "MyApplication.app/Contents/Frameworks/QtConcurrent.framework/Resources/Info.plist" QIODevice::read (QFile, "MyApplication.app/Contents/Frameworks/QtConcurrent.framework/Resources/Info.plist"): device not open QIODevice::write (QFile, "MyApplication.app/Contents/Frameworks/QtConcurrent.framework/Resources/Info.plist"): device not open
-
The app run without -dmg?
can you open app & work it?
I like to look this app like this...
https://www.youtube.com/watch?v=hJDvKud8RWs
search Mac Screen Recorder ... -
@patrik08 the application runs directly from the Qt and when I double click on it, but only before running the
macdeployqt
command. -
@KelvinSP said in Error deploying Qt application on OS X:
macdeployqt
The job from macdeployqt is only take all file and relink lib or framework .. if file an all exist its not give problem..
to build a dir/bundle & at end hdiutil create a bzip2 compressed dmg image like a iso file... -
Did you re-run macdeployqt several times on the same app bundle ? If so, you'll get a message telling you that it already has run.
-
@SGaist Yes, I did. I received the following message:
WARNING: Could not find any external Qt frameworks to deploy in "MyApplication.app" WARNING: Perhaps macdeployqt was already used on "MyApplication.app" ? WARNING: If so, you will need to rebuild "MyApplication.app" before trying again.
The DMG file was created but the application still not working (when double clicking).
Note: every time I test a new
macdelpoyqt
command, I rebuild the project first. -
I have uninstalled other qt versions using
brew list
,brew remove qt
andbrew remove qt5
. I also noted that I had pyqt installed (and I was not using it), so I also remove it usingbrew remove pyqt
.Then, I have reinstalled Qt 5.3.2 and had other issues:
Project ERROR: Xcode not set up properly. You may need to confirm the license agreement by running /usr/bin/xcodebuild.
Which was solved changing the
isEmpty($$list($$system("/usr/bin/xcrun -find xcrun 2>/dev/null")))
command from theQt_install_folder/5.7/clang_64/mkspecs/features/mac/default_pre.prf
file toisEmpty($$list($$system("/usr/bin/xcrun -find xcodebuild 2>/dev/null")))
, as explained here: https://stackoverflow.com/questions/33728905/qt-creator-project-error-xcode-not-set-up-properly-you-may-need-to-confirm-tand
Could not resolve SDK path for 'macosx10.8'
That was solved by changing the
QtPath/5.3/clang_64/mkspecs/qdevice.pri
from!host_build:QMAKE_MAC_SDK = macosx10.8
to!host_build:QMAKE_MAC_SDK = macosx10.12
, as explained here: https://stackoverflow.com/questions/26320677/error-could-not-resolve-sdk-path-for-macosx10-8So, I run the command from my Qt directory:
/Users/kuser/Qt5.3.2/5.3/clang_64/bin/macdeployqt MyApplication.app -dmg
and it worked.
I found these solutions in comments from the following question:
https://stackoverflow.com/questions/19988129/qt5-cannot-find-platform-plugins-mac-os-x