为Wince工作的Qt构建,但没有插件或导入工作(Qt build for Wince works, but no plugins or import work)

编程入门 行业动态 更新时间:2024-10-28 19:33:46
为Wince工作的Qt构建,但没有插件或导入工作(Qt build for Wince works, but no plugins or import work)

我已经为CE 6自定义sdk构建了Qt。 我可以使用VS2005和KITL连接,并在设备上成功运行几个Qt示例。 如果我将所有Qt dll复制到USB驱动器上带有.exe的目录并将其附加到设备上,我也可以运行示例。

但是,似乎任何使用QTDIR查找位置的东西都不起作用(插件和QML导入)。 如果我将qml作为资源文件包含在项目中,我能够获得一些QML示例。

我没有尝试过任何工作(包括将插件/导入复制到带有dll的目录)。 我无法设置QTDIR,因为wince没有环境设置。

我可以通过静态构建与共享来进一步提高,但我相信像QtWebkit和QtMobility这样的“好东西”将无法用于静态构建。

在wince部署是否有一些秘密可以让我失踪?

I've got Qt build for a CE 6 custom sdk. I can use VS2005 and a KITL connection and run several of the Qt examples successfully on the device. I can also run examples if I copy all of the Qt dll's into a directory with the .exe on a USB drive and attach it to the device.

However, it seems that anything that uses QTDIR to find the location doesn't work (plugins and QML imports). I was able to get some QML examples to work if I included the qml in the project as a resource file.

Nothing I've tried works (including copying the plugins/imports to a directory with the dlls). I can't set QTDIR, as wince doesn't have environment settings.

I was able to get a little further with a static build vs. shared, but I believe that "nice stuff" like QtWebkit and QtMobility won't be available for static builds.

Is there some secret to deployment on wince that I'm missing?

最满意答案

跟踪它。 在src / corelib / io / qfilesystemiterator_win.cpp中有一个代码块:

if (QSysInfo::windowsVersion() >= QSysInfo::WV_WINDOWS7) { dwAdditionalFlags = 2; // FIND_FIRST_EX_LARGE_FETCH infoLevel = 1 ; // FindExInfoBasic; }

wince(6.0)的windowsVersion的枚举是不同的,导致它触发为true而不是false。 包含上面的代码

#ifndef Q_OS_WINCE ... #endif

解决了这个问题。

注意,我发现了一个用于Windows Embedded Compact 7补丁的git repo(从4.8.0开始)不包含在Qt中。 此修复是其中一项更改。 如果您正在使用4.8和wince(甚至是CE 6),请查看https://qt.gitorious.org/qt/jaanttils-qt/graph/WEC7_Patches 。 我需要在顶部进行一些更改,但我认为它们特定于我正在使用的sdk。

Tracked it down. In src/corelib/io/qfilesystemiterator_win.cpp there is a code chunk:

if (QSysInfo::windowsVersion() >= QSysInfo::WV_WINDOWS7) { dwAdditionalFlags = 2; // FIND_FIRST_EX_LARGE_FETCH infoLevel = 1 ; // FindExInfoBasic; }

The enums for windowsVersion for wince (6.0) are different, causing this to trigger as true instead of false. Wrapping the above code in

#ifndef Q_OS_WINCE ... #endif

fixes the problem.

Note, I found a git repo for Windows Embedded Compact 7 patches that (as of 4.8.0) is not included in Qt. This fix is one of the changes. Check out https://qt.gitorious.org/qt/jaanttils-qt/graph/WEC7_Patches if you are working on 4.8 and wince (even CE 6). I needed a handful of changes on top, but I think they were specific to the sdk I'm using.

更多推荐

Qt,QTDIR,wince,电脑培训,计算机培训,IT培训"/> <meta name="description&qu

本文发布于:2023-08-07 05:09:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1461148.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:工作   插件   Qt   Wince   build

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!