mirror of
https://github.com/artegoser/pimi-launcher.git
synced 2024-12-04 16:46:22 +03:00
fix: autoupdate after close
This commit is contained in:
parent
298c9ec96a
commit
0496200d8f
1 changed files with 1 additions and 23 deletions
|
@ -19,29 +19,6 @@ import { electronApp, optimizer, is } from '@electron-toolkit/utils'
|
||||||
import icon from '../../resources/icon.png?asset'
|
import icon from '../../resources/icon.png?asset'
|
||||||
import { autoUpdater } from 'electron-updater'
|
import { autoUpdater } from 'electron-updater'
|
||||||
|
|
||||||
autoUpdater.checkForUpdatesAndNotify()
|
|
||||||
|
|
||||||
autoUpdater.on('checking-for-update', () => {
|
|
||||||
console.log('Checking for update...')
|
|
||||||
})
|
|
||||||
autoUpdater.on('update-available', () => {
|
|
||||||
console.log('Update available.')
|
|
||||||
})
|
|
||||||
autoUpdater.on('update-not-available', () => {
|
|
||||||
console.log('Update not available.')
|
|
||||||
})
|
|
||||||
autoUpdater.on('error', () => {
|
|
||||||
console.log('Error in auto-updater.')
|
|
||||||
})
|
|
||||||
autoUpdater.on('download-progress', () => {
|
|
||||||
console.log('Download progress...')
|
|
||||||
})
|
|
||||||
|
|
||||||
autoUpdater.on('update-downloaded', () => {
|
|
||||||
console.log('Update downloaded')
|
|
||||||
autoUpdater.quitAndInstall()
|
|
||||||
})
|
|
||||||
|
|
||||||
function createWindow() {
|
function createWindow() {
|
||||||
// Create the browser window.
|
// Create the browser window.
|
||||||
const mainWindow = new BrowserWindow({
|
const mainWindow = new BrowserWindow({
|
||||||
|
@ -90,6 +67,7 @@ app.whenReady().then(() => {
|
||||||
optimizer.watchWindowShortcuts(window)
|
optimizer.watchWindowShortcuts(window)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
autoUpdater.checkForUpdatesAndNotify()
|
||||||
createWindow()
|
createWindow()
|
||||||
|
|
||||||
app.on('activate', function () {
|
app.on('activate', function () {
|
||||||
|
|
Loading…
Add table
Reference in a new issue