4
0
mirror of https://github.com/AltarikMC/Launcher synced 2024-11-22 06:19:50 +01:00

theorically fix updater

This commit is contained in:
Quentin Legot 2021-03-29 00:27:08 +02:00
parent 5772d3059e
commit 0ea573f918
4 changed files with 16 additions and 6 deletions

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{ {
"name": "altarik-launcher", "name": "altarik-launcher",
"version": "0.1.1-SNAPSHOT", "version": "0.2.0",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {

View File

@ -1,9 +1,12 @@
{ {
"name": "altarik-launcher", "name": "altarik-launcher",
"version": "0.2.0-SNAPSHOT", "version": "0.2.0",
"description": "Altarik Launcher", "description": "Altarik Launcher",
"main": "src/server/main.js", "main": "src/server/main.js",
"repository": "AltarikMC/Launcher", "repository": {
"type": "git",
"url": "https://github.com/AltarikMC/Launcher.git"
},
"scripts": { "scripts": {
"start": "electron-forge start", "start": "electron-forge start",
"test": "echo \"Error: no test specified\" && exit 1", "test": "echo \"Error: no test specified\" && exit 1",
@ -11,7 +14,10 @@
"make": "electron-forge make" "make": "electron-forge make"
}, },
"keywords": [], "keywords": [],
"authors": ["Topeka_", "Altarik"], "authors": [
"Topeka_",
"Altarik"
],
"license": "BSD-3-Clause", "license": "BSD-3-Clause",
"devDependencies": { "devDependencies": {
"@electron-forge/cli": "^6.0.0-beta.54", "@electron-forge/cli": "^6.0.0-beta.54",

View File

@ -3,9 +3,11 @@ const { join } = require('path')
if (require('electron-squirrel-startup')) { if (require('electron-squirrel-startup')) {
require("./install.js").handleSquirrelEvent(app) require("./install.js").handleSquirrelEvent(app)
app.quit() app.quit()
return;
} }
// don't work // 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 { Client, Authenticator } = require('minecraft-launcher-core')
const appdata = process.env.APPDATA || (process.platform == 'darwin' ? process.env.HOME + '/Library/Preferences' : process.env.HOME + "/.local/share") const appdata = process.env.APPDATA || (process.platform == 'darwin' ? process.env.HOME + '/Library/Preferences' : process.env.HOME + "/.local/share")

View File

@ -38,6 +38,7 @@ function configUpdater(app, autoUpdater, dialog) {
autoUpdater.on('error', message => { autoUpdater.on('error', message => {
console.error('There was a problem updating the application') console.error('There was a problem updating the application')
console.error(message) console.error(message)
/*
showNotification(feed) showNotification(feed)
const dialogOpts = { const dialogOpts = {
type: 'info', type: 'info',
@ -47,11 +48,12 @@ function configUpdater(app, autoUpdater, dialog) {
detail: message detail: message
} }
dialog.showMessageBox(dialogOpts) dialog.showMessageBox(dialogOpts) */
}) })
autoUpdater.on('update-available', () => { autoUpdater.on('update-available', () => {
showNotification("Altarik launcher", "downloading update") showNotification("Altarik launcher", "downloading update")
autoUpdater.down
}) })
} }