[QBS] Install subdirectory tree
Christian Kandeler
christian.kandeler at theqtcompany.com
Wed Jan 7 11:24:32 CET 2015
On 01/07/2015 11:04 AM, Stéphane Fabry wrote:
> I'd like to install some files and directories that form a directory tree.
>
> Example:
>
> Group {
>
> name: "IMAGERs"
> prefix: "IMAGERs/**/"
> files: "*"
> qbs.install: true
> qbs.installDir: project.calibInstall + "/IMAGERs"
> }
> The imager directory has two subdirectories that contains files, after
> the install all files are mixed in IMAGER's and subdirectories are not
> created.
Yes, this is a known problem that comes up regularly.
> The only solution I have now is to make a group for each leaf subdirectory.
That is one possible workaround. The other one is to simply set the
"files" property to the root of the directory tree you want to install.
In your case:
Group {
name: "IMAGERs"
files: "IMAGERs"
qbs.install: true
qbs.installDir: project.calibInstall
}
This has the drawback that now qbs does not know the files in this
directory, so they won't show up in your project tree in Qt Creator. And
of course, if they are not purely run-time resources, but actual
sources, this approach won't work.
> Do you have a solution ?
We have discussed some promising ideas and I'm confident we will have
something ready for 1.4.
Christian
More information about the Qbs
mailing list