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).

> One question about an implementation detail: Currently ResolvedProject
> stores a list of ResolvedProduct and a list of ResolvedProjectFolder in
> parallel. Should I remove the ResolvedProduct list and replace it with
> one dummy ResolvedProjectFolder? This would save a few conditional
> expressions in handling project and products (as parent context of
> product will always be a ResolvedProjectFolder) or should I stay with
> both for compatibility reasons (I am not sure if introduction of dummy
> ResolvedProjectFolder may break compatibility to some existing qbs
> scripts).

If you're going the folder road, I'd say use a dummy root folder.


Cheers,

Joerg

_______________________________________________
QBS mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/qbs

Reply via email to