[QBS] Rule ist not executed

Wolf Bublitz wolf.bublitz at gmail.com
Sat Nov 22 21:36:02 CET 2014


Hi,

I am new to QBS and currently I am trying to setup a custom Rule:

DynamicLibrary
    {
        property string targetDir: path

        name: "Test"
        files:
            [
            "file1.h",
            "file2.h",
            "file1.cpp",
            "file2.cpp",

        ]
        Depends { name: "cpp" }
        Depends { name: "Qt"; submodules: ["core"]}

        Rule
        {
            inputs: ["hpp"]

            Artifact
            {
                filePath: "test/" + input.filePath
                fileTags: ["HeaderCopy"]
            }

            prepare:
            {
                var cmd = new JavaScriptCommand();
                cmd.description = "copying " + input.filePath;
                cmd.highlight = "filegen";
                cmd.sourceCode = function()
                {
                    print("simulated copy");
                };

                return cmd;
            }
        }
   }


As shown above my rule should copy the header files to a directory called „test“. Please note that there is no copying at all at the moment, the Rule just prints „simulated copy“ for testing purpose. The problem I am fighting with is that my Rule seems not to be executed. As far as I see it, I would expect „copying header1.h“ and „copying header2.h“ in the output of QBS but nothing happens at all. The files are „just“ compiled and nothing more happens.

I would be happy if some of could give me a hint why my rule keeps doing nothing.


Greetings

Wolf Bublitz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qbs/attachments/20141122/e77330b8/attachment.html>


More information about the Qbs mailing list