[QBS] (no subject)
Kakadu
kakaduhafanana at yandex.ru
Thu May 16 15:59:33 CEST 2013
Oh, I didn't expect that prepare can return many commands. thanks.
--
Best wishes,
Kakadu
16.05.2013, 12:14, "Joerg Bornemann" <joerg.bornemann at digia.com>:
> On 15/05/2013 18:28, Kakadu wrote:
>
>> Now qbs take source file and generates result in build folder. I have compiler which takes source files and places result always in the same folder. Is it possible to hack qbs to copy source file to build directory and built it there? How difficult is it?
>
> You'd have to add a copy command before the actual compiler call.
> Something like this:
>
> ---snip---
> Rule {
> ...
> prepare: {
> ...
> var commands = [];
> // copy source file
> var cmd = new Command("cp", [input.fileName,
> FileInfo.path(output.fileName));
> commands.push(cmd);
> // now the actual compiler call
> cmd = new Command("g++", args);
> commands.push(cmd);
> return commands;
> }
> }
> ---snap---
>
> Instead of calling cp you can use a JavaScript command and copy the file
> via File.copy in a platform-independent way, if you want.
>
> BR,
>
> Joerg
>
> _______________________________________________
> QBS mailing list
> QBS at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/qbs
More information about the Qbs
mailing list