Skip to content

Commit bfb0827

Browse files
zjefferguihkx
andcommitted
Remove Qt 5 support
As time goes by, it becomes more and more laborious to maintain two major Qt versions in parallel. We had many workarounds and missing features for the Qt 5 version, which had its last public release almost 4 years ago. Additionally, the system requirements for Qt 6 are not unreasonable, so the majority of people should be able to run it. So, for those reasons, we decided to remove Qt 5 support completely. Users that can't run the Qt 6 version for whatever reason, are free to either disable updates and stay on Notes 2.3.x, or manually build Notes off of the "qt5" branch. Co-authored-by: guihkx <[email protected]>
1 parent b824ab5 commit bfb0827

28 files changed

+68
-1432
lines changed

.github/workflows/linux.yml

Lines changed: 5 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ env:
99

1010
jobs:
1111
deb:
12-
name: deb (${{ matrix.build-type }}, Qt ${{ matrix.qt-version-major }}, ${{ matrix.image }})
12+
name: deb (${{ matrix.build-type }}, Qt 6, ${{ matrix.image }})
1313
runs-on: ubuntu-latest
1414
permissions:
1515
contents: read
@@ -18,20 +18,12 @@ jobs:
1818
fail-fast: false
1919
matrix:
2020
include:
21-
# Ubuntu's release cycle: https://wiki.ubuntu.com/Releases
22-
- image: ubuntu-20_04
23-
build-script: ubuntu_deb_entrypoint.sh
24-
qt-version-major: 5
25-
build-type: release
26-
2721
- image: ubuntu-22_04
2822
build-script: ubuntu_deb_entrypoint.sh
29-
qt-version-major: 6
3023
build-type: release
3124

3225
- image: ubuntu-23_10
3326
build-script: ubuntu_deb_entrypoint.sh
34-
qt-version-major: 6
3527
build-type: release
3628
steps:
3729
- name: Checkout code
@@ -75,7 +67,7 @@ jobs:
7567
uses: actions/upload-artifact@v4
7668
with:
7769
if-no-files-found: error
78-
name: ${{ steps.build.outputs.deb_name }}-qt${{ matrix.qt-version-major }}-${{ steps.build.outputs.distro_name }}-${{ matrix.build-type }}
70+
name: ${{ steps.build.outputs.deb_name }}-qt6-${{ steps.build.outputs.distro_name }}-${{ matrix.build-type }}
7971
path: ${{ steps.build.outputs.deb_path }}
8072

8173
- name: Login to GitHub Container Registry
@@ -104,7 +96,7 @@ jobs:
10496
tags: ${{ env.REGISTRY }}/nuttyartist/notes:${{ matrix.image }}
10597

10698
rpm:
107-
name: rpm (${{ matrix.build-type }}, Qt ${{ matrix.qt-version-major }}, ${{ matrix.image }})
99+
name: rpm (${{ matrix.build-type }}, Qt 6, ${{ matrix.image }})
108100
runs-on: ubuntu-latest
109101
strategy:
110102
fail-fast: false
@@ -113,13 +105,11 @@ jobs:
113105
# Fedora's release cycle: https://endoflife.date/fedora
114106
- image: fedora-38
115107
build-script: rpm_entrypoint.sh
116-
qt-version-major: 6
117108
build-type: release
118109

119110
# openSUSE's release cycle: https://endoflife.date/opensuse
120111
- image: opensuse-15_5
121112
build-script: rpm_entrypoint.sh
122-
qt-version-major: 6
123113
build-type: release
124114
steps:
125115
- name: Checkout code
@@ -163,7 +153,7 @@ jobs:
163153
uses: actions/upload-artifact@v4
164154
with:
165155
if-no-files-found: error
166-
name: ${{ steps.build.outputs.rpm_name }}-qt${{ matrix.qt-version-major }}-${{ steps.build.outputs.distro_name }}-${{ matrix.build-type }}
156+
name: ${{ steps.build.outputs.rpm_name }}-qt6-${{ steps.build.outputs.distro_name }}-${{ matrix.build-type }}
167157
path: ${{ steps.build.outputs.rpm_path }}
168158

169159
- name: Login to GitHub Container Registry
@@ -192,20 +182,14 @@ jobs:
192182
tags: ${{ env.REGISTRY }}/nuttyartist/notes:${{ matrix.image }}
193183

194184
appimage:
195-
name: AppImage (${{ matrix.build-type }}, Qt ${{ matrix.qt-version-major }}, ${{ matrix.image }})
185+
name: AppImage (${{ matrix.build-type }}, Qt 6, ${{ matrix.image }})
196186
runs-on: ubuntu-latest
197187
strategy:
198188
fail-fast: false
199189
matrix:
200190
include:
201-
- image: appimage-qt5
202-
build-script: appimage_entrypoint.sh
203-
qt-version-major: 5
204-
build-type: release
205-
206191
- image: appimage-qt6
207192
build-script: appimage_entrypoint.sh
208-
qt-version-major: 6
209193
build-type: release
210194
steps:
211195
- name: Checkout code
@@ -246,7 +230,6 @@ jobs:
246230
run: docker run --rm -v "${GITHUB_OUTPUT}:/GITHUB_OUTPUT" -v "$(pwd):/src" -t '${{ env.REGISTRY }}/nuttyartist/notes:${{ matrix.image }}' -t ${{ matrix.build-type }} ${{ github.ref_type == 'tag' && '-n' || ' ' }}
247231

248232
- name: (FIXME) Run qmllint
249-
if: endsWith(matrix.image, 'qt6')
250233
run: docker run --rm -v "$(pwd):/src" --entrypoint '' -t '${{ env.REGISTRY }}/nuttyartist/notes:${{ matrix.image }}' cmake --build build --target all_qmllint || true
251234

252235
- name: Upload AppImage artifact

.github/workflows/macos.yml

Lines changed: 8 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -9,38 +9,23 @@ jobs:
99
# So it doesn't make much sense to have different build types other than 'debug' here.
1010
# The release dmg is built using aqtinstall instead (the job below this one).
1111
build-homebrew:
12-
name: Build (${{ matrix.build-type }}, homebrew (qt${{ matrix.qt-version-major }}), ${{ matrix.os }})
12+
name: Build (${{ matrix.build-type }}, homebrew (qt6), ${{ matrix.os }})
1313
runs-on: ${{ matrix.os }}
1414
strategy:
1515
fail-fast: false
1616
matrix:
1717
include:
1818
- os: macos-13
19-
qt-version-major: 5
20-
build-type: debug
21-
22-
- os: macos-13
23-
qt-version-major: 6
2419
build-type: debug
2520
steps:
2621
- name: Checkout code
2722
uses: actions/checkout@v4
2823
with:
2924
submodules: recursive
3025

31-
- name: Install Qt ${{ matrix.qt-version-major }} (homebrew)
32-
run: |
33-
brew install ninja qt@${{ matrix.qt-version-major }}
34-
35-
- name: Configure Qt ${{ matrix.qt-version-major }} (homebrew)
36-
if: matrix.qt-version-major == 5
26+
- name: Install Qt 6 (homebrew)
3727
run: |
38-
brew link qt@${{ matrix.qt-version-major }}
39-
cat << EOF
40-
LDFLAGS="-L/usr/local/opt/qt@${{ matrix.qt-version-major }}/lib"
41-
export CPPFLAGS="-I/usr/local/opt/qt@${{ matrix.qt-version-major }}/include"
42-
export PATH="/usr/local/opt/qt@${{ matrix.qt-version-major }}/bin:$PATH"
43-
EOF >> ~/.bashrc
28+
brew install ninja qt@6
4429
4530
- name: Setup CLang problem matcher
4631
# Technically, this action only supports GCC, but it seems to work well for Clang too.
@@ -55,13 +40,10 @@ jobs:
5540
cmake . --warn-uninitialized --warn-unused-vars \
5641
-G Ninja -B build \
5742
-DCMAKE_BUILD_TYPE=${{ matrix.build-type }} \
58-
-DCMAKE_PREFIX_PATH="$(brew --prefix qt@${{ matrix.qt-version-major }})" \
43+
-DCMAKE_PREFIX_PATH="$(brew --prefix qt@6)" \
5944
-DPRO_VERSION=OFF
6045
cmake --build build
6146
62-
# Build the dmg disk image using the official Qt 5 release downloaded by aqtinstall.
63-
# This is also done for Linux and Windows, just to make sure we use the exact same Qt version across all three OSes.
64-
#
6547
# NOTE: This job uses a fixed Qt version (set in the 'qt-version' key below)!
6648
# So, remember to keep it updated whenever a new Qt version is available on aqtinstall.
6749
dmg-aqtinstall:
@@ -71,10 +53,6 @@ jobs:
7153
fail-fast: false
7254
matrix:
7355
include:
74-
- os: macos-13
75-
qt-version: 5.15.2
76-
build-type: release
77-
7856
- os: macos-13
7957
qt-version: 6.5.2
8058
build-type: release
@@ -98,11 +76,7 @@ jobs:
9876
then
9977
version="${version}+g${GITHUB_SHA::7}"
10078
fi
101-
arches='x86_64'
102-
if [[ '${{ matrix.qt-version }}' == 6.* ]]
103-
then
104-
arches+='-arm64'
105-
fi
79+
arches='x86_64-arm64'
10680
artifact_name="Notes_${version}-Qt${{ matrix.qt-version }}-${arches}"
10781
if [ '${{ matrix.build-type }}' == 'debug' ]
10882
then
@@ -126,23 +100,20 @@ jobs:
126100
127101
- name: Build (${{ matrix.build-type }})
128102
env:
129-
# Only commercial Qt 5 supports targeting Apple Silicon at the moment:
130-
# https://www.qt.io/blog/qt-on-apple-silicon
131-
TARGET_ARCH: ${{ startsWith(matrix.qt-version, '6.') && 'x86_64;arm64' || 'x86_64' }}
103+
TARGET_ARCH: x86_64;arm64
132104
VERBOSE: 1
133105
run: |
134106
export CMAKE_BUILD_PARALLEL_LEVEL=$(sysctl -n hw.logicalcpu)
135107
cmake . --warn-uninitialized --warn-unused-vars \
136108
-B build -G Ninja \
137-
-DCMAKE_OSX_DEPLOYMENT_TARGET=${{ startsWith(matrix.qt-version, '6.') && '11.0' || '10.15' }} \
109+
-DCMAKE_OSX_DEPLOYMENT_TARGET=11.0 \
138110
-DCMAKE_BUILD_TYPE=${{ matrix.build-type }} \
139111
-DGIT_REVISION=${{ github.ref_type != 'tag' && 'ON' || 'OFF' }} \
140-
-DCMAKE_OSX_ARCHITECTURES="${{ env.TARGET_ARCH }}" \
112+
-DCMAKE_OSX_ARCHITECTURES='x86_64;arm64' \
141113
-DPRO_VERSION=OFF
142114
cmake --build build
143115
144116
- name: (FIXME) Run qmllint
145-
if: startsWith(matrix.qt-version, '6.')
146117
run: |
147118
cmake --build build --target all_qmllint || true
148119
@@ -158,17 +129,6 @@ jobs:
158129
mv Notes.app 'Notes Better.app'
159130
macdeployqt 'Notes Better.app' -qmldir=../src/qml -appstore-compliant
160131
161-
- name: Remove unnecessary Qt plugins and libraries
162-
run: |
163-
set -x
164-
set -e
165-
cd 'build/Notes Better.app'
166-
if [[ '${{ matrix.qt-version }}' == 5.* ]]
167-
then
168-
# The bearer plugin has caused problems for us in the past. Plus, it was removed altogether in Qt 6.
169-
rm -rv Contents/PlugIns/bearer
170-
fi
171-
172132
- name: Import signing certificate
173133
if: github.repository == 'nuttyartist/notes' && github.event_name != 'pull_request'
174134
run: |

0 commit comments

Comments
 (0)