📜 ⬆️ ⬇️

Qt Creator 2.7: QBS Project Manager Under the Hood

Greetings, friends! In early February, IDE Qt Creator 2.7 beta was announced, and on March 21, release 2.7.0 was introduced.
So, from noticeable changes in the new release were:

Many minor changes, such as merge support for the git plugin, improvements in the debugger, but in general, the release is not revolutionary, but evolutionary.
You know, I will not describe in detail all the changes, they can be read in the press release .
One notable innovation for me is the appearance in the main branch of the QBS support plugin. I wrote about the qbs system earlier in the Habré . Since a lot of water has flowed, and someone might have thought that the project has stalled, but no, the construction of communism is going on at an accelerated pace, and I will try to give a brief overview of some changes.



1. Support qbs projects (plugin QbsProjectManager)


(Note: until the release was released, there were problems with the build, and with stability under Windows).
How to collect? If you want to manually, of course, but do not use the finished assembly. I will just shorten your reading time, I will not write commands for git.

')
If everything did not go well, compilation errors (it happens!), Then two ways:

In addition, the fastest way is to simply download the binary build and enable the QBS Project Manager plugin in the settings.

2. Current plugin features


They are more than modest. You can build a project. And you can not collect!

You can also rescan the qbs file (for example, files were added, and the list of files is given by a mask) to rebuild the tree. Naturally, it remains possible to run under the debugger, like qmake project.
How the assembly itself goes: as with qmake, in the Compile Output we see the output of qbs. For the most part, it is very succinct until errors or warnings occur. Assembly can be interrupted. And thank God that such an opportunity already exists)
Build output
 15:32:58: Running steps for project qtcreator ...
 compiling tcpportsgatherer.cpp
 compiling textfileformat.cpp
 compiling treewidgetcolumnstretcher.cpp
 compiling uncommentselection.cpp
 compiling unixutils.cpp
 moc wizard.cpp
 moc wizard.h
 compiling faketooltip.cpp
 moc faketooltip.h
 moc tips.h
 compiling tipcontents.cpp
 moc tooltip.h
 compiling tooltip.cpp
 The following products couldn’t be built: QmlJSEditor, GLSLEditor, Git, CodePaster, Perforce, ClearCase, Android, Welcome, Core, Aggregation, Find, Debugger, RemoteLinux, styleplugin, QtcSsh, AutotoolsProjectManager, FakeVim, CMakeProjectManager, ImageViewer, QJQJ, QJ, QJ, QJ, CJ, JJT Mercurio apex Help, qtcreator, Todo, Bazaar, TextEditor, ClassView, cPlusPlus, CVS, Qt4ProjectManager, ResourceEditor, translations, QmlJS, VcsBase, Madde, qtpromaker, CppEditor, QmlEditorWidgets, QmlProfiler, HelloWorld, Valgrind, AnalyzerBase, sdktool, Locator.
 Build was canceled due to user request.
 03:33:05 PM: Canceled build / deployment.
 3:33:05 PM: Elapsed time: 00:05.


Naturally, if there are errors, you can see them in the assembly error widget. There are flaws with parsing (errors are displayed twice in fact), and with an alert icon (displayed as errors). I hope this is corrected.
In addition, it is possible to reassemble one specific file from the context menu. According to my feeling, this opportunity is somehow unstable (it hasn’t been noticed in its behavior, but sometimes it even works).
Having loaded the qbs project for QtCreator, I managed to build it in 13 minutes (which is twice as fast - about faster than qmake + make).
On the Run tab, there is a basic setup of steps for building under qbs. When I tried to add my own version, QtC crashed. Sadly


3. The most delicious. What was added for the year?




What else can I add? I was not able to test even half the capabilities of QBS, but I can say that the organization of cross-platform assemblies (under the arm tulcheyn) turned out to be very convenient and enjoyable.
In conclusion, it remains only to note that despite the rapid and explosive development, QBS is still under active development, and compatibility may still break (up to 1.0 release, which is good if it appears this year).
You can also read my previous article on QBS .

Source: https://habr.com/ru/post/171405/


All Articles