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<>();
|
List<String> paths = new ArrayList<>();
|
||||||
Path librariesDir = instance.getPath().resolve("libraries");
|
Path librariesDir = instance.getPath().resolve("libraries");
|
||||||
|
|
||||||
|
System.out.println(ZAnsi.cyan(" buildClasspathFromManifest: " + manifest.getLibraries().size() + " libraries in manifest"));
|
||||||
|
|
||||||
for (VersionManifest.Library lib : manifest.getLibraries()) {
|
for (VersionManifest.Library lib : manifest.getLibraries()) {
|
||||||
Path libPath = librariesDir.resolve(lib.artifactPath);
|
Path libPath = librariesDir.resolve(lib.artifactPath);
|
||||||
if (Files.exists(libPath)) {
|
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();
|
Path versionJar = findVersionJar();
|
||||||
if (versionJar != null) {
|
if (versionJar != null) {
|
||||||
paths.add(0, versionJar.toAbsolutePath().toString());
|
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") ? ";" : ":";
|
String separator = System.getProperty("os.name").toLowerCase().contains("win") ? ";" : ":";
|
||||||
|
|||||||
@@ -266,7 +266,12 @@ public class JFXLauncher extends Application {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void handleGameLogs(HttpExchange exchange) {
|
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) {
|
private void handleExit(HttpExchange exchange) {
|
||||||
|
|||||||
Reference in New Issue
Block a user