[Qbs] Passing data from current project to module-provider

Иван Комиссаров abbapoh at gmail.com
Fri Jun 28 09:19:17 CEST 2024


You’d need to add a property in the provider and set in the top-level project to path.

The reason that providers cannot access product/project props directly is because we use provider props as a prodiver cache key to avoid generating modules for every product. Adding all possible props of the product/project/qbs module will result in the cache key being unique making caching impossible.

Why do you need an access to the build dir? Artefacts do not exist when providers are run.

If you want to generate some files, you can put them near the generated modules and use Group item to include them in the project

Ivan.

> 27 июня 2024 г., в 20:08, Maximilian Hrabowski <hrabowski at bee360.com> написал(а):
> 
> Hi all,
>  
> Is there a way to pass data from the current project to a module-provider (<project-root>/module-providers/myProvider/provider.qbs)?
>  
> When the relativeSearchPaths is evaluated inside the module-provider, it seems that nearly  no properties are available. It would be enough to know the build-directory or pass in a path.
> A work-around vould be to use outputBaseDir+”/../../..” but I’m not sure whether this is safe or there is a better way. Passing information determined at the beginning of a build (e.g. with a Probe) to the module-provider does not seem to be extra-ordinary to me.
>  
> Best regards,
> Maxim
> _______________________________________________
> Qbs mailing list
> Qbs at qt-project.org <mailto:Qbs at qt-project.org>
> https://lists.qt-project.org/listinfo/qbs

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qbs/attachments/20240628/a4dec691/attachment.htm>


More information about the Qbs mailing list