安装编译QtWebKit所需的工具(见trac.webkit.org关于BuildQtOnWindows)
安装 perl, python, ruby, gnuwin32, openssl等
安装icu库:
download icu library from
解压缩到C:\ICU
添加 C:\ICU\bin and C:\ICU\lib到系统路径中
在源代码目录下运行:
configure.bat -release -opensource -confirm-license -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -dbus -opengl desktop -openssl -icu -prefix C:\Qt\5.5.0 -I C:\OpenSSL\include -I C:\ICU\include -L C:\OpenSSL\lib -L C:\ICU\lib -nomake examples -nomake tests
用configure.bat配置时出现一个错误:“qtbase\configure.exe’ 不是内部或外部命令,也不是可运行的程序或批处理文件”。
原因是直接下的代码,并不是用git里clone出来的。
解决办法是在qtbase创建一个.gitignore文件,里面内容为foo。
如在qt-everywhere-opensource-src-5.0.1目录下,可以运行命令:“echo foo > qtbase\.gitignore”。然后再configure.bat即可通过。
nmake
nmake install
编译异常顺利,如果编译包含examples和tests要耗时5个多小时