[QBS] BinaryProbe is broken?

Aleksey Sidorov gorthauer87 at yandex.ru
Mon Apr 7 16:13:48 CEST 2014


Following code snippet successfully found bison binary, but path or filePath variable is undefined

import qbs
import qbs.probes as Probes

Product {
    property string bisonPath: "bison"

    Probes.PathProbe {
        id: bisonProbe
        names: ["bison"]
        platformPaths: [ "/usr/local/bin", "/usr/bin" ]
    }
    Properties {
        condition: bisonProbe.found
        bisonPath: {
            print ("Bison found: " + bisonProbe.found + ", path: " + bisonProbe.path);
            return bisonProbe.path;
        }
    }
    Group {
        name: "Bison: " + bisonPath + "(" + bisonProbe.filePath + ")"
    }
}





More information about the Qbs mailing list