v1
This commit is contained in:
BIN
app/assets/images/title.png
Normal file
BIN
app/assets/images/title.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 14 KiB |
@@ -7,7 +7,7 @@ const logger = LoggerUtil.getLogger('ConfigManager')
|
||||
|
||||
const sysRoot = process.env.APPDATA || (process.platform == 'darwin' ? process.env.HOME + '/Library/Application Support' : process.env.HOME)
|
||||
|
||||
const dataPath = path.join(sysRoot, '.helioslauncher')
|
||||
const dataPath = path.join(sysRoot, '.patatalauncher')
|
||||
|
||||
const launcherDir = require('@electron/remote').app.getPath('userData')
|
||||
|
||||
|
||||
4
app/assets/js/custom.js
Normal file
4
app/assets/js/custom.js
Normal file
@@ -0,0 +1,4 @@
|
||||
exports.getCustomConfig = () => {
|
||||
packwizUrl: "https://patatapack.oier.ovh/pack.toml"
|
||||
packwizBootstrap: "packwiz-installer-bootstrap.jar"
|
||||
}
|
||||
@@ -4,7 +4,7 @@ const ConfigManager = require('./configmanager')
|
||||
|
||||
// Old WesterosCraft url.
|
||||
// exports.REMOTE_DISTRO_URL = 'http://mc.westeroscraft.com/WesterosCraftLauncher/distribution.json'
|
||||
exports.REMOTE_DISTRO_URL = 'https://helios-files.geekcorner.eu.org/distribution.json'
|
||||
exports.REMOTE_DISTRO_URL = 'https://distribution.oier.ovh/distribution.json'
|
||||
|
||||
const api = new DistributionAPI(
|
||||
ConfigManager.getLauncherDirectory(),
|
||||
|
||||
@@ -7,7 +7,7 @@ const { getMojangOS, isLibraryCompatible, mcVersionAtLeast } = require('helios-
|
||||
const { Type } = require('helios-distribution-types')
|
||||
const os = require('os')
|
||||
const path = require('path')
|
||||
|
||||
const Custom = require('./custom')
|
||||
const ConfigManager = require('./configmanager')
|
||||
|
||||
const logger = LoggerUtil.getLogger('ProcessBuilder')
|
||||
@@ -70,10 +70,84 @@ class ProcessBuilder {
|
||||
//args = args.concat(this.constructModArguments(modObj.fMods))
|
||||
args = args.concat(this.constructModList(modObj.fMods))
|
||||
}
|
||||
/*const preLaunchArgs = [
|
||||
"-jar",
|
||||
Custom.getCustomConfig().packwizBootstrap,
|
||||
Custom.getCustomConfig().packwizUrl
|
||||
]*/
|
||||
|
||||
logger.info('Launch Arguments:', args)
|
||||
const preLaunchArgsArray = [
|
||||
// "-version"
|
||||
"-jar",
|
||||
//path.join(this.gameDir, "packwiz-installer-bootstrap.jar"),
|
||||
"packwiz-installer-bootstrap.jar",
|
||||
"https://patatapack.oier.ovh/pack/pack.toml"
|
||||
]
|
||||
const preLaunchArgs = [
|
||||
"-jar " +
|
||||
path.join(this.gameDir, "/packwiz-installer-bootstrap.jar") +
|
||||
" https://patatapack.oier.ovh/pack.toml"
|
||||
]
|
||||
|
||||
logger.info('PreLaunch Arguments:', preLaunchArgs)
|
||||
logger.info('getJavaExecutable:', ConfigManager.getJavaExecutable(this.server.rawServer.id))
|
||||
;
|
||||
logger.info('Server RAW id:', this.server.rawServer.id)
|
||||
logger.info('gamedir:', this.gameDir)
|
||||
//const preLaunchChild = child_process.execSync(ConfigManager.getJavaExecutable(this.server.rawServer.id) +" " + preLaunchArgsArray.join(' '), preLaunchArgsArray, {
|
||||
const preLaunchChild = child_process.spawnSync(ConfigManager.getJavaExecutable(this.server.rawServer.id), preLaunchArgsArray, {
|
||||
|
||||
cwd: this.gameDir,
|
||||
// detached: ConfigManager.getLaunchDetached()
|
||||
})
|
||||
const authArgs = [
|
||||
"-Dminecraft.api.env=custom",
|
||||
"-Dminecraft.api.auth.host=https://auth.oier.ovh",
|
||||
"-Dminecraft.api.account.host=https://auth.oier.ovh/user",
|
||||
"-Dminecraft.api.session.host=https://auth.oier.ovh/api/yggdrasil",
|
||||
"-Dminecraft.api.services.host=https://auth.oier.ovh/api/yggdrasil"
|
||||
]
|
||||
args = authArgs.concat(args)
|
||||
|
||||
//preLaunchChild.on('close', (preLaunchCode, preLaunchSignal) => {
|
||||
//logger.info('PRELAUNCH Exited with code', preLaunchCode)
|
||||
logger.info('Launch Arguments:', args)
|
||||
|
||||
const child = child_process.spawn(ConfigManager.getJavaExecutable(this.server.rawServer.id), args, {
|
||||
cwd: this.gameDir,
|
||||
detached: ConfigManager.getLaunchDetached()
|
||||
})
|
||||
|
||||
if(ConfigManager.getLaunchDetached()){
|
||||
child.unref()
|
||||
}
|
||||
|
||||
child.stdout.setEncoding('utf8')
|
||||
child.stderr.setEncoding('utf8')
|
||||
|
||||
child.stdout.on('data', (data) => {
|
||||
data.trim().split('\n').forEach(x => console.log(`\x1b[32m[Minecraft]\x1b[0m ${x}`))
|
||||
|
||||
})
|
||||
child.stderr.on('data', (data) => {
|
||||
data.trim().split('\n').forEach(x => console.log(`\x1b[31m[Minecraft]\x1b[0m ${x}`))
|
||||
})
|
||||
child.on('close', (code, signal) => {
|
||||
logger.info('Exited with code', code)
|
||||
fs.remove(tempNativePath, (err) => {
|
||||
if(err){
|
||||
logger.warn('Error while deleting temp dir', err)
|
||||
} else {
|
||||
logger.info('Temp dir deleted successfully.')
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
//return child
|
||||
return child
|
||||
// });
|
||||
|
||||
const child = child_process.spawn(ConfigManager.getJavaExecutable(this.server.rawServer.id), args, {
|
||||
/* const child = child_process.spawn(ConfigManager.getJavaExecutable(this.server.rawServer.id), args, {
|
||||
cwd: this.gameDir,
|
||||
detached: ConfigManager.getLaunchDetached()
|
||||
})
|
||||
@@ -103,7 +177,7 @@ class ProcessBuilder {
|
||||
})
|
||||
})
|
||||
|
||||
return child
|
||||
return child */
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -18,15 +18,6 @@ function loginOptionsCancelEnabled(val){
|
||||
}
|
||||
}
|
||||
|
||||
loginOptionMicrosoft.onclick = (e) => {
|
||||
switchView(getCurrentView(), VIEWS.waiting, 500, 500, () => {
|
||||
ipcRenderer.send(
|
||||
MSFT_OPCODE.OPEN_LOGIN,
|
||||
loginOptionsViewOnLoginSuccess,
|
||||
loginOptionsViewOnLoginCancel
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
loginOptionMojang.onclick = (e) => {
|
||||
switchView(getCurrentView(), VIEWS.login, 500, 500, () => {
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
# Custom Language File for Launcher Customizer
|
||||
|
||||
[ejs.app]
|
||||
title = "Helios Launcher"
|
||||
title = "PatataLauncher"
|
||||
|
||||
[ejs.landing]
|
||||
mediaGitHubURL = "https://github.com/dscalzi/HeliosLauncher"
|
||||
mediaGitHubURL = "#"
|
||||
mediaTwitterURL = "#"
|
||||
mediaInstagramURL = "#"
|
||||
mediaYouTubeURL = "#"
|
||||
mediaDiscordURL = "https://discord.gg/zNWUXdt"
|
||||
mediaDiscordURL = "#"
|
||||
|
||||
[ejs.settings]
|
||||
sourceGithubLink = "https://github.com/dscalZi/HeliosLauncher"
|
||||
supportLink = "https://github.com/dscalZi/HeliosLauncher/issues"
|
||||
|
||||
[ejs.welcome]
|
||||
welcomeHeader = "WELCOME TO WESTEROSCRAFT"
|
||||
welcomeDescription = "Our mission is to recreate the universe imagined by author George RR Martin in his fantasy series, A Song of Ice and Fire. Through the collaborative effort of thousands of community members, we have sought to create Westeros as accurately and precisely as possible within Minecraft. The world we are creating is yours to explore. Journey from Dorne to Castle Black, and if you aren’t afraid, beyond the Wall itself, but best not delay. As the words of House Stark ominously warn: Winter is Coming."
|
||||
welcomeDescCTA = "You are just a few clicks away from Westeros."
|
||||
welcomeHeader = "Ongi etorri Patata!"
|
||||
welcomeDescription = "Patata launcher."
|
||||
welcomeDescCTA = "Go go go"
|
||||
|
||||
Reference in New Issue
Block a user