This commit is contained in:
Daniel Scalzi 2023-03-18 22:07:22 -04:00
parent a731fa90ea
commit e3af7669d8
No known key found for this signature in database
GPG Key ID: 9E3E2AFE45328AA5
3 changed files with 8 additions and 6 deletions

View File

@ -6,11 +6,10 @@ const path = require('path')
const logger = LoggerUtil.getLogger('ConfigManager')
const sysRoot = process.env.APPDATA || (process.platform == 'darwin' ? process.env.HOME + '/Library/Application Support' : process.env.HOME)
// TODO change
const dataPath = path.join(sysRoot, '.helioslauncher')
// Forked processes do not have access to electron, so we have this workaround.
const launcherDir = process.env.CONFIG_DIRECT_PATH || require('@electron/remote').app.getPath('userData')
const launcherDir = require('@electron/remote').app.getPath('userData')
/**
* Retrieve the absolute path of the launcher directory.

View File

@ -540,8 +540,8 @@ async function dlAsync(login = true) {
toggleLaunchArea(false)
if(hasRPC){
DiscordWrapper.updateDetails('Loading game..')
proc.stdout.on('data', gameStateChange)
}
proc.stdout.on('data', gameStateChange)
proc.stdout.removeListener('data', tempListener)
proc.stderr.removeListener('data', gameErrorListener)
}
@ -789,7 +789,7 @@ function initNews(){
let news = {}
loadNews().then(news => {
newsArr = news.articles || null
newsArr = news?.articles || null
if(newsArr == null){
// News Loading Failed
@ -938,6 +938,10 @@ function displayArticle(articleObject, index){
async function loadNews(){
const distroData = await DistroAPI.getDistribution()
if(!distroData.rawDistribution.rss) {
loggerLanding.debug('No RSS feed provided.')
return null
}
const promise = new Promise((resolve, reject) => {

View File

@ -1354,7 +1354,6 @@ function populateJavaReqDesc(server) {
settingsJavaReqDesc.innerHTML = `Requires Java ${server.effectiveJavaOptions.suggestedMajor} x64.`
}
// TODO Update to use semver range
function populateJvmOptsLink(server) {
const major = server.effectiveJavaOptions.suggestedMajor
settingsJvmOptsLink.innerHTML = `Available Options for Java ${major} (HotSpot VM)`