Hi Damien, Out of curiosity, which IDE are you integrating Qbs into? We've actually done some prior work on Qbs IDE integration; you might want to look into the src/plugins/generator directory of the Qbs sources where you can find a Visual Studio integration.
There's also the Qbs Qt Creator plugin which you can investigate. > On Dec 14, 2017, at 9:19 AM, Damien Courtois <[email protected]> > wrote: > > 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 debug. > > 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 > Starting target > 'D:\Development\IsoDarts\build\Qbs\debug\IsoDarts.e08a60cd\IsoDarts.exe'. > 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. > > Damien > > > > 2017-12-14 17:38 GMT+01:00 Christian Kandeler <[email protected]>: > On Thu, 14 Dec 2017 16:21:42 +0100 > Damien Courtois <[email protected]> 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 my > > 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? > > > Christian > _______________________________________________ > Qbs mailing list > [email protected] > http://lists.qt-project.org/mailman/listinfo/qbs > > _______________________________________________ > Qbs mailing list > [email protected] > http://lists.qt-project.org/mailman/listinfo/qbs -- Jake Petroules - [email protected] The Qt Company - Silicon Valley Qbs build tool evangelist - qbs.io _______________________________________________ Qbs mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/qbs
