0.0.6 • Published 8 years ago

electron-asar-autoupdate v0.0.6

Weekly downloads
1
License
ISC
Repository
github
Last release
8 years ago

electron asar autoupdate

set code in index.html

    updater = require('electron-asar-autoupdate')
    updater.init({
        api: 'http://localhost:3400/update',
        appPath: __dirname + '/'
    })
    window.checkForUpdates = function () {
        EAU.check(function (error) {
            if (error) {
                if (error === 'no_update_available') {
                    return false;
                }
                alert(error);
                return false;
            }

            var apply = confirm("New Update Available.\nWould you like to update?");
            if (apply == true) {

                EAU.download(function (error) {
                    if (error) {
                        alert(error);
                        return false;
                    }
                    alert('App updated successfully! Restart it please.');
                });

            } else {
                return false;
            }

        });
    }
0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago