[QBS] About vcproj generators

Jake Petroules jake.petroules at petroules.com
Sun Jul 27 08:23:37 CEST 2014


On 2014-07-27, at 02:12 AM, Smirnov Vladimir <mapron at yandex.ru> wrote:

> Greetings,
> 
> I just wonder, does anybody tried to implement .vsproj/.sln generator 
> for qbs?
> I have created such tool some weeks ago, but it has some possible flaws:
> -It uses qbscore library (so it low integreated to qbs tree),

This is the right approach. Such a generator would be integrated into qbs so it would certainly be using the qbscore library. 

> -It generates projects which uses "NMake tool" template and runs qbs on 
> build.

Yep, this sounds correct.

> -generates debug/release configurations for several qbs profiles 
> (==profiles*2 vcproj configs)

Probably OK.

> It's ok for our company, but i am thinking about better approach.
> What already done?
> -Generating .sln files with subgroups as nested Projects items do;

Yes.

> -Files and filters (in a plain list without groups)

Absolutely.

> -Writing Intellisence settings (includes and defines)

Yes, my Xcode generator does the equivalent too.

> -Some common options as target name and destination directory.

Absolutely.

> 
> I have some plans of what could be done right:
> 
> 1. writing command-line tool alike qbs-qt-setup;

Wouldn't necessarily have to be a separate tool, my WIP has it as a sub-command (so `qbs generate [...]`), though this could change.

> 2. writing autotests;

Tricky.

> 3. implement generating projects which invoke VCCompiler, not 
> nmake-like. So it should create moc invokation just like QtAddin does.

Qbs is too powerful to allow VC to perform the build. It must be a makefile target which invokes qbs to perform the actual build steps.

> 
> So, i am asking QBS leaders: How should it be?
> _______________________________________________
> QBS mailing list
> QBS at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/qbs


I've already begun work on an Xcode generator; you can find the patches for that here if it helps (still, note that these are only WIP, the API and method of integration could change):

https://codereview.qt-project.org/#/c/89972/ (generator API)
https://codereview.qt-project.org/#/c/75130/ (Xcode generator)

I strongly encourage you to push your WIP vcproj generator to Gerrit so we can all have a look and help it get to a point where it can be merged upstream - no sense in duplicating effort. ;)
-- 
Jake Petroules - jake.petroules at petroules.com
Chief Technology Officer - Petroules Corporation


More information about the Qbs mailing list