[QBS] v2 of Proposal: improvements to the config system

André Pönitz andre.poenitz at mathematik.tu-chemnitz.de
Wed Mar 28 23:44:57 CEST 2012

On Wed, Mar 28, 2012 at 08:20:40PM +0000, Tom Sutcliffe wrote:
> The way we'd represent this in the QSettings keyspace would be
> something like this. I've modelled this on my setup where for a given
> qt version I need to set the architecture and platform at the same
> time - with this proposal these can be setup in exactly the same way.
> profiles.myDefaultSetup.qt.core.path: "D:\QtSDK-1.1\Desktop\Qt\4.7.2\mingw"
> profiles.myDefaultSetup.qbs.platform: "mingw32"
> profiles.myDefaultSetup.qbs.architecture: "x86"
> profiles.x64.qt.core.path: "D:\QtSDK-1.1\QtSources\4.7.2-msvc2010-x64"
> profiles.x64.qbs.platform: "msvc2010"
> profiles.x64.qbs.architecture: "x86_64"
> profiles.x64.qbs.buildVariant: "release"
> Which profile(s) are used is determined by the top-level "profile"
> key. Thus you could run "qbs build release profile:x64" (or just "qbs
> profile:x64") then all the keys under profiles.x64 would be set (ie
> qbs.platform would be set to "msvc2010" etc), or you could set the
> default value for this (and thus the default profile to be used) by
> calling "qbs config --global profile myDefaultSetup".

Sorry for being late in the game (and for not knowing qbs, getting
terminology wrong, ...)

I think it might be beneficial to have one more indirection below the
"profiles" level, depending on you many properties hide behind e.g. the
'qt.' "component" 

If there will be "a lot qt. properties" like

 profiles.x64.qt.core.path: "D:\QtSDK-1.1\QtSources\4.7.2-msvc2010-x64"
 profiles.x64.qt.foo1: ...
 profiles.x64.qt.foo63: ...
 profiles.x64.qbs.platform: "msvc2010"
 profiles.x64.qbs.architecture: "x86_64"
 profiles.x64.qbs.buildVariant: "release"

 profiles.x64a.qt.core.path: "D:\QtSDK-1.1\QtSources\4.7.2-msvc2010-x64"
 profiles.x64a.qt.foo1: ...
 profiles.x64a.qt.foo63: ...
 profiles.x64a.qbs.platform: "msvc2010"
 profiles.x64a.qbs.architecture: "x86_64"
 profiles.x64a.qbs.buildVariant: "release-ish"

this could be 

 qt.somename64.core.path: "D:\QtSDK-1.1\QtSources\4.7.2-msvc2010-x64"
 qt.somename64.foo1: ...
 qt.somename64.foo63: ...

 profiles.x64.qt: "somename64"   # "links" to all qt.somename64.*
 profiles.x64.qbs.architecture: "x86_64"
 profiles.x64.qbs.buildVariant: "release"

 profiles.x64a.qt: "somename64"
 profiles.x64a.qbs.architecture: "x86_64"
 profiles.x64a.qbs.buildVariant: "release-ish"

It's essentially the same data, but treats profiles as a "bag of
highlevel components" instead of a "bag of all the properties of 
highlevel components", and would incidentally pretty much match
what (hopefully, work is on-going...) will be the internal layout
of qt versions, toolchains, etc for Qt Creator 2.6

I pretty much agree with everything else.


More information about the Qbs mailing list