From c036bed301fcd484e7ba7f7f931efb85831d11fd Mon Sep 17 00:00:00 2001 From: he wei <858544502@qq.com> Date: 星期一, 21 三月 2022 12:08:33 +0800 Subject: [PATCH] java‘ --- src/main/demo/src/background.js | 13 ++++++++++--- 1 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/main/demo/src/background.js b/src/main/demo/src/background.js index 53d8c5c..0f06276 100644 --- a/src/main/demo/src/background.js +++ b/src/main/demo/src/background.js @@ -21,8 +21,11 @@ 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"]); @@ -67,10 +70,11 @@ 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') } } @@ -123,6 +127,9 @@ }) } +// 绂佺敤鏈湴缂撳瓨 +// app.commandLine.appendSwitch("--disable-http-cache"); + app.on('ready', async () => { // require('child_process').spawn('cmd.exe', ['/c', 'echo ready >> 123.txt']) startUp() -- Gitblit v1.9.1