3
我有這個簡單的代碼爲什麼qbs不理會我的規則?
import qbs
Project {
name: "simple_test"
Product {
name: "micro"
type: "other"
Group {
files: '*.q'
fileTags: ['qfile']
}
Rule {
id: check1
inputs: ["qfile"]
prepare: {
var cmd = new JavaScriptCommand();
cmd.description = "QFile passing"
cmd.silent = false;
cmd.highlight = "compiler";
cmd.sourceCode = function() {
print("Nothing to do");
};
return cmd;
}
}
Transformer {
inputs: ['blink.q']
Artifact {
filePath: "processed_qfile.txt"
fileTags: "processed_qfile"
}
prepare: {
var cmd = new JavaScriptCommand();
cmd.description = "QFile transformer";
cmd.highlight = "compiler";
cmd.sourceCode = function() {
print("Another nothing");
};
return cmd;
}
}
}
}
並把兩個文件blink.q和blink1.q
通過文件,我必須在「編譯輸出」窗口看到3行:兩個與 「一個QFile傳「和一個用‘一個QFile變壓器’
但我看到只有變壓器塊是工作(沒有‘QFile時路過’的話);?(什麼是錯我的規則