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"
|
||||
|
||||
@@ -100,13 +100,13 @@
|
||||
<span id="player_count"><%- lang('landing.serverStatusPlaceholder') %></span>
|
||||
</div>
|
||||
<div class="bot_divider"></div>
|
||||
<div id="mojangStatusWrapper">
|
||||
<!-- <div id="mojangStatusWrapper">
|
||||
<span class="bot_label"><%- lang('landing.mojangStatus') %></span>
|
||||
<span id="mojang_status_icon">•</span>
|
||||
<div id="mojangStatusTooltip">
|
||||
<div id="mojangStatusTooltipTitle"><%- lang('landing.mojangStatusTooltipTitle') %></div>
|
||||
<div id="mojangStatusEssentialContainer">
|
||||
<!-- Essential Mojang services are populated here. -->
|
||||
< !-- Essential Mojang services are populated here. -- >
|
||||
</div>
|
||||
<div id="mojangStatusNEContainer">
|
||||
<div class="mojangStatusNEBar"></div>
|
||||
@@ -114,10 +114,10 @@
|
||||
<div class="mojangStatusNEBar"></div>
|
||||
</div>
|
||||
<div id="mojangStatusNonEssentialContainer">
|
||||
<!-- Non Essential Mojang services are populated here. -->
|
||||
< !-- Non Essential Mojang services are populated here. -- >
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,17 +3,6 @@
|
||||
<div class="loginOptionsMainContent">
|
||||
<h2><%- lang('loginOptions.loginOptionsTitle') %></h2>
|
||||
<div class="loginOptionActions">
|
||||
<div class="loginOptionButtonContainer">
|
||||
<button id="loginOptionMicrosoft" class="loginOptionButton">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 23 23">
|
||||
<path fill="#f35325" d="M1 1h10v10H1z" />
|
||||
<path fill="#81bc06" d="M12 1h10v10H12z" />
|
||||
<path fill="#05a6f0" d="M1 12h10v10H1z" />
|
||||
<path fill="#ffba08" d="M12 12h10v10H12z" />
|
||||
</svg>
|
||||
<span><%- lang('loginOptions.loginWithMicrosoft') %></span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="loginOptionButtonContainer">
|
||||
<button id="loginOptionMojang" class="loginOptionButton">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 9.677 9.667">
|
||||
|
||||
Reference in New Issue
Block a user