Skip to content

Conversation

@ann0see
Copy link
Member

@ann0see ann0see commented Apr 29, 2023

Short description of changes
Hardens the detection of QT 5 in macOS and iOS build scripts. This at least moves the build in #3042 a bit further

CHANGELOG: Autobuild: Hardened detection of QT 5 builds for macOS and iOS

Context: Fixes an issue?
Not yet documented. But related and discussed in #3042.

Does this change need documentation? What needs to be documented and how?
No.

Status of this Pull Request
Ready for review. This is just a partial fix.

What is missing until this pull request can be merged?
Testing in the mentioned PR. But I'll cherry-pick this commit into the PR.

Checklist

  • I've verified that this Pull Request follows the general code principles
  • I tested my code and it does what I want
  • My code follows the style guide
  • I waited some time after this Pull Request was opened and all GitHub checks completed without errors.
  • I've filled all the content above

ann0see and others added 5 commits April 30, 2023 21:37
Since we compile with Qt 5.15 or later on non legacy builds, there is no need to disable darkmode anymore.
Only the legacy build will opt out from now on.
Bumps [DoozyX/clang-format-lint-action](https://github.com/DoozyX/clang-format-lint-action) from 0.15 to 0.16.
- [Release notes](https://github.com/DoozyX/clang-format-lint-action/releases)
- [Commits](DoozyX/clang-format-lint-action@c3b2c94...a83a8fb)

---
updated-dependencies:
- dependency-name: DoozyX/clang-format-lint-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
This is done to allow write access to a recording directory outside of the macOS sandbox
32bit builds remain on 5.15.2, as Qt6 is not available there.
Note: CI builds will now drop unofficial 64 Bit Windows 7 and 8.1
support. Since both are no longer supported by Microsoft, this should
not be an issue. Users should update their OS or compile from source.
@ann0see
Copy link
Member Author

ann0see commented Apr 30, 2023

Pasting diff for security reasons here:

--- a/.github/autobuild/ios.sh
+++ b/.github/autobuild/ios.sh
@@ -23,14 +23,14 @@ setup() {
         python3 -m pip install "aqtinstall==${AQTINSTALL_VERSION}"
         # Install actual ios Qt:
         local qtmultimedia=()
-        if [[ ! "${QT_VERSION}" =~ 5\..* ]]; then
+        if [[ ! "${QT_VERSION}" =~ 5\.[0-9]+\.[0-9]+ ]]; then
             # From Qt6 onwards, qtmultimedia is a module and cannot be installed
             # as an archive anymore.
             qtmultimedia=("--modules")
         fi
         qtmultimedia+=("qtmultimedia")
         python3 -m aqt install-qt --outputdir "${QT_DIR}" mac ios "${QT_VERSION}" --archives qtbase qttools qttranslations "${qtmultimedia[@]}"
-        if [[ ! "${QT_VERSION}" =~ 5\..* ]]; then
+        if [[ ! "${QT_VERSION}" =~ 5\.[0-9]+\.[0-9]+  ]]; then
             # Starting with Qt6, ios' qtbase install does no longer include a real qmake binary.
             # Instead, it is a script which invokes the mac desktop qmake.
             # As of aqtinstall 2.1.0 / 04/2022, desktop qtbase has to be installed manually:
diff --git a/.github/autobuild/mac.sh b/.github/autobuild/mac.sh
index 19f46efd..ed7b391d 100755
--- a/.github/autobuild/mac.sh
+++ b/.github/autobuild/mac.sh
@@ -24,7 +24,7 @@ setup() {
         echo "Installing Qt..."
         python3 -m pip install "aqtinstall==${AQTINSTALL_VERSION}"
         local qtmultimedia=()
-        if [[ ! "${QT_VERSION}" =~ 5\..* ]]; then
+        if [[ ! "${QT_VERSION}" =~ 5\.[0-9]+\.[0-9]+ ]]; then
             # From Qt6 onwards, qtmultimedia is a module and cannot be installed
             # as an archive anymore.
             qtmultimedia=("--modules")
diff --git a/.github/autobuild/windows.ps1 b/.github/autobuild/windows.ps1
index d29f0b26..7586ec2b 100644
--- a/.github/autobuild/windows.ps1
+++ b/.github/autobuild/windows.ps1
@@ -78,7 +78,7 @@ Function Install-Qt
         "$QtArch",
         "--archives", "qtbase", "qttools", "qttranslations"
     )
-    if ( $QtVersion -notmatch '^5\.' )
+    if ( $QtVersion -notmatch '5\.[0-9]+\.[0-9]+' )
     {
         # From Qt6 onwards, qtmultimedia is a module and cannot be installed
         # as an archive anymore.

@ann0see
Copy link
Member Author

ann0see commented Apr 30, 2023

Oof. Now I know what went wrong... Wrong repo!

@ann0see ann0see closed this Apr 30, 2023
@ann0see ann0see deleted the harden-qt5-regex branch April 30, 2023 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants