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.
|
* Fetch the last open JDK binary.
|
||||||
*
|
*
|
||||||
* HOTFIX: Uses Corretto 8 for macOS.
|
* HOTFIX: Uses Corretto 8 for macOS.
|
||||||
* See: https://github.com/dscalzi/HeliosLauncher/issues/70
|
|
||||||
* See: https://github.com/AdoptOpenJDK/openjdk-support/issues/101
|
* See: https://github.com/AdoptOpenJDK/openjdk-support/issues/101
|
||||||
*
|
*
|
||||||
* @param {string} major The major version of Java to fetch.
|
* @param {string} major The major version of Java to fetch.
|
||||||
*
|
*
|
||||||
* @returns {Promise.<OpenJDKData>} Promise which resolved to an object containing the JRE download data.
|
* @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') {
|
if(process.platform === 'darwin') {
|
||||||
return this._latestCorretto(major)
|
return this._latestCorretto(major)
|
||||||
@ -380,7 +379,7 @@ class JavaGuard extends EventEmitter {
|
|||||||
static parseJavaRuntimeVersion(verString){
|
static parseJavaRuntimeVersion(verString){
|
||||||
const major = verString.split('.')[0]
|
const major = verString.split('.')[0]
|
||||||
if(major == 1){
|
if(major == 1){
|
||||||
return JavaGuard._parseJavaRuntimeVersion_8(verString)
|
return JavaGuard._parseJavaRuntimeVersion_9(verString)
|
||||||
} else {
|
} else {
|
||||||
return JavaGuard._parseJavaRuntimeVersion_9(verString)
|
return JavaGuard._parseJavaRuntimeVersion_9(verString)
|
||||||
}
|
}
|
||||||
@ -459,25 +458,16 @@ class JavaGuard extends EventEmitter {
|
|||||||
let verString = props[i].split('=')[1].trim()
|
let verString = props[i].split('=')[1].trim()
|
||||||
console.log(props[i].trim())
|
console.log(props[i].trim())
|
||||||
const verOb = JavaGuard.parseJavaRuntimeVersion(verString)
|
const verOb = JavaGuard.parseJavaRuntimeVersion(verString)
|
||||||
if(verOb.major < 9){
|
if(verOb.major >= 16) {
|
||||||
// Java 8
|
// TODO Make this logic better. Make java 16 required.
|
||||||
if(verOb.major === 8 && verOb.update > 52){
|
// Java 9+
|
||||||
|
if(Util.mcVersionAtLeast('1.17', this.mcVersion)){
|
||||||
meta.version = verOb
|
meta.version = verOb
|
||||||
++checksum
|
++checksum
|
||||||
if(checksum === goal){
|
if(checksum === goal){
|
||||||
break
|
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.
|
// Space included so we get only the vendor.
|
||||||
} else if(props[i].lastIndexOf('java.vendor ') > -1) {
|
} else if(props[i].lastIndexOf('java.vendor ') > -1) {
|
||||||
@ -1544,7 +1534,7 @@ class AssetGuard extends EventEmitter {
|
|||||||
|
|
||||||
_enqueueOpenJDK(dataDir){
|
_enqueueOpenJDK(dataDir){
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
JavaGuard._latestOpenJDK('8').then(verData => {
|
JavaGuard._latestOpenJDK('17').then(verData => {
|
||||||
if(verData != null){
|
if(verData != null){
|
||||||
|
|
||||||
dataDir = path.join(dataDir, 'runtime', 'x64')
|
dataDir = path.join(dataDir, 'runtime', 'x64')
|
||||||
|
@ -537,7 +537,7 @@ exports.pullRemote = function(){
|
|||||||
return exports.pullLocal()
|
return exports.pullLocal()
|
||||||
}
|
}
|
||||||
return new Promise((resolve, reject) => {
|
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 distroURL = 'https://gist.githubusercontent.com/dscalzi/53b1ba7a11d26a5c353f9d5ae484b71b/raw/'
|
||||||
const opts = {
|
const opts = {
|
||||||
url: distroURL,
|
url: distroURL,
|
||||||
|
@ -96,6 +96,16 @@ class ProcessBuilder {
|
|||||||
return child
|
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
|
* Determine if an optional mod is enabled from its configuration value. If the
|
||||||
* configuration value is null, the required object will be used to
|
* configuration value is null, the required object will be used to
|
||||||
@ -339,11 +349,11 @@ class ProcessBuilder {
|
|||||||
|
|
||||||
// Classpath Argument
|
// Classpath Argument
|
||||||
args.push('-cp')
|
args.push('-cp')
|
||||||
args.push(this.classpathArg(mods, tempNativePath).join(process.platform === 'win32' ? ';' : ':'))
|
args.push(this.classpathArg(mods, tempNativePath).join(ProcessBuilder.getClasspathSeparator()))
|
||||||
|
|
||||||
// Java Arguments
|
// Java Arguments
|
||||||
if(process.platform === 'darwin'){
|
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('-Xdock:icon=' + path.join(__dirname, '..', 'images', 'minecraft.icns'))
|
||||||
}
|
}
|
||||||
args.push('-Xmx' + ConfigManager.getMaxRAM())
|
args.push('-Xmx' + ConfigManager.getMaxRAM())
|
||||||
@ -377,7 +387,18 @@ class ProcessBuilder {
|
|||||||
// JVM Arguments First
|
// JVM Arguments First
|
||||||
let args = this.versionData.arguments.jvm
|
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
|
// Java Arguments
|
||||||
if(process.platform === 'darwin'){
|
if(process.platform === 'darwin'){
|
||||||
@ -483,13 +504,13 @@ class ProcessBuilder {
|
|||||||
val = args[i].replace(argDiscovery, tempNativePath)
|
val = args[i].replace(argDiscovery, tempNativePath)
|
||||||
break
|
break
|
||||||
case 'launcher_name':
|
case 'launcher_name':
|
||||||
val = args[i].replace(argDiscovery, 'Helios-Launcher')
|
val = args[i].replace(argDiscovery, 'Kingdoms-Launcher')
|
||||||
break
|
break
|
||||||
case 'launcher_version':
|
case 'launcher_version':
|
||||||
val = args[i].replace(argDiscovery, this.launcherVersion)
|
val = args[i].replace(argDiscovery, this.launcherVersion)
|
||||||
break
|
break
|
||||||
case 'classpath':
|
case 'classpath':
|
||||||
val = this.classpathArg(mods, tempNativePath).join(process.platform === 'win32' ? ';' : ':')
|
val = this.classpathArg(mods, tempNativePath).join(ProcessBuilder.getClasspathSeparator())
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
if(val != null){
|
if(val != null){
|
||||||
@ -647,9 +668,13 @@ class ProcessBuilder {
|
|||||||
classpathArg(mods, tempNativePath){
|
classpathArg(mods, tempNativePath){
|
||||||
let cpArgs = []
|
let cpArgs = []
|
||||||
|
|
||||||
|
if(!Util.mcVersionAtLeast('1.17', this.server.getMinecraftVersion())) {
|
||||||
// Add the version.jar to the classpath.
|
// Add the version.jar to the classpath.
|
||||||
|
// Must not be added to the classpath for Forge 1.17+.
|
||||||
const version = this.versionData.id
|
const version = this.versionData.id
|
||||||
cpArgs.push(path.join(this.commonDir, 'versions', version, version + '.jar'))
|
cpArgs.push(path.join(this.commonDir, 'versions', version, version + '.jar'))
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if(this.usingLiteLoader){
|
if(this.usingLiteLoader){
|
||||||
cpArgs.push(this.llPath)
|
cpArgs.push(this.llPath)
|
||||||
@ -788,6 +813,15 @@ class ProcessBuilder {
|
|||||||
let libs = []
|
let libs = []
|
||||||
for(let sm of mdl.getSubModules()){
|
for(let sm of mdl.getSubModules()){
|
||||||
if(sm.getType() === DistroManager.Types.Library){
|
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())
|
libs.push(sm.getArtifact().getPath())
|
||||||
}
|
}
|
||||||
// If this module has submodules, we need to resolve the libraries for those.
|
// 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="#05a6f0" d="M1 12h10v10H1z" />
|
||||||
<path fill="#ffba08" d="M12 12h10v10H12z" />
|
<path fill="#ffba08" d="M12 12h10v10H12z" />
|
||||||
</svg>
|
</svg>
|
||||||
<span>Logearte en Microsoft</span>
|
<span>Logearte con Microsoft</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="loginOptionButtonContainer">
|
<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="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" />
|
<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>
|
</svg>
|
||||||
<span>Logearte con Microsoft</span>
|
<span>Logearte con Mojang</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
<div id="settingsContainerRight">
|
<div id="settingsContainerRight">
|
||||||
<div id="settingsTabAccount" class="settingsTab">
|
<div id="settingsTabAccount" class="settingsTab">
|
||||||
<div class="settingsTabHeader">
|
<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>
|
<span class="settingsTabHeaderDesc">Add new accounts or manage existing ones.</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="settingsAuthAccountTypeContainer">
|
<div class="settingsAuthAccountTypeContainer">
|
||||||
@ -71,11 +71,11 @@
|
|||||||
</div>
|
</div>
|
||||||
<div id="settingsTabMinecraft" class="settingsTab" style="display: none;">
|
<div id="settingsTabMinecraft" class="settingsTab" style="display: none;">
|
||||||
<div class="settingsTabHeader">
|
<div class="settingsTabHeader">
|
||||||
<span class="settingsTabHeaderText">Minecraft Settings</span>
|
<span class="settingsTabHeaderText">Minecraft Ajustes</span>
|
||||||
<span class="settingsTabHeaderDesc">Options related to game launch.</span>
|
<span class="settingsTabHeaderDesc">Options related to game launch.</span>
|
||||||
</div>
|
</div>
|
||||||
<div id="settingsGameResolutionContainer">
|
<div id="settingsGameResolutionContainer">
|
||||||
<span class="settingsFieldTitle">Game Resolution</span>
|
<span class="settingsFieldTitle">Resolucion del Juego</span>
|
||||||
<div id="settingsGameResolutionContent">
|
<div id="settingsGameResolutionContent">
|
||||||
<input type="number" id="settingsGameWidth" min="0" cValue="GameWidth">
|
<input type="number" id="settingsGameWidth" min="0" cValue="GameWidth">
|
||||||
<div id="settingsGameResolutionCross">✖</div>
|
<div id="settingsGameResolutionCross">✖</div>
|
||||||
@ -84,7 +84,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="settingsFieldContainer">
|
<div class="settingsFieldContainer">
|
||||||
<div class="settingsFieldLeft">
|
<div class="settingsFieldLeft">
|
||||||
<span class="settingsFieldTitle">Launch in fullscreen.</span>
|
<span class="settingsFieldTitle">Lanzar el Juego en Pantalla Maxima.</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="settingsFieldRight">
|
<div class="settingsFieldRight">
|
||||||
<label class="toggleSwitch">
|
<label class="toggleSwitch">
|
||||||
@ -134,13 +134,13 @@
|
|||||||
</div>
|
</div>
|
||||||
<div id="settingsModsContainer">
|
<div id="settingsModsContainer">
|
||||||
<div id="settingsReqModsContainer">
|
<div id="settingsReqModsContainer">
|
||||||
<div class="settingsModsHeader">Required Mods</div>
|
<div class="settingsModsHeader">Mods Requeridos</div>
|
||||||
<div id="settingsReqModsContent">
|
<div id="settingsReqModsContent">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="settingsOptModsContainer">
|
<div id="settingsOptModsContainer">
|
||||||
<div class="settingsModsHeader">Optional Mods</div>
|
<div class="settingsModsHeader">Mods Opcionales</div>
|
||||||
<div id="settingsOptModsContent">
|
<div id="settingsOptModsContent">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -196,7 +196,7 @@
|
|||||||
<span id="settingsMinRAMLabel" class="settingsMemoryLabel">3G</span>
|
<span id="settingsMinRAMLabel" class="settingsMemoryLabel">3G</span>
|
||||||
</div>
|
</div>
|
||||||
</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>
|
||||||
<div id="settingsMemoryContentRight">
|
<div id="settingsMemoryContentRight">
|
||||||
<div id="settingsMemoryStatus">
|
<div id="settingsMemoryStatus">
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<div id="waitingContent">
|
<div id="waitingContent">
|
||||||
<div class="waitingSpinner"></div>
|
<div class="waitingSpinner"></div>
|
||||||
<div id="waitingTextContainer">
|
<div id="waitingTextContainer">
|
||||||
<h2>Waiting for Microsoft..</h2>
|
<h2>Esperando a Microsoft..</h2>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
@ -80,7 +80,7 @@ A URL to a RSS feed. Used for loading news.
|
|||||||
```JSON
|
```JSON
|
||||||
{
|
{
|
||||||
"id": "Example_Server",
|
"id": "Example_Server",
|
||||||
"name": "WesterosCraft Example Client",
|
"name": "BetaTest",
|
||||||
"description": "Example WesterosCraft server. Connect for fun!",
|
"description": "Example WesterosCraft server. Connect for fun!",
|
||||||
"icon": "http://mc.westeroscraft.com/WesterosCraftLauncher/files/example_icon.png",
|
"icon": "http://mc.westeroscraft.com/WesterosCraftLauncher/files/example_icon.png",
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
|
@ -12,11 +12,11 @@
|
|||||||
"servers": [
|
"servers": [
|
||||||
{
|
{
|
||||||
"id": "WesterosCraft-1.11.2",
|
"id": "WesterosCraft-1.11.2",
|
||||||
"name": "WesterosCraft Production Server",
|
"name": "betatest-1.12.2",
|
||||||
"description": "Main WesterosCraft server. Connect to enter the Realm.",
|
"description": "Main WesterosCraft server. Connect to enter the Realm.",
|
||||||
"icon": "http://mc.westeroscraft.com/WesterosCraftLauncher/files/server-prod.png",
|
"icon": "http://mc.westeroscraft.com/WesterosCraftLauncher/files/server-prod.png",
|
||||||
"version": "3.9.4",
|
"version": "3.9.4",
|
||||||
"address": "mc.westeroscraft.com",
|
"address": "mc.universocraft.com",
|
||||||
"minecraftVersion": "1.11.2",
|
"minecraftVersion": "1.11.2",
|
||||||
"discord": {
|
"discord": {
|
||||||
"shortId": "Production",
|
"shortId": "Production",
|
||||||
|
2
package-lock.json
generated
2
package-lock.json
generated
@ -6,7 +6,7 @@
|
|||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "gekostudiosbetatest",
|
"name": "gekostudiosbetatest",
|
||||||
"version": "1.9.1",
|
"version": "1.9.0",
|
||||||
"license": "UNLICENSED",
|
"license": "UNLICENSED",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@electron/remote": "^2.0.8",
|
"@electron/remote": "^2.0.8",
|
||||||
|
@ -3,11 +3,11 @@
|
|||||||
"version": "1.9.1",
|
"version": "1.9.1",
|
||||||
"productName": "GekostudiosBetatest",
|
"productName": "GekostudiosBetatest",
|
||||||
"description": "Launcher exclusivamente para GekoStudios, para probar Testeos",
|
"description": "Launcher exclusivamente para GekoStudios, para probar Testeos",
|
||||||
"author": "GekoXD#00001 (https://github.com/GekoXD)",
|
"author": "GekoXD#0001 (https://github.com/GekoXD)",
|
||||||
"license": "UNLICENSED",
|
"license": "UNLICENSED",
|
||||||
"homepage": "https://github.com/GekoXD/GekostudiosBetatest",
|
"homepage": "https://github.com/GekoXD/GekostudiosBetatest",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/GekoXD/GekostudiosBetatest/pulls"
|
"url": "https://github.com/GekoXD/GekostudiosBetatest/issues"
|
||||||
},
|
},
|
||||||
"private": true,
|
"private": true,
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
|
Loading…
Reference in New Issue
Block a user