这是qbs.installSourceBase
物业的工作。基本上,您将其设置为包含组中文件的基本目录,Qbs 将qbs.installDir
根据它们相对于上述基本目录的路径将列出的文件分层安装。
例如,给定以下组:
// defined in /source/myproject/myproject.qbs
Group {
qbs.install: true
qbs.installDir: "share/stuff"
qbs.installSourceBase: "." // relative to /source/myproject
files: [
"fileA.txt",
"fileB.txt",
"subdir/fileB.txt",
]
}
和以下命令行调用:
$ qbs [...] --install-root /sample/some-root
将产生以下文件系统层次结构:
/sample/some-root/share/stuff/fileA.txt
/sample/some-root/share/stuff/fileB.txt
/sample/some-root/share/stuff/subdir/fileB.txt
有关详细信息,请参阅 Qbs安装属性文档。