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

QGIS Enhancement Proposal: Implementing CI Qt6 Windows Builds through vcpkg #292

Open
m-kuhn opened this issue Mar 20, 2024 · 4 comments
Open

Comments

@m-kuhn
Copy link
Member

m-kuhn commented Mar 20, 2024

Date: 2024/03/14
Author: Matthias Kuhn (@m-kuhn)
Contact: [email protected]
Version: QGIS 3.X

Background

QGIS currently supports continuous integration (CI) builds for Linux utilizing Qt6. However, there are no existing CI builds for Qt6 on Windows. The current Windows builds are based on Qt5 and use MinGW for compilation. The adoption of Qt6 is gaining momentum, and there is a recognized need to extent CI Qt6 builds to cover Windows platforms, where most QGIS users are coming from.

Rationale

The proposal to introduce Qt6 builds for Windows through the use of vcpkg comes at a time when the QGIS ecosystem is increasingly incorporating vcpkg for dependency management. Its introduction in QField and subsequent adoption by other mobile applications as well as nascent QGIS-JS project has demonstrated significant benefits of the tool. Incorporating a vcpkg-produced CI build will create further synergies across those projects.
Utilizing vcpkg for Windows builds aligns with current practices in the QGIS ecosystem, where Visual Studio is used for OSGeo4W builds. This approach not only facilitates the identification of MSVC-specific issues at an earlier stage but also simplifies the maintenance of OSGeo4W. Moreover, leveraging vcpkg can streamline the management of the project's growing list of vendored dependencies by allowing direct builds from the original upstream repositories, thereby adhering more closely to the DRY (Don't Repeat Yourself) principle.

Proposal

This QGIS Enhancement Proposal (QEP) aims to establish a CI build process for QGIS on Windows using Qt6 and vcpkg. This new build process will:

  • Adopt vcpkg for managing dependencies, benefiting from its increasingly widespread use within the QGIS ecosystem and its support for building using Visual Studio.
  • Address the absence of CI-produced Qt6 builds for Windows, ensuring parity with Linux and facilitating a smoother transition to Qt6 by making builds available to testers and plugin developers across all platforms.
  • Enhance the identification of MSVC-specific issues and improve the maintenance process for OSGeo4W, contributing to a more robust QGIS application on Windows.
  • Promote a more efficient handling of vendored dependencies by building directly from upstream sources, reducing redundancy and improving code maintainability.

Deliverables

The deliverables for this proposal include:

  • A fully implemented Qt6 and vcpkg-based CI build process for Windows.
  • An executable artifact of the QGIS application as the outcome of the CI process.
  • Documentation detailing the setup and maintenance of the CI build process.

It is acknowledged that the initial implementation may not cover all providers and functionalities (e.g., some uncertainties exist regarding 3D capabilities). However, this QEP represents a critical step forward in modernizing the QGIS build process for Windows and aligning it with current development practices.

Conclusion

Implementing CI builds for Qt6 on Windows using vcpkg is an essential evolution for the QGIS project, enabling it to leverage the latest technological advancements and maintain consistency across different platforms. This proposal sets the groundwork for future enhancements and ensures that QGIS remains at the forefront of GIS software development.

@elpaso
Copy link

elpaso commented Mar 20, 2024

@m-kuhn great proposal, thank you!

If I may add something to the mix, it would be very nice if vcpkg could help with the setup of a working development environment on Windows for the purpose of developing and debugging.

I am sure many people would be extremely grateful if you could add recipe for that while developing this.

@nyalldawson
Copy link
Contributor

Have you given any thought to also running the test suite on ci using these builds?

There'd be a mammoth amount of work required in getting all the tests de-unixified, but there's likely still a significant number which just pass already and we could enable.

@m-kuhn
Copy link
Member Author

m-kuhn commented Mar 20, 2024

@elpaso Regarding dev setup, that should be a logical consequence. E.g. in QField it's (almost) as easy as adding -DWITH_VCPKG=ON and it will automatically fetch and compile dependencies. I will gladly add a description for this.

@nyalldawson At some point we will want to enable tests, I kept it out of this proposal to keep the uncertainties limited.

@anitagraser
Copy link
Member

Thank you for submitting your proposal to the 2024 QGIS Grant Programme. The 2 week discussion period starts today. At the end of the discussion, the proposal author has to provide a 3-line pitch of their proposal for the voter information material. (For an example from last year check qgis/PSC#58 (comment))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants