本页内容

Qbs

Qbs 是一款多功能构建工具,它能够根据高级项目描述生成构建图(类似于 qmake 或 CMake 的工作方式),并执行构建图中低级别的命令(类似于 make 的工作方式)。

要使用Qbs构建项目,必须为该项目创建一个.qbs 文件。您可以使用Qt Creator 创建一个由 Qbs 构建的 C 或 C++ 项目。有关 Qbs 的更多信息,请参阅《Qbs 手册》。

应用程序使用与构建和运行套件关联的默认 Qbs 配置文件进行构建。Qt Creator 会为每个套件自动创建一个 Qbs 配置文件。您可以通过添加新的键和值来编辑构建配置文件。

要查看当前使用的 Qbs 版本,请选择“Preferences ” > “Qbs ” > “General ”。

构建 Qbs

如果您从Qt Creator Git 仓库自行构建Qt Creator ,还需要获取 Qbs 子模块以获得对 Qbs 的支持:

  1. 在您的Qt Creator Git 检出目录中,使用git submodule update --init 命令获取 Qbs 子模块。
  2. Qt Creator 上运行 qmake,并重新构建Qt Creator

另请参阅 “选择构建系统”“打开项目”“设置 Qbs 配置文件目录”、“Qbs 构建配置”以及“指定运行设置”

Copyright © The Qt Company Ltd. and other contributors. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.