ls-vertretungsplan-desktop

UNOFFICIAL Desktop App for the schedule of Lornsenschule, Schleswig
git clone git://archive.git.mtrnord.blog/MTRNord/ls-vertretungsplan-desktop.git
Log | Files | Refs | README

commit 055a2b236ec5eeb138beda911e1e9485b9cea398
parent b4fad90479c139dbd2593f6e01d7f8f17e497e0d
Author: MTRNord <mtrnord1@gmail.com>
Date:   Sat,  3 Sep 2016 18:09:10 +0200

fix Setup script

Diffstat:
Mapp/LS.ico | 0
Mapp/main.js | 45++++++++++++++++++++++++++++++++++++++++++++-
Mapp/package.json | 5+++--
Mpackage.json | 4++--
4 files changed, 49 insertions(+), 5 deletions(-)

diff --git a/app/LS.ico b/app/LS.ico Binary files differ. diff --git a/app/main.js b/app/main.js @@ -5,7 +5,7 @@ const {app, BrowserWindow, dialog} = require('electron') let win function update () { - var feedUrl = 'https://ls-desktop.herokuapp.com/update/win32/:' + app.getVersion(); + var feedUrl = 'https://ls-desktop.herokuapp.com/update/win32/' + app.getVersion(); autoUpdater.setFeedURL(feedUrl); autoUpdater.on('update-downloaded', function (event, releaseNotes, releaseName, releaseDate, updateUrl, quitAndUpdate) { @@ -70,3 +70,45 @@ app.on('activate', () => { // In this file you can include the rest of your app's specific main process // code. You can also put them in separate files and require them here. +if(require('electron-squirrel-startup')) return; +var handleStartupEvent = function() { + if (process.platform !== 'win32') { + return false; + } + + var squirrelCommand = process.argv[1]; + switch (squirrelCommand) { + case '--squirrel-install': + case '--squirrel-updated': + + // Optionally do things such as: + // + // - Install desktop and start menu shortcuts + // - Add your .exe to the PATH + // - Write to the registry for things like file associations and + // explorer context menus + + // Always quit when done + app.quit(); + + return true; + case '--squirrel-uninstall': + // Undo anything you did in the --squirrel-install and + // --squirrel-updated handlers + + // Always quit when done + app.quit(); + + return true; + case '--squirrel-obsolete': + // This is called on the outgoing version of your app before + // we update to the new version - it's the opposite of + // --squirrel-updated + app.quit(); + return true; + } +}; + +if (handleStartupEvent()) { + return; +} +\ No newline at end of file diff --git a/app/package.json b/app/package.json @@ -1,13 +1,14 @@ { "name": "ls_vertretungsplan_desktop", "productName": "Lornsenschule Vertretungsplan", - "version": "0.0.3", + "version": "0.0.4", "description": "Eine Anwendung die den Vertretungsplan auf dem Desktop anzeigt", "main": "./main.js", - "author": "Marcel Radzio <info@nordgedanken.de>", + "author": "Lornsenschule Vertretungsplan", "license": "", "dependencies": { "cached-request": "^1.0.0", + "electron-squirrel-startup": "^1.0.0", "request": "^2.69.0" }, "homepage": "https://github.com/MTRNord/ls-vertretungsplan-desktop" diff --git a/package.json b/package.json @@ -1,6 +1,6 @@ { "name": "ls_vertretungsplan_desktop", - "version": "0.0.3", + "version": "0.0.4", "description": "Eine Anwendung die den Vertretungsplan auf dem Desktop anzeigt", "author": "Marcel Radzio <info@nordgedanken.de>", "license": "", @@ -34,7 +34,7 @@ }, "win": { "iconUrl": "https://github.com/MTRNord/ls-vertretungsplan-desktop/tree/master/app/LS.ico?raw=true", - "remoteReleases": "https://github.com/MTRNord/ls-vertretungsplan-desktop" + "icon": "app/LS.ico" }, "linux": { "target": [