在Windows上部署QML应用程序的正确方法
Proper way to deploy QML applications on Windows
最近我需要为我的Qt-QML应用程序创建一个部署包。此过程非常繁琐,因为您需要手动查找和复制依赖项。如(官方?Qt维基:
Copy the following into C:Deployment
- The release version of MyApp.exe
- All the .dll files from C:Qt5.2.1mingw48_32bin
- All the folders from C:Qt5.2.1mingw48_32plugins (If you used QML)
- All the folders from C:Qt5.2.1mingw48_32qml
Do the deletion steps below in C:Deployment and all of its subdirectories.
After each deletion, launch C:DeploymentMyApp.exe and test it.
If it stops working, restore the files you just deleted.
- Launch MyApp.exe. While it is running, try to delete all DLLs.
The DLLs that aren't used will go to the recycle bin,
leaving behind only the DLLs that you need.
(This trick doesn't work for .qml and qmldir files, however).
- (If you used QML) Delete a few .qml files and try relaunching MyApp.exe.
Repeat until you try all .qml files.
- (If you used QML) Delete qmldir files from the folders that have no more DLLs or .qml files
对于任何现代工具,这样的程序看起来都是完全荒谬的。是的,我知道windeployqt.exe
,但它没有找到所有.dll
依赖项,并且对.qml
依赖项根本没有帮助。
有没有人知道这个问题的更实用的方法,人们如何在大型项目中处理这个问题?有什么工具可以提供帮助吗?
Qt开发人员是否打算对此做点什么?
对于 windeployqt,可以选择--qmldir
。
windeployqt --qmldir f:myAppsources f:build-myAppmyApp.exe
因此,它还检查导入并获取qml dll。
所有这些都在链接的文章中进行了描述
相关文章:
- 将FFMpeg AVFrame对象从C++应用程序流式传输到Python的最佳方法?
- 初始化和终止Qt应用程序的正确方法?
- 这是使用Docker开发多层C/C 应用程序的好方法
- 是否有一种简单的方法可以从普通的 win32 C++代码向应用程序见解提供数据?
- VS2013在构建容器应用程序时无法识别OCX控制的附加方法
- 有没有停止应用程序的睡眠的方法?(异步睡眠)(C )
- 该代码注入第三方Qt应用程序并执行一些方法来获取Qt应用程序信息
- 是否有一种跨平台的方法可以在使用 C++ 编写的二进制应用程序中嵌入资源?
- 使用C 的多线程应用程序中测量全局时间(壁挂)的最快方法
- 将大量数据从C 应用程序传递到SQLServer存储过程的最快方法是什么?
- 拥有用于QT应用程序的Web用户界面的最佳方法
- 有没有一种方法可以测量桌面应用程序 UI 响应时间
- 生成代码以与不需要重新编译的正在运行的 cpp 应用程序交互的好方法是什么?
- 在 UWP 应用程序中,future.wait() 在尝试同步来自异步方法的响应时继续等待
- 当从一个应用程序调用时,在DLL方法中创建COM接口指针是有效的,但当从另一个应用软件调用时则无效
- 如何在不冻结线程/应用程序的情况下减慢方法执行速度
- 测试使用visual studio编写的C++android应用程序的最佳方法是什么.不升级到windows专业版
- C++在32位应用程序之间传输大量数据以进行视频播放的方法
- 在MFC C++应用程序中在屏幕上绘制点的最快方法
- 从QML(Qt Quick应用程序)调用C++方法