[QBS] Do not called custom Rule from custom Module

Denis Shienkov denis.shienkov at gmail.com
Fri Apr 4 16:43:38 CEST 2014

Hi all.

I need for my project use the Windows software tracing feature:


For this purpose need to call the "tracewpp.exe" utility with passing a
list of project's source files (*.cpp) to them,
and then, the "tracewpp.exe" utility will create a set of the (*.tmh)
header files.

So, I trying to create a custom QBS module "wpp/WppModule.qbs":

import qbs 1.0

Module {

    property string wppTraceModuleHeadersDir: ".tmh/" + product.name

    condition: qbs.hostOS.contains('windows') &&
qbs.targetOS.contains('windows') && qbs.toolchain.contains('msvc')

    cpp.includePaths: product.buildDirectory + '/' + wppTraceModuleHeadersDir

    Rule {

        inputs: ["cpp"]

        Artifact {

            fileName: ModUtils.moduleProperty(product,

                      + '/' + input.completeBaseName + ".tmh"

            fileTags: ["tmh"]


        prepare: {

            var wpp_exe = "c:/Program Files/Windows

            var wpp_cfg_dir = "c:/Program Files/Windows

            var args = input.fileName;

            args.push("-cfgdir:" + wpp_cfg_dir);

            args.push("-odir:" + ModUtils.moduleProperty(product,

            var cmd = new Command(wpp_exe, args);

            cmd.description = "generating WPP " + output.fileName + " file";

            cmd.highlight = "filegen";

            return cmd;




and then in my project file I to do:

import qbs.base 1.0

DynamicLibrary {

    name: "foo"


    Depends { name: "wpp" }


    files: [




But in my case this does not work, the command do not called.. What I to do

Best regards,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qbs/attachments/20140404/648a5cd5/attachment.html>

More information about the Qbs mailing list