Yup. I tried to use TextFile and got next error:
:-1: warning: Error when calling output filter function: ReferenceError:
Can't find variable: TextFile
import qbs.TextFile
....
Rule {
id: sym
inputs: ["application"]
Artifact {
fileTags: ["sym"]
filePath: input.fileName.replace(".elf", ".sym")
}
prepare: {
var CmdPath = "arm-none-eabi-nm";
var args = ["-n", input.filePath];
var cmd = new Command(CmdPath, args);
cmd.stdoutFilterFunction = function ()
{
file = new TextFile(output.filePath, TextFile.WriteOnly);
file.truncate();
file.write('Some output\n');
file.close();
}
cmd.description = "Generating Symbol file: " + input.fileName;
cmd.highlight = "linker";
return cmd;
}
}
2015-07-17 20:14 GMT+08:00 Christian Kandeler <
[email protected]>:
> On 07/17/2015 01:43 PM, Andrii Anpilogov wrote:
> > I could not find a way to generate symbol file with QBS and GCC.
>
> See http://doc.qt.io/qbs/jsextension-textfile.html
>
>
> Christian
>
> _______________________________________________
> QBS mailing list
> [email protected]
> http://lists.qt-project.org/mailman/listinfo/qbs
>
--
--
WBR,
Andrii Anpilogov
Phone: +86 186-1660-3720
Skype: anpilogov.andrey
mailto:[email protected], [email protected]
_______________________________________________
QBS mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/qbs