版本更新
This commit is contained in:
@@ -34,7 +34,7 @@ app.whenReady().then(() => {
|
||||
|
||||
const installExe = async (exePath) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
exec(`start ${exePath}`, (error, stdout, stderr) => {
|
||||
exec(`${exePath}`, (error, stdout, stderr) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
@@ -65,12 +65,10 @@ app.whenReady().then(() => {
|
||||
"temp-exe-file.exe"
|
||||
);
|
||||
fs.writeFileSync(tempFilePath, response.data);
|
||||
|
||||
setTimeout(() => {
|
||||
win = null;
|
||||
app.exit();
|
||||
}, 1500);
|
||||
|
||||
const installResult = await installExe(tempFilePath);
|
||||
console.log(`安装结果:${installResult}`);
|
||||
} catch (error) {
|
||||
@@ -98,8 +96,7 @@ app.whenReady().then(() => {
|
||||
// 给渲染进程返回打印机列表
|
||||
ipcMain.on("getPrintList", () => {
|
||||
win.webContents.getPrintersAsync().then((res) => {
|
||||
console.log("打印机列表", res);
|
||||
|
||||
// console.log("打印机列表", res);
|
||||
win.webContents.send("printList", res);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user