[Qbs] A simple project that copy an executable does not work
Vincent Hui
vincenthk007 at gmail.com
Sat Jul 6 10:21:37 CEST 2019
Hi,
I created a simple project to copy an executable generated by
CppApplication. However the executable is not copied.
I cannot figure out why? Can anyone tell me why?
Thank you very much.
Regards,
Vincent
my qbs file
"
import qbs.base
import qbs.File
import qbs.FileInfo
CppApplication {
name: "myapp"
consoleApplication: true
files: "main.cpp"
Depends { name: "Qt.core" }
Group { // Properties for the produced executable
fileTagsFilter: "application"
qbs.install: true
qbs.installDir: "bin"
}
Rule {
inputs: ["application"]
Artifact {
filePath: input.fileName + ".out"
}
prepare: {
var cmd = new JavaScriptCommand();
cmd.description = "generating " +
FileInfo.fileName(output.filePath);
cmd.sourceCode = function() {
File.copy(input.filePath, output.filePath);
}
return cmd;
}
}
}
"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qbs/attachments/20190706/d5045a35/attachment.html>
More information about the Qbs
mailing list