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 = {
|
const options: any = {
|
||||||
provider: 'generic',
|
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
|
// Have to handle the auto updaters seperatly until we can support macOS. electron-builder limitation -q
|
||||||
|
if (process.platform === 'win32') await new NsisUpdater(options).checkForUpdatesAndNotify() //Windows
|
||||||
const win_autoUpdater = new NsisUpdater(options) //Windows
|
if (process.platform === 'linux') await new AppImageUpdater(options).checkForUpdatesAndNotify() //Linux
|
||||||
const linux_autoUpdater = new AppImageUpdater(options) //Linux
|
|
||||||
await win_autoUpdater.checkForUpdatesAndNotify()
|
|
||||||
await linux_autoUpdater.checkForUpdatesAndNotify()
|
|
||||||
});
|
});
|
||||||
ipcMain.on('disable-update', (event) => {
|
ipcMain.on('disable-update', (event) => {
|
||||||
// Check if using app store builds so people don't get pissy wen button go bonk
|
// 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) => {
|
ipcMain.on('get-version', (_event) => {
|
||||||
_event.returnValue = app.getVersion()
|
if (app.isPackaged){
|
||||||
|
_event.returnValue = app.getVersion()
|
||||||
|
} else {
|
||||||
|
_event.returnValue = `Experimental running on Electron ${app.getVersion()}`
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
ipcMain.on('open-appdata', (_event) => {
|
ipcMain.on('open-appdata', (_event) => {
|
||||||
shell.openPath(app.getPath('userData'));
|
shell.openPath(app.getPath('userData'));
|
||||||
|
|
|
@ -156,3 +156,5 @@ process.once('loaded', () => {
|
||||||
console.log("Setting ipcRenderer")
|
console.log("Setting ipcRenderer")
|
||||||
global.MusicKitInterop = MusicKitInterop;
|
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({
|
const app = new Vue({
|
||||||
el: "#app",
|
el: "#app",
|
||||||
store: store,
|
store: store,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue