http://www.qtcn.org/bbs/read-htm-tid-62470.html

http://stackoverflow.com/questions/31678657/qtwebengine-for-windows-xp-target

2 down vote favorite
2

I was trying to build Qt5.5 to be able to run QtWebEngine on Windows XP. Here's my bat file to setup environment:

REM Set up \Microsoft Visual Studio 2013, where <arch> is \c amd64, \c x86, etc.
CALL "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x86
SET _ROOT=%CD%
SET PATH=%_ROOT%\qtbase\bin;C:\Perl\bin;%_ROOT%\gnuwin32\bin;C:\devtools\Bitnami\rubystack-2.0.0-26\ruby\bin;C:\Python27;%PATH%
REM Uncomment the below line when using a git checkout of the source repository
REM SET PATH=%_ROOT%\qtrepotools\bin;%PATH%
SET QMAKESPEC=win32-msvc2013
SET _ROOT=

bat file to configure build

configure -debug-and-release -nomake examples -opensource -nomake tests -target xp -prefix c:\qt5\5.5\msvc2013-winxp

Build successfull, but I was unable to run any example with QtWebEngineenter image description here

Is it possible to build QtWebEngine for WinXP target or it incompatible with WinXP?

Qt WebEngine 5.5.0 for Windows XP compatibility build steps

PROBLEM WITH OFFICIAL RELEASE

Qt 5.5.0 oficial release qwebengine module is incompatible with Windows XP applications, even if you force your project binary with XP compatibility compilation/linking settings/flags(QT DLLs are probably still incompatible) and you can exec your exe binary file under XP, you can't use qwebengine module anyway- just because QtWebEnbineProcess.exe is build as invalid EXE for windows XP.

To make Qt WebEngine 5.5.0 possible to run on winXP you must rebuild Qt modules with additional options way (as as said oficial Qt release is incompatible at all, you must build new one). Under Windows QtWebEngine can be only build only in Visual Studio 2013, there is no possible to build chromium code in another version of Visual Studio. Normally Qt and chromium under Windows can be build with using OpenGL or/and ANGLE project(which uses Direc3D9Ex or Direct3D11) support for hardware graphics operations, if you build for WinXP you have no choose, you must use OpenGL(which is worst choise, if you have choise), because Direct3D9Ex/Direct3D11 are available to install only from Vista+. So make sure you have installed updated graphics drivers for machine where will run your program, because stock XP drivers for your card for OpenGL will be very outdated and perhaps won't work valid.

PROBLEM GENESIS

Any problems occur just because default Visual C++ 2013 app compilation is incompatible with XP(C runtime and EXE subsystem), but you can still change and use runtime compatible with WinXP in Visual C++ 2013, this is described there:

http://blogs.msdn.com/b/vcblog/archive/2012/10/08/windows-xp-targeting-with-c-in-visual-studio-2012.aspx

so basicly you must add Windows SDK7.1A paths to include, libs and binaries, pass /D_USING_V120_SDK71_ for every cl compiler execution for Qt and chromium and pass /SUBSYSTEM:WINDOWS,5.01 or /SUBSYSTEM:CONSOLE,5.01 for linker invocations while build your project and QtWebEngineProcess.exe, simple isn't it :)

Build requirements:

Visual C++ 2013 (in my case installed in stardard location: C:\Program Files (x86)\Microsoft Visual Studio 12.0)

Windows SDK 7.1A - last Windows XP compatible SDK, /D_USING_V120_SDK71_ forces to use it (in my case installed in standard location: C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A)

3rd party tools, used to build chromium: Git, Perl, Python, pscp.exe- you must add their binaries to PATH env variable before build.

OpenGL ES SDK to use OpenGL ES 2.0 implementation, I downloaded from AMD (in my case donwloaded to D:\rzaba\qt\GLES_SDK).

Qt 5.5.0 sources- unpacked to D:\rzaba\qt\src-5.5.0

(I can't paste more links because I don't have 2 points reputation, OMG! :D)

Build process

First read this: http://doc.qt.io/qt-5/windows-building.html, we must do this like there, but few more step is need for XP compatible build.

Now if source code is unpacked and everything is installed create qt5vars.cmd, in my case it looks like this:

************************************************************************
REM ********** INITIALIZE ENV FOR MSVC 2013 CL COMPILER **********
SET PATH=C:\Windows;C:\Windows\system32
CALL "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x86
REM ********** UPDATE INCLUDE & LIB TO SUPPORT XP WIN SDK 7.1A **********
SET PATH=C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Bin;%PATH%
SET INCLUDE=C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Include;%INCLUDE%
SET LIB=C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Lib;%LIB%
SET CL=/D_USING_V120_SDK71_;%CL%
REM ********** INCLUDE OPENGL DESKTOP GLES SDK **********
SET PATH=D:\rzaba\qt\GLES_SDK\x86;%PATH%
SET INCLUDE=D:\rzaba\qt\GLES_SDK\include;%INCLUDE%
SET LIB=D:\rzaba\qt\GLES_SDK\x86;%LIB%
REM ********** 3D PARTY BUILD TOOLS BINARIES: PUTTY, RUBY, PERL, GIT, PYTHON ********** 
SET PATH=D:\putty;D:\Ruby22\bin;D:\Perl\bin;D:\Git;D:\Git\bin;D:\Git\cmd;D:\Python27;%PATH%
REM ********** SETUP QT QMAKE ENV **********
SET QMAKESPEC=win32-msvc2013
SET PATH=D:\rzaba\qt\src-5.5.0\qtbase\bin;D:\rzaba\qt\src-5.5.0\gnuwin32\bin;%PATH%
************************************************************************

Generally script configures PATH, INCLUDE, LIB env variables for build. In CL env variable can force CL compiler setting, this is main place where we define V120_XP platform usage.

Now before you start build you must edit some files from sources:

you must edit file: qtwebengine\src\3rdparty\ninja\configure.py find line with: "if platform.is_msvc():" and there you have cl compiler flags, you must remove '/WX' flag, becuse it will fails compilation for sdk7.1. You can also add there '/D_USING_V120_SDK71_' flag, to make sure ninja tool will also define to use V120_xp.

and you must edit another file: qtwebengine\src\process\process.pro and add there those lines:

win32: {

QMAKE_CXXFLAGS += /D_USING_V120_SDK71

QMAKE_LFLAGS_CONSOLE += /SUBSYSTEM:CONSOLE,5.1

QMAKE_LFLAGS_WINDOWS += /SUBSYSTEM:WINDOWS,5.1

}

you should also add this into your project. This will generate QtWebEngineProcess.exe file compatible with XP. Without this Visual C++ 2013 builds invalid EXE file for winXP.

If you open command line and call this script now you must cd to qt source directory and call configure, this is my configuration:

configure -prefix d:[your install path there] -confirm-license -target xp -opensource -opengl desktop -debug-and-release -nomake examples -nomake tests -no-warnings-are-errors

So I want build debug and release. If you setup everything correctly you should see some compilation process and create Makefiles for qt modules. After that call nmake, compilation makes few hours, and nmake install to copy/install created libraries to prefix. Good luck

Remember that graphics device must support OpenGL ES 2.0, otherwise after creation QWebView your app will crash by OpenGL driver, or window GUI becomes black. If you want run your app on old machine, you can build Mesa OpenGL software render(I did it and performance is rly slow, few seconds per any refresh window GUI content, but it works) and use it instead hardware driver.
shareimprove this answer
    
answered Sep 22 '15 at 8:28
user5362462
612
    
        
    
You have written in the *.pro file: QMAKE_CXXFLAGS += /D_USING_V120_SDK71. But where is the last underscore /D_USING_V120_SDK71_? Also, I've met the following instruction QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWS,5.01 on the other site. (1) So, which version should I choose - 5.01 or 5.1? (2) Where should I set --single-process if I'd like to debug my program which implicitly calls QtWebEngineProcess.exe? (3) Which 3rd party dlls do I have to deploy (e.g. OpenGL ES SDK)? (4) Is debug version of program able to work with QtWebEngineProcess.exe (mixing release and debug Qt dlls in 1 folder)? – ilya Nov 7 '16 at 7:22
        
    
Please, add explicit info that this engine does not work with XP since Qt 5.6 :( bugreports.qt.io/browse/QTBUG-49900 – ilya Nov 8 '16 at 18:06
add a comment
up vote 0 down vote

You need to use the compiler from Visual Studio 2013, but the headers/libraries from a Windows SDK supporting Windows XP (that's 7.1A):

"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x86
set INCLUDE=C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Include;%INCLUDE%
set LIB=C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\lib;%LIB%
set CL=/D_USING_V110_SDK71_

Note though that QtWebEngine requires a working Qt Quick stack (even QtWebEngineWidgets!), which in turn requires OpenGL. Because OpenGL support on a stock Windows XP is close to non-existent, and ANGLE (the DirectX wrapper) is not working on Windows XP, you need either to make sure there's a decent 3rd party OpenGL driver installed, or fall back to a software opengl32.dll (e.g. from mesa). If you've a Qt license you can also rely on the Qt Quick 2d renderer.
shareimprove this answer
    
answered Aug 31 '15 at 13:50
kkoehne
624513
    
add a comment
up vote 0 down vote

Just open qtwebengine\src\process\process.pro with vs2013, modify to "Visual Studio 2013 - Windows XP (v120_xp)" an rebuild QtWebEngineProcess.exe

qt5.6 webengine兼容xp的编译方法的更多相关文章

  1. 使用Qt5.7.0 VS2015版本生成兼容XP的可执行程序 good(从VS2012 update1开始支持xp和c++11)

    一.直接使用VS2012/VS2013/VS2015生成XP兼容的可执行程序 Visual Studio刚发布时没打补丁,称为RTM版,之后会陆续发布补丁,进行bug修复和功能增强.VS2010及之前 ...

  2. 使用Qt5.7.0 VS2015版本生成兼容XP的可执行程序

    版权声明:本文为灿哥哥http://blog.csdn.net/caoshangpa原创文章,转载请标明出处. 一.直接使用VS2012/VS2013/VS2015生成XP兼容的可执行程序 Visua ...

  3. Spark-1.0.1 的make-distribution.sh编译、SBT编译、Maven编译 三种编译方法

    fesh个人实践,欢迎经验交流!本文Blog地址:http://www.cnblogs.com/fesh/p/3775343.html 本文编译方法所支持的hadoop环境是Hadoop-2.2.0, ...

  4. osip及eXosip的编译方法

    osip及eXosip的编译方法 在最新版本的osip2.exosip2中不支持在VC6.0下编译osip.exosip协议栈的方法 说明: 1.以下文章中的osip版本为3.1.0 2.eXosip ...

  5. (转)wxWidgets 2.9.2svn(3.x)最小体积编译方法

    官方论坛.网上记录的wxWidgets编译方法,会导致编译后的程序库非常大,原因在于对编译的方法选择不当.下面简单总结一下如何编译最新的SVN代码.下载最新源码(每日构建):http://biolpc ...

  6. 2018-01-28-TF源码做版本兼容的一个粗暴方法

    layout: post title: 2018-01-28-TF源码做版本兼容的一个粗暴方法 key: 20180128 tags: IT AI TF modify_date: 2018-01-28 ...

  7. QxOrm 1.2.9 下载 以及编译方法 简介.

    QxOrm 是一个基于QT开发的数据库方面的ORM库,功能很强大,是QT C++数据开发方面的好工具. 目前已经更新1.3.1 .但 不幸的是 它的官网http://www.qxorm.com/ 莫名 ...

  8. vue js计算精度问题处理,兼容XP系统

    js计算精度问题(浮点数误差,大数计算出错) JavaScript 运算时经常遇到会 0.000000001 和 0.999999999 这样奇怪的结果. 网上教程一大篇,原理请百度,抄作业往下看!! ...

  9. 完美解决IE(IE6/IE7/IE8)不兼容HTML5标签的方法

    完美解决IE(IE6/IE7/IE8)不兼容HTML5标签的方法   HTML5的语义化标签以及属性,可以让开发者非常方便地实现清晰的web页面布局,加上CSS3的效果渲染,快速建立丰富灵活的web页 ...

随机推荐

  1. 课后作业 04 --DateTime应用,判断多久后生日之类

    try { Console.Write("请以年-月-日的形式输入您的生日:"); string strA = Console.ReadLine(); DateTime bir = ...

  2. OpenCV中CvSVM部分函数解读

    CvSVM::predict函数解析:无论是Mat接口还是CvMat接口终于都是通过指针的形式调用的.也就是终于都是调用的下面函数实现的 float CvSVM::predict( const flo ...

  3. linux 分发同步脚本与分发命令脚本

    同步脚本,在第5步要拼接自己配置的主机名 #!/bin/bash # 获取输入参数个数,如果没有参数,直接退出 pcount=$# )); then echo no args; exit; fi # ...

  4. Node.js学习疑惑整理

    1.Node.js 在调用某个包时,会首先检查包中 package.json 文件的 main 字段,将其作为 包的接口模块,如果 package.json 或 main 字段不存在,会尝试寻找 in ...

  5. 微信,支付宝,支付异步通知验签,notify_url

    在支付接口开发中 ,当用户支付完成之后,阿里或者微信会向我们服务器发送一个支付结果的通知,里边带有一系列参数:其中特殊的是签名类型,和签名(他们根据这些参数做出来的签名). 我们的得到这些参数之后要去 ...

  6. 常见数据结构与算法的 Python 实现

    1. 排序 快速排序(quick sort) 形式一:借助 partition 辅助函数 def partition(seq): pivot, seq = seq[0], seq[1:] low = ...

  7. js父窗体关闭,子窗体紧随

    近来的.我们遇到了权限管理系统.由于权限管理系统与原系统的风格不符.打开一个全新的窗口.问题就来了.admin取消后,,权限管理形式不关闭.其他普通用户登录后.尚能经营权的管理形式. 简化问题:adm ...

  8. Openstack+Kubernetes+Docker微服务

    Openstack+Kubernetes+Docker微服务 渐入佳境,我们开始比较具体的工作,由于Docker是一个基础组件,所以本文的主题是Docker和Registry2. 底层系统基于Cent ...

  9. Leetcode 318 Maximum Product of Word Lengths 字符串处理+位运算

    先介绍下本题的题意: 在一个字符串组成的数组words中,找出max{Length(words[i]) * Length(words[j]) },其中words[i]和words[j]中没有相同的字母 ...

  10. Python 辨异 —— __init__ 与 __new__

    __init__ 更多的作用是初始化属性,__new__ 进行的是创建对象,显然 __new__ 要早于 __init__ 发生. 考虑一个继承自 tuple 的类,显然在 __init__ 无法对其 ...