mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-14 02:06:29 +00:00
Debug auto_update code of Windows app
This commit is contained in:
9
main.js
9
main.js
@@ -84,7 +84,10 @@ if (handleStartupEvent()) {
|
|||||||
|
|
||||||
var shouldQuit = app.makeSingleInstance(function(commandLine, workingDirectory) {
|
var shouldQuit = app.makeSingleInstance(function(commandLine, workingDirectory) {
|
||||||
if (mainWindow) {
|
if (mainWindow) {
|
||||||
if (mainWindow.isMinimized()) mainWindow.restore()
|
if (process.platform === 'win32') {
|
||||||
|
mainWindow.minimize()
|
||||||
|
mainWindow.restore()
|
||||||
|
}
|
||||||
mainWindow.focus()
|
mainWindow.focus()
|
||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
@@ -172,7 +175,7 @@ if (process.platform === 'darwin') {
|
|||||||
|
|
||||||
updater.on('update-downloaded', (info) => {
|
updater.on('update-downloaded', (info) => {
|
||||||
if (mainWindow != null) {
|
if (mainWindow != null) {
|
||||||
notify('Ready to Update! ' + releaseName, 'Click update button on Main window.')
|
notify('Ready to Update!', 'Click update button on Main window.')
|
||||||
mainWindow.webContents.send('update-available', 'Update available!')
|
mainWindow.webContents.send('update-available', 'Update available!')
|
||||||
isUpdateReady = true
|
isUpdateReady = true
|
||||||
}
|
}
|
||||||
@@ -262,7 +265,7 @@ app.on('ready', function () {
|
|||||||
ipc.on('update-app', function (event, msg) {
|
ipc.on('update-app', function (event, msg) {
|
||||||
if (isUpdateReady) {
|
if (isUpdateReady) {
|
||||||
appQuit = true
|
appQuit = true
|
||||||
update.install()
|
updater.install()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user