The release of the Qbs build tool 1.21 has been announced. This is the eighth release since the departure of the Qt Company from the project's development, prepared by a community interested in continuing the development of Qbs. Qt is required as a dependency for building with Qbs, although Qbs itself is designed to organize the builds of any projects. Qbs uses a simplified version of the QML language for defining project build scripts, allowing for flexible build rules that can include external modules, use JavaScript functions, and create arbitrary build rules.
The scripting language used in Qbs is adapted for automating the generation and parsing of build scripts in integrated development environments. Furthermore, Qbs does not generate makefiles but controls the launch of compilers and linkers directly, optimizing the build process based on a detailed graph of all dependencies. Having original data about the project's structure and dependencies allows for efficiently parallelizing operations across multiple threads. For large projects consisting of a significant number of files and subdirectories, the performance of rebuilding using Qbs can surpass make by several timesārebuilds occur almost instantly and do not cause developers to waste time waiting.
It is worth reminding that in 2018, the Qt Company decided to stop the development of Qbs. Qbs was developed as a replacement for qmake, but ultimately it was decided to use CMake as the primary build system for Qt in the long term. The development of Qbs is now continued in the form of an independent project, supported by the community and interested developers. The development still utilizes the infrastructure of the Qt Company.
Key innovations in Qbs 1.21:
- The module provider (module generator) mechanism has been revamped. For frameworks such as Qt and Boost, more than one provider can now be used, allowing you to define which provider to run using the new property qbsModuleProviders and specify the priority for selecting modules generated by different providers. For example, you can specify two providers 'Qt' and 'qbspkgconfig', where the first will attempt to use the user-installed Qt (by searching qmake), and if such an installation is not found, the second provider will try to use the Qt provided by the system (via pkg-config): CppApplication { Depends { name: 'Qt.core' } files: 'main.cpp' qbsModuleProviders: ['Qt', 'qbspkgconfig'] }
- A new provider 'qbspkgconfig' has been added, replacing the 'fallback' module provider that attempted to generate a module using pkg-config if the requested module was not generated by other providers. Unlike 'fallback', the 'qbspkgconfig' uses an integrated C++ library to directly read '.pc' files instead of calling the pkg-config utility, which speeds up operation and provides additional information about package dependencies not available when calling pkg-config.
- Support for the C++23 specification, which defines the future C++ standard, has been added.
- Support for the Elbrus E2K architecture has been added for the GCC toolchain.
- For the Android platform, the property Android.ndk.buildId has been added, allowing overriding the default value for the linker flag '--build-id'.
- In the capnproto and protobuf modules, it is now possible to use runtime provided by the qbspkgconfig provider.
- Resolved issues with tracking changes in source code files on the FreeBSD platform, which occurred due to discarding milliseconds when evaluating file modification time.
- Added the ConanfileProbe.verbose property, simplifying the debugging of projects using the Conan package manager.
It is also noteworthy that alpha testing of the Qt 6.3 framework has begun, which features the new 'Qt Language Server' module with support for the Language Server and JsonRpc 2.0 protocols, a significant number of new functions have been added to the Qt Core module, the Qt Quick Dialogs module has implemented the QML MessageDialog type for utilizing dialog windows provided by the platform, and a compositor has been added to the Qt Wayland Compositor module. server Qt Shell and API for creating custom shell extensions.
The Qt QML module offers an implementation of the qmltc (QML type compiler) that allows compiling QML object structures into C++ classes. For commercial users, testing of the Qt Quick Compiler product has started with Qt 6.3, which, along with the aforementioned QML Type Compiler, includes the QML Script Compiler, allowing for the compilation of QML functions and expressions into C++ code. It is noted that using the Qt Quick Compiler will bring the performance of applications based on QML closer to native applications, particularly as the compilation of extensions shows a reduction in launch and execution time by approximately 30% compared to the interpreted version.
Source: opennet.ru
