commit 9694f58b5e56035ca2f81621461c92329fe0415e
parent 03077033988cf62665b3f4534c624c2ff1fe794c
Author: Marcel <MTRNord@users.noreply.github.com>
Date: Sun, 4 Sep 2016 19:54:39 +0200
Merge pull request #10 from MTRNord/develop
fix finally Autoupdater
Diffstat:
3 files changed, 25 insertions(+), 8 deletions(-)
diff --git a/app/main.js b/app/main.js
@@ -9,18 +9,35 @@ let win
function update () {
console.warn("Starting Autoupdater")
console.warn(app.getVersion())
- var feedUrl = 'https://ls-desktop.herokuapp.com/update/' + os.platform() + '/' + app.getVersion() + '/';
+ var feedUrl = 'http://ls-desktop.herokuapp.com/update/' + os.platform() + '/' + app.getVersion() + '/';
autoUpdater.setFeedURL(feedUrl);
- autoUpdater.checkForUpdates()
+ console.log('created');
+ autoUpdater.on('checking-for-update', function() {
+ console.log("checking-for-update");
+ });
+
+ autoUpdater.on('update-available', function() {
+ console.log("update-available");
+ });
+
+ autoUpdater.on('update-not-available', function() {
+ console.log("update-not-available");
+ });
+
+ autoUpdater.on('update-downloaded', function() {
+ console.log(" update-downloaded");
+ });
+
+ setTimeout(function() {autoUpdater.checkForUpdates()}, 10000);
autoUpdater.on('update-downloaded', function (event, releaseNotes, releaseName, releaseDate, updateUrl, quitAndUpdate) {
- var index = dialog.showMessageBox(mainWindow, {
+ var index = dialog.showMessageBox({
type: 'info',
buttons: ['Restart', 'Later'],
title: "Lornsenschule Vertretungsplan",
- message: i18n.__('The new version has been downloaded. Please restart the application to apply the updates.'),
+ message: ('The new version has been downloaded. Please restart the application to apply the updates.'),
detail: releaseName + "\n\n" + releaseNotes
});
@@ -28,7 +45,7 @@ function update () {
return;
}
- autoUpdater.quitAndUpdate();
+ quitAndUpdate()
});
}
diff --git a/app/package.json b/app/package.json
@@ -1,7 +1,7 @@
{
"name": "ls_vertretungsplan_desktop",
"productName": "Lornsenschule Vertretungsplan",
- "version": "0.1.0",
+ "version": "0.1.1",
"description": "Eine Anwendung die den Vertretungsplan auf dem Desktop anzeigt",
"main": "./main.js",
"author": {
diff --git a/package.json b/package.json
@@ -1,6 +1,6 @@
{
"name": "ls_vertretungsplan_desktop",
- "version": "0.1.0",
+ "version": "0.1.1",
"description": "Eine Anwendung die den Vertretungsplan auf dem Desktop anzeigt",
"author": "Marcel Radzio",
"license": "",
@@ -34,7 +34,7 @@
},
"win": {
"iconUrl": "https://github.com/MTRNord/ls-vertretungsplan-desktop/tree/master/app/LS.ico?raw=true",
- "remoteReleases": "http://ls-desktop.herokuapp.com/download/0.0.4/",
+ "remoteReleases": "http://ls-desktop.herokuapp.com/download/0.1.0/",
"icon": "app/LS.ico"
},
"linux": {