[QBS] What to use instead input.modules in artifact?
Aleksey Sidorov
gorthauer87 at yandex.ru
Sat Mar 2 11:22:18 CET 2013
I used input.modules in artifacts to dynamically create headers in build dir like this:
Rule:
Rule {
inputs: [ "devheader" ]
Artifact {
fileTags: [ "hpp", "installed_content" ]
fileName: "GeneratedFiles/" + input.modules.qbs.installDir + "/" + input.fileName
}
prepare: {
var cmd = new JavaScriptCommand();
cmd.sourceCode = function() {
var inputFile = new TextFile(input.fileName, TextFile.ReadOnly);
var file = new TextFile(output.fileName, TextFile.WriteOnly);
file.truncate();
file.write("#include \"" + input.fileName + "\"\n");
file.close();
}
cmd.description = "generating " + FileInfo.fileName(output.fileName);
cmd.highlight = "filegen";
return cmd;
}
}
Rule usage:
Group {
files: [
"api/*_p.h",
"api/draft/*_p.h",
"api/draft/*.h"
]
fileTags: ["devheader"]
overrideTags: false
qbs.installDir: "include/vreen/" + vreen.core.version + "/vreen/private"
}
But now i cannot get qbs.installDir in artifact from input.
More information about the Qbs
mailing list