Elsewhere (http://qt-project.org/forums/viewthread/31038/) I reported my
issue with manipulating TextFiles with qbs. Am I the only one having
trouble? I would appreciate it if someone could confirm / deny this.
minimal qbs file to reproduce:
import qbs 1.0
import qbs.fileinfo as FileInfo
Project {
property string name: "helloWorld"
Product {
type: [ "someOutput" ]
name: project.name + ".html"
Transformer {
// no inputs -> just a generator
Artifact {
fileName: "test.txt"
fileTags: "conf"
}
prepare: {
var cmdConf = new JavaScriptCommand();
cmdConf.confContent = 'Hello World';
cmdConf.description = "generating " + output.fileName;
cmdConf.highlight = "codegen";
cmdConf.sourceCode = function() {
print("Starting...");
var file = new TextFile(output.fileName, TextFile.WriteOnly);
file.truncate();
file.write(confContent);
file.close();
}
return cmdConf;
}
}
}
}
Thanks in advance
_______________________________________________
Qt-creator mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/qt-creator