Skip to content

Commit

Permalink
v0.0.1-alpha.10 - Hotfix for startup error.
Browse files Browse the repository at this point in the history
  • Loading branch information
dscalzi committed Jun 5, 2018
1 parent 50d85d3 commit 05fe516
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 8 deletions.
1 change: 1 addition & 0 deletions app/assets/js/configmanager.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ exports.load = function(){
config = validateKeySet(DEFAULT_CONFIG, config)
exports.save()
}
console.log('%c[ConfigManager]', 'color: #a02d2a; font-weight: bold', 'Successfully Loaded')
}

/**
Expand Down
6 changes: 6 additions & 0 deletions app/assets/js/scripts/uibinder.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ function getCurrentView(){
}

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)
refreshServerStatus()
setTimeout(() => {
Expand Down
1 change: 0 additions & 1 deletion app/assets/js/scripts/uicore.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ if(!isDev){
break
}
})
ipcRenderer.send('autoUpdateAction', 'initAutoUpdater')
}

/**
Expand Down
9 changes: 4 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Requirements
const {app, BrowserWindow, ipcMain} = require('electron')
const autoUpdater = require('electron-updater').autoUpdater
const ConfigManager = require('./app/assets/js/configmanager.js')
const ejse = require('ejs-electron')
const fs = require('fs')
const isDev = require('electron-is-dev')
Expand All @@ -10,9 +9,9 @@ const semver = require('semver')
const url = require('url')

// Setup auto updater.
function initAutoUpdater(event) {
if(ConfigManager.getAllowPrerelease()){
function initAutoUpdater(event, data) {

if(data){
autoUpdater.allowPrerelease = true
} else {
// Defaults to true if application version contains prerelease components (e.g. 0.12.1-alpha.1)
Expand Down Expand Up @@ -42,7 +41,7 @@ ipcMain.on('autoUpdateAction', (event, arg, data) => {
switch(arg){
case 'initAutoUpdater':
console.log('Initializing auto updater.')
initAutoUpdater(event)
initAutoUpdater(event, data)
event.sender.send('autoUpdateNotification', 'ready')
break
case 'checkForUpdate':
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "westeroscraftlauncher",
"version": "0.0.1-alpha.9",
"version": "0.0.1-alpha.10",
"description": "Custom modded launcher for Westeroscraft",
"productName": "WesterosCraft Launcher",
"main": "index.js",
Expand Down

0 comments on commit 05fe516

Please sign in to comment.