How to build Qt 5.15.2 for Vortex Studio
- 1 Introduction
- 2 System requirements
- 3 Package downloads
- 4 Build Qt 5.15.2 for Windows
- 5 Build Qt 5.15.1 for Linux
- 6 Patches for Qt 5.15.2 used in Vortex Studio
- 6.1 Patch #1
- 6.2 Patch #2
- 6.3 Patch #3:
- 6.4 Patch #4:Â
- 6.5 Patch #5:
Introduction
Vortex Studio uses Qt's technologies for creating its multiple user interfaces. Several Qt pages show how to build Qt 5.15 with third parties (https://doc.qt.io/qt-5/build-sources.html)
In Vortex Studio, Qt 5.15.2 source is specifically linked with additional versions of Perl and XCB libraries (for Linux build) and built into binary libraries with specific Qt's configurations. Changes were made to fix some small issues found in this version of the source code. The changes are listed in the section Patches for Qt 5.15.2 used in Vortex Studio.
The following sections detail steps by steps on how to build Qt 5.15.2.
System requirements
VS2019 C++ compiler
Python 2.7
Package downloads
Qt 5.15.2 (qt-everywhere-src-5.15.2.zip)
Source code:Â https://download.qt.io/archive/qt/5.15/5.15.2/single/
Perl 5.32.0.1 for windows (strawberry-perl-5.32.0.1-64bit.msi)
Strawberry Perl 5.32.0.1 (2020-08-02):Â http://strawberryperl.com
Build Qt 5.15.2 for Windows
1) Run strawberry-perl-5.32.0.1-64bit.msi to install
2) Create a folder (e.g. c:\qt515_for_windows)
3) Unzip the content of Qt 5.15.2 package to a specified folder (e.g. c:\qt515_for_windows\qt5.15.2)
4) Apply patches listed in the section Patches for Qt 5.15.2 used in Vortex Studio.
5) Create a file named Makefile in the folder created in step #2 with this content
Makefile for building Qt5.15.2 for Windows
CURRENTDIR:=$(shell pwd)
makeit: qt515 ;
TOOLCHAIN:=x64_win32_vc14
export INCLUDE:=$(CURRENTDIR)\stage_qt5_$(TOOLCHAIN)\include;$(INCLUDE)
export LIB:=$(CURRENTDIR)\stage_qt5_$(TOOLCHAIN)\lib;$(LIB)
qt515:
(mkdir build_qt5_$(TOOLCHAIN) & cd build_qt5_$(TOOLCHAIN) && \
$(CURRENTDIR)\qt5.15.2\configure -debug-and-release -force-debug-info -recheck -shared -opensource -confirm-license -no-system-proxies -openssl -opengl desktop -skip qtwebengine -nomake tests -nomake examples -prefix $(CURRENTDIR)\stage_qt5_$(TOOLCHAIN))
.PHONY: qt515
7) Open the VS2015 x64Â Native Tools Command Prompt as an administrator.
Â
8)Â In the command prompt, run:
> make
Build Qt 5.15.1 for Linux
Linux still uses 5.15.1. Follow the download instruction but replace 5.15.2 for 5.15.1.
1) Make sure Perl is installed. Type the following to find out which version
   > perl -v
2) Create a folder (e.g. c:\qt515_for_windows)
3) Start a Terminal
4) Unzip the content of Qt5.15.1 package to a specified folder (e.g. c:\qt515_for_windows\qt5.15.1)
5) Apply patches listed in the section Patches for Qt 5.15.1 used in Vortex Studio.
6) Execute the following commands:
    > cd c:\qt515_for_windows\qt5.15.1
    > find ./ -type f -exec dos2unix {} \;
        > sudo su -
        > yum install libxcb libxcb-devel xcb-util xcb-util-devel libxkbcommon-devel libxkbcommon-x11-devel xcb-util-keysyms-devel xcb-util-wm-devel xcb-util-image-devel xcb-util-renderutil-devel mesa-libGL-devel
7) Create a file named Makefile in the folder created in step #2 with this content
Makefile for building Qt5.15.1 for Linux
CURRENTDIR:=$(shell pwd)
makeit: qt515 ;
TOOLCHAIN:=x64_rhel7_gcc73
export INCLUDE:=$(CURRENTDIR)/stage_qt5_$(TOOLCHAIN)/include;$(INCLUDE)
export LIB:=$(CURRENTDIR)/stage_qt5_$(TOOLCHAIN)/lib;$(LIB)
qt515:
(mkdir -p build_qt5_$(TOOLCHAIN) && cd build_qt5_$(TOOLCHAIN) && \
chmod +x $(CURRENTDIR)/qt5/configure && \
chmod +x $(CURRENTDIR)/qt5/qtbase/configure && \
$(CURRENTDIR)/qt5.15.1/configure -shared -opensource -confirm-license -xcb -xcb-xlib -bundled-xcb-xinput -no-system-proxies -openssl -opengl desktop -skip qtwebengine -nomake tests -nomake examples -prefix $(CURRENTDIR)/stage_qt5_$(TOOLCHAIN) && \
$(MAKE) && \
$(MAKE) install)
.PHONY: qt515
7) In the Terminal, run:
Patches for Qt 5.15.2 used in Vortex Studio
The following changes were made in the original Qt 5.15.2 source to fix some small issues found in the source.