From 133c8f097a2968be06d9937e6a9d05618b2793a4 Mon Sep 17 00:00:00 2001 From: Rasmus Karlsson Date: Sun, 17 Nov 2024 11:49:53 +0100 Subject: [PATCH 1/4] dev: Default building with Qt6 on all platforms --- CMakeLists.txt | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c3f57d474b9..da5eeed647a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,11 +21,7 @@ option(BUILD_WITH_QTKEYCHAIN "Build Chatterino with support for your system key option(USE_SYSTEM_MINIAUDIO "Build Chatterino with your system miniaudio" OFF) option(BUILD_WITH_CRASHPAD "Build chatterino with crashpad" OFF) option(USE_PRECOMPILED_HEADERS "Use precompiled headers" ON) -if(WIN32) - option(BUILD_WITH_QT6 "Build with Qt6, default on for Windows" On) -else() - option(BUILD_WITH_QT6 "Use Qt6 instead of default Qt5" OFF) -endif() +option(BUILD_WITH_QT6 "Build with Qt6" On) option(CHATTERINO_GENERATE_COVERAGE "Generate coverage files" OFF) # We don't use translations, and we don't want qtkeychain to build translations option(BUILD_TRANSLATIONS "" OFF) From 19ae10cd8c80a152874595ec1b436056da83c6f5 Mon Sep 17 00:00:00 2001 From: Rasmus Karlsson Date: Sun, 17 Nov 2024 12:01:18 +0100 Subject: [PATCH 2/4] Add changelog entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ea1939fbb25..9b3d80fd5f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -73,6 +73,7 @@ - Bugfix: Fixed incorrect messages getting replaced visually. (#5683) - Bugfix: Fixed rendering of multi-line selection that starts at a trailing space. (#5691) - Bugfix: Fixed pause indicator not appearing in certain cases. (#5707) +- Dev: Default build with Qt6 on all platforms. (#5716) - Dev: Update Windows build from Qt 6.5.0 to Qt 6.7.1. (#5420) - Dev: Update vcpkg build Qt from 6.5.0 to 6.7.0, boost from 1.83.0 to 1.85.0, openssl from 3.1.3 to 3.3.0. (#5422) - Dev: Unsingletonize `ISoundController`. (#5462) From 2c592f940eaff0ea63249609d9529397dbb05100 Mon Sep 17 00:00:00 2001 From: Rasmus Karlsson Date: Sun, 17 Nov 2024 12:04:43 +0100 Subject: [PATCH 3/4] clean up CI builds & their BUILD_WITH_QT6 directives --- .CI/full-ubuntu-build.sh | 1 - .CI/setup-clang-tidy.sh | 1 - .cirrus.yml | 1 - .docker/Dockerfile-ubuntu-22.04-qt6-build | 2 -- .github/workflows/build.yml | 2 -- .github/workflows/test.yml | 2 -- 6 files changed, 9 deletions(-) diff --git a/.CI/full-ubuntu-build.sh b/.CI/full-ubuntu-build.sh index 5c2e9f801b3..114c3ffda62 100755 --- a/.CI/full-ubuntu-build.sh +++ b/.CI/full-ubuntu-build.sh @@ -29,7 +29,6 @@ cmake \ -DCMAKE_EXPORT_COMPILE_COMMANDS=On \ -DCHATTERINO_PLUGINS="$C2_PLUGINS" \ -DCMAKE_PREFIX_PATH="$Qt6_DIR/lib/cmake" \ - -DBUILD_WITH_QT6="$C2_BUILD_WITH_QT6" \ -DCHATTERINO_STATIC_QT_BUILD=On \ -DCMAKE_CXX_FLAGS="-fno-sized-deallocation" \ . diff --git a/.CI/setup-clang-tidy.sh b/.CI/setup-clang-tidy.sh index 4884285eb8e..0a9df6cf596 100755 --- a/.CI/setup-clang-tidy.sh +++ b/.CI/setup-clang-tidy.sh @@ -19,7 +19,6 @@ cmake -S. -Bbuild-clang-tidy \ -DCMAKE_EXPORT_COMPILE_COMMANDS=On \ -DCHATTERINO_LTO=Off \ -DCHATTERINO_PLUGINS=On \ - -DBUILD_WITH_QT6=On \ -DBUILD_TESTS=On \ -DBUILD_BENCHMARKS=On diff --git a/.cirrus.yml b/.cirrus.yml index d4ac409cd92..1183ff7129f 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -20,7 +20,6 @@ task: -DUSE_SYSTEM_QTKEYCHAIN="ON" \ -DCMAKE_BUILD_TYPE="release" \ -DCMAKE_EXPORT_COMPILE_COMMANDS="ON" \ - -DBUILD_WITH_QT6="ON" \ .. cat compile_commands.json make -j $(getconf _NPROCESSORS_ONLN) diff --git a/.docker/Dockerfile-ubuntu-22.04-qt6-build b/.docker/Dockerfile-ubuntu-22.04-qt6-build index 3fd5b8a20b4..bee6f5ec925 100644 --- a/.docker/Dockerfile-ubuntu-22.04-qt6-build +++ b/.docker/Dockerfile-ubuntu-22.04-qt6-build @@ -3,7 +3,6 @@ ARG UBUNTU_VERSION=22.04 FROM ubuntu:$UBUNTU_VERSION ARG QT_VERSION=6.2.4 -ARG BUILD_WITH_QT6=ON ENV TZ=UTC RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone @@ -48,7 +47,6 @@ RUN mkdir /src/build # cmake RUN cd /src/build && \ CXXFLAGS=-fno-sized-deallocation cmake \ - -DBUILD_WITH_QT6=$BUILD_WITH_QT6 \ -DCMAKE_INSTALL_PREFIX=appdir/usr/ \ -DCMAKE_PREFIX_PATH=/opt/qt/$QT_VERSION/gcc_64/lib/cmake \ -DBUILD_WITH_QTKEYCHAIN=OFF \ diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d01e876176d..ef5900cae36 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -62,7 +62,6 @@ jobs: C2_ENABLE_LTO: ${{ matrix.force-lto }} C2_PLUGINS: ${{ matrix.plugins }} C2_ENABLE_CRASHPAD: ${{ matrix.skip-crashpad == false }} - C2_BUILD_WITH_QT6: ${{ startsWith(matrix.qt-version, '6.') }} steps: - uses: actions/checkout@v4 @@ -87,7 +86,6 @@ jobs: -DCHATTERINO_LTO="$C2_ENABLE_LTO" \ -DCHATTERINO_PLUGINS="$C2_PLUGINS" \ -DCMAKE_PREFIX_PATH="$Qt6_DIR/lib/cmake" \ - -DBUILD_WITH_QT6="$C2_BUILD_WITH_QT6" \ -DCHATTERINO_STATIC_QT_BUILD=On \ .. make -j"$(nproc)" diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d8bbe207e04..1ce616951ee 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -33,7 +33,6 @@ jobs: fail-fast: false env: C2_PLUGINS: ${{ matrix.plugins }} - C2_BUILD_WITH_QT6: ${{ startsWith(matrix.qt-version, '6.') }} steps: - uses: actions/checkout@v4 @@ -57,7 +56,6 @@ jobs: -DBUILD_APP=OFF \ -DCHATTERINO_PLUGINS="$C2_PLUGINS" \ -DCMAKE_PREFIX_PATH="$Qt6_DIR/lib/cmake" \ - -DBUILD_WITH_QT6="$C2_BUILD_WITH_QT6" \ -DCHATTERINO_STATIC_QT_BUILD=On \ -DCHATTERINO_GENERATE_COVERAGE=On \ -DCMAKE_BUILD_TYPE=Debug \ From d166c6c8e7a5fbcad6c0e8a7cd4c26dd054d83b3 Mon Sep 17 00:00:00 2001 From: Rasmus Karlsson Date: Sun, 17 Nov 2024 12:05:54 +0100 Subject: [PATCH 4/4] Update docs to reflect new default --- BUILDING_ON_FREEBSD.md | 2 +- BUILDING_ON_LINUX.md | 2 +- BUILDING_ON_MAC.md | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/BUILDING_ON_FREEBSD.md b/BUILDING_ON_FREEBSD.md index 38b603a2c5c..a681dcb9500 100644 --- a/BUILDING_ON_FREEBSD.md +++ b/BUILDING_ON_FREEBSD.md @@ -17,7 +17,7 @@ FreeBSD 15.0-SNAP. ``` 1. Generate build files. To enable Lua plugins in your build add `-DCHATTERINO_PLUGINS=ON` to this command. ```sh - cmake -DBUILD_WITH_QT6=ON .. + cmake .. ``` 1. Build the project ```sh diff --git a/BUILDING_ON_LINUX.md b/BUILDING_ON_LINUX.md index 51317ecd1ff..104a41e2baa 100644 --- a/BUILDING_ON_LINUX.md +++ b/BUILDING_ON_LINUX.md @@ -53,7 +53,7 @@ nix-shell -p openssl boost qt6.full pkg-config cmake ``` 1. Generate build files. To enable Lua plugins in your build add `-DCHATTERINO_PLUGINS=ON` to this command. ```sh - cmake -DBUILD_WITH_QT6=ON -DBUILD_WITH_QTKEYCHAIN=OFF .. + cmake -DBUILD_WITH_QTKEYCHAIN=OFF .. ``` 1. Build the project ```sh diff --git a/BUILDING_ON_MAC.md b/BUILDING_ON_MAC.md index d1fc018b90b..f7d31f2afab 100644 --- a/BUILDING_ON_MAC.md +++ b/BUILDING_ON_MAC.md @@ -10,7 +10,7 @@ Local dev machines for testing are available on Apple Silicon on macOS 13. 1. Install [Homebrew](https://brew.sh/#install) We use this for dependency management on macOS 1. Install all dependencies: - `brew install boost openssl@1.1 rapidjson cmake qt@5` + `brew install boost openssl@3 rapidjson cmake qt@6` ## Building @@ -21,7 +21,7 @@ Local dev machines for testing are available on Apple Silicon on macOS 13. 1. Create a build directory and go into it: `mkdir build && cd build` 1. Run CMake. To enable Lua plugins in your build add `-DCHATTERINO_PLUGINS=ON` to this command. - `cmake -DCMAKE_PREFIX_PATH=/opt/homebrew/opt/qt@5 -DOPENSSL_ROOT_DIR=/opt/homebrew/opt/openssl@1.1 ..` + `cmake -DCMAKE_PREFIX_PATH=/opt/homebrew/opt/qt@6 ..` 1. Build: `make`