diff --git a/windows/Sources/FabricSandbox/SandboxCommandLine.swift b/windows/Sources/FabricSandbox/SandboxCommandLine.swift index 6d46bb0..ca7558b 100644 --- a/windows/Sources/FabricSandbox/SandboxCommandLine.swift +++ b/windows/Sources/FabricSandbox/SandboxCommandLine.swift @@ -100,6 +100,8 @@ class SandboxCommandLine { args[0] = appPath.path() } + var classpathMap: [String: String] = [:] + for i in 0.. String { let classPath = classPathArgument.split(separator: ";") @@ -213,11 +259,13 @@ class SandboxCommandLine { logger.debug("Copying classpath entry to sandbox: \(source.path()) -> \(target.path())") try source.copy(to: target) newClasspath.append(target.path()) + classpathMap[source.path()] = target.path() } else { // The classpath entry is located within the minecraft jar, so will be mounted into the sandbox. let relativePath = source.relative(to: dotMinecraftDir) let sandboxPath = sandboxRoot.child(relativePath) newClasspath.append(sandboxPath.path()) + classpathMap[source.path()] = sandboxPath.path() } } return newClasspath.joined(separator: ";") @@ -252,4 +300,16 @@ class SandboxCommandLine { try newClasspathFile.writeString(newEntries.map { $0.path() }.joined(separator: ";")) return newClasspathFile } + + private static func modifyJvmProp(name: String, args: inout [String], _ func: (String) -> String) { + let prop = "-D\(name)=" + for i in 0..