Qbs 1.16.0 released

We are delighted to announce version 1.16.0 of the Qbs build tool.

Qbs is a build automation tool designed for flexibility, speed and multi-platform development. It is particularly appreciated for its clean concept, easy-to-learn language and speed. Qbs has been formerly developed by The Qt Company, but since 2019 it is mostly driven by a community of volunteers.

What's new

About 225 contributions went into this release since version 1.15.0. We have selected a few highlights below. Have a look into the complete changelog if you are interested in more details.

Language

  • List properties in modules are now merged according to inter-module dependencies. This is important when flags like cpp.staticLibraries are contributed by multiple modules with dependencies between each other (QBS-1517).

C/C++ Support

  • Support for bare-metal MCUs has been extended to a couple of Renesas MCU families. Qbs now automatically detects GCC and IAR for these architectures. Have a look at the reference documentation for a list of known architectures.

  • Xcode version 11.4 is now supported on macOS.

  • The clang-cl toolchain module got more features and flexibility.

  • The MSVC, clang-cl and MinGW toolchains are now automatically detected if the profile does not set an explicit installation location, for instance because no profile was given.

  • Installation of separate debug information can now be easily enabled and configured in convenience items like Application and DynamicLibrary. This works out of the box for toolchains based on GCC, MSVC or clang-cl.

The following example demonstrates how to generate separate debug information next to the binary in a Qt application project:

// project.qbs
CppApplication {
Depends { name: "Qt.gui" }

cpp.debugInformation: true
cpp.separateDebugInformation: true

install: true
installDebugInformation: true

files:
["main.cpp"]
}

Qt Support

  • Qbs now supports Qt 5.14 for Android which comes as a multi-architecture package. The qbs-setup-android tool has been updated accordingly (QBS-1497).

  • Debug-only builds of Qt >= 5.14 with MinGW, where Qt libraries don't have the 'd' suffix, are now properly supported (QTBUG-80792). 

  • JSON metatype files generated by moc (Qt >= 5.15) are supported by setting  Qt.core.generateMetaTypesFile and Qt.core.metaTypesInstallDir.

  • The QML type declaration mechanism introduced in Qt 5.15 is now supported by the Qt.qml module (QBS-1531).

Here is an example how to use the new type declaration mechanism. All you need to do is to tag a class with the QML_ELEMENT tag:

// person.h
class Person : public QObject
{
Q_OBJECT
Q_PROPERTY(QString name MEMBER m_name)
Q_PROPERTY(int shoeSize MEMBER m_shoeSize)
Q
ML_ELEMENT
public:
P
erson(QObject *parent = nullptr);
private:
QString m_name;
i
nt m_shoeSize;
};

A basic Qbs project file of such a QML application would look like this:

// project.qbs
CppApplication {
Depends { name: "Qt.qml"] }

// All classes tagged with QML_ELEMENT are registered.
Qt.qml.importName: "People"
Qt.qml.importVersion: "1.0"

files: [
"main.cpp",
"person.cpp",
"person.h",
]
}

Setting Qt.qml.importName automatically enables Qt.core.generateMetaTypesFile.

In your QML file, you can then import your implicitly created QML module as follows:

import People 1.0

Person {
name: "Bob Jones"
shoeSize: 12
}

As you can see, the support for Qt is top-notch. If you often find yourself searching the Internet for solutions to build system problems and then copying some dubious snippets into your QMake or CMake project, try Qbs.

Miscellaneous

  • The README was extended and a CONTRIBUTING file has been added which provides useful information for potential contributors. This is important for people looking at our github mirror.

  • A new ConanfileProbe allows better and more flexible integration of Qbs and the Conan package manager.

  • A lot of effort went into our CI infrastructure to provide faster feedback to Gerrit and to keep the quality of our code base high.

Try it

Qbs is available for download on the download page. Please report issues in our bug tracker. We have recently started to use Discord in addition to the existing IRC channel #qbs on chat.freenode.net. Feel free to join. You can use our mailing list for questions and discussions. The documentation and wiki are also good places to get started.

Qbs is also available on a number of package repositories (Chocolatey, MacPorts, Homebrew), and is updated there 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 here.

Qbs 1.16.0 is also included in Qt Creator 4.12.0, which was released earlier this week.

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.

A big thanks to everybody who made the 1.16.0 release happen:

  • Alberto Mardegan

  • Björn Schäpers

  • BogDan Vatra

  • Christian Kandeler

  • Christian Stenger

  • Denis Shienkov

  • Ivan Komissarov

  • Jochen Ulrich

  • Jörg Bornemann

  • Leon Buckel

  • Marius Sincovici

  • Maximilian Goldstein

  • Mitch Curtis

  • Oliver Wolff

  • Orgad Shaneh

  • Raphaël Cotty

  • Richard Weickelt


Blog Topics:

Comments