From f49d007f9fd3aff6ba3faa0fce50c444ed079c87 Mon Sep 17 00:00:00 2001 From: Zaxar163 Date: Fri, 3 May 2019 10:06:11 +0300 Subject: [PATCH] =?UTF-8?q?[FIX]=20Radon=20=D1=80=D0=B0=D0=B1=D0=BE=D1=82?= =?UTF-8?q?=D0=B0=D0=B5=D1=82.=20=D0=90=D0=B3=D0=B5=D0=BD=D1=82=20=D1=82?= =?UTF-8?q?=D0=BE=D0=B6=D0=B5=20=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D0=B0=D0=B5?= =?UTF-8?q?=D1=82.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/ru/gravit/launchserver/LaunchServer.java | 7 ++++--- .../gravit/launchserver/websocket/LauncherNettyServer.java | 1 - .../src/main/java/ru/gravit/launcher/LauncherAgent.java | 4 +++- Radon | 2 +- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java b/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java index 94f4db54..3bcaa154 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java @@ -721,7 +721,8 @@ private void generateConfigIfNotExists(boolean testEnv) throws IOException { newConfig.threadCoreCount = 0; // on your own newConfig.threadCount = JVMHelper.OPERATING_SYSTEM_MXBEAN.getAvailableProcessors() >= 4 ? JVMHelper.OPERATING_SYSTEM_MXBEAN.getAvailableProcessors() / 2 : JVMHelper.OPERATING_SYSTEM_MXBEAN.getAvailableProcessors(); - newConfig.enabledRadon = false; + newConfig.enabledRadon = true; + newConfig.genMappings = true; newConfig.enabledProGuard = true; newConfig.stripLineNumbers = true; newConfig.deleteTempFiles = true; @@ -745,12 +746,12 @@ private void generateConfigIfNotExists(boolean testEnv) throws IOException { System.out.println("LaunchServer projectName: "); newConfig.setProjectName(commandHandler.readLine()); } - if(address == null) + if(address == null || address.isEmpty()) { LogHelper.error("Address null. Using localhost"); address = "localhost"; } - if(newConfig.projectName == null) + if(newConfig.projectName == null || newConfig.projectName.isEmpty()) { LogHelper.error("ProjectName null. Using MineCraft"); newConfig.projectName = "MineCraft"; diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/websocket/LauncherNettyServer.java b/LaunchServer/src/main/java/ru/gravit/launchserver/websocket/LauncherNettyServer.java index 0259bdc9..811db49a 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/websocket/LauncherNettyServer.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/websocket/LauncherNettyServer.java @@ -12,7 +12,6 @@ import io.netty.handler.codec.http.HttpServerCodec; import io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandler; import io.netty.handler.codec.http.websocketx.extensions.compression.WebSocketServerCompressionHandler; -import io.netty.handler.logging.LogLevel; import io.netty.handler.logging.LoggingHandler; import ru.gravit.launchserver.LaunchServer; import ru.gravit.launchserver.websocket.fileserver.FileServerHandler; diff --git a/Launcher/src/main/java/ru/gravit/launcher/LauncherAgent.java b/Launcher/src/main/java/ru/gravit/launcher/LauncherAgent.java index 0d4903e0..9946e584 100644 --- a/Launcher/src/main/java/ru/gravit/launcher/LauncherAgent.java +++ b/Launcher/src/main/java/ru/gravit/launcher/LauncherAgent.java @@ -15,6 +15,7 @@ import java.io.IOException; import java.io.InputStream; import java.lang.instrument.Instrumentation; +import java.lang.management.ManagementFactory; import java.util.ArrayList; import java.util.List; import java.util.jar.JarFile; @@ -53,7 +54,8 @@ public static void premain(String agentArgument, Instrumentation instrumentation } } try { - //replaceClasses(pb, rt); + if (ManagementFactory.getOperatingSystemMXBean().getName().startsWith("Windows")) replaceClasses(pb, rt); + else replaceClasses(false, false); } catch (Error e) { NativeJVMHalt.haltA(294); throw e; diff --git a/Radon b/Radon index 07581407..6410af80 160000 --- a/Radon +++ b/Radon @@ -1 +1 @@ -Subproject commit 07581407e7b214b7dff8a256247dde62bba1697d +Subproject commit 6410af8044e7346e06f546dc04636b631fa7584c