Qbs (build tool)

Last updated
Qbs
Developer(s) Qt Project
Initial releaseFebruary 15, 2012;11 years ago (2012-02-15) [1]
Stable release
1.22.1 / April 29, 2022;17 months ago (2022-04-29) [2]
Repository www.code.qt.io/cgit/qbs/qbs.git
Written in C++, JavaScript, QML, some Java and TypeScript
Operating system Cross-platform
Type Build automation, software development tools
License LGPL [3]
Website wiki.qt.io/Qbs   OOjs UI icon edit-ltr-progressive.svg

Qbs (pronounced Cubes) is a cross-platform free and open-source software for managing the build process of software. It was designed to support large, complex projects, written in any number of programming languages, primarily C/C++.

Contents

Qbs is an all-in-one tool that generates a build graph from a high-level project description (like its predecessor qmake), and additionally undertakes the task of executing the commands in the low-level build graph (like make).

Qbs was originally created by Nokia, then The Qt Company, who distributes it along with their Qt toolkit. It integrates with the Qt framework, and automates the creation of moc (meta object compiler) and rcc (resource compiler) sources, which are used in Qt's meta-object system and in the integration of binary resources (e.g. pictures).

It has been deprecated by Qt Group in 2018 to redirect the resources to CMake instead "Deprecation of Qbs"..

Features

Qbs is unique in that it has no mechanism for in-source builds, guaranteeing the ability to create several builds from a single source tree, including building them from a single command invocation and in parallel. This is a key feature, ensuring that source files remain unaffected if a build directory is removed and that no output artifacts are written into the source directory.

Qbs has no built-in support for any particular programming language, toolkit, or library. This is again in contrast to qmake, which hardcodes support for many Qt-related tools and workflows. Instead, Qbs is provided with a set of modules written in a QML dialect and JavaScript that enable support for a variety of programming languages and tools. Qbs currently provides modules supporting the Android SDK and NDK, C, C++, Java, NSIS, TypeScript, WiX, Xcode, and a variety of other tools.

Qbs can build projects for many platforms including Android, FreeBSD, iOS, Linux, macOS, QNX, tvOS, watchOS, and Windows, with support for Universal Windows Platform applications, INTEGRITY, VxWorks, and other platforms under development.

Qt Creator provides built-in Qbs support, and IDE integration for Visual Studio is provided by the generators feature. Support for Xcode is currently under development.

Build process

The build process in Qbs takes place in two stages. First, the build graph is resolved by reading the project's configuration files and computing the set of input and output nodes and the dependencies between them in a directed acyclic graph. Then the executor executes all of the commands necessary to create the output files, in parallel according to the dependency rules.

Each build project contains a single build graph (*.bg) file in the directory where Qbs stores the serialized representation of its internal build graph format. Deserializing this file and utilizing the cached information allows Qbs to very quickly resolve the project, leading to near-instant incremental builds. Deleting the build graph file causes a complete (clean) rebuild of the entire project. In contrast to make, Qbs does not rely on timestamps of files in the build directory, and tampering with its contents will not lead to targets being rebuilt unless the --check-outputs option is used. This is done for performance reasons because on some platforms (e.g. Windows), reading timestamps from the filesystem is very slow compared to reading them from the build graph file.

Example Qbs file

CppApplication{name:"helloworld"files:"main.cpp"}

History

Qbs development began at Nokia in the year 2010 in response to the need for a replacement for qmake. Qbs' design aims to provide a much lower learning curve, better integration with IDEs, and a stable and powerful language with predictable behavior. Qbs 1.0 was released in 2013 [4] and further developed by the Qt Company beginning around that time under the governance model of the Qt Project. The developers hoped to eventually push for Qbs to replace qmake as Qt's own build system. However, in October 2018 it was deprecated [5] in favor of qmake and/or cmake. In an August 7, 2019 blog post, the Qt Company stated that starting with Qt 6, cmake will become Qt's standard build system [6] and cited cmake's extreme popularity as a factor. [6]

Qbs development was taken over by external volunteers, who as of June 2020 are still actively maintaining it under the Qt Project umbrella. [7] Although the Qt Company announced that they would stop further development on Qbs, they committed to provide the necessary infrastructure for future releases of Qbs by the community. [5]

Applications that use Qbs

Related Research Articles

<span class="mw-page-title-main">Qt (software)</span> Object-oriented framework for software development

Qt is free and open-source cross-platform software for creating graphical user interfaces as well as cross-platform applications that run on various software and hardware platforms such as Linux, Windows, macOS, Android or embedded systems with little or no change in the underlying codebase while still being a native application with native capabilities and speed.

<span class="mw-page-title-main">KDevelop</span> Integrated development environment

KDevelop is a free and open-source integrated development environment (IDE) for Unix-like computer operating systems and Windows. It provides editing, navigation and debugging features for several programming languages, and integration with build automation and version-control systems, using a plugin-based architecture.

<span class="mw-page-title-main">WebObjects</span> Java web application server and framework originally developed by NeXT Software

WebObjects was a Java web application server and a server-based web application framework originally developed by NeXT Software, Inc.

<span class="mw-page-title-main">Xcode</span> IDE including tools for developing software for Apple platforms

Xcode is Apple's integrated development environment (IDE) for macOS, used to develop software for macOS, iOS, iPadOS, watchOS, tvOS, and visionOS. It was initially released in late 2003; the latest stable release is version 15, released on September 18, 2023, and is available free of charge via the Mac App Store and the Apple Developer website. Registered developers can also download preview releases and prior versions of the suite through the Apple Developer website. Xcode includes command-line tools which enable UNIX-style development via the Terminal app in macOS. They can also be downloaded and installed without the GUI.

<span class="mw-page-title-main">SCons</span>

SCons is a computer software build tool that automatically analyzes source code file dependencies and operating system adaptation requirements from a software project description and generates final binary executables for installation on the target operating system platform. Its function is analogous to the traditional GNU build system based on the make utility and the autoconf tools.

<span class="mw-page-title-main">OpenSceneGraph</span>

OpenSceneGraph is an open-source 3D graphics application programming interface, used by application developers in fields such as visual simulation, computer games, virtual reality, scientific visualization and modeling.

ITK is a cross-platform, open-source application development framework widely used for the development of image segmentation and image registration programs. Segmentation is the process of identifying and classifying data found in a digitally sampled representation. Typically the sampled representation is an image acquired from such medical instrumentation as CT or MRI scanners. Registration is the task of aligning or developing correspondences between data. For example, in the medical environment, a CT scan may be aligned with an MRI scan in order to combine the information contained in both.

<span class="mw-page-title-main">CMake</span> Cross-platform, compiler-independent build system generator

In software development, CMake is cross-platform free and open-source software for build automation, testing, packaging and installation of software by using a compiler-independent method. CMake is not a build system itself; it generates another system's build files. It supports directory hierarchies and applications that depend on multiple libraries. It is used in conjunction with native build environments such as Make, Qt Creator, Ninja, Android Studio, Apple's Xcode, and Microsoft Visual Studio. It has minimal dependencies, requiring only a C++ compiler on its own build system.

qmake is a utility that automates the generation of makefiles. Makefiles are used by the program make to build executable programs from source code; therefore, qmake is a make-makefile tool, or makemake for short.

<span class="mw-page-title-main">JUCE</span> C++ Cross-Platform Application Development Framework

JUCE is an open-source cross-platform C++ application framework, used for the development of desktop and mobile applications. JUCE is used in particular for its GUI and plug-ins libraries. It is dual licensed under the GPLv3 and a commercial license.

Enthought, Inc. is a software company based in Austin, Texas, United States that develops scientific and analytic computing solutions using primarily the Python programming language. It is best known for the early development and maintenance of the SciPy library of mathematics, science, and engineering algorithms and for its Python for scientific computing distribution Enthought Canopy.

<span class="mw-page-title-main">Qt Creator</span> QT development environment

Qt Creator is a cross-platform C++, JavaScript, Python and QML integrated development environment (IDE) which simplifies GUI application development. It is part of the SDK for the Qt GUI application development framework and uses the Qt API, which encapsulates host OS GUI function calls. It includes a visual debugger and an integrated WYSIWYG GUI layout and forms designer. The editor has features such as syntax highlighting and autocompletion. Qt Creator uses the C++ compiler from the GNU Compiler Collection on Linux. On Windows it can use MinGW or MSVC with the default install and can also use Microsoft Console Debugger when compiled from source code. Clang is also supported.

<span class="mw-page-title-main">Symbian</span> Discontinued mobile operating system

Symbian is a discontinued mobile operating system (OS) and computing platform designed for smartphones. It was originally developed as a proprietary software OS for personal digital assistants in 1998 by the Symbian Ltd. consortium. Symbian OS is a descendant of Psion's EPOC, and was released exclusively on ARM processors, although an unreleased x86 port existed. Symbian was used by many major mobile phone brands, like Samsung, Motorola, Sony Ericsson, and above all by Nokia. It was also prevalent in Japan by brands including Fujitsu, Sharp and Mitsubishi. As a pioneer that established the smartphone industry, it was the most popular smartphone OS on a worldwide average until the end of 2010, at a time when smartphones were in limited use, when it was overtaken by iOS and Android. It was notably less popular in North America.

<span class="mw-page-title-main">MeeGo</span> Discontinued Linux distribution

MeeGo is a discontinued Linux distribution hosted by the Linux Foundation, using source code from the operating systems Moblin and Maemo. Primarily targeted at mobile devices and information appliances in the consumer electronics market, MeeGo was designed to act as an operating system for hardware platforms such as netbooks, entry-level desktops, nettops, tablet computers, mobile computing and communications devices, in-vehicle infotainment devices, SmartTV / ConnectedTV, IPTV-boxes, smart phones, and other embedded systems.

<span class="mw-page-title-main">Meson (software)</span> Build automation system

Meson is a software tool for automating the building (compiling) of software. The overall goal for Meson is to promote programmer productivity. Meson is free and open-source software written in Python, under the Apache License 2.0.

<span class="mw-page-title-main">Bazel (software)</span> Software tool that automates software builds and tests

Bazel is a free and open-source software tool used for the automation of building and testing software. Google uses the build tool Blaze internally and released an open-sourced port of the Blaze tool as Bazel, named as an anagram of Blaze. Bazel was first released in March 2015 and was in beta status by September 2015.

References

  1. "Introducing Qbs". The Qt Company. Retrieved 2016-06-02.
  2. "ndex of /official_releases/qbs". download.qt.io. Retrieved 2022-05-13.
  3. "Qt Licensing - Qt Developer Network". qt-project.org.
  4. "qbs 1.0.0 released". The Qt Company. Retrieved 2016-06-02.
  5. 1 2 "Deprecation of Qbs". www.qt.io.
  6. 1 2 "Technical vision for Qt 6 - The next big release". www.qt.io.
  7. "GitHub - qbs/qbs: Modern build tool for software projects". GitHub. 22 July 2022.

Further reading