我已经为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 ... #endiffixes 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
发布评论