qt-build-tools/README.md

35 lines
1.8 KiB
Markdown
Raw Normal View History

2021-08-27 16:27:55 +08:00
# Qt build tools and patches
2021-09-26 04:16:39 +08:00
This is a set of build tools and required patches to build Qt yourself and distribute it along with your app on macOS and Windows.
### macOS
2021-08-27 16:27:55 +08:00
For macOS we currently distribute two binaries:
2024-11-19 21:10:57 +08:00
- Modern, compiled with [Qt 5.15.16](5.15.16) for macOS 10.13+. The folder contains several macOS-related patches.
2021-08-27 16:27:55 +08:00
2023-11-02 06:30:54 +08:00
- Legacy, compiled with [Qt 5.6.3](5.6.3) for macOS 10.7-10.12. The folder contains several macOS-related patches ([QTBUG-40583](https://bugreports.qt.io/browse/QTBUG-40583), [QTBUG-18624](https://bugreports.qt.io/browse/QTBUG-18624), [QTBUG-52536](https://bugreports.qt.io/browse/QTBUG-52536), [QTBUG-63451](https://bugreports.qt.io/browse/QTBUG-63451) ) already applied in order to be compiled and used normally. To compile Qt 5.6.3 we use macOS 10.13 and XCode 8.
2021-08-27 16:27:55 +08:00
2024-02-06 19:12:59 +08:00
To apply patches and compile Qt the same as we do, simply copy the contents of the folder ([Qt 5.15.16](5.15.16) or [Qt 5.6.3](5.6.3)) to the official Qt source tree (overwriting existing files of cause).
2022-02-02 22:40:41 +08:00
2022-04-26 17:57:21 +08:00
Compiling your app with both modern and legacy Qt can be done on modern macOS with [XCode](https://apps.apple.com/us/app/xcode/id497799835?mt=12).
2022-04-26 17:56:03 +08:00
When compiling a project with Qt 5.6.3 on arm64 host machine some additional steps are required in your .pro file:
```bash
# compiler flags:
QMAKE_CXXFLAGS += "-arch x86_64"
QMAKE_CFLAGS += "-arch x86_64"
QMAKE_LFLAGS += "-arch x86_64"
# linker flags, required to support 10.7, otherwise minimum deployment target is 10.9
QMAKE_LFLAGS += "-stdlib=libc++"
```
2021-08-27 16:27:55 +08:00
2021-09-26 04:16:39 +08:00
### Windows
2021-08-27 16:27:55 +08:00
2024-08-06 23:51:52 +08:00
On Windows you need [VS2022 Community Edition](https://visualstudio.microsoft.com/downloads/) and [Perl](https://strawberryperl.com/). QtNetwork module is compiled using openssl-3.0.13 which is pre-compiled but once you delete the folder, it will be compiled again.
2024-04-03 17:40:58 +08:00
### Qt 6
2024-08-06 23:52:31 +08:00
We currently have a build script only for Windows (VS2022).