commit 4f713ead59c2be09e1bf8f1d91dceac17aff497d
parent 93e971148e6dccf8b612a70f2901f37819515701
Author: Marcel <MTRNord@users.noreply.github.com>
Date: Sat, 3 Sep 2016 18:14:04 +0200
Merge pull request #8 from MTRNord/develop
fix Setup script
Diffstat:
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": [