QtWebEngine/How to Try: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
No edit summary
(codeblock)
 
(29 intermediate revisions by 15 users not shown)
Line 1: Line 1:
==Get the code==
{{LangSwitch}}The QtWebEngine can't be build statically. When a static build is started it will just skip over this part with the message "Static builds of QtWebEngine aren't supported." and continue with the build.
[[Category:Developing with Qt::QtWebEngine]]
== Get the code ==


The source code for QtWebEngine can be found on [http://qt.gitorious.org/qt/qtwebengine gitorious] ''[qt.gitorious.org]''.
The source code for QtWebEngine can be found at http://code.qt.io/cgit/qt/qtwebengine.git/ .


==Building QtWebengine==
== Building QtWebengine ==


[[QtWebEngineOnWindows|For Windows see here]] ''[qt.io]''
[https://doc.qt.io/qt-5/windows-requirements.html For Windows see here]


While this is hidden away in our build system, the build relies on gyp and ninja (fetched along with the chromium sources) to build chromium, hence a build dependency to python, in addition to the usual Qt5 suspects. You currently need at least Qt 5.4 to build QtWebEngine.
While this is hidden away in our build system, the build relies on gyp and ninja (fetched along with the chromium sources) to build chromium, hence a build dependency to python, in addition to the usual Qt5 suspects. You currently need at least Qt 5.4 to build QtWebEngine.


===Installing dependencies on Ubuntu (might be outdated):===
Note: That in case you have the 64-bit Linux host, you need to install an adidtional 32-bit multilib packages (at least: linux-libc-dev:i386, linux-headers-xxx:i386).


====Installing additional dependencies on Ubuntu 14.04 (might be outdated):====
=== Installing dependencies on Ubuntu ===
<code>
sudo apt-get install bison build-essential gperf flex python2 libasound2-dev \
libcups2-dev libdrm-dev libegl1-mesa-dev libnss3-dev libpci-dev libpulse-dev libudev-dev nodejs \
libxtst-dev gyp ninja-build</code>
 
=== Installing additional dependencies on Ubuntu 20.04+ ===
''(To save a bit time compiling the bundled variants from qtwebengine.git)''<code>
sudo apt-get install libssl-dev libxcursor-dev libxcomposite-dev libxdamage-dev libxrandr-dev \
libfontconfig1-dev libxss-dev libsrtp0-dev libwebp-dev libjsoncpp-dev libopus-dev libminizip-dev \
libavutil-dev libavformat-dev libavcodec-dev libevent-dev libvpx-dev libsnappy-dev libre2-dev libprotobuf-dev protobuf-compiler</code>


Please note that these libraries need to be installed on other distributions as well, though the package names and the set of libraries that are preinstalled may differ depending on the distribution used.
Please note that these libraries need to be installed on other distributions as well, though the package names and the set of libraries that are preinstalled may differ depending on the distribution used.


===Installing dependencies on Fedora (might be outdated):===
=== Installing dependencies on Fedora ===
<code>
sudo yum install "qt5-*"
 
sudo yum install mesa-libEGL-devel libgcrypt-devel libgcrypt pciutils-devel nss-devel libXtst-devel gperf
cups-devel pulseaudio-libs-devel libgudev1-devel systemd-devel libcap-devel alsa-lib-devel flex bison ruby
</code>
 
To build a release build (generally recommended) do:<syntaxhighlight lang="bash">
qmake -r CONFIG+=release
</syntaxhighlight>


To build a release build (generally recommended) do:<br /> qmake -r <span class="caps">CONFIG</span>+=release
=== Installing dependencies on openSUSE ===
<code>
sudo zypper install Mesa-libEGL-devel libgcrypt-devel libgcrypt20 pciutils-devel xmlsec1-nss-devel libXtst-devel gperf cups-devel libpulse-devel pulseaudio-qt-devel libgudev-1_0-devel systemd-devel libcap-devel alsa-lib-devel flex bison ruby nodejs17 nodejs17-devel nodejs-common npm17 libqt5-qtsvg-devel libqt5-qtsvg-private-headers-devel
</code>


==Testing==
=== Building ===
In case you cloned Qt WebEngine as a separate module from git, you might need to initialize out the src/3rdparty submodule that contains the Chromium and Ninja code:
<code>
cd qtwebengine
git submodule update --init
</code>


examples can then be found in the examples/ subdir. It consists of two minimalistic browser testbeds for the Widgets and QtQuick integration, in addition to some exisiting QtWebKitWidgets examples that were imported in order to ensure we have a good migration path.
Ensure that your $PATH points to a python version 2 binary. Many systems these days use python 3 by default.


===Categories:===
Make:


* [[:Category:Developing-with-Qt|Developing with Qt]]
<code>
** [[:Category:Developing-with-Qt::QtWebEngine|QtWebEngine]]
qmake -r
make
sudo make install
</code>

Latest revision as of 11:07, 8 November 2023

En Ar Bg De El Es Fa Fi Fr Hi Hu It Ja Kn Ko Ms Nl Pl Pt Ru Sq Th Tr Uk Zh

The QtWebEngine can't be build statically. When a static build is started it will just skip over this part with the message "Static builds of QtWebEngine aren't supported." and continue with the build.

Get the code

The source code for QtWebEngine can be found at http://code.qt.io/cgit/qt/qtwebengine.git/ .

Building QtWebengine

For Windows see here

While this is hidden away in our build system, the build relies on gyp and ninja (fetched along with the chromium sources) to build chromium, hence a build dependency to python, in addition to the usual Qt5 suspects. You currently need at least Qt 5.4 to build QtWebEngine.

Note: That in case you have the 64-bit Linux host, you need to install an adidtional 32-bit multilib packages (at least: linux-libc-dev:i386, linux-headers-xxx:i386).

Installing dependencies on Ubuntu

sudo apt-get install bison build-essential gperf flex python2 libasound2-dev \
libcups2-dev libdrm-dev libegl1-mesa-dev libnss3-dev libpci-dev libpulse-dev libudev-dev nodejs \
libxtst-dev gyp ninja-build

Installing additional dependencies on Ubuntu 20.04+

(To save a bit time compiling the bundled variants from qtwebengine.git)

sudo apt-get install libssl-dev libxcursor-dev libxcomposite-dev libxdamage-dev libxrandr-dev \
libfontconfig1-dev libxss-dev libsrtp0-dev libwebp-dev libjsoncpp-dev libopus-dev libminizip-dev \
libavutil-dev libavformat-dev libavcodec-dev libevent-dev libvpx-dev libsnappy-dev libre2-dev libprotobuf-dev protobuf-compiler

Please note that these libraries need to be installed on other distributions as well, though the package names and the set of libraries that are preinstalled may differ depending on the distribution used.

Installing dependencies on Fedora

sudo yum install "qt5-*" 

sudo yum install mesa-libEGL-devel libgcrypt-devel libgcrypt pciutils-devel nss-devel libXtst-devel gperf
cups-devel pulseaudio-libs-devel libgudev1-devel systemd-devel libcap-devel alsa-lib-devel flex bison ruby

To build a release build (generally recommended) do:

qmake -r CONFIG+=release

Installing dependencies on openSUSE

sudo zypper install Mesa-libEGL-devel libgcrypt-devel libgcrypt20 pciutils-devel xmlsec1-nss-devel libXtst-devel gperf cups-devel libpulse-devel pulseaudio-qt-devel libgudev-1_0-devel systemd-devel libcap-devel alsa-lib-devel flex bison ruby nodejs17 nodejs17-devel nodejs-common npm17 libqt5-qtsvg-devel libqt5-qtsvg-private-headers-devel

Building

In case you cloned Qt WebEngine as a separate module from git, you might need to initialize out the src/3rdparty submodule that contains the Chromium and Ninja code:

cd qtwebengine
git submodule update --init

Ensure that your $PATH points to a python version 2 binary. Many systems these days use python 3 by default.

Make:

qmake -r
make
sudo make install