|
@@ -3,13 +3,18 @@ const childProcess = window.nodeRequire("child_process");
|
|
|
const util = window.nodeRequire("util");
|
|
|
const childProcessExec = util.promisify(childProcess.exec);
|
|
|
|
|
|
+const isWindowsPlatform = process.platform === "win32";
|
|
|
+
|
|
|
export function setScanner() {
|
|
|
+ if (!isWindowsPlatform) return;
|
|
|
const commandStr = `${getScanExePath()} -settings`;
|
|
|
console.log(commandStr);
|
|
|
return childProcessExec(commandStr);
|
|
|
}
|
|
|
|
|
|
export function evokeScanner(inputDir) {
|
|
|
+ if (!isWindowsPlatform) return;
|
|
|
+
|
|
|
const commandStr = `${getScanExePath()} -scan -d${inputDir}`;
|
|
|
// console.log(commandStr);
|
|
|
return childProcessExec(commandStr);
|