[QBS] Proposal: improvements to the config system

devtomsci at me.com devtomsci at me.com
Wed Mar 28 16:33:58 CEST 2012


Hi Joerg,

Great I will update the original proposal.

I made a start implementing this last night. Currently I have working:

* qbs config uses dots rather than slashes
* qbs config --import and --export commands
* profiles and the "profile:x" setting
* buildVariant, architecture now internally always use the full qbs.* property (meaning "qbs build qbs.platform:mingw" will actually work as expected)
* build config takes into account command-line overrides, profiles, platforms and modules.* keyspace (in that order) and correctly sets module properties (or seems to, anyway!)
* Removed all the qbs.configurationValue() stuff from qtcore.qbs (although probably need to put it back in if we want to be backwards compatible with old configs)

I've left platforms the way the are for the moment. I had to hack things a little to special-case "qt.core.xyz" into {"qt/core", "xyz"} rather than {"qt", "core"} in the configuration - I didn't have enough time to dig into that, something to do with the module internal name needs to change maybe. Will look at implementing "qbs properties" tonight, but it all looks a bit hairy figuring out what scopes contain what :)

Example output:
    D:\hg\build-qbstest>qbs config --import newcfg.txt
    old global variables:
    defaults.platform: mingw32
    qt.default.path: D:\QtSDK-1.1b\Desktop\Qt\4.7.2\mingw
    qt.default.version: 4.7.2
    qt.x64.path: D:\QtSDK-1.1b\QtSources\4.7.2-msvc2010-x64
    qt.x64.version: 4.7.2

    new global variables:
    modules.qt.core.version: 4.7.2
    profiles.mingw.qbs.architecture: x86
    profiles.mingw.qbs.platform: mingw32
    profiles.mingw.qt.core.path: D:\QtSDK-1.1b\Desktop\Qt\4.7.2\mingw
    profiles.x64.qbs.architecture: x86_64
    profiles.x64.qbs.platform: msvc2010
    profiles.x64.qt.core.path: D:\QtSDK-1.1b\QtSources\4.7.2-msvc2010-x64


"qbs profile:x64" nearly runs successfully with the above config - only falls over at link step as I must have messed up qtcore.qbs slightly. Hopefully will fix that tonight. But it does the right thing in terms of setting up qbs.platform etc. And as you can see I haven't migrated platforms (or updated all the probe tools etc) yet.

If everyone's happy with the proposal, I'll post a final version of the proposal to the list for posterity, and take further implementation discussions offline?

Cheers,

Tom

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qbs/attachments/20120328/274c9e7f/attachment.html>


More information about the Qbs mailing list