Commit 0fbd4f83 authored by 阮传宙's avatar 阮传宙

fix: 兼容window启动

parent b9523143
......@@ -33,16 +33,11 @@ function javaServer() {
log.info(shell.ls())
const child = shell.exec(exePath + ' -jar syc-paas-standalone-biz.jar -spring.config.location=file:./baseServer/config/boostrap.yml &', { async: true })
let isStart = false
child.stdout.on('data', function (stdout) {
log.info(stdout, '----')
if (stdout.includes('http://localhost') && !isStart) {
if (!isMac()) {
process.send('close')
} else {
ipcRenderer.send("close", MESSAGE_TYPE.DESIGN);
}
isStart = true
}
})
......
......@@ -38,12 +38,8 @@ class ProcessActivity {
if (args.length) {
forkParam = [shellPath, args]
}
let child = null
if (utils.isMac()) {
child = utilityProcess.fork(...forkParam)
} else {
child = fork(...forkParam)
}
let child = child = utilityProcess.fork(...forkParam)
child.on('message', (data) => {
const childParam = { data, child }
......@@ -51,10 +47,6 @@ class ProcessActivity {
return this.watchGlobalMsg(childParam, cb)
}
this.handleDefaultProcessEnd(childParam)
if (data === 'close') {
this.ctx.win.close()
}
})
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment