-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Blog post about 2.4.0 release
- Loading branch information
Showing
2 changed files
with
136 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
--- | ||
title: Qbs 2.4.0 released | ||
date: '2024-07-30' | ||
author: Ivan Komissarov | ||
--- | ||
|
||
The [Qbs build tool](http://qbs.io) version 2.4.0 is available. | ||
|
||
## What's new | ||
|
||
The main feature in this release is the support for the [Conan](https://conan.io) package | ||
manager. We've added the new [conan](https://qbs.io//docs/qml-qbsmoduleproviders-conan/) module | ||
provider which creates Qbs modules from JSON files generated by Conan. | ||
|
||
<!--more--> | ||
|
||
### Conan Module provider | ||
|
||
The Conan module provider requires the `QbsDeps` generator which is present in Conan 2.5.0. | ||
For each dependency specified in the `conanfile`, this generator creates a JSON file with | ||
the information required for the conan module provider. This information includes paths to | ||
libraries, include directories, build tools, compiler and linker flags. | ||
Conan module provider reads those files and converts them to Qbs modules. | ||
|
||
Condider an example of an application that uses the `zlib` compression library: | ||
``` | ||
CppApplication { | ||
Depends { name: "zlib" } | ||
qbsModuleProviders: "conan" | ||
consoleApplication: true | ||
files: "main.c" | ||
} | ||
``` | ||
|
||
In order to install and build an application, we would also need a `conanfile.py`: | ||
``` | ||
from conan import ConanFile | ||
from conan.tools.qbs import Qbs | ||
class Recipe(ConanFile): | ||
name = "conan-zlib" | ||
version = "1.0" | ||
exports_sources = "*.c", "*.qbs", | ||
settings = "os", "compiler", "arch", "build_type" | ||
generators = ["QbsDeps"] | ||
def build(self): | ||
qbs = Qbs(self) | ||
qbs.resolve() | ||
qbs.build() | ||
``` | ||
|
||
Now we can easily build the application using Conan: | ||
``` | ||
$ conan create . --build=missing | ||
``` | ||
|
||
Note that the new provider only works with Conan version 2.5.0 and above; for Conan version 1.x | ||
please use the [ConanfileProbe](http://localhost/~abbapoh/qbs-io//docs/qml-qbsprobes-conanfileprobe/). | ||
|
||
For more details on the provider as well as how to use Conan only for installing dependencies, | ||
see the [provider](https://qbs.io//docs/qml-qbsmoduleproviders-conan/) page in the documentation. | ||
|
||
### Other changes | ||
* We've added new FlatBuffers modules, for [C](https://qbs.io//docs/qml-qbsmodules-flatbuf-c/) | ||
and [C++](https://qbs.io//docs/qml-qbsmodules-flatbuf-cpp/) languages. These modules require | ||
runtime dependencies that can be installed using Conan module provider | ||
([QBS-1666](https://bugreports.qt.io/projects/QBS/issues/QBS-1666)). | ||
* Rules trying to create artifacts outside the build directory is now a hard error | ||
([QBS-1268](https://bugreports.qt.io/projects/QBS/issues/QBS-1268)). | ||
* More details are now printed when a command times out | ||
([QBS-1750](https://bugreports.qt.io/projects/QBS/issues/QBS-1750)). | ||
* Updated the bundled quickjs library. | ||
* The pkg-config based fallback provider was removed. That provider was not flexible enough and | ||
didn't give users control over providers priorities. Also, that provider created files | ||
even for non-present modules which also happens in case of misconfiguration. This was | ||
inconvenient since those files had to be cleaned up manually. | ||
* It is no longer allowed to attach a QML `id` to a module item. This feature violated various | ||
preconditions and triggered asserts in debug builds of Qbs. Please update you modules and remove | ||
usages of `id` property. You can replace it with the raw `propertyName` in module context, with | ||
`parent.propertyName` in module sub items, e.g. `Probes` or with | ||
`product.yourModule.propertyName` in `Rules`. | ||
|
||
### What's next | ||
|
||
Currently, we are [working](https://github.com/conan-io/conan/pulls) on even better Conan | ||
integration - the one thing that is still missing, is the generator that sets up Qbs settings | ||
and profiles based on Conan toolhain. | ||
Another big feature we are [working](https://codereview.qt-project.org/c/qbs/qbs/+/387822) on, is | ||
the support for C++20 modules. All basic cases are already working, but such a huge feature | ||
requires some additional changes in Qbs internals. Stay tuned! | ||
|
||
## Try it | ||
|
||
Qbs is available for download on the | ||
[download page](https://download.qt.io/official_releases/qbs/2.4.0/). | ||
|
||
Please report issues in our [bug tracker](https://bugreports.qt.io/browse/QBS/). | ||
|
||
Join our [Discord server](https://discord.gg/zhMHvC5GNa) for live discussions. | ||
|
||
You can use our [mailing list](https://lists.qt-project.org/mailman/listinfo/qbs) for questions | ||
and discussions. | ||
|
||
The [documentation](https://qbs.io/docs/index.html) | ||
and [wiki](https://wiki.qt.io/Qbs) are also good places to get started. | ||
|
||
Qbs is also available from a number of package repositories | ||
([Chocolatey](https://chocolatey.org/packages/qbs), | ||
[MacPorts](https://www.macports.org/ports.php?by=name&substr=qbs), | ||
[Homebrew](https://formulae.brew.sh/formula/qbs)) and is updated on each | ||
release by the Qbs development team. It can also be installed through | ||
the native package management system on a number of Linux distributions. | ||
Please find a complete overview on | ||
[repology.org](https://repology.org/project/qbs/versions). | ||
|
||
Qbs 2.4.0 is also included in Qt Creator 14.0.0. | ||
|
||
### Contribute | ||
If You are a happy user of Qbs, please tell others about it. But maybe you would | ||
like to contribute something. Everything that makes Qbs better is highly | ||
appreciated. Contributions may consist of reporting bugs or fixing them right | ||
away. But also new features are very welcome. Your patches will be automatically | ||
sanity-checked, built and verified on Linux, macOS and Windows by our CI bot. | ||
Get started with instructions in the [Qbs Wiki](https://wiki.qt.io/Qbs). | ||
|
||
Thanks to everybody who made the 2.4 release happen: | ||
|
||
* Christian Kandeler | ||
* Ivan Komissarov | ||
* Kai Dohmen | ||
* Raphael Cotty |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
SPDX-FileCopyrightText: 2024 Ivan Komissarov <[email protected]> | ||
|
||
SPDX-License-Identifier: GPL-3.0-only |