check for update on launch, prep for operation balls
This commit is contained in:
parent
798a38613d
commit
23dafc4036
3 changed files with 13 additions and 8 deletions
|
@ -986,15 +986,13 @@ export class BrowserWindow {
|
|||
|
||||
const options: any = {
|
||||
provider: 'generic',
|
||||
url: `${base_url}`
|
||||
url: `${base_url}`,
|
||||
allowDowngrade: true,
|
||||
}
|
||||
|
||||
// Have to handle the auto updaters seperatly until we can support macOS. electron-builder limitation -q
|
||||
|
||||
const win_autoUpdater = new NsisUpdater(options) //Windows
|
||||
const linux_autoUpdater = new AppImageUpdater(options) //Linux
|
||||
await win_autoUpdater.checkForUpdatesAndNotify()
|
||||
await linux_autoUpdater.checkForUpdatesAndNotify()
|
||||
if (process.platform === 'win32') await new NsisUpdater(options).checkForUpdatesAndNotify() //Windows
|
||||
if (process.platform === 'linux') await new AppImageUpdater(options).checkForUpdatesAndNotify() //Linux
|
||||
});
|
||||
ipcMain.on('disable-update', (event) => {
|
||||
// Check if using app store builds so people don't get pissy wen button go bonk
|
||||
|
@ -1019,7 +1017,12 @@ export class BrowserWindow {
|
|||
})
|
||||
|
||||
ipcMain.on('get-version', (_event) => {
|
||||
if (app.isPackaged){
|
||||
_event.returnValue = app.getVersion()
|
||||
} else {
|
||||
_event.returnValue = `Experimental running on Electron ${app.getVersion()}`
|
||||
}
|
||||
|
||||
});
|
||||
ipcMain.on('open-appdata', (_event) => {
|
||||
shell.openPath(app.getPath('userData'));
|
||||
|
|
|
@ -156,3 +156,5 @@ process.once('loaded', () => {
|
|||
console.log("Setting ipcRenderer")
|
||||
global.MusicKitInterop = MusicKitInterop;
|
||||
});
|
||||
|
||||
ipcRenderer.send('check-for-update')
|
||||
|
|
|
@ -64,7 +64,7 @@ const store = new Vuex.Store({
|
|||
}
|
||||
}
|
||||
})
|
||||
|
||||
ipcRenderer.send('check-for-update')
|
||||
const app = new Vue({
|
||||
el: "#app",
|
||||
store: store,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue