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

Commit

Permalink
Fix: Not opening after packaging
Browse files Browse the repository at this point in the history
  • Loading branch information
deep5050 committed Sep 9, 2020
1 parent 73ca8e2 commit b693c7c
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,9 @@ contextMenu({
});


let win;

function createWindow() {
win = new BrowserWindow({
const win = new BrowserWindow({
width: 298, // 300
height: 438, // 400
resizable: false,
Expand All @@ -150,12 +150,14 @@ function createWindow() {


// win.webContents.openDevTools()
}


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

}

autoUpdater.on('update-available', () => {
let currWin = BrowserWindow.getFocusedWindow();
currWin.webContents.send('mode', "App Update Available");
Expand Down Expand Up @@ -450,9 +452,9 @@ ipcMain.on('go', (event, filePath) => {
var filePathArr = filePath.split("\n");
analyzeAndGo(filePathArr);
let currWin = BrowserWindow.getFocusedWindow();
win.webContents.send('done', 'DONE');
currWin.webContents.send('done', 'DONE');
});

ipcMain.on('quit', (event) => {
app.quit();
})
})

0 comments on commit b693c7c

Please sign in to comment.