1、回顾
说起到qt的编译,真是领人痛心啊,不仅编译选项繁多,而且编译时间比较久,总是能使想编译qt源码的人望而却步,呵呵。。。我就是其中一个,不知道从什么时候开始就想着把qt的源码编译一下,也尝试过几次,但都以失败而告终,编译的时候总是不得要领,网上的相关文章也是一大片,但总是五花八门,因为不同人的机器是不一样的,编译的源码时可能会出现不一样的错误信息。最近偶然间看到qtcn博客中有人用vs2013编译qt5.6,他也给出了编译的博客地址Qt 5.6.0 动态编译(VS2013 x86 target xp openssl icu webkit),我顿时又来了兴趣,兴致勃勃的去到这个地址阅读了作者的编译步骤,开始了新的编译里程。
2、编译理解
多种编译
4、第四阶段:小有收货。到此刻位置,虽然我没有完全的编译出qt的源码,但是也有了一些小小的收货,因为要加快编译速度,我在一边的时候可能仅仅编译release或者debug,就有那么一种配置,在debug下,我编译出了除webengine意外的所有模块,不言而喻,webkit也是编译出来了,哈哈哈。虽然只是在debug下,但是release编译就只是时间问题了。
短暂的想法:还是很激动的哟,qt这个老顽固终于搞定啦,然后接下来的目标就是编译webengine了,说实在的,这个webengine我用用了几次,渲染速度是很好,但是不稳定啊亲。
5、第五阶段:编译webengine。经过上述4个阶段,除过webengine以外的其他模块都编译成功,终于到了webengine,其实在之前我也是把webengine考虑和整个模块一起编译的,但是出现了如下的错误,错误提示很明显是chromium模块,而且错误提示中有说明是Save he file in Unicode format to prevent data loss,这个貌似和编码有关系,后来看到了一片文章用MSVC2015编译Qt5.6(包含openssl、webengine)就是解决这个问题的,按照文章所示,开始编译qt,不想还没开始编译就夭折了,原因是我个人的原因,我用户名用了中文,首先是命令行乱码、紧接着就是vs起不来,后来就没有后来了。。。
短暂想法:我相信这个文章是可以解决编译webengine问题的,当然我没有经过验证,这个也只能国庆节过后,在公司同事机器上验证了。如果问题解决了我会后续补充完善这一部分。。。
webengine编译错误
3、依赖库
在此我还想说明几点问题,是关于我们编译qt源码的一些问题,我们不仅仅是要把qt的源码编译成功,而是要搞清楚,编译qt我们的步骤和思路,下边说的这点儿意见,说的不对欢迎指正,喷子绕行。
以下观点是针对qt5.6来讲,不一定适用于其他版本,因为本人没有试验过
在编译qt5.6的时候,需要的基础第三方库有这么几个,基本上大家的文章中都有,分别是:
- ActivePerl:编译qt必须的
- Python-2.7.11(https://www.python.org/downloads/):编译qt必须的
- Ruby(编译webkit所需):编译浏览器内核需要
- ICU4C 56.1 源代码(编译webkit所需):编译qt必须的,好像是这么回事,我之前编译了基础模块,不包含webengine和webkit,但是运行帮助程序的时候提示说需要icudt51、icuin51和icuuc51。后从qt5.6readme中看到,这个库确实是为了编译webkit,我执行帮助文档之所以需要是因为我配置编译选项时添加了-icu支持,后来经过我的验证,编译基础模块时取消-icu,确实可以不依赖icu库。
- The Netwide Assembler(nasm-2.12.01-win32)(可选,编译openssl所需)
- openssl-1.0.2g 源代码:编译浏览器内核需要
4、源码下载
- qt源码:官网自己下载,百度输入qt,就可以啦,进入相关源码下载,然后进入single目录,就可以下载源码。
- webkit源码:安装git工具,直接克隆,必须这么干,要不然会出现编译错误,这是一个大坑。问题请参考:http://blog.csdn.net/liuyez123/article/details/50339865文章,评论中有相关链接打开就是。git克隆地址:git clone git://code.qt.io/qt/qtwebkit.git
5、编译步骤
编译qt源码使用什么样的命令行,如果你直接用vs的command,那么nmake什么的都直接可以用 ,如果你直接使用系统的cmd来编译,那么就需要自己初始化下vs的环境,比如:执行命令call C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat x86。我是直接使用vs的命令行来编译
1、首先我们从vs启动命令行,然后设置命令行的相关环境,如下:
SET _ROOT=C:\Qt\qt-everywhere-opensource-src-5.6.
SET PATH=%_ROOT%\qtbase\bin;%_ROOT%\gnuwin32\bin;%PATH%
SET QMAKESPEC=win32-msvc2013
SET _ROOT=
SET INCLUDE=C:\Qt\icu\include;C:\Qt\openssl_x86(1.0.1s)\openssl_x86\include;%INCLUDE%
SET LIB=C:\Qt\icu\lib;C:\Qt\openssl_x86(1.0.1s)\openssl_x86\lib;%LIB%
SET PATH=C:\Qt\icu\lib;%PATH%
SET PATH=C:\Ruby21;C:\Qt\openssl_x86(1.0.1s)\openssl_x86\bin;C:\Qt\icu\bin;%PATH%
上面的一些路径都是绝对的,同学们需要自己看仔细了,为什么要设置openssl呢,因为我在configure的时候链接了openssl,主要是想让qnetwork支持https操作。perl和python在安装的时候我直接添加了path路径,所以没有给单独的命令行在设置,如果在安装时没有设置,那么还需要单独给命令行设置perl和python的安装路径,就像第8行的ruby似得
2、紧接着我们自己在源码的同级目录创建一个文件夹(qt-5.6.0-build-shared),是用来存放我们编译的临时文件和生成文件,目的是为了不改变源码的目录结构,也有一个好处是,我们可以同时对一份源码进行不同配置选项的编译,不过就是慢一些,我就是晚上同时配置3种选项,然后同时编译;同时在创建一个目录用来安装我们编译后的文件(5.6.0-shared)
3、在第一步设置好了的命令行切换到第二步创建的文件夹,把这个文件夹作为当前目录来编译
4、配置qt编译选项,其中有一个-force-debug-info选项,是为了生成qt在release下的pdb文件
"../qt-everywhere-opensource-src-5.6.0/configure.bat" -prefix C:/Qt/5.6.-shared -force-debug-info -opensource -ltcg -nomake examples -nomake tests -skip qtwebengine -skip qtwebengine -accessibility -plugin-sql-odbc -plugin-sql-sqlite -opengl dynamic -target xp -largefile -D _USING_V120_SDK71 -qt-zlib -qt-pcre -icu -qt-libpng -qt-libjpeg -qt-freetype -qt-harfbuzz -rtti -ssl -openssl -mp -l gdi32
5、紧接着输入字符y,等配置成功后,执行nmake命令,如果nmake找不到,那就需要设置vs的环境,设置环境变量如下图,这是取自Win10 + VS2015 下编译 Qt5.6.0文章,其中6-10行是启用对xp支持,因为这篇博客的作者是用vs2015,因此有一个宏是_USING_V140_SDK71,如果是vs2013的话该宏替换为_USING_V120_SDK71。
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAApgAAACuCAIAAAAd7+oHAAAgAElEQVR4nO1dS27jOtPVnqTleCBA028YZw8Coi1kEG9AQKBB9wYya2SgkdGjH2jcLXjmf6AHi+QpinrYsZJzcBvXpv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ia/UQ5rChlbC0KNv+LNAbYnCAI4q5Yc9f6QWC4Qd38+Zl9y/qGRG79GZJ145L7B0Pmlxgnb2Wc1lVq1KkvlPuzftE+OClBiqA9ksi939pixlgJrIbeQO7kvEgiQkV4RlhG+xo8urEuTs6JeTpRRGIfLUwag96cIAjifuADYbYAU7HdIPTHAARBEHvE/wM3rSKXbEHQdAAAAABJRU5ErkJggg==" alt="" />
配置 VC 编译器
6、编译完成后,输入nmake docs,编译帮助文档,nmake install_docs安装帮助文档,如果安装帮助文档,启动assiant时,索引目录为空。补充:使用_USING_V120_SDK71宏编译的qt源码,在执行nmake docs,会出现错误,因此在执行以便configure命令,并把该宏去掉,然后在继续编译帮助文档。再补充:经过测试在xp测试,编译qt不需要这一个宏也可以,只需要把工程的编译工具集设置支持xp即可
7、最后进行安装nmake install,拷贝sdk到指定目录(-prefix所指目录)
8、如下图所示,是我编译安装后的目录
qt5.6安装示意图1
qt5.6安装示意图2
9、如果想启动设计器,那么还需要icu的支持,因为我们的编译选项中有-icu,因此我们需要手动拷贝一些文件到安装目录,或者使用windows命令,注意我使用的都是绝对路径,同学们根据不同情况需要自己修改。拷贝命令如下:
rem 复制icu到qt安装目录中
xcopy /y /k "C:\Qt\icu\bin\icudt51.dll" "C:\Qt\5.6.0-shared\bin\"
xcopy /y /k "C:\Qt\icu\bin\icuin51.dll" "C:\Qt\5.6.0-shared\bin\"
xcopy /y /k "C:\Qt\icu\bin\icuuc51.dll" "C:\Qt\5.6.0-shared\bin\"
xcopy /y /k "C:\Qt\icu\lib\icudt.lib" "C:\Qt\5.6.0-shared\lib\"
xcopy /y /k "C:\Qt\icu\lib\icuin.lib" "C:\Qt\5.6.0-shared\lib\"
xcopy /y /k "C:\Qt\icu\lib\icuuc.lib" "C:\Qt\5.6.0-shared\lib\"
10、现在可以试着运行设计器了,应该可以正常运行
11、运行帮助文档,应该也有索引功能
6、借鉴文章
- Qt 5.6.0 动态编译(VS2013 x86 target xp openssl icu webkit):文章很好,按照文章所描述的可以编译成功,文章中设置对xp支持的模块我没有做修改
- 编译 Qt 5.6:深度好文,也提到了怎么编译webengine,推荐阅读
Win10 + VS2015 下编译 Qt5.6.0:讲解很透彻,特别是文章最后的说明,对新手的我很有帮助
- 用MSVC2015编译Qt5.6(包含openssl、webengine) :主要是编译webengine模块
7、问题分析
本来这一小节是没有的,但是后来我在继续编译的过程中有发现一些小问题,为了记住这些问题和有可能帮助其他同学,我又追加了一点儿内容
编译webkit时源码必须使用git拉取,原因上边的qwebkit源码下载我已经给出了链接,这儿我给出具体的文字链接Building QtWebKit with QT 5.6 on Mac 10.11,安装网友johnlamericain给出的答案可以解决编译时出现的QtWebkit/QtWebkit找不到问题。由于我之前编译qt5.6.0时,使用的git拉取的webkit源码(qt5.7webkit),所以没有出现问题,后来我编译qt5.6.1时,直接把webkit源码从5.6.0拷到5.6.1,位了速度快把.git目录删掉了,因此又出现了问题,后来我直接从下载了一份qtwebkit源码。
- 关于qtwebengine编译:文章前面想法4中描述了qtwebengine编译失败问题,及原因,后来阴差阳错的我把系统搞坏了,这难道是天意,我重新安装了系统,然后把系统的用户名自然而然的设置成了英文,然后改了时区,接着就是编译qt啦,这次异常的安静,没有一次错误,qt的整个工程编译过了。就是时间稍微有些长,19个小时而已(从前一天晚上8点编译到第二天下午3点,靠我的电脑配置也不低啊,x260的呢,编译的时候还把不相干的程序都推掉了)。万幸编译成功了,而且qt的帮助文档也编译成功并且按照成功。