From 0ea573f918c39cb1abdb3f78189a9646c0df0aee Mon Sep 17 00:00:00 2001 From: Quentin Legot Date: Mon, 29 Mar 2021 00:27:08 +0200 Subject: [PATCH] theorically fix updater --- package-lock.json | 2 +- package.json | 12 +++++++++--- src/server/main.js | 4 +++- src/server/updater.js | 4 +++- 4 files changed, 16 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index b3b4f08..f8ca411 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "altarik-launcher", - "version": "0.1.1-SNAPSHOT", + "version": "0.2.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 943171b..c47ca9e 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,12 @@ { "name": "altarik-launcher", - "version": "0.2.0-SNAPSHOT", + "version": "0.2.0", "description": "Altarik Launcher", "main": "src/server/main.js", - "repository": "AltarikMC/Launcher", + "repository": { + "type": "git", + "url": "https://github.com/AltarikMC/Launcher.git" + }, "scripts": { "start": "electron-forge start", "test": "echo \"Error: no test specified\" && exit 1", @@ -11,7 +14,10 @@ "make": "electron-forge make" }, "keywords": [], - "authors": ["Topeka_", "Altarik"], + "authors": [ + "Topeka_", + "Altarik" + ], "license": "BSD-3-Clause", "devDependencies": { "@electron-forge/cli": "^6.0.0-beta.54", diff --git a/src/server/main.js b/src/server/main.js index d8c6ef9..ade5167 100644 --- a/src/server/main.js +++ b/src/server/main.js @@ -3,9 +3,11 @@ const { join } = require('path') if (require('electron-squirrel-startup')) { require("./install.js").handleSquirrelEvent(app) app.quit() + return; } // don't work -//require('./updater.js').configUpdater(app, autoUpdater, dialog) +require('./updater.js').configUpdater(app, autoUpdater, dialog) + const { Client, Authenticator } = require('minecraft-launcher-core') const appdata = process.env.APPDATA || (process.platform == 'darwin' ? process.env.HOME + '/Library/Preferences' : process.env.HOME + "/.local/share") diff --git a/src/server/updater.js b/src/server/updater.js index e851a0a..7e53f66 100644 --- a/src/server/updater.js +++ b/src/server/updater.js @@ -38,6 +38,7 @@ function configUpdater(app, autoUpdater, dialog) { autoUpdater.on('error', message => { console.error('There was a problem updating the application') console.error(message) + /* showNotification(feed) const dialogOpts = { type: 'info', @@ -47,11 +48,12 @@ function configUpdater(app, autoUpdater, dialog) { detail: message } - dialog.showMessageBox(dialogOpts) + dialog.showMessageBox(dialogOpts) */ }) autoUpdater.on('update-available', () => { showNotification("Altarik launcher", "downloading update") + autoUpdater.down }) }