QtWebEngine/Qt6Build: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
(add initial Qt6 build page , checkout source code)
 
(Add selecting branches)
Line 3: Line 3:
Please check platform notes for required dependencies https://doc.qt.io/qt-6/qtwebengine-platform-notes.html.
Please check platform notes for required dependencies https://doc.qt.io/qt-6/qtwebengine-platform-notes.html.


Qt builds can be done in 'top level' manner, meaning that you clone qt5 main repository (git://code.qt.io/qt/qt5.git),
Qt builds can be done in ''top level'' manner, meaning that you clone qt5 main repository (git://code.qt.io/qt/qt5.git),
which then initializes all the qt modules as submodules and configures and builds everything in one go.
which then initializes all the qt modules as sub-modules,configures and builds everything in one go.
However, in this small guide shows the alternative way so called 'module build' which is more robust as
However, this small guide shows the alternative way, so called ''module build'', which is more robust as
it clones minimum subset of modules required for QtWebengine and compiles each module separately. It also
it clones minimum subset of modules required for QtWebengine and compiles each module separately. It is
is very flexible as you can try to compile newer QtWebengine with older qt base and so.
also very flexible way of building as you can try to compile newer QtWebengine module with older qt modules.
 
==Obtain Qt6 sources code===
==Obtain Qt6 sources code===


Line 15: Line 16:


git clone git://code.qt.io/qt/qtbase.git
git clone git://code.qt.io/qt/qtbase.git
git clone git://code.qt.io/qt/shadertools.git
git clone git://code.qt.io/qt/qtshadertools.git
git clone git://code.qt.io/qt/qtdeclarative.git
git clone git://code.qt.io/qt/qtdeclarative.git
git clone git://code.qt.io/qt/qtwebengine.git
git clone git://code.qt.io/qt/qtwebengine.git
Line 26: Line 27:


Note that web engine needs initialization of submodule.
Note that web engine needs initialization of submodule.
==Select branches==
Let's assume we want to compile Qt 6.4.3 with Qt Webengine 6.5.0
Therefore, in qtbase, qtshadertools, qtdeclarative repositories we select barnches:
<syntaxhighlight>
git checkout origin/6.4.3
</syntaxhighlight>
Where-else in qtwebengine
<syntaxhighlight>
cd qtwebengine
git checkout origin/6.5.0
git submodule update
cd ..
</syntaxhighlight>

Revision as of 17:02, 16 March 2023

Building Qt6 WebEngine from Source

Please check platform notes for required dependencies https://doc.qt.io/qt-6/qtwebengine-platform-notes.html.

Qt builds can be done in top level manner, meaning that you clone qt5 main repository (git://code.qt.io/qt/qt5.git), which then initializes all the qt modules as sub-modules,configures and builds everything in one go. However, this small guide shows the alternative way, so called module build, which is more robust as it clones minimum subset of modules required for QtWebengine and compiles each module separately. It is also very flexible way of building as you can try to compile newer QtWebengine module with older qt modules.

Obtain Qt6 sources code=

mkdir qt6
cd qt6

git clone git://code.qt.io/qt/qtbase.git
git clone git://code.qt.io/qt/qtshadertools.git
git clone git://code.qt.io/qt/qtdeclarative.git
git clone git://code.qt.io/qt/qtwebengine.git

cd qtwebenigne
git submodule init
git submodule update
cd ..

Note that web engine needs initialization of submodule.

Select branches

Let's assume we want to compile Qt 6.4.3 with Qt Webengine 6.5.0 Therefore, in qtbase, qtshadertools, qtdeclarative repositories we select barnches:

git checkout origin/6.4.3

Where-else in qtwebengine

cd qtwebengine
git checkout origin/6.5.0
git submodule update
cd ..