Skip to content
This repository was archived by the owner on Jan 14, 2025. It is now read-only.

Commit b693c7c

Browse files
committed
Fix: Not opening after packaging
1 parent 73ca8e2 commit b693c7c

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

main.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,9 @@ contextMenu({
125125
});
126126

127127

128-
let win;
128+
129129
function createWindow() {
130-
win = new BrowserWindow({
130+
const win = new BrowserWindow({
131131
width: 298, // 300
132132
height: 438, // 400
133133
resizable: false,
@@ -150,12 +150,14 @@ function createWindow() {
150150

151151

152152
// win.webContents.openDevTools()
153-
}
153+
154154

155155
win.once('ready-to-show', () => {
156156
autoUpdater.checkForUpdatesAndNotify();
157157
});
158158

159+
}
160+
159161
autoUpdater.on('update-available', () => {
160162
let currWin = BrowserWindow.getFocusedWindow();
161163
currWin.webContents.send('mode', "App Update Available");
@@ -450,9 +452,9 @@ ipcMain.on('go', (event, filePath) => {
450452
var filePathArr = filePath.split("\n");
451453
analyzeAndGo(filePathArr);
452454
let currWin = BrowserWindow.getFocusedWindow();
453-
win.webContents.send('done', 'DONE');
455+
currWin.webContents.send('done', 'DONE');
454456
});
455457

456458
ipcMain.on('quit', (event) => {
457459
app.quit();
458-
})
460+
})

0 commit comments

Comments
 (0)