[QBS] New item ProductFolder

Jochen Becher jochen_becher at gmx.de
Mon Jun 3 20:32:24 CEST 2013


Am Montag, den 03.06.2013, 16:30 +0200 schrieb Joerg Bornemann:
> On 02/06/2013 16:22, Jochen Becher wrote:
> 
> > As I understand QBS is currently not able to provide a similar thing. So
> > I started to implement a new Item "ProductFolder" which is a virtual
> > folder / group between Project and Product. So one can write:
> >
> > Project {
> > 	name: "Project Name"
> > 	ProjectFolder {
> > 		name: "Client View"
> > 		Product { name: "My Client" }
> > 		references: "client_library.qbs"
> > 	}
> > }
> 
> I reckon that Visual Studio has virtual solution folders because it has 
> this one-level hierarchy "solution -> projects".
> Qbs has the same limitation ATM. Wouldn't your issue be solved by adding 
> the possibility to nest projects?
> 
> Project {
>      name: "foo"
>      SubProject {                // basically a fancy references entry
>          name: "libs"
>          displayName: "My Libraries"     // not sure if this is needed
>          filePath: "src/libs/libs.qbs"
>      }
> }
> 
> where src/libs/libs.qbs contains a Project item with all the libs which 
> can be even built stand-alone without the surrounding top-level project.
> 
> This looks quite similar to your approach and we need something like 
> this for Qt anyways (oh and actually for the qbs submodule in Qt Creator 
> as well).
> 

Of course nested projects could also be done. But especially the
implementation within qbs source code makes nested projects not the
first choice to me (ResolvedProjects contains attributes and methods
which are really only used from the top-level project and will not make
any sense within a nested project, won't they?)

Furthermore I would like to allow having ProjectFolder as a root element
within a referenced qbs file (currently only product is allowed here).
Having a Project as a root element in referenced qbs files would
introduce some kind of fuzziness of the project/product concept. I
prefer a cleaner structure Project -> ProjectFolder -> Product -> Group
where ProjectFolder and Group should be possible to nest.

Regards, Jochen





More information about the Qbs mailing list