简体   繁体   English

QBS:qbs.buildVariant和qbs.configurationName有什么区别?

[英]QBS: What's the difference between qbs.buildVariant and qbs.configurationName?

In QBS build system, what's the difference between and use cases for qbs.buildVariant and qbs.configurationName ? 在QBS构建系统中, qbs.buildVariantqbs.configurationName和用例之间有什么区别?

I'm confused by the fact that while both of them can be used to select release or debug configurations, only configurationName is mapped to command-line parameter config: , and yet the value of buildVariant implicitly depends on configurationName . 我感到困惑的是,虽然它们都可以用于选择发布或调试配置,但是只有configurationName映射到命令行参数config: buildVariantbuildVariant的值隐含地取决于configurationName The two seem to have overlapping functionality. 两者似乎具有重叠的功能。

My gut feeling is that one of them (more likely the buildVariant ) might have been considered deprecated without reflecting that in docs, but I may/must be wrong. 我的直觉是,其中之一(更可能是buildVariant )可能已被认为已弃用,但未在文档中反映出来,但我可能/必须错了。

So, to sum up, what's the difference and when should we prefer one to another, especially in the context of creating custom Modules? 因此,总而言之,有什么区别?何时应该优先选择另一个, 特别是在创建自定义模块的情况下?

You don't have to care about qbs.configurationName in your project files, ever. 您无需担心项目文件中的qbs.configurationName。 It's only exposed as a property so that the default value of qbs.buildVariant can be derived from it. 它仅作为一个属性公开,因此可以从中获取qbs.buildVariant的默认值。 The config property on the command line mainly determines the name of your top-level build directory, and you can choose it freely. 命令行上的config属性主要确定顶级构建目录的名称,您可以自由选择它。 It's just that if it's called "debug" or "release", qbs will assume you want the respective build variant, to save you some typing. 只是,如果将其称为“ debug”或“ release”,则qbs会假设您要使用各自的构建变体,从而节省了键入时间。 That's all. 就这样。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM