Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore support for Qt 6.6.3 and Android 7.1 #12457

Conversation

rubenp02
Copy link
Contributor

Restore support for Qt 6.6.3 and Android 7.1

Description

Restored support for Qt 6.6.3 while preserving the existing build configuration for the primary supported Qt version (6.8.2). Changed the min. Android SDK version to 25 when the Qt version supports it. This allows targeting Android 7.1-based GCS such as the CubePilot Herelink or the SkyDroid H16.

Key changes:

  • Lowered the QGC_QT_MINIMUM_VERSION CMake variable to 6.6.3, the latest Qt version compatible with Android 7.1.
  • Disabled the CMake features introduced in Qt versions 6.7 and 6.8 when configuring the project for Qt 6.6.3.
  • Updated build.gradle to utilize qtGradlePluginType only when available.
  • Reintroduced the "package" attribute in AndroidManifest.xml, which is necessary for Qt 6.6.3 but non-disruptive for the main supported version.

Checklist:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Restored support for Qt 6.6.3 while preserving the existing build
configuration for the primary supported Qt version (6.8.2). Changed the
min. Android SDK version to 25 when the Qt version supports it. This
allows targeting Android 7.1-based GCS such as the CubePilot Herelink or
the SkyDroid H16.

Key changes:
- Lowered the QGC_QT_MINIMUM_VERSION CMake variable to 6.6.3, the latest
  Qt version compatible with Android 7.1.
- Disabled the CMake features introduced in Qt versions 6.7 and 6.8 when
  configuring the project for Qt 6.6.3.
- Updated build.gradle to utilize qtGradlePluginType only when
  available.
- Reintroduced the "package" attribute in AndroidManifest.xml, which is
  necessary for Qt 6.6.3 but non-disruptive for the main supported
  version.
@rubenp02
Copy link
Contributor Author

Not sure if you're interested in merging this, and my guess is that probably not, but it restores support for popular Android GCS like the Herelink and the SkyDroid H16. My hope is that 5.0 can be compatible with them out of the box, without messy patches.

@HTRamsey
Copy link
Collaborator

Yeah I think it's fine until we have to start checking Qt versions in the code all over the place. But we aren't using anything introduced in Qt6.8 yet, except for maybe QtMultimedia related stuff

@DonLakeFlyer
Copy link
Contributor

For my current version of Herelink I just downgraded the min sdk version and still use 6.8: https://github.com/DonLakeFlyer/Herelink-QGC/blob/master/custom/cmake/CustomOverrides.cmake

Why not do that instead?

@rubenp02
Copy link
Contributor Author

But looking at the CMake and the GitHub workflows you're using Qt 6.6.3, no? Or am I missing something? AFAIK Qt 6.8 just doesn't support Android SDK 25.

@DonLakeFlyer
Copy link
Contributor

Sorry, I'm confused as to where we ended up. I can't remember the driver to move from 6.6.3 to 6.8. I think because 6.8 was LTS maybe? But LTS doesn't help us that much since open source doesn't get LTS updates anyway?

In general I'd rather pick a Qt version and use that for everything. Is there good reason to move to 6.8 from 6.6?

@HTRamsey
Copy link
Collaborator

I recall one reason was supporting Arm based desktop builds

@DonLakeFlyer
Copy link
Contributor

DonLakeFlyer commented Feb 16, 2025

Hmm, yeah. Useful. Maybe I'm overreacting to supporting multiple Qt. In reality the downgrade is just for things like Herelink/Skydroid. If it works it works. How about if we only allowed downgrade for android builds and messaged usage for Herelink/Skydroid situations? That limits exposure on desktop.

@DonLakeFlyer
Copy link
Contributor

Put some more thinking into this, also looking at my own android custom builds. I think the way to do this is to support down to 6.6.3 on Android. But I would still lock down to specific android versions. Desktop 6.8.2 only. Android either 6.6.3 or 6.8.2 only. I've run into problems in the past with not locking down to specific Qt versions. By being really specific it reduces the support burden of odd things breaking or people doing odd things with version of Qt that don't run through CI. If someone wants to run some other version of Qt they can hack the make scripts if they really need it. But it isn't supported by default.

Then the question would be what to do with the android builds coming out of CI. I would propose those are built on 6.6.3 by default. Then that will keep checks on the Herelink style controller requirements.

Comments?

@rubenp02
Copy link
Contributor Author

I think that's a good idea. It's probably not going to be easy to support 6.6.3 in the long term though, even if none of the features of newer versions are used. Not a great example, but take #12179. Should that workaround for the Qt bug be used so that 6.6.3 works as expected, at the expense of worse and less canonical code for 6.8? That's a tiny visual bug, but I imagine there are many bigger ones that do impact functionality.

IMO, a good compromise is to support 6.6.3 until the next QGC stable to give these Android GCS one last big update, and then support a single LTS Qt.

@DonLakeFlyer
Copy link
Contributor

support 6.6.3 until the next QGC stable to give these Android GCS one last big update

Yeah, kinda what I was thinking as well

@DonLakeFlyer
Copy link
Contributor

So I'm gonna merge this since it lets me make forward progress again on Herelink version.

@DonLakeFlyer DonLakeFlyer merged commit 76cd683 into mavlink:master Feb 18, 2025
9 checks passed
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.

3 participants