v0.0.1-alpha.10 - Hotfix for startup error.
This commit is contained in:
parent
50d85d30cc
commit
05fe516249
@ -85,6 +85,7 @@ exports.load = function(){
|
|||||||
config = validateKeySet(DEFAULT_CONFIG, config)
|
config = validateKeySet(DEFAULT_CONFIG, config)
|
||||||
exports.save()
|
exports.save()
|
||||||
}
|
}
|
||||||
|
console.log('%c[ConfigManager]', 'color: #a02d2a; font-weight: bold', 'Successfully Loaded')
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -54,6 +54,12 @@ function getCurrentView(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
function showMainUI(){
|
function showMainUI(){
|
||||||
|
|
||||||
|
if(!isDev){
|
||||||
|
console.log('%c[AutoUpdater]', 'color: #a02d2a; font-weight: bold', 'Initializing..')
|
||||||
|
ipcRenderer.send('autoUpdateAction', 'initAutoUpdater', ConfigManager.getAllowPrerelease())
|
||||||
|
}
|
||||||
|
|
||||||
updateSelectedServer(AssetGuard.getServerById(ConfigManager.getSelectedServer()).name)
|
updateSelectedServer(AssetGuard.getServerById(ConfigManager.getSelectedServer()).name)
|
||||||
refreshServerStatus()
|
refreshServerStatus()
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
@ -67,7 +67,6 @@ if(!isDev){
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
ipcRenderer.send('autoUpdateAction', 'initAutoUpdater')
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
7
index.js
7
index.js
@ -1,7 +1,6 @@
|
|||||||
// Requirements
|
// Requirements
|
||||||
const {app, BrowserWindow, ipcMain} = require('electron')
|
const {app, BrowserWindow, ipcMain} = require('electron')
|
||||||
const autoUpdater = require('electron-updater').autoUpdater
|
const autoUpdater = require('electron-updater').autoUpdater
|
||||||
const ConfigManager = require('./app/assets/js/configmanager.js')
|
|
||||||
const ejse = require('ejs-electron')
|
const ejse = require('ejs-electron')
|
||||||
const fs = require('fs')
|
const fs = require('fs')
|
||||||
const isDev = require('electron-is-dev')
|
const isDev = require('electron-is-dev')
|
||||||
@ -10,9 +9,9 @@ const semver = require('semver')
|
|||||||
const url = require('url')
|
const url = require('url')
|
||||||
|
|
||||||
// Setup auto updater.
|
// Setup auto updater.
|
||||||
function initAutoUpdater(event) {
|
function initAutoUpdater(event, data) {
|
||||||
|
|
||||||
if(ConfigManager.getAllowPrerelease()){
|
if(data){
|
||||||
autoUpdater.allowPrerelease = true
|
autoUpdater.allowPrerelease = true
|
||||||
} else {
|
} else {
|
||||||
// Defaults to true if application version contains prerelease components (e.g. 0.12.1-alpha.1)
|
// Defaults to true if application version contains prerelease components (e.g. 0.12.1-alpha.1)
|
||||||
@ -42,7 +41,7 @@ ipcMain.on('autoUpdateAction', (event, arg, data) => {
|
|||||||
switch(arg){
|
switch(arg){
|
||||||
case 'initAutoUpdater':
|
case 'initAutoUpdater':
|
||||||
console.log('Initializing auto updater.')
|
console.log('Initializing auto updater.')
|
||||||
initAutoUpdater(event)
|
initAutoUpdater(event, data)
|
||||||
event.sender.send('autoUpdateNotification', 'ready')
|
event.sender.send('autoUpdateNotification', 'ready')
|
||||||
break
|
break
|
||||||
case 'checkForUpdate':
|
case 'checkForUpdate':
|
||||||
|
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "westeroscraftlauncher",
|
"name": "westeroscraftlauncher",
|
||||||
"version": "0.0.1-alpha.9",
|
"version": "0.0.1-alpha.10",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "westeroscraftlauncher",
|
"name": "westeroscraftlauncher",
|
||||||
"version": "0.0.1-alpha.9",
|
"version": "0.0.1-alpha.10",
|
||||||
"description": "Custom modded launcher for Westeroscraft",
|
"description": "Custom modded launcher for Westeroscraft",
|
||||||
"productName": "WesterosCraft Launcher",
|
"productName": "WesterosCraft Launcher",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
|
Loading…
Reference in New Issue
Block a user