[Qbs] Need help with setting up a code generator

Christian Kandeler christian.kandeler at qt.io
Tue Dec 12 14:29:36 CET 2017


On Tue, 12 Dec 2017 14:20:01 +0100
Ola Røer Thorsen <ola at silentwings.no> wrote:

> To run the command inside the outputArtifacts script, I'll use the Process
> object, right?

Yes.

> What is the exact condition for when this script is run? Is it only
> whenever any of the inputs are modified (or the qbs file I guess)?

Whenever any input has a timestamp newer than any output, or if a property accessed in the rule has changed its value since the last run, or if the rule source code has changed.
Modifications to the qbs file only cause rule re-execution if there are relevant changes as described above.

> What's the simplest way to define a dummy command in the prepare-script?

var cmd = new JavaScriptCommand();
cmd.silent = true; // Or cmd.description = "<your choice>";
cmd.sourceCode = function() {}


Christian



More information about the Qbs mailing list