mirror of
https://github.com/dscalzi/HeliosLauncher.git
synced 2024-12-22 03:32:12 -08:00
Use classpath flag instead of hardcode.
This commit is contained in:
parent
4636f7200c
commit
a6e3d2b85c
@ -5,7 +5,7 @@
|
||||
},
|
||||
"extends": "eslint:recommended",
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 2019,
|
||||
"ecmaVersion": 2021,
|
||||
"sourceType": "module"
|
||||
},
|
||||
"rules": {
|
||||
|
@ -118,7 +118,7 @@ class Module {
|
||||
* @returns {Module} The parsed Module.
|
||||
*/
|
||||
static fromJSON(json, serverid){
|
||||
return new Module(json.id, json.name, json.type, json.required, json.artifact, json.subModules, serverid)
|
||||
return new Module(json.id, json.name, json.type, json.classpath, json.required, json.artifact, json.subModules, serverid)
|
||||
}
|
||||
|
||||
/**
|
||||
@ -143,9 +143,10 @@ class Module {
|
||||
}
|
||||
}
|
||||
|
||||
constructor(id, name, type, required, artifact, subModules, serverid) {
|
||||
constructor(id, name, type, classpath, required, artifact, subModules, serverid) {
|
||||
this.identifier = id
|
||||
this.type = type
|
||||
this.classpath = classpath
|
||||
this._resolveMetaData()
|
||||
this.name = name
|
||||
this.required = Required.fromJSON(required)
|
||||
@ -306,6 +307,13 @@ class Module {
|
||||
return this.type
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {boolean} Whether or not this library should be on the classpath.
|
||||
*/
|
||||
getClasspath(){
|
||||
return this.classpath ?? true
|
||||
}
|
||||
|
||||
}
|
||||
exports.Module
|
||||
|
||||
|
@ -816,16 +816,10 @@ class ProcessBuilder {
|
||||
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
|
||||
}
|
||||
|
||||
if(sm.getClasspath()) {
|
||||
libs.push(sm.getArtifact().getPath())
|
||||
}
|
||||
}
|
||||
// If this module has submodules, we need to resolve the libraries for those.
|
||||
// To avoid unnecessary recursive calls, base case is checked here.
|
||||
if(mdl.hasSubModules()){
|
||||
|
Loading…
Reference in New Issue
Block a user