Initial work on 1.13 forge resolver, fixes.

Moved java executable to its own util class.
Fixed artifact resolution links for older versions of forge.

1.13 support is going to be difficult because forge does not
make anything developer friendly.
This commit is contained in:
Daniel Scalzi committed 2020-01-18 10:50:28 -05:00
1 parent b4bef1b258
commit aeef30e3c8
11 files changed
+133 -19

No files matched your search

+2 -5
View File
@@ -1,12 +1,9 @@
import { spawn } from 'child_process'
import { join } from 'path'
import { JavaUtil } from './javautil'
export class PackXZExtractWrapper {
public static getJavaExecutable() {
return process.env.JAVA_EXECUTABLE as string
}
public static getPackXZExtract() {
return join(process.cwd(), 'libraries', 'java', 'PackXZExtract.jar')
}
@@ -25,7 +22,7 @@ export class PackXZExtractWrapper {
private static execute(command: string, paths: string[]) {
return new Promise((resolve, reject) => {
const child = spawn(PackXZExtractWrapper.getJavaExecutable(), [
const child = spawn(JavaUtil.getJavaExecutable(), [
'-jar',
PackXZExtractWrapper.getPackXZExtract(),
command,
+7
View File
@@ -0,0 +1,7 @@
export class JavaUtil {
public static getJavaExecutable() {
return process.env.JAVA_EXECUTABLE as string
}
}
+1 -1
View File
@@ -17,7 +17,7 @@ export class VersionUtil {
}
}
}
return null
throw new Error(`${version} is not a valid minecraft version!`)
}
}