[Qbs] qbs run --dry-run not working ?
damien.courtois at gmail.com
Thu Dec 14 18:19:22 CET 2017
Thanks for the answer !
I'm currently working on integrating Qbs into another IDE. In this IDE, I
let the user point to the Qbs executable, optionally select a settings
folder and various other options.
Then through the IDE, I let the user select his profile and configuration,
and finally I let him build, clean and run the project.
To do that, I need to be able to easily get a list of available profiles
from Qbs (this one is pretty easy, I just need to parse the output of `qbs
config --list`), a list of available configurations (for the moment I'm
just exposing "debug" and "release", I have no idea how to get that
information) and the full path to the built executable (assuming the
project is a simple executable) I can't just run it using Qbs because the
IDE's debugger would attach to Qbs instead of the actual executable to
Currently I'm using `qbs config --list` to get the list of profiles, and
the only way to get the full path to the built executable is using `qbs
run`: it outputs something like
which I can parse, and then feed to the IDE's debugger.
But you can easily see that it's prone to errors, changes in the way Qbs
logs things to the stdout, etc.
So it would be awesome if Qbs was providing a sort of unified `query`
command (or something similar) that would let us extract informations about
Qbs and the project in a clear documented way (Ideally outputing in JSON
format or a similarly easy to parse format)
This way Qbs would be very easy to integrate into existing toolsets.
2017-12-14 17:38 GMT+01:00 Christian Kandeler <christian.kandeler at qt.io>:
> On Thu, 14 Dec 2017 16:21:42 +0100
> Damien Courtois <damien.courtois at gmail.com> wrote:
> > I'm not sure if this is a bug or me not understanding the documentation,
> > but when I use `qbs run [...] --dry-run profile:foo debug` my project is
> > still started.
> > Isn't this option supposed to suppress the actual command executions ?
> The --dry-run option is a build option and thus "command execution" refers
> to compilers and such. It's only available for "run" because "run" includes
> "build" as a sub-step.
> If I understand you correctly, you want output such as "would try to run
> <path to app>"? I suppose that could be added.
> > As a side note, I'm doing this to get the full path to the executable of
> > project. It's the only way I found, but I'd like to avoid starting the
> > executable just to get this information. Maybe there is a better way to
> > query this kind of information ?
> We don't currently have command-line options for this, though this sounds
> as if it would fit as an extension to the list-products command.
> What are you planning to do with that information?
> Qbs mailing list
> Qbs at qt-project.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Qbs