Jake Petroules

Qbs 1.10 released

Published Thursday December 7th, 2017
11 Comments on Qbs 1.10 released
Posted in Announcements, Biz Circuit & Dev Loop, Build system, Releases

Qbs (pronounced “Cubes”) is The Qt Company’s latest build tool, which aims to be the replacement for qmake in the Qt build system. In addition to its use within Qt, for our customers Qbs will also provide faster build times coupled with a rich feature set in order to reduce build engineering complexity and decrease time to market.

Today I’m excited to introduce you to the latest release of Qbs – 1.10.

What’s New?

This release focuses on bug fixing and general enhancements, specifically to the Qbs language.

Language Improvements

Profiles can now be defined dynamically in a project using the new Profile language item. This is useful for when a project has specific, well-known requirements regarding the build environment and/or target platform.

Group nesting now works more naturally with respect to prefixes. If a Group does not define the prefix property, its value will be taken from the parent group (and so on until a prefix is found or the product level is reached).

Modules and file taggers may now set priority levels. This allows Qbs to disambiguate between multiple implementations of the same module whose conditions evaluate to true, or multiple file taggers that would tag the same files – essentially, a conflict resolution mechanism. Simply set the priority property of a Module or FileTagger to an integer value greater than zero. The instance with the highest value wins. For example, Qbs uses this to choose the cpp module implementation on different platforms. Because the Android implementation is a superset of the Linux implementation, both the Linux and Android implementations are available on Android, but because the latter has a higher priority level, that implementation gets chosen.

It is now possible to add file tags to generated artifacts by setting the new fileTags property in a group that has a fileTagsFilter. This allows you to “append” to the list of file tags assigned to artifacts created by a rule that is defined in a module which is outside your control.

Documentation

Another big focus of this release was enhancing the documentation (and even more significant changes in this area will come with Qbs 1.11).

To start with, we’ve added two new major pages. The first is a qmake porting guide, which contains an overview of various qmake variables and how to achieve the same functionality in Qbs. The second is a “how-to” page on how to create modules for third party libraries. We plan to have many more of these “how-to” style guides showing how to solve common build system problems with Qbs.

We also added in-depth descriptions of all command line tools and their respective options, and a man page for the qbs command line tool.

Platform Support

This release adds a few notable platform-specific features: initial support for the Universal Windows Platform, and the run command can now deploy and run Android apps on devices, and deploy and run iOS and tvOS apps on the simulator.

Qt Support

This release adds support for the Qt Quick compiler and for qmlcachegen.

Other New Features

  • The TextFile service can now append to existing files using the new TextFile.Append open mode.
  • Process and TextFile objects in rules, commands and configure scripts are now closed automatically after script execution.
  • Added the vcs module to provide VCS repository information. Git and Subversion are supported initially.
  • Added the cpufeatures module for abstracting compiler flags related to CPU features such as SSE.
  • Added property cpp.discardUnusedData abstracting linker options that strip unneeded symbols or sections.
  • Added property cpp.variantSuffix for making binary names unique when multiplexing products.
  • Added property cpp.compilerDefinesByLanguage providing the compiler’s pre-defined macros.
  • Added new command line sub-command list-products which lists the names of the products available in the project.

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.10 is also included in Qt Creator 4.5, which was also released this week.

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

Posted in Announcements, Biz Circuit & Dev Loop, Build system, Releases

11 comments

stlcours says:

There are so many things to do and to learn for developer. We should focus on our main work. I don’t hope it be the first build tool for Qt 6.0. THANKS!

Marc Bornhers says:

I would never hire a developer who is not willing to learn new things all the time or who is unwilling to broaden his or her horizons.

stlcours says:

I learn the new things everyday! But do you really need Qbs? Normally qmake is enough to 90%, even 95% projects.

Will says:

After playing with QBS a bit, I am honestly surprised how much I like it. I am not a huge fan of QML, but it’s the only build system with a language that doesn’t seem completely absurd when you try to so something mildly complicated. QMake is terrible for dealing with a bunch of different outputs and modules in one project. CMake was invented by maniacs. Autotools was invented by grey haired maniacs.

My only real complaint at the moment is that QtCreator presents a much more pleasant UI for QMake projects, separating the Headers from the sources and such so it’s a lot more convenient. It will also automatically add new files to the project. Once the UI side catches up for daily use, the actual build system seems quite good.

Christian Kandeler Christian Kandeler says:

The project tree reflects your project file. If you put headers and sources into dedicated groups, they will show up as such, otherwise they won’t.
I do not understand what you mean by “automatically add new files to the project”. Could you explain?

Jake Petroules Jake Petroules says:

I completely agree that developers should be able to focus on their main work. Our goal with Qbs is to allow you to do just that – free you from the needless complexity that most build tools impose, and make your life easier as a developer by providing a tool that *just works*.

stlcours says:

But for 90% projects, qmake is enough and so good! I only don’t want it will be the first tool rather qmake. Of course, Qbs is good to be a second build tool, especially for the complexity projects. Thanks!

Grecko says:

For most of those projects just adding stuff via Qt Creator and not caring about the .pro is enough. If Qt Creator generates a qbs project instead of a qmake one it wouldn’t change much for those projects. And when it’s not the case, qmake is an undocumented nightmare that makes things complicated. Learning qbs will sure be faster than struggling with qmake.

Martin says:

It’s worth noting Qbs is in the Fedora repos since August. The update to 1.10 is now in the testing repository.

Jake Petroules Jake Petroules says:

Thanks! I believe 27 is the first Fedora release in which it’s officially included, and which was just released recently. I’ll update the text of the post.

zack says:

Apropos build system switching.
Boost is switching to CMake. Maybe you can provide a proof of concept, that qbs would be the better alternative?

Commenting closed.

Get started today with Qt Download now