qt - macdeployqt 破解应用
问题描述
我已经安装了 Qt creator 5.11.0,
然后我更改了一些我需要在我的旧项目上更改的东西,当我尝试构建它时,它按预期工作,但是在使用 macdeployqt 后,我的应用程序无法加载。
所以,当我像这样运行 macdeployqt 时:
./macdeployqt /Users/`MY_USERNAME`/Downloads/build-`MY_PROJECT_NAME`-Desktop_Qt_5_11_0_clang_64bit-Release/`MY_PROJECT_NAME`.app -qmldir=/Users/`MY_USERNAME`/Downloads/build-`MY_PROJECT_NAME`-Desktop_Qt_5_11_0_clang_64bit-Release/ -dmg -verbose=3
这一切都“成功”完成,但我的应用程序无法加载。如果我尝试从 QtCreator 运行它,它会输出这个
qrc:/main.qml:1 module "QtQuick" is not installed
qrc:/main.qml:4 module "QtGraphicalEffects" is not installed
qrc:/main.qml:2 module "QtQuick.Window" is not installed
qrc:/main.qml:3 module "QtQuick.Controls" is not installed
qrc:/main.qml:1 module "QtQuick" is not installed
qrc:/main.qml:4 module "QtGraphicalEffects" is not installed
qrc:/main.qml:2 module "QtQuick.Window" is not installed
qrc:/main.qml:3 module "QtQuick.Controls" is not installed
qrc:/main.qml:1 module "QtQuick" is not installed
qrc:/main.qml:4 module "QtGraphicalEffects" is not installed
qrc:/main.qml:2 module "QtQuick.Window" is not installed
qrc:/main.qml:3 module "QtQuick.Controls" is not installed
qrc:/main.qml:1 module "QtQuick" is not installed
qrc:/main.qml:4 module "QtGraphicalEffects" is not installed
qrc:/main.qml:2 module "QtQuick.Window" is not installed
qrc:/main.qml:3 module "QtQuick.Controls" is not installed
有什么帮助吗?
谢谢!
解决方案
该选项是应用程序源目录-qmldir
中QML 文件的路径。尝试像这样运行它(假设参数是应用程序源目录的路径):-qmldir
./macdeployqt \
/Users/`MY_USERNAME`/Downloads/build-`MY_PROJECT_NAME`-Desktop_Qt_5_11_0_clang_64bit-Release/`MY_PROJECT_NAME`.app \
-qmldir=/Users/`MY_USERNAME`/Downloads/`MY_PROJECT_NAME`/ \
-dmg -verbose=3
否则,该工具将在构建目录中搜索 QML 文件,在该目录中找不到任何 QML 文件,因此不包含任何 QML 模块。
推荐阅读
- c++ - bad_alloc 在 Linux 中的作用域和用途是什么?
- excel - 在复制行的其余部分时拆分单元格中的多个数据
- python-3.x - 为什么我的 django 模板中的单选按钮不能被选择或显示?
- c# - 在移动设备 Chrome 上第二次尝试内存流错误
- django - 缓存超时后执行函数
- c# - FFMPEG缓存如何配置和获取缓存文件名
- node.js - 节点模块是针对不同的节点模块编译的 67
- c - 使用 strace 从编译的 C 程序打印验证所有 ascii 代码
- spring-boot - IntelliJ IDEA CE 2019.1:“JUnit Vintage”测试部分在使用“@RunWith(SpringRunner.class)”时抛出“无可运行方法”
- c++ - 打开文件,不存在则创建,判断是否创建