1.9.1
ac
This commit is contained in:
parent
0f149831eb
commit
0075e1dece
@ -227,14 +227,13 @@ class JavaGuard extends EventEmitter {
|
||||
* Fetch the last open JDK binary.
|
||||
*
|
||||
* HOTFIX: Uses Corretto 8 for macOS.
|
||||
* See: https://github.com/dscalzi/HeliosLauncher/issues/70
|
||||
* See: https://github.com/AdoptOpenJDK/openjdk-support/issues/101
|
||||
*
|
||||
* @param {string} major The major version of Java to fetch.
|
||||
*
|
||||
* @returns {Promise.<OpenJDKData>} Promise which resolved to an object containing the JRE download data.
|
||||
*/
|
||||
static _latestOpenJDK(major = '8'){
|
||||
static _latestOpenJDK(major = '17'){
|
||||
|
||||
if(process.platform === 'darwin') {
|
||||
return this._latestCorretto(major)
|
||||
@ -380,7 +379,7 @@ class JavaGuard extends EventEmitter {
|
||||
static parseJavaRuntimeVersion(verString){
|
||||
const major = verString.split('.')[0]
|
||||
if(major == 1){
|
||||
return JavaGuard._parseJavaRuntimeVersion_8(verString)
|
||||
return JavaGuard._parseJavaRuntimeVersion_9(verString)
|
||||
} else {
|
||||
return JavaGuard._parseJavaRuntimeVersion_9(verString)
|
||||
}
|
||||
@ -459,25 +458,16 @@ class JavaGuard extends EventEmitter {
|
||||
let verString = props[i].split('=')[1].trim()
|
||||
console.log(props[i].trim())
|
||||
const verOb = JavaGuard.parseJavaRuntimeVersion(verString)
|
||||
if(verOb.major < 9){
|
||||
// Java 8
|
||||
if(verOb.major === 8 && verOb.update > 52){
|
||||
if(verOb.major >= 16) {
|
||||
// TODO Make this logic better. Make java 16 required.
|
||||
// Java 9+
|
||||
if(Util.mcVersionAtLeast('1.17', this.mcVersion)){
|
||||
meta.version = verOb
|
||||
++checksum
|
||||
if(checksum === goal){
|
||||
break
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// Java 9+
|
||||
if(Util.mcVersionAtLeast('1.13', this.mcVersion)){
|
||||
console.log('Java 9+ not yet tested.')
|
||||
/* meta.version = verOb
|
||||
++checksum
|
||||
if(checksum === goal){
|
||||
break
|
||||
} */
|
||||
}
|
||||
}
|
||||
// Space included so we get only the vendor.
|
||||
} else if(props[i].lastIndexOf('java.vendor ') > -1) {
|
||||
@ -1544,7 +1534,7 @@ class AssetGuard extends EventEmitter {
|
||||
|
||||
_enqueueOpenJDK(dataDir){
|
||||
return new Promise((resolve, reject) => {
|
||||
JavaGuard._latestOpenJDK('8').then(verData => {
|
||||
JavaGuard._latestOpenJDK('17').then(verData => {
|
||||
if(verData != null){
|
||||
|
||||
dataDir = path.join(dataDir, 'runtime', 'x64')
|
||||
|
@ -537,7 +537,7 @@ exports.pullRemote = function(){
|
||||
return exports.pullLocal()
|
||||
}
|
||||
return new Promise((resolve, reject) => {
|
||||
const distroURL = 'http://mc.westeroscraft.com/WesterosCraftLauncher/distribution.json'
|
||||
const distroURL = 'http://127.0.0.1:8080/distribution.json'
|
||||
//const distroURL = 'https://gist.githubusercontent.com/dscalzi/53b1ba7a11d26a5c353f9d5ae484b71b/raw/'
|
||||
const opts = {
|
||||
url: distroURL,
|
||||
|
@ -96,6 +96,16 @@ class ProcessBuilder {
|
||||
return child
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the platform specific classpath separator. On windows, this is a semicolon.
|
||||
* On Unix, this is a colon.
|
||||
*
|
||||
* @returns {string} The classpath separator for the current operating system.
|
||||
*/
|
||||
static getClasspathSeparator() {
|
||||
return process.platform === 'win32' ? ';' : ':'
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if an optional mod is enabled from its configuration value. If the
|
||||
* configuration value is null, the required object will be used to
|
||||
@ -339,11 +349,11 @@ class ProcessBuilder {
|
||||
|
||||
// Classpath Argument
|
||||
args.push('-cp')
|
||||
args.push(this.classpathArg(mods, tempNativePath).join(process.platform === 'win32' ? ';' : ':'))
|
||||
args.push(this.classpathArg(mods, tempNativePath).join(ProcessBuilder.getClasspathSeparator()))
|
||||
|
||||
// Java Arguments
|
||||
if(process.platform === 'darwin'){
|
||||
args.push('-Xdock:name=HeliosLauncher')
|
||||
args.push('-Xdock:name=KingdomsLauncher')
|
||||
args.push('-Xdock:icon=' + path.join(__dirname, '..', 'images', 'minecraft.icns'))
|
||||
}
|
||||
args.push('-Xmx' + ConfigManager.getMaxRAM())
|
||||
@ -377,7 +387,18 @@ class ProcessBuilder {
|
||||
// JVM Arguments First
|
||||
let args = this.versionData.arguments.jvm
|
||||
|
||||
//args.push('-Dlog4j.configurationFile=D:\\WesterosCraft\\game\\common\\assets\\log_configs\\client-1.12.xml')
|
||||
// Debug securejarhandler
|
||||
// args.push('-Dbsl.debug=true')
|
||||
|
||||
if(this.forgeData.arguments.jvm != null) {
|
||||
for(const argStr of this.forgeData.arguments.jvm) {
|
||||
args.push(argStr
|
||||
.replaceAll('${library_directory}', this.libPath)
|
||||
.replaceAll('${classpath_separator}', ProcessBuilder.getClasspathSeparator())
|
||||
.replaceAll('${version_name}', this.forgeData.id)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
// Java Arguments
|
||||
if(process.platform === 'darwin'){
|
||||
@ -483,13 +504,13 @@ class ProcessBuilder {
|
||||
val = args[i].replace(argDiscovery, tempNativePath)
|
||||
break
|
||||
case 'launcher_name':
|
||||
val = args[i].replace(argDiscovery, 'Helios-Launcher')
|
||||
val = args[i].replace(argDiscovery, 'Kingdoms-Launcher')
|
||||
break
|
||||
case 'launcher_version':
|
||||
val = args[i].replace(argDiscovery, this.launcherVersion)
|
||||
break
|
||||
case 'classpath':
|
||||
val = this.classpathArg(mods, tempNativePath).join(process.platform === 'win32' ? ';' : ':')
|
||||
val = this.classpathArg(mods, tempNativePath).join(ProcessBuilder.getClasspathSeparator())
|
||||
break
|
||||
}
|
||||
if(val != null){
|
||||
@ -647,9 +668,13 @@ class ProcessBuilder {
|
||||
classpathArg(mods, tempNativePath){
|
||||
let cpArgs = []
|
||||
|
||||
if(!Util.mcVersionAtLeast('1.17', this.server.getMinecraftVersion())) {
|
||||
// Add the version.jar to the classpath.
|
||||
// Must not be added to the classpath for Forge 1.17+.
|
||||
const version = this.versionData.id
|
||||
cpArgs.push(path.join(this.commonDir, 'versions', version, version + '.jar'))
|
||||
}
|
||||
|
||||
|
||||
if(this.usingLiteLoader){
|
||||
cpArgs.push(this.llPath)
|
||||
@ -788,6 +813,15 @@ class ProcessBuilder {
|
||||
let libs = []
|
||||
for(let sm of mdl.getSubModules()){
|
||||
if(sm.getType() === DistroManager.Types.Library){
|
||||
|
||||
// TODO Add as file or something.
|
||||
const x = sm.getIdentifier()
|
||||
console.log(x)
|
||||
if(x.includes(':universal') || x.includes(':slim') || x.includes(':extra') || x.includes(':srg') || x.includes(':client')) {
|
||||
console.log('SKIPPING ' + x)
|
||||
continue
|
||||
}
|
||||
|
||||
libs.push(sm.getArtifact().getPath())
|
||||
}
|
||||
// If this module has submodules, we need to resolve the libraries for those.
|
||||
|
@ -11,7 +11,7 @@
|
||||
<path fill="#05a6f0" d="M1 12h10v10H1z" />
|
||||
<path fill="#ffba08" d="M12 12h10v10H12z" />
|
||||
</svg>
|
||||
<span>Logearte en Microsoft</span>
|
||||
<span>Logearte con Microsoft</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="loginOptionButtonContainer">
|
||||
@ -21,7 +21,7 @@
|
||||
<path d="M2.598.022h7.07L9.665 7c-.003 1.334-1.113 2.46-2.402 2.654H0V2.542C.134 1.2 1.3.195 2.598.022z" fill="#db2331" />
|
||||
<path d="M1.54 2.844c.314-.76 1.31-.46 1.954-.528.785-.083 1.503.272 2.1.758l.164-.9c.327.345.587.756.964 1.052.28.254.655-.342.86-.013.42.864.408 1.86.54 2.795l-.788-.373C6.9 4.17 5.126 3.052 3.656 3.685c-1.294.592-1.156 2.65.06 3.255 1.354.703 2.953.51 4.405.292-.07.42-.34.87-.834.816l-4.95.002c-.5.055-.886-.413-.838-.89l.04-4.315z" fill="#fff" />
|
||||
</svg>
|
||||
<span>Logearte con Microsoft</span>
|
||||
<span>Logearte con Mojang</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -25,7 +25,7 @@
|
||||
<div id="settingsContainerRight">
|
||||
<div id="settingsTabAccount" class="settingsTab">
|
||||
<div class="settingsTabHeader">
|
||||
<span class="settingsTabHeaderText">Account Settings</span>
|
||||
<span class="settingsTabHeaderText">Ajustes Cuenta</span>
|
||||
<span class="settingsTabHeaderDesc">Add new accounts or manage existing ones.</span>
|
||||
</div>
|
||||
<div class="settingsAuthAccountTypeContainer">
|
||||
@ -71,11 +71,11 @@
|
||||
</div>
|
||||
<div id="settingsTabMinecraft" class="settingsTab" style="display: none;">
|
||||
<div class="settingsTabHeader">
|
||||
<span class="settingsTabHeaderText">Minecraft Settings</span>
|
||||
<span class="settingsTabHeaderText">Minecraft Ajustes</span>
|
||||
<span class="settingsTabHeaderDesc">Options related to game launch.</span>
|
||||
</div>
|
||||
<div id="settingsGameResolutionContainer">
|
||||
<span class="settingsFieldTitle">Game Resolution</span>
|
||||
<span class="settingsFieldTitle">Resolucion del Juego</span>
|
||||
<div id="settingsGameResolutionContent">
|
||||
<input type="number" id="settingsGameWidth" min="0" cValue="GameWidth">
|
||||
<div id="settingsGameResolutionCross">✖</div>
|
||||
@ -84,7 +84,7 @@
|
||||
</div>
|
||||
<div class="settingsFieldContainer">
|
||||
<div class="settingsFieldLeft">
|
||||
<span class="settingsFieldTitle">Launch in fullscreen.</span>
|
||||
<span class="settingsFieldTitle">Lanzar el Juego en Pantalla Maxima.</span>
|
||||
</div>
|
||||
<div class="settingsFieldRight">
|
||||
<label class="toggleSwitch">
|
||||
@ -134,13 +134,13 @@
|
||||
</div>
|
||||
<div id="settingsModsContainer">
|
||||
<div id="settingsReqModsContainer">
|
||||
<div class="settingsModsHeader">Required Mods</div>
|
||||
<div class="settingsModsHeader">Mods Requeridos</div>
|
||||
<div id="settingsReqModsContent">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div id="settingsOptModsContainer">
|
||||
<div class="settingsModsHeader">Optional Mods</div>
|
||||
<div class="settingsModsHeader">Mods Opcionales</div>
|
||||
<div id="settingsOptModsContent">
|
||||
|
||||
</div>
|
||||
@ -196,7 +196,7 @@
|
||||
<span id="settingsMinRAMLabel" class="settingsMemoryLabel">3G</span>
|
||||
</div>
|
||||
</div>
|
||||
<div id="settingsMemoryDesc">The recommended minimum RAM is 3 gigabytes. Setting the minimum and maximum values to the same value may reduce lag.</div>
|
||||
<div id="settingsMemoryDesc">La ram Recomendada es 3G.</div>
|
||||
</div>
|
||||
<div id="settingsMemoryContentRight">
|
||||
<div id="settingsMemoryStatus">
|
||||
|
@ -2,7 +2,7 @@
|
||||
<div id="waitingContent">
|
||||
<div class="waitingSpinner"></div>
|
||||
<div id="waitingTextContainer">
|
||||
<h2>Waiting for Microsoft..</h2>
|
||||
<h2>Esperando a Microsoft..</h2>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -80,7 +80,7 @@ A URL to a RSS feed. Used for loading news.
|
||||
```JSON
|
||||
{
|
||||
"id": "Example_Server",
|
||||
"name": "WesterosCraft Example Client",
|
||||
"name": "BetaTest",
|
||||
"description": "Example WesterosCraft server. Connect for fun!",
|
||||
"icon": "http://mc.westeroscraft.com/WesterosCraftLauncher/files/example_icon.png",
|
||||
"version": "0.0.1",
|
||||
|
@ -12,11 +12,11 @@
|
||||
"servers": [
|
||||
{
|
||||
"id": "WesterosCraft-1.11.2",
|
||||
"name": "WesterosCraft Production Server",
|
||||
"name": "betatest-1.12.2",
|
||||
"description": "Main WesterosCraft server. Connect to enter the Realm.",
|
||||
"icon": "http://mc.westeroscraft.com/WesterosCraftLauncher/files/server-prod.png",
|
||||
"version": "3.9.4",
|
||||
"address": "mc.westeroscraft.com",
|
||||
"address": "mc.universocraft.com",
|
||||
"minecraftVersion": "1.11.2",
|
||||
"discord": {
|
||||
"shortId": "Production",
|
||||
|
2
package-lock.json
generated
2
package-lock.json
generated
@ -6,7 +6,7 @@
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "gekostudiosbetatest",
|
||||
"version": "1.9.1",
|
||||
"version": "1.9.0",
|
||||
"license": "UNLICENSED",
|
||||
"dependencies": {
|
||||
"@electron/remote": "^2.0.8",
|
||||
|
@ -3,11 +3,11 @@
|
||||
"version": "1.9.1",
|
||||
"productName": "GekostudiosBetatest",
|
||||
"description": "Launcher exclusivamente para GekoStudios, para probar Testeos",
|
||||
"author": "GekoXD#00001 (https://github.com/GekoXD)",
|
||||
"author": "GekoXD#0001 (https://github.com/GekoXD)",
|
||||
"license": "UNLICENSED",
|
||||
"homepage": "https://github.com/GekoXD/GekostudiosBetatest",
|
||||
"bugs": {
|
||||
"url": "https://github.com/GekoXD/GekostudiosBetatest/pulls"
|
||||
"url": "https://github.com/GekoXD/GekostudiosBetatest/issues"
|
||||
},
|
||||
"private": true,
|
||||
"main": "index.js",
|
||||
|
Loading…
Reference in New Issue
Block a user