const {autoUpdater} = require("electron-updater");
autoUpdater.on('checking-for-update', () => {
global.p3xre.mainWindow.webContents.send('p3x-action', {
action: 'toast',
message: global.p3xre.strings.updater["checking-for-update"]
})
})
autoUpdater.on('update-available', (info) => {
global.p3xre.mainWindow.webContents.send('p3x-action', {
action: 'toast',
message: global.p3xre.strings.updater["update-available"]
})
})
autoUpdater.on('update-not-available', (info) => {
global.p3xre.mainWindow.webContents.send('p3x-action', {
action: 'toast',
message: global.p3xre.strings.updater["update-not-available"]
})
})
autoUpdater.on('error', (error) => {
global.p3xre.mainWindow.webContents.send('p3x-action', {
action: 'toast',
error: error,
message: global.p3xre.strings.updater["error"]({
})
})
})
autoUpdater.on('download-progress', (progressObj) => {