[QBS] How to set the Qt version from the command line?
devtomsci at me.com
devtomsci at me.com
Thu Mar 22 11:15:53 CET 2012
> The syntax for this is not easy to guess:
> qbs release platform:msvc2010 qt/core.qtVersionName:x64
> architecture:x86_64
Thanks! Although I'm tempted to ask is there any chance we could change that to use a dot instead of the slash, for consistancy? I always thought one of the few really messy bits of java was the way classnames were referred to using dots except for internally and in reflection when they were slashes instead...
Thinking about it, it would be nice if you could use the dot syntax when referring to a submodule property - so instead of:
Depends { id:qtcore; name: "qt.core"}
property var v: qtcore.qtVersion
You could more simply say:
Depends { name: "qt.core"}
property var v: qt.core.qtVersion
It caught me out first time and I had to go read a bunch of other qbs files to figure out the trick of the extra "id:".
> If you omit the module name, then the qbs base module
> (share/qbs/modules/qbs/common.qbs) is assumed:
Gotcha.
> > All the examples I can find just rely on
> > qt/default/path being set.
>
> This definitely must find its way into the docs! :)
There are a few other places where the docs are already out of date with the 0.1 version - is there a docs cleanup/review planned or should I raise bugs when I see issues?
> > It would also be nice if qbs could figure out the appropriate platform
> > and architecture from the qt version, since they have to match up
> > anyway. (Although I understand if it's not as easy as it sounds to
> > figure this out!)
>
> Depends from which side you're looking at the problem. Does the chosen
> Qt select the platform (Qt Creator / qmake way) or does the chosen
> platform select the Qt build (which one)?
I guess the Qt version would have to choose the platform and arch, since as you say multiple Qt builds could be compatible with a given platform but there is exactly one combination used for a given Qt version. Plus if you specify Qt name you get 2 settings for free (arch & platform) as opposed for choosing 2 and only getting one inferred. Maybe it's not worth worrying about, especially if aliases are an option.
Cheers,
Tom
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qbs/attachments/20120322/1a71f45e/attachment.html>
More information about the Qbs
mailing list