Vs2015+Qt5.9.3源码编译(包含QWebEngine)

此版本已编译出QWebEngine
// -->控制面板\时钟、语言和区域:更改时区(太平洋时间(美国和加拿大));更改位置(美国);更改系统区域设置(英语(美国))
// 下载Qt5.9.3-msvc2015,安装Qt运行软件及源码,(切记别把源码拿出来编译!)
// 下载jom1.1.2,安装,并在环境变量界面添加path后面添加安装路径(注意:有bin的一定要设置到bin)

 

// 下载python2.7.14,安装,并在环境变量界面添加path后面添加安装路径(注意:有bin的一定要设置到bin)

 

//  下载ActivePerl,安装

// 下载ruby24,安装,并在环境变量界面添加path后面添加安装路径(注意:有bin的一定要设置到bin)

// 下载nasm-2.12.01,安装,并在环境变量界面添加path后面添加安装路径(注意:有bin的一定要设置到bin)
// 下载icu58,解压
// 下载openssl,编译(教程百度很多),(注意:下面用到openssl的路径是编译后的安装路径),并在环境变量界面添加path后面添加安装路径(注意:有bin的一定要设置到bin)
// 启动“vs2015开发人员命令提示”cd qt-everywhere-src-5.9.3
// 上面步骤在外部操作,操作完成之后执行下面脚本(注意:下面路径按照自己的路径改),然后等待3h+

//build.bat
msvc_path=D:\Program Files (x86)\Microsoft Visual Studio 14.0
set make_spec=win32-msvc
SET CL=/MP
set Root_path=D:\Qt5.9.3
set src_path=D:\Qt5.9.3\qt-everywhere-src-5.9.3
set dst_path=%Root_path%\Qt5
set icu_path=%Root_path%\icu
set openssl_path=%Root_path%\openssl
set PATH=%src_path%\qtbase\bin;%src_path%\qtbase\lib;%src_path%\gnuwin32\bin;%PATH%
set LIB=%LIB%;%icu_path%\lib;%openssl_path%\lib
set INCLUDE=%INCLUDE%;%icu_path%\include;%openssl_path%\include
set PATH=%PATH%;%icu_path%\bin;%openssl_path%\bin;%icu_path%\lib;%openssl_path%\lib


call "%msvc_path%\VC\vcvarsall.bat" x86
call configure -v -mp -opensource -confirm-license -platform %make_spec% -debug-and-release -force-debug-info -qt-sqlite -qt-pcre -qt-zlib -qt-libpng -qt-libjpeg   -opengl desktop -qt-freetype  -icu -openssl -nomake examples -nomake tests -prefix %dst_path%


jom
jom install
jom clean


xcopy /y /k "%icu_path%\bin\icudt58.dll" "%dst_path%\bin\" 
xcopy /y /k "%icu_path%\bin\icuin58.dll" "%dst_path%\bin\" 
xcopy /y /k "%icu_path%\bin\icuio58.dll" "%dst_path%\bin\" 
xcopy /y /k "%icu_path%\bin\icutest58.dll" "%dst_path%\bin\" 
xcopy /y /k "%icu_path%\bin\icutu58.dll" "%dst_path%\bin\" 
xcopy /y /k "%icu_path%\bin\icuuc58.dll" "%dst_path%\bin\" 
xcopy /y /k "%icu_path%\lib\icudt.lib" "%dst_path%\lib\" 
xcopy /y /k "%icu_path%\lib\icuin.lib" "%dst_path%\lib\" 
xcopy /y /k "%icu_path%\lib\icuio.lib" "%dst_path%\lib\" 
xcopy /y /k "%icu_path%\lib\icutest.lib" "%dst_path%\lib\" 
xcopy /y /k "%icu_path%\lib\icutu.lib" "%dst_path%\lib\" 
xcopy /y /k "%icu_path%\lib\icuuc.lib" "%dst_path%\lib\" 


xcopy /y /k "%openssl_path%\bin\libeay32.dll" "%dst_path%\bin\" 
xcopy /y /k "%openssl_path%\bin\ssleay32.dll" "%dst_path%\bin\" 
xcopy /y /k "%openssl_path%\lib\libeay32.lib" "%dst_path%\lib\" 
xcopy /y /k "%openssl_path%\lib\ssleay32.lib" "%dst_path%\lib\"


// Qt5.7以上删除了 -target xp选项
// 编译添加-static选项无法编译QWebEngine

你可能感兴趣的:(Qt)