mongodb-js / electron-squirrel-startup

Default Squirrel.Windows event handler for your Electron apps.
Apache License 2.0
217 stars 41 forks source link

How do I add release notes? #31

Open ishwarrimal opened 7 years ago

ishwarrimal commented 7 years ago

I am trying to add release notes in my update information (on windows system). But i am not able to do so.

And is there any way to prevent autoupdate? I am trying this. Its updating the app in both the case

autoUpdater.on('update-available', () =>{ console.log('update is available'); var index = dialog.showMessageBox(mainWindow, { type: 'info', buttons: ['Update','Later'], title: "My App", message: 'The new version of my app is available. Do you want to download now?' });

        if (index === 1) {
            return;
        }

        autoUpdater.on('update-downloaded', function (event,releaseName) {

            // # confirm install or not to user
            var index = dialog.showMessageBox(mainWindow, {
                type: 'info',
                buttons: ['Restart','Later'],
                title: "My Tech Solution",
                message: 'The new version has been downloaded. Please restart the application to apply the updates.',
                detail: releaseName
            });

            if (index === 1) {
                return;
            }

            // # restart app, then update will be applied
            autoUpdater.quitAndInstall();
        });
    });