import QtQuick import qs.Common // Gates plugin activation on the chatd binary actually being built (see // chatd-rs/README or the project plan - a Rust build step is needed // before this plugin can do anything). QtObject { function chatdPath() { const dirUrl = Qt.resolvedUrl(".").toString(); const dir = dirUrl.replace(/^file:\/\//, ""); return dir + "chatd-rs/target/release/chatd"; } function check(done) { const path = chatdPath(); Proc.runCommand("dankChat.depCheck", ["test", "-x", path], (stdout, exitCode) => { if (exitCode === 0) { done(null); return; } done({ "title": I18n.tr("chatd is not built"), "details": I18n.tr("Expected an executable at:\n%1\n\nBuild it with:\ncd chatd-rs && cargo build --release").arg(path) }); }); } }