请输入您要查询的百科知识:

 

词条 Qbs (build tool)
释义

  1. Features

  2. Build process

  3. Example Qbs file

  4. History

  5. Notable applications that use Qbs

  6. References

  7. External links

{{primary sources|date=June 2016}}{{Infobox software
| name = Qbs
| developer = Qt Project, The Qt Company
| released = {{Start date and age|2012|02|15}}[1]
| latest release version = 1.12.2
| latest release date = {{Start date and age|2018|12|10}}[2]
| repo = https://code.qt.io/cgit/qbs/qbs.git
| status = Active
| programming language = C++, JavaScript, QML, some Java and TypeScript
| operating system = Cross-platform
| genre = Build automation, software development tools
| license = LGPL[3]
}}

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++.

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, and is now primarily developed by 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). The developers hope to eventually push for Qbs to replace qmake as Qt's own build system.

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

import qbs 1.0

Application {

    name: "helloworld"    files: ["main.cpp"]    Depends { name: "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 Project beginning around that time. It was deprecated[5] in favor of qmake and/or cmake, as of October 2018.

It should be noted, though, that the term deprecation is quite an unfortunate choice of wording here, as it may discourage new developers from learning QBS, giving them false impression that the build system is doomed; on the contrary, this only means that even though the QT Company will stop dedicating resources to QBS after the year 2019, they will still support it throughout this period and are now working towards a new release in April. Meanwhile, external contributors are welcomed to take lead in the development[6].

Notable applications that use Qbs

  • Qt
  • Qt Creator
  • [https://docs.conan.io/en/latest/integrations/qbs.html Conan (C++ package manager)]
  • [https://github.com/mitchcurtis/slate Slate]

References

1. ^{{cite web |title = Introducing Qbs |url = http://blog.qt.io/blog/2012/02/15/introducing-qbs/ |publisher = The Qt Company |accessdate = 2016-06-02 }}
2. ^{{cite web|title=official 1.12.2 release|url=https://download.qt.io/official_releases/qbs/1.12.2/|date=10 December 2018}}
3. ^{{cite web|url=https://www.qt.io/faq/|title=Qt Licensing - Qt Developer Network |publisher=qt-project.org}}
4. ^{{ cite web |title = qbs 1.0.0 released |url = https://blog.qt.io/blog/2013/05/31/qbs-1-release/ |publisher = The Qt Company |accessdate = 2016-06-02 }}
5. ^{{cite web|title=Deprecation of Qbs|url=https://blog.qt.io/blog/2018/10/29/deprecation-of-qbs/}}
6. ^{{Cite web|url=https://blog.qt.io/blog/2018/10/29/deprecation-of-qbs/#comment-1205579|title=Tuukka Turunen's clarification about the fate of QBS|last=|first=|date=|website=|archive-url=|archive-date=|dead-url=|access-date=}}

External links

  • [https://doc.qt.io/qbs/ Qbs Manual]
  • [https://stackoverflow.com/questions/tagged/qbs Newest 'qbs' Questions - Stack Overflow]
  • [https://www.youtube.com/watch?v=v4glCQt2jE0 QtWS15 - Effective multi platform development with Qt, Creator, QBS, and QEMU Andrew Knight, Intopalo]
  • Qt Creator 2.7: QBS the project manager under a cowl
  • [https://www.opennet.ru/opennews/art.shtml?num=42122 Release of an assembly tool qbs 1.4.0, Qt to develop the project]
{{Qt}}

3 : Build automation|Compiling tools|Qt (software)

随便看

 

开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。

 

Copyright © 2023 OENC.NET All Rights Reserved
京ICP备2021023879号 更新时间:2024/9/21 18:43:13