Christian Kandeler

Qbs 1.11 released

Published Wednesday March 28th, 2018
10 Comments on Qbs 1.11 released
Posted in Announcements, Build system, cross-platform, Dev Loop, Releases

We are happy to announce version 1.11.0 of the Qbs build tool.

What’s new?

Language Improvements

The long-existing list properties qbs.targetOS and qbs.toolchain have been complemented by their scalar counterparts qbs.targetPlatform and qbs.toolchainType, respectively. The new properties make it easier to specify the target platform on the command line and in profiles, while you should still use the existing ones in your project files for purposes such as conditional compilation.

Modules can now declare their own target artifacts using the new filesAreTargets property of the Group item. The next version of Qbs will add the ability to auto-generate such modules from your products. These modules can then be distributed along with the binaries so that other Qbs projects can make use of them by simply declaring a dependency on the module.

In addition to TextFile, we now also have BinaryFile for reading and writing binary files.

C/C++ Support

We have added the property cpp.rpathOrigin, which evaluates to @loader_path on Darwin and $ORIGIN on other Unix-like platforms.

You can now specify flags to be passed to the compiler frontend only when linking via the cpp.driverLinkerFlags property.

The value "c++17" is now properly supported for cpp.cxxLanguageVersion, emitting the /std:c++17 flag when using an MSVC compiler that supports it.

The auto-detection mechanism for GCC-like compilers now considers typical MinGW prefixes, that is, file names such as i686-w64-mingw32-gcc are picked up from the search path.

Command-line Interface

The syntax for specifying configuration names has always been rather confusing, which is why they are now passed using the new config key. For instance, to build your project for two independent configurations called debug and release, you now write:

$ qbs config:debug config:release

As a result, all command-line parameters are now either options, option arguments or key-value pairs.

We have also dropped the requirement that property assignments have to appear after all options. This comes in particularly handy when amending earlier inputs using the shell history.

Documentation

The item and module references were re-designed, resulting in much-improved readability.

Furthermore, we have added a how-to on the topic of pre-compiled headers, and provided missing documentation for our XML support and the Utilities functions.

Other New Features

The “run” functionality as used by the command of the same name now considers an executable’s library dependencies, that is, it adds the paths they are located in to the respective environment variable (PATH on Windows, DYLD_LIBRARY_PATH/DYLD_FRAMEWORK_PATH on macOS and LD_LIBRARY_PATH on other Unix-like systems). This also works when running from Qt Creator.

Try It!

The Open Source version is available on the download page, and you can find commercially licensed packages on the Qt Account Portal. Please post issues in our bug tracker. You can also find us on IRC in #qbs on chat.freenode.net, and on the mailing list. The documentation and wiki are also good places to get started.

Qbs is also available on a number of packaging systems (Chocolatey, MacPorts, Homebrew) and 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 including but not limited to Debian, Ubuntu, Fedora, and Arch Linux.

Qbs 1.11.0 is also included in Qt Creator 4.6.0, which was released this week as well.

Do you like this? Share it
Share on LinkedInGoogle+Share on FacebookTweet about this on Twitter

Posted in Announcements, Build system, cross-platform, Dev Loop, Releases

10 comments

Thomsom Wesley says:

With this new version of qbs, do you intend to upgrade in the next build of Qt to use a version of the most current mingw?

Christian Kandeler Christian Kandeler says:

Sorry, I don’t understand what the versions of qbs and mingw have to do with each other. Could you explain?

Benoît Gradit says:

And what about the status of Android+iOS ?

Christian Kandeler Christian Kandeler says:

Could you elaborate? There haven’t been major changes for these in this release.

kambala says:

There’s https://bugreports.qt.io/browse/QTCREATORBUG-18977 for example, which renders QBS unusable for iOS / Android

Christian Kandeler Christian Kandeler says:

I was not aware of that particular bug report; will try to reproduce the problem.
More generally, a number of target-specific plugins in Qt Creator (Android and iOS among them) have never supported anything but qmake projects. The Qt Creator team has been working in recent months on making the general infrastructure more accommodating to build system independent approaches, but it will still take a bit of time until this pays concrete dividends.

Vladislav Navrocky says:

Can you provide buildable advanced example of Android and IOS application? I mean a QBS project with app and some static/dynamic lib inside. It will be very helpfull on start trying QBS.

I cannot find any working example here https://github.com/qbs/qbs/tree/master/examples.
My problem is that I cannot build simple qbs project for Android getting error: “type_traits not found”. I see that this bug (https://bugreports.qt.io/browse/QBS-1176) was closed some times ago, but it seems to be still here.

Christian Kandeler Christian Kandeler says:

As explained in the comments on that bug report, you need to set the Android.ndk.appStl property (see https://doc-snapshots.qt.io/qbs/qml-qbsmodules-android-ndk.html#appStl-prop). Android’s default C++ standard library is a bit limited.

Vladislav Navrocky says:

I saw this tip, but I cannot suggest right place in my project to insert this property. Can you submit short example with this property set?

Christian Kandeler Christian Kandeler says:

You do that in the product that has the C++ sources, e.g. your dynamic library. The same one where you set cpp properties.

Commenting closed.

Get started today with Qt Download now