| | |
| | | let path = pathArr.join('\\'); |
| | | // require('child_process').spawn('cmd.exe', ['/c', 'echo '+path+' > 123.txt']); |
| | | |
| | | serverProcess = require('child_process').spawn('cmd.exe', ['/c', 'testElectronJ.bat'], { |
| | | cwd: path + '/bundled/bin' |
| | | // serverProcess = require('child_process').spawn('cmd.exe', ['/c', 'testElectronJ.bat'], { |
| | | // cwd: path + '/bundled/bin' |
| | | // }) |
| | | serverProcess = require('child_process').spawn('app_x64.exe', { |
| | | cwd: path + '/bundled' |
| | | }) |
| | | } else { |
| | | const chmod = require('child_process').spawn('chmod', ['+x', app.getAppPath() + "/bin/testElectronJ"]); |
| | |
| | | if (process.env.WEBPACK_DEV_SERVER_URL) { |
| | | // Load the url of the dev server if in development mode |
| | | await win.loadURL(process.env.WEBPACK_DEV_SERVER_URL) |
| | | // if (!process.env.IS_TEST) win.webContents.openDevTools() |
| | | if (!process.env.IS_TEST) win.webContents.openDevTools() |
| | | } else { |
| | | createProtocol('app') |
| | | // Load the index.html when not in development |
| | | // win.webContents.openDevTools(); |
| | | win.loadURL('app://./index.html') |
| | | } |
| | | } |
| | |
| | | }) |
| | | } |
| | | |
| | | // 禁用本地缓存 |
| | | // app.commandLine.appendSwitch("--disable-http-cache"); |
| | | |
| | | app.on('ready', async () => { |
| | | // require('child_process').spawn('cmd.exe', ['/c', 'echo ready >> 123.txt']) |
| | | startUp() |