使用 macdeployqt (Qt 4.7.3) 部署 Qt 应用程序后,该应用程序损坏
到目前为止,使用 macdeployqt 部署我的应用程序工作正常,但升级到 Qt 4.7.3(Mac Qt SDK 1.1 Release Candidate)后,我的程序在部署后被破坏。这就是问题:
- 所有图标和资源图像都消失了(不显示在工具栏中)
- 窗口不再打开
- Cmd+Q 不会退出应用程序
令我感到困惑的是我不明白是什么导致了所有这些问题,因为 macdeployqt
只是将框架(在我的例子中为 QtGui、QtCore、QtSql、QtNetwork)复制到应用程序包中,并使用 otool
和install_name_tool
。所有图标和图像都编译成二进制文件,因此我唯一能想到的是重写链接(存储为字符串?)会覆盖二进制文件和/或代码部分的数据部分中的数据。
我该怎么做才能使 macdeployqt
再次工作?
编辑:此问题也出现在一个非常简单的测试应用程序中,该应用程序只有一个包含图标的工具按钮。在 macdeployqt
之后,该图标不再可见。
编辑:如果知道是否有人可以重现该问题会有所帮助。
Until now deploying my Application with macdeployqt
worked fine, but after upgrading to Qt 4.7.3 (Mac Qt SDK 1.1 Release Candidate) my program is broken after the deployment. This are the issues:
- all icons and resource images are gone (do not show up in the toolbar)
- windows don't open anymore
- Cmd+Q does not quit the app
What buzzes me is that i don't understand what causes all these problems, since macdeployqt
simply copies the frameworks (QtGui, QtCore, QtSql, QtNetwork in my case) into the app bundle and rewrites the links of the binary and the deployed frameworks by using otool
and install_name_tool
. All icons and images are compiled into the binary, so the only thing i can think of is that rewriting the links (stored as strings?) overwrites data in the data section of the binary and/or code section.
What can I do to make macdeployqt
work again?
EDIT: This problem also appears in a very simple test app with just one tool button that contains an icon. After macdeployqt
this icon is not visible anymore.
EDIT: If would be helpful to know if anyone can reproduce the problem.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
QtSDK 附带的 macdeployqt 版本似乎已损坏。
删除 QtSDK 并从仅框架版本安装库 (http://qt.nokia.com/downloads/qt-for-open-source-cpp-development-on-mac-os-x)。那里包含的 macdeployqt 应该可以工作。
关于此问题的错误已在 Qt-Bugtracker -> 中提交。 http://bugreports.qt-project.org/browse/QTBUG-17959
The macdeployqt-version that comes shipped with QtSDK seems to be broken.
Remove QtSDK and install the libraries from the framework-only version (http://qt.nokia.com/downloads/qt-for-open-source-cpp-development-on-mac-os-x). The macdeployqt included there should work.
A bug regarding this problem is already filed for that in the Qt-Bugtracker -> http://bugreports.qt-project.org/browse/QTBUG-17959