<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Hi,<br>
<br>
I am struggling for a while trying to trigger a Rule on completion of an Application.<br>
In any way I tried it, the Rule is never executed.<br>
Here is a small example, which do not work for me, because the Rule is never executed.<br>
<br>
<font face="Courier New">import qbs 1.0<br>
import qbs.File<br>
import qbs.FileInfo<br>
<br>
Project {<br>
    name: "mainproject"<br>
    minimumQbsVersion: "1.4.0"<br>
<br>
<br>
    Product {<br>
        name: "helloworld"<br>
        type: "application"<br>
        files: "main.c"<br>
        Depends { name: "cpp" }<br>
    }<br>
<br>
    Product {<br>
        name: "copy"<br>
        type: ["custom-image"]<br>
        Depends { name:"helloworld" }<br>
<br>
        Rule {<br>
            multiplex: true<br>
            inputsFromDependencies: ["application"]<br>
<br>
            prepare: {<br>
                var cmds = [];<br>
<br>
                var cmd = new JavaScriptCommand();<br>
                cmd.description = "deploy " + input.filePath;<br>
                cmd.highlight = "codegen";<br>
                cmd.sourceCode = function() {<br>
                    File.copy(input.filePath, "/tmp/helloworld");<br>
                }<br>
                cmds.push(cmd);<br>
                return cmds;<br>
            }<br>
        }<br>
    }<br>
}<br>
</font><br>
Probably I am making a noob's mistake. I would be very glad for any hint.<br>
<br>
Thanks a lot<br>
Stefan<br>
</div>
<br>
<p style="FONT-SIZE: 8pt; FONT-FAMILY: Arial,Helvetica,sans-serif; BORDER-TOP-COLOR: ; BORDER-LEFT-COLOR: ; COLOR: black; BORDER-BOTTOM-COLOR: ; BORDER-RIGHT-COLOR: ">
<br>
<br>
Hottinger Baldwin Messtechnik GmbH, Im Tiefen See 45, 64293 Darmstadt, Germany | www.hbm.com
<br>
<br>
Registered as GmbH (German limited liability corporation) in the commercial register at the local court of Darmstadt, HRB 1147  <br>
Company domiciled in Darmstadt | Managing Director: Andreas Hüllhorst | Chairman of the board: Eoghan O’Lionaird
<br>
<br>
Als Gesellschaft mit beschränkter Haftung eingetragen im Handelsregister des Amtsgerichts Darmstadt unter HRB 1147 <br>
Sitz der Gesellschaft: Darmstadt | Geschäftsführung: Andreas Hüllhorst | Aufsichtsratsvorsitzender: Eoghan O’Lionaird
<br>
<br>
The information in this email is confidential. It is intended solely for the addressee. If you are not the intended recipient, please let me know and delete this email.
<br>
<br>
Die in dieser E-Mail enthaltene Information ist vertraulich und lediglich für den Empfänger bestimmt. Sollten Sie nicht der eigentliche Empfänger sein, informieren Sie mich bitte kurz und löschen diese E-Mail.</p>
<br>
</body>
</html>