qgis / QGIS-Enhancement-Proposals

QEP's (QGIS Enhancement Proposals) are used in the process of creating and discussing new enhancements for QGIS
117 stars 37 forks source link

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

Open m-kuhn opened 5 months ago

m-kuhn commented 5 months ago

Date: 2024/03/14 Author: Matthias Kuhn (@m-kuhn) Contact: matthias@opengis.ch 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:

Deliverables

The deliverables for this proposal include:

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 commented 5 months ago

@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 commented 5 months ago

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 commented 5 months ago

@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 commented 5 months ago

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 https://github.com/qgis/PSC/issues/58#issuecomment-1567892412)