[QBS] Artifacts within Transformers; condition does not work

Kurt Keller kk at parity-software.com
Fri Jun 27 15:26:44 CEST 2014

I am using Qbs 1.2.1:

I would like to have a Transformer which should create two artifacts on
windows and only one on linux, depending on one single input file: 

Transformer {
  inputs: "version.h.in"

  Artifact {
    fileName: "version.h"
    fileTags: "hpp"

  Artifact {
    // condition: qbs.targetOS.contains("windows")
    condition: false
    fileName: "resource.rc"
    fileTags: "rc"

  prepare: {
    for (var tag in outputs) {
      for (var index in outputs[tag]) {
         var artifact = outputs[tag][index].filePath;
         print("file = " + artifact);

There are always both artifact file paths printed, the condition inside
the Artifact item for file tags 'rc' does not do anything.

Is this a bug or is this my mistake?


More information about the Qbs mailing list