-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Qt compilation
This page explains how to recompile the Qt dependency on every platforms.
On Windows, Qt is provided as a MSYS2 pacman package and is automatically installed when installing the msys dependencies.
Download https://download.qt.io/official_releases/online_installers/qt-unified-linux-x64-online.run and run it:
wget https://download.qt.io/official_releases/online_installers/qt-unified-linux-x64-online.run
chmod +x ./qt-unified-linux-x64-online.run
./qt-unified-linux-x64-online.run
Install Qt in $(HOME)/Qt5.15.0
(default directory) with at least these items selected:
- Qt
| - Qt 5.15.0
| | - Desktop gcc 64-bit
| | - Qt WebEngine
We should recompile some Qt modules to improve performance or fix temporary bugs. In order to recompile these modules, the following packages need to be installed:
sudo apt-get update
sudo apt-get install libdbus-1-dev libglu1-mesa-dev libegl1-mesa-dev libx11-xcb-dev libfreetype6-dev libcups2-dev gperf libnss3-dev libxcomposite-dev libxcursor-dev libxi-dev libxtst-dev bison flex libxrandr-dev libxkbcommon-x11-dev
Recompiling the liqjpeg plugin will faster JPEG compression:
cd ~/Downloads
wget https://download.qt.io/official_releases/qt/5.15/5.15.0/submodules/qtbase-everywhere-src-5.15.0.tar.xz
tar xf qtbase-everywhere-src-5.15.0.tar.xz
rm qtbase-everywhere-src-5.15.0.tar.xz
cd qtbase-everywhere-src-5.15.0
./configure -release -opensource -dbus -disable-eglfs -nomake tools -nomake examples -nomake tests -icu -system-libjpeg
make
cp plugins/imageformats/libqjpeg.so ~/Qt5.15.0/5.15.0/gcc_64/plugins/imageformats
QWebSockets 5.15.0 (and earlier) has a bug which breaks SSL connections from Firefox and Edge: https://bugreports.qt.io/browse/QTBUG-57665. To fix it, we need to patch and recompile the Qt websocket library.
Download the qtwebsockets module:
cd ~/Downloads
wget https://download.qt.io/official_releases/qt/5.15/5.15.0/submodules/qtwebsockets-everywhere-src-5.15.0.tar.xz
tar xf qtwebsockets-everywhere-src-5.15.0.tar.xz
rm qtwebsockets-everywhere-src-5.15.0.tar.xz
cd qtwebsockets-everywhere-src-5.15.0
# apply this patch: https://codereview.qt-project.org/#/c/180148/4//ALL,unified
export QT5DIR=~/Qt5.15.0/5.15.0/gcc_64
export PATH=$QT5DIR/bin:$PATH
qmake
make
make install
cd ~/webots/scripts/install
./qt_linux_installer.sh
./configure -release -opensource -dbus -nomake examples -nomake tests -icu -cups -system-libjpeg
Download Qt 5.15.2 for macOS (https://www.qt.io/download) and install it in $(HOME)/Qt5.15.2 (default directory) with at least these items selected:
- Qt 5.15.2
| - Qt 5.15.2
| | - macOS
| | - Qt WebEngine
cd ~/webots/scripts/install/
# Optional: edit the 2 first paths of ./qt_mac_installer.sh
./qt_mac_installer.sh