mirror of
https://github.com/dscalzi/HeliosLauncher.git
synced 2024-12-22 03:32:12 -08:00
Compare commits
3 Commits
bd71c0deba
...
79e901051d
Author | SHA1 | Date | |
---|---|---|---|
|
79e901051d | ||
|
84dd03c01a | ||
|
190bb4cf85 |
@ -468,15 +468,15 @@ class JavaGuard extends EventEmitter {
|
||||
break
|
||||
}
|
||||
}
|
||||
} else {
|
||||
} else if(verOb.major >= 16) {
|
||||
// TODO Make this logic better. Make java 16 required.
|
||||
// Java 9+
|
||||
if(Util.mcVersionAtLeast('1.13', this.mcVersion)){
|
||||
console.log('Java 9+ not yet tested.')
|
||||
/* meta.version = verOb
|
||||
if(Util.mcVersionAtLeast('1.17', this.mcVersion)){
|
||||
meta.version = verOb
|
||||
++checksum
|
||||
if(checksum === goal){
|
||||
break
|
||||
} */
|
||||
}
|
||||
}
|
||||
}
|
||||
// Space included so we get only the vendor.
|
||||
|
@ -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,7 +349,7 @@ 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'){
|
||||
@ -377,6 +387,19 @@ class ProcessBuilder {
|
||||
// JVM Arguments First
|
||||
let args = this.versionData.arguments.jvm
|
||||
|
||||
// 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)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
//args.push('-Dlog4j.configurationFile=D:\\WesterosCraft\\game\\common\\assets\\log_configs\\client-1.12.xml')
|
||||
|
||||
// Java Arguments
|
||||
@ -489,7 +512,7 @@ class ProcessBuilder {
|
||||
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 +670,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 +815,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.
|
||||
|
@ -253,8 +253,9 @@ const refreshServerStatus = async function(fade = false){
|
||||
refreshMojangStatuses()
|
||||
// Server Status is refreshed in uibinder.js on distributionIndexDone.
|
||||
|
||||
// Refresh statuses every hour. The status page itself refreshes every day so...
|
||||
let mojangStatusListener = setInterval(() => refreshMojangStatuses(true), 60*60*1000)
|
||||
// Set refresh rate to once every 5 minutes.
|
||||
let mojangStatusListener = setInterval(() => refreshMojangStatuses(true), 300000)
|
||||
let serverStatusListener = setInterval(() => refreshServerStatus(true), 300000)
|
||||
|
||||
/**
|
||||
|
1941
package-lock.json
generated
1941
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
12
package.json
12
package.json
@ -29,22 +29,22 @@
|
||||
"discord-rpc-patch": "^4.0.1",
|
||||
"ejs": "^3.1.8",
|
||||
"ejs-electron": "^2.1.1",
|
||||
"electron-updater": "^5.2.3",
|
||||
"electron-updater": "^5.3.0",
|
||||
"fs-extra": "^10.1.0",
|
||||
"github-syntax-dark": "^0.5.0",
|
||||
"got": "^11.8.5",
|
||||
"helios-core": "~0.1.1",
|
||||
"helios-core": "~0.1.2",
|
||||
"jquery": "^3.6.1",
|
||||
"node-stream-zip": "^1.15.0",
|
||||
"request": "^2.88.2",
|
||||
"semver": "^7.3.7",
|
||||
"semver": "^7.3.8",
|
||||
"tar-fs": "^2.1.1",
|
||||
"winreg": "^1.2.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"electron": "^20.1.1",
|
||||
"electron-builder": "^23.3.3",
|
||||
"eslint": "^8.23.0"
|
||||
"electron": "^21.2.2",
|
||||
"electron-builder": "^23.6.0",
|
||||
"eslint": "^8.27.0"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
Loading…
Reference in New Issue
Block a user