Debug: classpath for modloaders, game logs in UI
This commit is contained in:
+5
@@ -298,6 +298,8 @@ public class LaunchCommandBuilder {
|
||||
List<String> paths = new ArrayList<>();
|
||||
Path librariesDir = instance.getPath().resolve("libraries");
|
||||
|
||||
System.out.println(ZAnsi.cyan(" buildClasspathFromManifest: " + manifest.getLibraries().size() + " libraries in manifest"));
|
||||
|
||||
for (VersionManifest.Library lib : manifest.getLibraries()) {
|
||||
Path libPath = librariesDir.resolve(lib.artifactPath);
|
||||
if (Files.exists(libPath)) {
|
||||
@@ -313,9 +315,12 @@ public class LaunchCommandBuilder {
|
||||
}
|
||||
}
|
||||
|
||||
System.out.println(ZAnsi.cyan(" buildClasspathFromManifest: " + paths.size() + " libraries in classpath"));
|
||||
|
||||
Path versionJar = findVersionJar();
|
||||
if (versionJar != null) {
|
||||
paths.add(0, versionJar.toAbsolutePath().toString());
|
||||
System.out.println(ZAnsi.green(" Added version jar: " + versionJar.getFileName()));
|
||||
}
|
||||
|
||||
String separator = System.getProperty("os.name").toLowerCase().contains("win") ? ";" : ":";
|
||||
|
||||
@@ -266,7 +266,12 @@ public class JFXLauncher extends Application {
|
||||
}
|
||||
|
||||
private void handleGameLogs(HttpExchange exchange) {
|
||||
sendJson(exchange, Map.of("success", true, "data", getGameLogs()));
|
||||
String logs = getGameLogs();
|
||||
log("[GAME-LOGS-API] Request, logs length: " + logs.length());
|
||||
if (!logs.isEmpty()) {
|
||||
log("[GAME-LOGS-API] First 200 chars: " + logs.substring(0, Math.min(200, logs.length())));
|
||||
}
|
||||
sendJson(exchange, Map.of("success", true, "data", logs));
|
||||
}
|
||||
|
||||
private void handleExit(HttpExchange exchange) {
|
||||
|
||||
Reference in New Issue
Block a user