From e3bab8a6b911ccc73607de53ddfd86e65a452e31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20Gro=C3=9F?= Date: Sun, 21 Feb 2021 00:22:39 +0100 Subject: [PATCH 1/7] Update Ubuntu 18.04 amd64 Qt to 5.15.2 --- hifi_qt.py | 2 +- tools/qt-builder/README.md | 196 ++++++++++++++++++------------------- 2 files changed, 99 insertions(+), 99 deletions(-) diff --git a/hifi_qt.py b/hifi_qt.py index 48e9b337a6..b85d9ee7b2 100644 --- a/hifi_qt.py +++ b/hifi_qt.py @@ -69,7 +69,7 @@ endif() if u_major == 16: self.qtUrl = self.assets_url + '/dependencies/vcpkg/qt5-install-5.12.3-ubuntu-16.04-with-symbols.tar.gz' elif u_major == 18: - self.qtUrl = self.assets_url + '/dependencies/vcpkg/qt5-install-5.12.3-ubuntu-18.04.tar.gz' + self.qtUrl = 'http://motofckr9k.ddns.net/vircadia_packages/qt5-install-5.15.2-ubuntu-18.04-amd64_test.tar.gz' elif u_major == 19 and u_minor == 10: self.qtUrl = self.assets_url + '/dependencies/vcpkg/qt5-install-5.12.6-ubuntu-19.10.tar.xz' elif u_major > 19: diff --git a/tools/qt-builder/README.md b/tools/qt-builder/README.md index 75f085f8ea..18c0cac890 100644 --- a/tools/qt-builder/README.md +++ b/tools/qt-builder/README.md @@ -1,10 +1,6 @@ # General -This document describes the process to build Qt 5.12.3. -Note that there are several patches. -* The first (to qfloat16.h) is needed to compile QT 5.12.3 on Visual Studio 2017 due to a bug in Visual Studio (*bitset* will not compile. Note that there is a change in CMakeLists.txt to support this. -* The second patch is to OpenSL ES audio and allow audio echo cancelllation on Android. -* The third is a patch to QScriptEngine to prevent crashes in QScriptEnginePrivate::reportAdditionalMemoryCost, during garbage collection. See https://bugreports.qt.io/browse/QTBUG-76176 -* The fourth is a patch which fixes video playback on WebEngineViews on mac. See https://bugreports.qt.io/browse/QTBUG-70967 +This document describes the process to build Qt 5.51.2. + ## Requirements ### Windows 1. Visual Studio 2017 @@ -54,54 +50,38 @@ Enter a user name - all small letters (this is used for *sudo* commands) Choose a password 1. Jom jom is a clone of nmake to support the execution of multiple independent commands in parallel. -https://wiki.qt.io/Jom +https://wiki.qt.io/Jom + + ### Linux -Tested on Ubuntu 16.04 and 18.04. -**16.04 NEEDED FOR JENKINS~~ ** -1. qt5 requirements -edit /etc/apt/sources.list (edit as root) -replace all *# deb-src* with *deb-src* (in vi `1,$s/# deb-src/deb-src/`) -`sudo apt-get update -y` -`sudo apt-get upgrade -y` -`sudo apt-get build-dep qt5-default -y` -1. git >= 1.6 -Check if needed `git --version` -`sudo apt-get install git -y` -Verify again -1. python -Check if needed `python --version` - should return python 2.7.x -`sudo apt-get install python -y` (not python 3!) -Verify again -1. gperf -Check if needed `gperf --version` -`sudo apt-get install gperf -y` -Verify again -1. bison and flex -Check if needed `flex --version` and `bison --version` -`sudo apt-get install flex bison -y` -Verify again -1. pkg-config (needed for qtwebengine) -Check if needed `pkg-config --version` -`sudo apt-get install pkg-config -y` -Verify again -1. OpenGL -Verify (first install mesa-utils - `sudo apt install mesa-utils -y`) by `glxinfo | grep "OpenGL version"` -`sudo apt-get install libgl1-mesa-dev -y` -`sudo ln -s /usr/lib/x86_64-linux-gnu/libGL.so.346.35 /usr/lib/x86_64-linux-gnu/libGL.so.1.2.0` -Verify again -1. make -Check if needed `make --version` -`sudo apt-get install make -y` -Verify again -1. g++ -Check if needed - `g++ --version` -`sudo apt-get install g++ -y` -Verify again -1. dbus-1 (needed for qtwebengine) -`sudo apt-get install libdbus-glib-1-dev -y` -1. nss (needed for qtwebengine) -`sudo apt-get install libnss3-dev -y` +1. qt5 requirements +On Ubuntu based systems you can just have apt install the dependencies for the qt5-default package: +Edit /etc/apt/sources.list (edit as root) and uncomment all source repositories by replacing all `# deb-src` with `deb-src`. +```bash +sudo apt update +sudo apt upgrade +sudo apt build-dep qt5-default +``` + +1. git >= 1.6 +1. python 2.7.x +1. gperf +1. bison and flex +1. pkg-config (needed for qtwebengine) +1. OpenGL +1. make +1. g++ +1. dbus-1 (needed for qtwebengine) +1. nss (needed for qtwebengine) + +On Ubuntu based systems you can install all these dependencies with: +```bash +sudo apt install git python gperf flex bison pkg-config mesa-utils libgl1-mesa-dev make g++ libdbus-glib-1-dev libnss3-dev +``` +Make sure that python 2.7.x is the system standard by checking if `python --version` returns python 2.7.x + +Qt also provides a dependency list for some major Linux distributions here: https://wiki.qt.io/Building_Qt_5_from_Git#Linux.2FX11 + ### Mac 1. git >= 1.6 Check if needed `git --version` @@ -160,60 +140,80 @@ Upload qt5-install-5.12.3-windows.tar.gz to our Amazon S3 vircadia-public bucket Update hifi_vcpkg.py to use this new URL. Additionally, you should make a small change to any file in the hifi/cmake/ports directory to force the re-download of the qt-install.tar.gz during the build process for hifi. #### Preparing Symbols Run `python3 prepare-windows-symbols-for-backtrace.py qt5-install` to scan the qt5-install directory for any dlls and pdbs. After running this command the backtrace directory will be created. Zip this directory up, but make sure that all dlls and pdbs are in the root of the zip file, not under a sub-directory. This file can then be uploaded to backtrace here: https://highfidelity.sp.backtrace.io/p/Interface/settings/symbol/upload + + ### Linux #### Preparing source files -`git clone --recursive git://code.qt.io/qt/qt5.git -b 5.12.3 --single-branch` - -* Copy the **patches** folder to qt5 -* Apply patches to Qt -`cd qt5` -`git apply --ignore-space-change --ignore-whitespace patches/aec.patch` -`git apply --ignore-space-change --ignore-whitespace patches/qtscript-crash-fix.patch` -`cd ..` +```bash +git clone --recursive git://code.qt.io/qt/qt5.git -b 5.15.2 --single-branch +``` + +As of qt version 5.15.0, no patches are needed anymore. +~~* Copy the **patches** folder to qt5~~ +~~* Apply patches to Qt~~ +~~`cd qt5`~~ +~~`git apply --ignore-space-change --ignore-whitespace patches/aec.patch`~~ +~~`git apply --ignore-space-change --ignore-whitespace patches/qtscript-crash-fix.patch`~~ +~~`cd ..`~~ + #### Configuring -`mkdir qt5-install` -`mkdir qt5-build` -`cd qt5-build` +```bash +mkdir qt5-install +mkdir qt5-build +cd qt5-build +``` -*Ubuntu 16.04* -`../qt5/configure -opensource -confirm-license -platform linux-g++-64 -qt-zlib -qt-libjpeg -qt-libpng -qt-xcb -qt-freetype -qt-pcre -qt-harfbuzz -nomake examples -nomake tests -skip qttranslations -skip qtserialport -skip qt3d -skip qtlocation -skip qtwayland -skip qtsensors -skip qtgamepad -skip qtspeech -skip qtcharts -skip qtmacextras -skip qtvirtualkeyboard -skip qtpurchasing -skip qtdatavis3d -no-warnings-are-errors -no-pch -no-egl -no-icu -prefix ../qt5-install` +amd64: +```bash +../qt5/configure -force-debug-info -release -opensource -confirm-license -platform linux-g++-64 -recheck-all -nomake tests -nomake examples -skip qttranslations -skip qtserialport -skip qt3d -skip qtlocation -skip qtwayland -skip qtsensors -skip qtgamepad -skip qtcharts -skip qtx11extras -skip qtmacextras -skip qtvirtualkeyboard -skip qtpurchasing -skip qtdatavis3d -skip qtlottie -skip qtquick3d -skip qtpim -skip qtdocgallery -no-warnings-are-errors -no-pch -no-egl -no-icu -prefix ../qt5-install +``` +If libX11 or libGL aren't found, you will need to manually provide those locations. Search for `libX11.so` and `libGL.so` respectively and provide paths to their folders inside `qt5/qtbase/mkdspecs/linux-g++-64/qmake.conf`. +On Ubuntu 18.04 both are in `/usr/lib/x86_64-linux-gnu` -*Ubuntu 18.04* -`../qt5/configure -force-debug-info -release -opensource -confirm-license -gdb-index -recheck-all -nomake tests -nomake examples -skip qttranslations -skip qtserialport -skip qt3d -skip qtlocation -skip qtwayland -skip qtsensors -skip qtgamepad -skip qtspeech -skip qtcharts -skip qtx11extras -skip qtmacextras -skip qtvirtualkeyboard -skip qtpurchasing -skip qtdatavis3d -no-warnings-are-errors -no-pch -c++std c++14 -prefix ../qt5-install` +aarch64: +```bash +../qt5/configure -force-debug-info -release -opensource -confirm-license -platform linux-g++ -recheck-all -nomake tests -nomake examples -skip qttranslations -skip qtserialport -skip qt3d -skip qtlocation -skip qtwayland -skip qtsensors -skip qtgamepad -skip qtcharts -skip qtx11extras -skip qtmacextras -skip qtvirtualkeyboard -skip qtpurchasing -skip qtdatavis3d -skip qtlottie -skip qtquick3d -skip qtpim -skip qtdocgallery -no-warnings-are-errors -no-pch -no-icu -prefix ../qt5-install +``` +You can accelerate the build process by installing some of the optional system dependencies. +#### Make +Replace `4` with the number of threads you want to use. Keep in mind that the QT build process uses a lot of memory. It is recommended to have at *least* 1,2 GiB per thread. +Be warned that the qtwebengine build process ignores this setting and just uses your actual number of available threads instead. In my case it needed ~24GiB of memory for the build process. +On some systems qtscript, qtwebengine, qtwebchannel and qtspeech will be build by `make` without you manually specifying it, while others require you to build modules individually. +Check the folders of each needed module for binary files, to make sure that they have actually been built. +```bash +make -j4 +make -j4 module-qtscript +make -j4 module-qtwebengine +make -j4 module-qtspeech +make -j4 module-qtwebchannel +make -j4 install +cd qtwebengine +make -j4 install +cd ../qtscript +make -j4 install +cd ../qtspeech +make -j4 install +cd ../qtwebchannel +make -j4 install +``` +If one of the make commands fails, running it a second time sometimes clears the issue. -???`../qt5/configure -opensource -confirm-license -gdb-index -nomake examples -nomake tests -skip qttranslations -skip qtserialport -skip qt3d -skip qtlocation -skip qtwayland -skip qtsensors -skip qtgamepad -skip qtspeech -skip qtcharts -skip qtmacextras -skip qtvirtualkeyboard -skip qtpurchasing -skip qtdatavis3d -no-warnings-are-errors -no-pch -prefix ../qt5-install` -#### Make -`make` - -????*Ubuntu 18.04 only* -????`make module-qtwebengine` -????`make module-qtscript` - -*Both* -`make install` #### Fixing -1. The *.prl* files have an absolute path that needs to be removed (see http://www.linuxfromscratch.org/blfs/view/stable-systemd/x/qtwebengine.html) -`cd ../qt5-install` -`find . -name \*.prl -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \;` -1. Copy *qt.conf* to *qt5-install\bin* -#### Uploading -*Ubuntu 16.04* -1. Return to the home folder -`cd ..` -1. Open a python 3 shell -`python3` -1. Run the following snippet: -`import os` -`import tarfile` -`filename=tarfile.open("qt5-install.tar.gz", "w:gz")` -`filename.add("qt5-install", os.path.basename("qt5-install"))` -`exit()` -1. Upload qt5-install.tar.gz to https://hifi-qa.s3.amazonaws.com/qt5/Ubuntu/16.04 +1. The *.prl* files have an absolute path that needs to be removed (see http://www.linuxfromscratch.org/blfs/view/stable-systemd/x/qtwebengine.html) +```bash +cd ../qt5-install +find . -name \*.prl -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \; +``` +1. Copy *qt.conf* to *qt5-install\bin* + +#### Uploading +1. Tar and gzip qt5-install to create the package. Replace `ubuntu-18.04` with the relevant system and `amd64` with the relevant architecture. +```bash +tar -zcvf qt5-install-5.15.2-ubuntu-18.04-amd64.tar.gz qt5-install +``` +1. Upload qt5-install-5.15.2-ubuntu-18.04-amd64.tar.gz to https://athena-public.s3.amazonaws.com/dependencies/vcpkg/ -*Ubuntu 18.04* -``tar -zcvf qt5-install.tar.gz qt5-install` -1. Upload qt5-install.tar.gz to https://hifi-qa.s3.amazonaws.com/qt5/Ubuntu/18.04 ### Mac #### Preparing source files From cd0bf03576b2175a1c73871220143fc7261c5f66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20Gro=C3=9F?= Date: Sun, 21 Feb 2021 00:52:41 +0100 Subject: [PATCH 2/7] Move Qt package to athena s3 --- hifi_qt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hifi_qt.py b/hifi_qt.py index b85d9ee7b2..65837e010f 100644 --- a/hifi_qt.py +++ b/hifi_qt.py @@ -69,7 +69,7 @@ endif() if u_major == 16: self.qtUrl = self.assets_url + '/dependencies/vcpkg/qt5-install-5.12.3-ubuntu-16.04-with-symbols.tar.gz' elif u_major == 18: - self.qtUrl = 'http://motofckr9k.ddns.net/vircadia_packages/qt5-install-5.15.2-ubuntu-18.04-amd64_test.tar.gz' + self.qtUrl = self.assets_url + '/dependencies/vcpkg/qt5-install-5.15.2-ubuntu-18.04-amd64.tar.gz' elif u_major == 19 and u_minor == 10: self.qtUrl = self.assets_url + '/dependencies/vcpkg/qt5-install-5.12.6-ubuntu-19.10.tar.xz' elif u_major > 19: From 8f473084e50f949688b3e1aaf0846b8ec2ceb6c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20Gro=C3=9F?= Date: Sun, 21 Feb 2021 01:53:09 +0100 Subject: [PATCH 3/7] Update README and change to xz compression --- hifi_qt.py | 2 +- tools/qt-builder/README.md | 33 ++++++++++++++++++++++++--------- 2 files changed, 25 insertions(+), 10 deletions(-) diff --git a/hifi_qt.py b/hifi_qt.py index 65837e010f..10c8709761 100644 --- a/hifi_qt.py +++ b/hifi_qt.py @@ -69,7 +69,7 @@ endif() if u_major == 16: self.qtUrl = self.assets_url + '/dependencies/vcpkg/qt5-install-5.12.3-ubuntu-16.04-with-symbols.tar.gz' elif u_major == 18: - self.qtUrl = self.assets_url + '/dependencies/vcpkg/qt5-install-5.15.2-ubuntu-18.04-amd64.tar.gz' + self.qtUrl = self.assets_url + '/dependencies/vcpkg/qt5-install-5.15.2-ubuntu-18.04-amd64.tar.xz' elif u_major == 19 and u_minor == 10: self.qtUrl = self.assets_url + '/dependencies/vcpkg/qt5-install-5.12.6-ubuntu-19.10.tar.xz' elif u_major > 19: diff --git a/tools/qt-builder/README.md b/tools/qt-builder/README.md index 18c0cac890..9e60313bc0 100644 --- a/tools/qt-builder/README.md +++ b/tools/qt-builder/README.md @@ -1,5 +1,9 @@ # General -This document describes the process to build Qt 5.51.2. +This document describes the process to build Qt 5.15.2. +Note that there are several patches. +* The first (to qfloat16.h) is needed to compile QT 5.12.3 on Visual Studio 2017 due to a bug in Visual Studio (*bitset* will not compile. Note that there is a change in CMakeLists.txt to support this. +* The second patch is to OpenSL ES audio and allow audio echo cancelllation on Android. +* The third is a patch which fixes video playback on WebEngineViews on mac. See https://bugreports.qt.io/browse/QTBUG-70967 ## Requirements ### Windows @@ -159,7 +163,7 @@ As of qt version 5.15.0, no patches are needed anymore. #### Configuring ```bash mkdir qt5-install -mkdir qt5-build +mkdir qt5-build cd qt5-build ``` @@ -177,17 +181,28 @@ aarch64: You can accelerate the build process by installing some of the optional system dependencies. #### Make -Replace `4` with the number of threads you want to use. Keep in mind that the QT build process uses a lot of memory. It is recommended to have at *least* 1,2 GiB per thread. -Be warned that the qtwebengine build process ignores this setting and just uses your actual number of available threads instead. In my case it needed ~24GiB of memory for the build process. +Replace `4` with the number of threads you want to use. Keep in mind that the QT build process uses a lot of memory. It is recommended to have at least 1,2 GiB per thread. +```bash +NINJAFLAGS='-j4' make -j4 +``` + On some systems qtscript, qtwebengine, qtwebchannel and qtspeech will be build by `make` without you manually specifying it, while others require you to build modules individually. Check the folders of each needed module for binary files, to make sure that they have actually been built. +If a module has not been built, make the module "manually": ```bash -make -j4 make -j4 module-qtscript -make -j4 module-qtwebengine +NINJAFLAGS='-j4' make -j4 module-qtwebengine make -j4 module-qtspeech make -j4 module-qtwebchannel +``` + +Now Qt can be installed to qt5-install: +```bash make -j4 install +``` + +If some modules were missing in previous steps, it is needed to install them individually as well: +```bash cd qtwebengine make -j4 install cd ../qtscript @@ -208,11 +223,11 @@ find . -name \*.prl -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \; 1. Copy *qt.conf* to *qt5-install\bin* #### Uploading -1. Tar and gzip qt5-install to create the package. Replace `ubuntu-18.04` with the relevant system and `amd64` with the relevant architecture. +1. Tar and xz qt5-install to create the package. Replace `ubuntu-18.04` with the relevant system and `amd64` with the relevant architecture. ```bash -tar -zcvf qt5-install-5.15.2-ubuntu-18.04-amd64.tar.gz qt5-install +tar -Jcvf qt5-install-5.15.2-ubuntu-18.04-amd64.tar.xz qt5-install ``` -1. Upload qt5-install-5.15.2-ubuntu-18.04-amd64.tar.gz to https://athena-public.s3.amazonaws.com/dependencies/vcpkg/ +1. Upload qt5-install-5.15.2-ubuntu-18.04-amd64.tar.xz to https://athena-public.s3.amazonaws.com/dependencies/vcpkg/ ### Mac From 9222348863e742e40db6247be7d3614f08de77ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20Gro=C3=9F?= Date: Tue, 23 Feb 2021 15:55:52 +0100 Subject: [PATCH 4/7] Remove Ubuntu 16.04 package as we haven't supported it as long as I have been here. Remove Ubuntu 19.10 package as support for it ran out last year. --- hifi_qt.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/hifi_qt.py b/hifi_qt.py index 10c8709761..3ab38da1e8 100644 --- a/hifi_qt.py +++ b/hifi_qt.py @@ -66,12 +66,8 @@ endif() u_major = int( distro.major_version() ) u_minor = int( distro.minor_version() ) - if u_major == 16: - self.qtUrl = self.assets_url + '/dependencies/vcpkg/qt5-install-5.12.3-ubuntu-16.04-with-symbols.tar.gz' - elif u_major == 18: + if u_major == 18: self.qtUrl = self.assets_url + '/dependencies/vcpkg/qt5-install-5.15.2-ubuntu-18.04-amd64.tar.xz' - elif u_major == 19 and u_minor == 10: - self.qtUrl = self.assets_url + '/dependencies/vcpkg/qt5-install-5.12.6-ubuntu-19.10.tar.xz' elif u_major > 19: print("We don't support " + distro.name(pretty=True) + " yet. Perhaps consider helping us out?") raise Exception('LINUX DISTRO IS NOT SUPPORTED YET!!!') From 5e1330b7131de51212cdc6a477bc2d2da43297ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20Gro=C3=9F?= Date: Sat, 27 Feb 2021 20:54:00 +0100 Subject: [PATCH 5/7] Merge missing file --- tools/qt-builder/README.md | 308 ++++++++++++++++++++++--------------- 1 file changed, 185 insertions(+), 123 deletions(-) diff --git a/tools/qt-builder/README.md b/tools/qt-builder/README.md index 9e60313bc0..be07647e99 100644 --- a/tools/qt-builder/README.md +++ b/tools/qt-builder/README.md @@ -1,61 +1,59 @@ # General This document describes the process to build Qt 5.15.2. -Note that there are several patches. -* The first (to qfloat16.h) is needed to compile QT 5.12.3 on Visual Studio 2017 due to a bug in Visual Studio (*bitset* will not compile. Note that there is a change in CMakeLists.txt to support this. -* The second patch is to OpenSL ES audio and allow audio echo cancelllation on Android. -* The third is a patch which fixes video playback on WebEngineViews on mac. See https://bugreports.qt.io/browse/QTBUG-70967 + +Reference: https://doc.qt.io/qt-5/build-sources.html + +Note that there are patches. +* *win-qtwebengine.diff* fixes building with Visual Studio 2019 16.8.0. See https://bugreports.qt.io/browse/QTBUG-88625. + ## Requirements + ### Windows -1. Visual Studio 2017 - If you don’t have Community or Professional edition of Visual Studio 2017, download [Visual Studio Community 2017](https://www.visualstudio.com/downloads/). +1. Visual Studio 2019 +If you don’t have Community or Professional edition of Visual Studio 2019, download [Visual Studio Community 2019](https://www.visualstudio.com/downloads/). Install with C++ support. - -1. python 2.7.16 -Check if needed running `python --version` - should return python 2.7.x -Install from https://www.python.org/ftp/python/2.7.16/python-2.7.16.amd64.msi -Add path to python executable to PATH. - -NOTE: REMOVE python 3 from PATH. Our regular build uses python 3. This will still work, because HIFI_PYTHON_EXEC points to the python 3 executable. - -Verify that python runs python 2.7 (run “python --version”) -1. git >= 1.6 -Check if needed `git --version` -Download from https://git-scm.com/download/win -Verify by entering `git --version` -1. perl >= 5.14 -Install from Strawberry Perl - http://strawberryperl.com/ - 5.28.1.1 64 bit to C:\Strawberry\ -Verify by running `perl --version` -1. flex and bison -Download from https://sourceforge.net/projects/winflexbison/files/latest/download -Uncompress in C:\flex_bison -Rename win-bison.exe to bison.exe and win-flex.exe to flex.exe -Add C:\flex_bison to PATH -Verify by running `flex --version` -Verify by running `bison --version` -1. gperf -Install from http://gnuwin32.sourceforge.net/downlinks/gperf.php -Add C:\Program Files (x86)\GnuWin32\bin to PATH -Verify by running `gperf --version` -1. 7-zip -Download from https://www.7-zip.org/download.html -1. Bash shell -From *Settings* select *Update & Security* -Select *For Developers* -Enable *Developer mode* -Restart PC -Open Control Panel and select *Programs and Features* -Select *Turn Windows features on or off* -Check *Windows Subsystem for Linux* -Click *Restart now* -Download from the Microsoft Store - Search for *bash* and choose the latest Ubuntu version -[First run will take a few minutes] -Enter a user name - all small letters (this is used for *sudo* commands) +1. python 2.7.x >= 2.7.16 +Download MSI installer from https://www.python.org/ and add directory of the python executable to PATH. +NOTE: REMOVE python 3 from PATH. (Regular Vircadia builds use python 3, however these will still work because +the make files automatically handle this.) +Verify by running `python.exe --version` +1. git >= 1.6 +Download from https://git-scm.com/download/win +Verify by running `git --version` +1. perl >= 5.14 +Install from Strawberry Perl - http://strawberryperl.com/ - 5.28.1.1 64 bit to C:\Strawberry\ +Verify by running `perl --version` +1. flex and bison +These are provided as part of the Qt repository in the gnuwin32/bin folder, which is prepended to the command prompt PATH when +`tq5vars.bat` is run (see below). +Alternatively, you can download it from https://sourceforge.net/projects/winflexbison/files/latest/download and... +: Uncompress in C:\flex_bison +: Rename win-bison.exe to bison.exe and win-flex.exe to flex.exe +: Add C:\flex_bison to PATH +Verify by running `flex --version` +Verify by running `bison --version` +1. gperf +This is provided as part of the Qt repository in the gnuwin32/bin folder, which is prepended to the command prompt PATH when +`tq5vars.bat` is run (see below). +alternatively, you can install from http://gnuwin32.sourceforge.net/downlinks/gperf.php and... +: Add C:\Program Files (x86)\GnuWin32\bin to PATH +Verify by running `gperf --version` +1. 7-zip +Download from https://www.7-zip.org/download.html and install. +1. Bash shell +Open Control Panel and select *Programs and Features* +Select *Turn Windows features on or off* +Check *Windows Subsystem for Linux* +Click *Restart now* +Download from the Microsoft Store - Search for *bash* and choose the latest Ubuntu version +[First run will take a few minutes] +Enter a user name - all small letters (this is used for *sudo* commands) Choose a password -1. Jom -jom is a clone of nmake to support the execution of multiple independent commands in parallel. +1. Jom +jom is a clone of nmake to support the execution of multiple independent commands in parallel. https://wiki.qt.io/Jom - +Install in C:\Jom and add directory to PATH. ### Linux 1. qt5 requirements @@ -87,66 +85,124 @@ Make sure that python 2.7.x is the system standard by checking if `python --vers Qt also provides a dependency list for some major Linux distributions here: https://wiki.qt.io/Building_Qt_5_from_Git#Linux.2FX11 ### Mac -1. git >= 1.6 -Check if needed `git --version` -Install from https://git-scm.com/download/mac -Verify again -1. pkg-config -brew fontconfig dbus-glib stall pkg-config -1. dbus-1 -brew install dbus-glib +1. git >= 1.6 +Check if needed `git --version` +Install from https://git-scm.com/download/mac +Verify again +1. install pkg-config, dbug-glib, and fontconfig +brew install fontconfig dbus-glib pkg-config + + ## Build Process + + ### General -qt is cloned to the qt5 folder. -The build is performed in the qt5-build folder. -Build products are installed to the qt5-install folder. -Before running configure, make sure that the qt5-build folder is empty. +Qt is cloned to a qt5 folder. +The build is performed in a qt5/qt5-build folder. +Build products are installed to the qt5/qt5-install folder. +Before running configure, make sure that the qt5-build folder is empty. + -**Only run the git patches once!!!** ### Windows -Before building, verify that **HIFI_VCPKG_BASE_VERSION** points to a *vcpkg* folder containing *packages\openssl-windows_x64-windows*. -If not, follow https://github.com/highfidelity/vcpkg to install *vcpkg* and then *openssl*. -Also, make sure the directory that you are using to build qt is not deeply nested. It is quite possible to run into the windows MAX_PATH limit when building chromium. For example: `c:\msys64\home\ajt\code\hifi\tools\qt-builder\qt5-build` is too long. `c:\q\qt5-build\` is a better choice. +Make sure that the directory you are using to build Qt is not deeply nested. It is quite possible to run into the windows MAX_PATH limit when building chromium. For example: `c:\msys64\home\ajt\code\hifi\tools\qt-builder\qt5-build` is too long. `c:\q\qt5-build\` is a better choice. + +#### Preparing OpenSSL + +Do one of the following to provide OpenSSL for building against: +a. If you have installed a local copy of Qt 5.15.2 and have built Vircadia against that, including OpenSSL, find the +**HIFI_VCPKG_BASE** subdirectory used in your build and make an environment variable **HIFI_VCPKG_BASE_DIR** point to the +*installed\x64-windows* folder. +a. Follow https://github.com/vircadia/vcpkg to install *vcpkg* and then *openssl*. +Then make an environment variable **HIFI_VCPKG_BASE_DIR** point to the *packages\openssl-windows_x64-windows* vcpkg folder. + #### Preparing source files -`git clone --recursive https://code.qt.io/qt/qt5.git -b 5.12.3 --single-branch` - -* Copy the **patches** folder to qt5 -* Copy the **qt5vars.bat** file to qt5 -* Apply the patches to Qt +Get the source: +`git clone --recursive https://code.qt.io/qt/qt5.git -b 5.15.2 --single-branch` -`cd qt5` -`git apply --ignore-space-change --ignore-whitespace patches/qfloat16.patch` -`git apply --ignore-space-change --ignore-whitespace patches/aec.patch` -`git apply --ignore-space-change --ignore-whitespace patches/qtscript-crash-fix.patch` -`cd ..` -#### Configuring -`mkdir qt5-install` -`mkdir qt5-build` -`cd qt5-build` +Apply patches: +* Copy the **patches** folder to qt5 +* Apply the patches to Qt +`cd qt5` +`git apply --ignore-space-change --ignore-whitespace patches/win-qtwebengine.diff` +`cd ..` -run `..\qt5\qt5vars.bat` -`cd ..\..\qt5-build` +Set up configuration batch file: +* Copy the **qt5vars.bat** file to qt5. +* Edit the **qt5vars.bat** file per the instructions in it. + +#### Configuring + +Do the following in a Visual Studio 2019 Command Prompt window. + +Set up the build directories: +`cd qt5` +`mkdir qt5-build` +`mkdir qt5-install` +`cd qt5-build` + +Set up the environment variables: +`..\qt5vars` + +Note: If you need to rebuild, wipe the *qt5-build* and *qt5-install* directories and re-run `qt5vars`. + +Configure the Qt build: + +`..\configure -force-debug-info -opensource -confirm-license -opengl desktop -platform win32-msvc -openssl-linked -I %HIFI_VCPKG_BASE_DIR%\include -L %HIFI_VCPKG_BASE_DIR%\lib OPENSSL_LIBS="-llibcrypto -llibssl" -nomake examples -nomake tests -skip qttranslations -skip qtserialport -skip qt3d -skip qtlocation -skip qtwayland -skip qtsensors -skip qtgamepad -skip qtcharts -skip qtx11extras -skip qtmacextras -skip qtvirtualkeyboard -skip qtpurchasing -skip qtdatavis3d -no-warnings-are-errors -no-pch -prefix ..\qt5-install` + +Copy the files *zlib1.dll* and *zlib.pdb* from the %HIFI_VCPKG_BASE_DIR%\bin directory to *qt5-build\qtbase\bin* (which is on +the PATH used by the `jom` command). +FIXME: Why aren't these zlib files automatically provided / found for use by rcc.exe? -`..\qt5\configure -force-debug-info -opensource -confirm-license -opengl desktop -platform win32-msvc -openssl-linked OPENSSL_LIBS="-lssleay32 -llibeay32" -I %HIFI_VCPKG_BASE_VERSION%\packages\openssl-windows_x64-windows\include -L %HIFI_VCPKG_BASE_VERSION%\packages\openssl-windows_x64-windows\lib -nomake examples -nomake tests -skip qttranslations -skip qtserialport -skip qt3d -skip qtlocation -skip qtwayland -skip qtsensors -skip qtgamepad -skip qtspeech -skip qtcharts -skip qtx11extras -skip qtmacextras -skip qtvirtualkeyboard -skip qtpurchasing -skip qtdatavis3d -no-warnings-are-errors -no-pch -prefix ..\qt5-install` #### Make -`jom` -`jom install` + +Build Qt: +`jom` +`jom install` + #### Fixing -The *.prl* files have an absolute path that needs to be removed (see http://www.linuxfromscratch.org/blfs/view/stable-systemd/x/qtwebengine.html) -1. Open a bash terminal -1. `cd` to the *qt5-install* folder (e.g. `cd /mnt/d/qt5-install/`) -1. Run the following command -`find . -name \*.prl -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \;` -1. Copy *qt.conf* to *qt5-install\bin* + +The *.prl* files have an absolute path that needs to be removed (see http://www.linuxfromscratch.org/blfs/view/stable-systemd/x/qtwebengine.html) +1. `cd` to the *qt5-install* folder. +1. Open a bash terminal. (Run `bash` in command prompt.) +1. Run the following command: +`find . -name \*.prl -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \;` + +Add a *qt.conf* file. +1. Copy the file *qt5-build\qtbase\bin\qt.conf* to *qt5-install\bin*. +1. Edit the *qt.conf* file: replace all absolute URLs with relative URLs. + +Copy the files *zlib1.dll* and *zlib.pdb* from *qt5-build\qtbase\bin* to *qt5-install\bin*. +FIXME: Why aren't these zlib files automatically included? + + #### Uploading -Create a tar file called qt5-install-5.12.3-windows.tar.gz from the qt5-install folder. -Upload qt5-install-5.12.3-windows.tar.gz to our Amazon S3 vircadia-public bucket, under the dependencies/vckpg directory. -Update hifi_vcpkg.py to use this new URL. Additionally, you should make a small change to any file in the hifi/cmake/ports directory to force the re-download of the qt-install.tar.gz during the build process for hifi. + +Create a Gzip tar file called qt5-install-5.15.2-windows.tar.gz from the qt5-install folder. + +Using 7-Zip: +* `cd` to the *qt5* folder. +* `7z a -ttar qt5-install-5.15.2-windows.tar qt5-install` +* `7z a -tgzip qt5-install-5.15.2-windows.tar.gz qt5-install-5.15.2-windows.tar` + +Upload qt5-install-5.15.2-windows.tar.gz to the Amazon S3 vircadia-public bucket, under the dependencies/vckpg directory. +Update hifi_vcpkg.py to use this new URL. Additionally, you should make a small change to any file in the vircadia/cmake/ports +directory to force the re-download of the qt-install.tar.gz during the build process for Vircadia. + #### Preparing Symbols -Run `python3 prepare-windows-symbols-for-backtrace.py qt5-install` to scan the qt5-install directory for any dlls and pdbs. After running this command the backtrace directory will be created. Zip this directory up, but make sure that all dlls and pdbs are in the root of the zip file, not under a sub-directory. This file can then be uploaded to backtrace here: https://highfidelity.sp.backtrace.io/p/Interface/settings/symbol/upload + +Using Python 3, Run the following command in the *qt5* folder, substituting in paths as required. The +*prepare-windows-symbols-for-backtrace.py* file is in the Vircadia repository's *tools\qt-builder* folder. +`python prepare-windows-symbols-for-backtrace.py qt5-install` + +This scans the qt5-install directory for dlls and pdbs, and copies them to a *backtrace* directory. +Check that all dlls and pdbs are in the root of the directory. + +Zip up this directory and upload it to Backtrace or other crash log handlng tool. ### Linux +**TODO: Update this section for Qt 5.15.2** + #### Preparing source files ```bash git clone --recursive git://code.qt.io/qt/qt5.git -b 5.15.2 --single-branch @@ -222,7 +278,7 @@ find . -name \*.prl -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \; ``` 1. Copy *qt.conf* to *qt5-install\bin* -#### Uploading +#### Uploading 1. Tar and xz qt5-install to create the package. Replace `ubuntu-18.04` with the relevant system and `amd64` with the relevant architecture. ```bash tar -Jcvf qt5-install-5.15.2-ubuntu-18.04-amd64.tar.xz qt5-install @@ -230,36 +286,42 @@ tar -Jcvf qt5-install-5.15.2-ubuntu-18.04-amd64.tar.xz qt5-install 1. Upload qt5-install-5.15.2-ubuntu-18.04-amd64.tar.xz to https://athena-public.s3.amazonaws.com/dependencies/vcpkg/ -### Mac -#### Preparing source files -git clone --recursive git://code.qt.io/qt/qt5.git -b 5.12.3 --single-branch - -* Copy the **patches** folder to qt5 -* Apply the patches to Qt -`cd qt5` -`git apply --ignore-space-change --ignore-whitespace patches/aec.patch` -`git apply --ignore-space-change --ignore-whitespace patches/qtscript-crash-fix.patch` -`git apply --ignore-space-change --ignore-whitespace patches/mac-web-video.patch` -`cd ..` -#### Configuring -`mkdir qt5-install` -`mkdir qt5-build` -`cd ../qt5-build` -`../qt5/configure -force-debug-info -opensource -confirm-license -qt-zlib -qt-libjpeg -qt-libpng -qt-freetype -qt-pcre -qt-harfbuzz -nomake examples -nomake tests -skip qttranslations -skip qtserialport -skip qt3d -skip qtlocation -skip qtwayland -skip qtsensors -skip qtgamepad -skip qtspeech -skip qtcharts -skip qtx11extras -skip qtmacextras -skip qtvirtualkeyboard -skip qtpurchasing -skip qtdatavis3d -no-warnings-are-errors -no-pch -prefix ../qt5-install` +### Mac + +#### Preparing source files +git clone --recursive git://code.qt.io/qt/qt5.git -b 5.15.2 --single-branch + +* If you are compiling with MacOSX11.1.SDK or greater, edit qt5/qtwebengine/src/3rdparty/chromium/build/mac/find_sdk.py line 91 and replace "MacOSX(10" with "MacOSX(11". + +#### Configuring +`mkdir qt5-install` +`mkdir qt5-build` +`cd ../qt5-build` + +`../configure -force-debug-info -opensource -confirm-license -qt-zlib -qt-libjpeg -qt-libpng -qt-freetype -qt-pcre -qt-harfbuzz -nomake examples -nomake tests -skip qttranslations -skip qtserialport -skip qt3d -skip qtlocation -skip qtwayland -skip qtsensors -skip qtgamepad -skip qtcharts -skip qtx11extras -skip qtmacextras -skip qtvirtualkeyboard -skip qtpurchasing -skip qtdatavis3d -no-warnings-are-errors -no-pch -prefix ../qt5-install` + #### Make -`make` -`make install` +`make` +`make install` + #### Fixing -1. The *.prl* files have an absolute path that needs to be removed (see http://www.linuxfromscratch.org/blfs/view/stable-systemd/x/qtwebengine.html) -`cd ../qt5-install` -`find . -name \*.prl -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \;` -`cd ..` -1. Copy *qt.conf* to *qt5-install\bin* +1. The *.prl* files have an absolute path that needs to be removed (see http://www.linuxfromscratch.org/blfs/view/stable-systemd/x/qtwebengine.html) +`cd` to the `qt5-install directory` +`find . -name \*.prl -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \;` +`cd ..` +1. Note: you may have additional files in qt5-install/lib and qt5-install/lib/pkg/pkgconfig that have your local build absolute path included. Optionally you can fix these as well, but it will not effect the build if left alone. + +Add a *qt.conf* file. +1. Copy the file *qt5-build\qtbase\bin\qt.conf* to *qt5-install\bin* +1. Edit the *qt.conf* file: replace all absolute URLs with relative URLs (beginning with .. or .) + #### Uploading -`tar -zcvf qt5-install-5.13.2-macos.tar.gz qt5-install` -Upload qt5-install-5.13.2-macos.tar.gz to our Amazon S3 vircadia-public bucket, under the dependencies/vckpg directory -#### Creating symbols -Run `python3 prepare-mac-symbols-for-backtrace.py qt5-install` to scan the qt5-build directory for any dylibs and execute dsymutil to create dSYM bundles. After running this command the backtrace directory will be created. Zip this directory up, but make sure that all dylibs and dSYM fiels are in the root of the zip file, not under a sub-directory. This file can then be uploaded to backtrace here: https://highfidelity.sp.backtrace.io/p/Interface/settings/symbol/upload +`tar -zcvf qt5-install-5.15.2-macos.tar.gz qt5-install` +Upload qt5-install-5.15.2-macos.tar.gz to our Amazon S3 vircadia-public bucket, under the dependencies/vckpg directory + +#### Creating symbols (optional) +Run `python3 prepare-mac-symbols-for-backtrace.py qt5-install` to scan the qt5-build directory for any dylibs and execute dsymutil to create dSYM bundles. After running this command the backtrace directory will be created. Zip this directory up, but make sure that all dylibs and dSYM fiels are in the root of the zip file, not under a sub-directory. This file can then be uploaded to backtrace or other crash log handling tool. + ## Problems *configure* errors, if any, may be viewed in **config.log** and **config.summary** From 653f631a5367484a58ad71dcec0528879aca636e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20Gro=C3=9F?= Date: Sun, 28 Feb 2021 08:10:03 +0100 Subject: [PATCH 6/7] Add new webengine dependencies --- .github/workflows/master_build.yml | 2 +- .github/workflows/pr_build.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/master_build.yml b/.github/workflows/master_build.yml index ee6ef88d0e..0b9e8f9604 100644 --- a/.github/workflows/master_build.yml +++ b/.github/workflows/master_build.yml @@ -35,7 +35,7 @@ jobs: include: - os: ubuntu-18.04 build_type: full - apt-dependencies: mesa-common-dev libegl1 libglvnd-dev libdouble-conversion1 libpulse0 + apt-dependencies: mesa-common-dev libegl1 libglvnd-dev libdouble-conversion1 libpulse0 libsnappy1v5 libwebpdemux2 libwebpmux3 fail-fast: false runs-on: ${{matrix.os}} steps: diff --git a/.github/workflows/pr_build.yml b/.github/workflows/pr_build.yml index 9d6984b5b2..002eef7122 100644 --- a/.github/workflows/pr_build.yml +++ b/.github/workflows/pr_build.yml @@ -38,7 +38,7 @@ jobs: build_type: full - os: ubuntu-18.04 build_type: full - apt-dependencies: mesa-common-dev libegl1 libglvnd-dev libdouble-conversion1 libpulse0 + apt-dependencies: mesa-common-dev libegl1 libglvnd-dev libdouble-conversion1 libpulse0 libsnappy1v5 libwebpdemux2 libwebpmux3 - os: ubuntu-18.04 build_type: android apt-dependencies: mesa-common-dev libegl1 libglvnd-dev libdouble-conversion1 libpulse0 From 1977d4e47af0705ce79674a5951d83fca75afe55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20Gro=C3=9F?= Date: Mon, 1 Mar 2021 03:55:19 +0100 Subject: [PATCH 7/7] Apply suggestions from code review --- tools/qt-builder/README.md | 36 ++++++----------- tools/qt-builder/patches/aec.patch | 40 ------------------- .../patches/qtscript-crash-fix.patch | 16 -------- 3 files changed, 13 insertions(+), 79 deletions(-) delete mode 100644 tools/qt-builder/patches/aec.patch delete mode 100644 tools/qt-builder/patches/qtscript-crash-fix.patch diff --git a/tools/qt-builder/README.md b/tools/qt-builder/README.md index be07647e99..6b12580cb4 100644 --- a/tools/qt-builder/README.md +++ b/tools/qt-builder/README.md @@ -65,16 +65,16 @@ sudo apt upgrade sudo apt build-dep qt5-default ``` -1. git >= 1.6 -1. python 2.7.x -1. gperf -1. bison and flex -1. pkg-config (needed for qtwebengine) -1. OpenGL -1. make -1. g++ -1. dbus-1 (needed for qtwebengine) -1. nss (needed for qtwebengine) +2. git >= 1.6 +3. python 2.7.x +4. gperf +5. bison and flex +6. pkg-config (needed for qtwebengine) +7. OpenGL +8. make +9. g++ +10. dbus-1 (needed for qtwebengine) +11. nss (needed for qtwebengine) On Ubuntu based systems you can install all these dependencies with: ```bash @@ -201,21 +201,11 @@ Zip up this directory and upload it to Backtrace or other crash log handlng tool ### Linux -**TODO: Update this section for Qt 5.15.2** - #### Preparing source files ```bash git clone --recursive git://code.qt.io/qt/qt5.git -b 5.15.2 --single-branch ``` -As of qt version 5.15.0, no patches are needed anymore. -~~* Copy the **patches** folder to qt5~~ -~~* Apply patches to Qt~~ -~~`cd qt5`~~ -~~`git apply --ignore-space-change --ignore-whitespace patches/aec.patch`~~ -~~`git apply --ignore-space-change --ignore-whitespace patches/qtscript-crash-fix.patch`~~ -~~`cd ..`~~ - #### Configuring ```bash mkdir qt5-install @@ -237,7 +227,7 @@ aarch64: You can accelerate the build process by installing some of the optional system dependencies. #### Make -Replace `4` with the number of threads you want to use. Keep in mind that the QT build process uses a lot of memory. It is recommended to have at least 1,2 GiB per thread. +Replace `4` with the number of threads you want to use. Keep in mind that the Qt build process uses a lot of memory. It is recommended to have at least 1.2 GiB per thread. ```bash NINJAFLAGS='-j4' make -j4 ``` @@ -276,14 +266,14 @@ If one of the make commands fails, running it a second time sometimes clears the cd ../qt5-install find . -name \*.prl -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \; ``` -1. Copy *qt.conf* to *qt5-install\bin* +2. Copy *qt.conf* to *qt5-install\bin* #### Uploading 1. Tar and xz qt5-install to create the package. Replace `ubuntu-18.04` with the relevant system and `amd64` with the relevant architecture. ```bash tar -Jcvf qt5-install-5.15.2-ubuntu-18.04-amd64.tar.xz qt5-install ``` -1. Upload qt5-install-5.15.2-ubuntu-18.04-amd64.tar.xz to https://athena-public.s3.amazonaws.com/dependencies/vcpkg/ +2. Upload qt5-install-5.15.2-ubuntu-18.04-amd64.tar.xz to https://athena-public.s3.amazonaws.com/dependencies/vcpkg/ diff --git a/tools/qt-builder/patches/aec.patch b/tools/qt-builder/patches/aec.patch deleted file mode 100644 index be159d857a..0000000000 --- a/tools/qt-builder/patches/aec.patch +++ /dev/null @@ -1,40 +0,0 @@ -diff --git a/qtmultimedia/src/plugins/opensles/qopenslesaudioinput.cpp b/qtmultimedia/src/plugins/opensles/qopenslesaudioinput.cpp -index ad87cb0..54ed18a 100644 ---- a/qtmultimedia/src/plugins/opensles/qopenslesaudioinput.cpp -+++ b/qtmultimedia/src/plugins/opensles/qopenslesaudioinput.cpp -@@ -117,6 +117,8 @@ QOpenSLESAudioInput::QOpenSLESAudioInput(const QByteArray &device) - m_recorderPreset = SL_ANDROID_RECORDING_PRESET_CAMCORDER; - else if (qstrcmp(device, QT_ANDROID_PRESET_VOICE_RECOGNITION) == 0) - m_recorderPreset = SL_ANDROID_RECORDING_PRESET_VOICE_RECOGNITION; -+ else if (qstrcmp(device, QT_ANDROID_PRESET_VOICE_COMMUNICATION) == 0) -+ m_recorderPreset = SL_ANDROID_RECORDING_PRESET_VOICE_COMMUNICATION; - else - m_recorderPreset = SL_ANDROID_RECORDING_PRESET_GENERIC; - #endif -diff --git a/qtmultimedia/src/plugins/opensles/qopenslesaudioinput.h b/qtmultimedia/src/plugins/opensles/qopenslesaudioinput.h -index ad84db0..35cc379 100644 ---- a/qtmultimedia/src/plugins/opensles/qopenslesaudioinput.h -+++ b/qtmultimedia/src/plugins/opensles/qopenslesaudioinput.h -@@ -50,6 +50,7 @@ - #define QT_ANDROID_PRESET_MIC "mic" - #define QT_ANDROID_PRESET_CAMCORDER "camcorder" - #define QT_ANDROID_PRESET_VOICE_RECOGNITION "voicerecognition" -+#define QT_ANDROID_PRESET_VOICE_COMMUNICATION "voicecommunication" - - #endif - -diff --git a/qtmultimedia/src/plugins/opensles/qopenslesengine.cpp b/qtmultimedia/src/plugins/opensles/qopenslesengine.cpp -index 1a16cc2..2577fb3 100644 ---- a/qtmultimedia/src/plugins/opensles/qopenslesengine.cpp -+++ b/qtmultimedia/src/plugins/opensles/qopenslesengine.cpp -@@ -114,7 +114,8 @@ QList QOpenSLESEngine::availableDevices(QAudio::Mode mode) const - #ifdef ANDROID - devices << QT_ANDROID_PRESET_MIC - << QT_ANDROID_PRESET_CAMCORDER -- << QT_ANDROID_PRESET_VOICE_RECOGNITION; -+ << QT_ANDROID_PRESET_VOICE_RECOGNITION -+ << QT_ANDROID_PRESET_VOICE_COMMUNICATION; - #else - devices << "default"; - #endif - \ No newline at end of file diff --git a/tools/qt-builder/patches/qtscript-crash-fix.patch b/tools/qt-builder/patches/qtscript-crash-fix.patch deleted file mode 100644 index 0a659fe9e3..0000000000 --- a/tools/qt-builder/patches/qtscript-crash-fix.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/qtscript/src/script/api/qscriptengine.cpp b/qtscript/src/script/api/qscriptengine.cpp -index c5f437b..942833e 100644 ---- a/qtscript/src/script/api/qscriptengine.cpp -+++ b/qtscript/src/script/api/qscriptengine.cpp -@@ -1332,8 +1332,10 @@ void QScriptEnginePrivate::collectGarbage() - - void QScriptEnginePrivate::reportAdditionalMemoryCost(int size) - { -- if (size > 0) -+ if (size > 0) { -+ QScript::APIShim shim(this); - globalData->heap.reportExtraMemoryCost(size); -+ } - } - - QScript::TimeoutCheckerProxy *QScriptEnginePrivate::timeoutChecker() const