QtWebEngine application failed to run on windows xp but works on windows 7
-
Hi.
I compiled qt 5.5.0 on windows 7 via MSVC2013.(target -> Windows XP)This is the
qt5vars.cmd
file that i invoked it first to prepare the environment:CALL "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x86 SET _ROOT=D:\myqt\5.5.0\source SET PATH=%_ROOT%\qtbase\bin;%_ROOT%\gnuwin32\bin;%PATH% SET QMAKESPEC=win32-msvc2013 SET _ROOT=
And this is how i configure qt:
configure -debug-and-release -opensource -confirm-license -opengl dynamic no-warnings-are-errors -nomake examples -nomake tests -skip qt3d -skip qtwebengine -skip qtwebkit -skip qtwebkit-examples -skip qtwayland -skip qtandroidextras -skip qtmacextras -skip qtx11extras -target xp -prefix "D:\myqt\5.5.0\install\msvc2013\32bit"
After successful compilation, i decided to compile qtwebengine module separately.
This is the content of
qt5vars.cmd
: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% SET QMAKESPEC=win32-msvc2013 SET _ROOT=D:\myqt\5.5.0\source SET PATH=%_ROOT%\qtbase\bin;%_ROOT%\gnuwin32\bin;%PATH% SET _ROOT=
Everything seems OK. After that i tried to compile the browser sample that located here:
qtwebengine\examples\webenginewidgets\browser
It compiled and run perfectly on windows 7.
But if i try to run it on windows xp i'll get these strange errors:(With help of DebugView)
https://gist.github.com/LinArcX/09aa86edf7848325b2b9589ac543e66bSeems it tries to search for
QtWebEngineProcess.exe
in a wrong path:QtWebEngineProcess not found at location D:/myqt/5.5.0/install/msvc2013/32bit/bin/QtWebEngineProcess.exe. Trying fallback path...
QtWebEngineProcess.exe
exists beside application file in deployed directory. -
@KH-219Design Thank you so much. problem fixed due to my testing on virtualBox machine. On real hardware everything works like a charm.
-
This is the output of dependency walker profiler:
https://gist.github.com/LinArcX/48fab610c34112e706bdac0e9711ad31 -
There are some caveats to my advice, but hopefully some kind of advice is better than none!
Caveats: I do not use Windows, and I am using Qt 5.15.0.
In order to get a webengine-based application properly deployed using a Linux AppImage, I needed to use a
qt.conf
file as per: https://doc.qt.io/qt-5/qtwebengine-deploying.htmlThe important part was:
- At runtime, Qt WebEngine looks for the QtWebEngineProcess executable in the directory that QLibraryInfo::location(QLibraryInfo::LibraryExecutablesPath) returns. For Qt installations, this is
QTDIR/libexec
(Linux) orQTDIR\bin
(Windows). The path can be changed by defining aqt.conf
file, for example. Alternatively, an executable path can be set as a value of the QTWEBENGINEPROCESS_PATH environment variable.
Because I am on Linux, I needed a qt.conf line such as:
LibraryExecutables = Qt/libexec
But since that documentation says that Windows uses "bin", I suppose you would use "Binaries" in place of "LibraryExecutables" (see: https://doc.qt.io/qt-5/qt-conf.html )
- At runtime, Qt WebEngine looks for the QtWebEngineProcess executable in the directory that QLibraryInfo::location(QLibraryInfo::LibraryExecutablesPath) returns. For Qt installations, this is
-
For completeness:
I am placing my
qt.conf
file side-by-side with my executable.And the "Qt/libexec" path shown here:
LibraryExecutables = Qt/libexec
Is a relative path relative to "right there" where the executable and
qt.conf
file reside. -
@KH-219Design Thank you so much. problem fixed due to my testing on virtualBox machine. On real hardware everything works like a charm.