added launching, patching, and ui override

This commit is contained in:
2024-01-13 23:41:40 +01:00
parent d9fec1193e
commit f11e84efd7
13 changed files with 599 additions and 15 deletions

20
src/util/executeUtil.js Normal file
View File

@@ -0,0 +1,20 @@
const childProcess = require("child_process");
const runFile = (folder, file, args, onExit) => {
childProcess.execFile(file, args, {
cwd: folder
}, (_err, _stdout, _stdin) => {
if (onExit) onExit();
})
}
const runFileDetached = (folder, file, args) => {
const subProcess = childProcess.spawn(file + (args ? " " + args : ''), {
cwd: folder,
detached: true,
stdio: 'ignore'
});
subProcess.unref();
}
module.exports = { runFile, runFileDetached };