mirror of
https://github.com/artegoser/pimi-launcher.git
synced 2024-11-22 11:26:22 +03:00
fix: autoUpdater
This commit is contained in:
parent
4b332b8aa2
commit
9738b6349a
1 changed files with 26 additions and 0 deletions
|
@ -17,6 +17,32 @@ import { app, shell, BrowserWindow } from 'electron'
|
|||
import { join } from 'path'
|
||||
import { electronApp, optimizer, is } from '@electron-toolkit/utils'
|
||||
import icon from '../../resources/icon.png?asset'
|
||||
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; will install in 5 seconds')
|
||||
setTimeout(function () {
|
||||
autoUpdater.quitAndInstall()
|
||||
}, 5000)
|
||||
})
|
||||
|
||||
function createWindow() {
|
||||
// Create the browser window.
|
||||
|
|
Loading…
Add table
Reference in a new issue