diff --git a/LaunchServer/src/main/resources/ru/gravit/launchserver/defaults/proguard.cfg b/LaunchServer/src/main/resources/ru/gravit/launchserver/defaults/proguard.cfg index f703b476..e4bd9f2c 100644 --- a/LaunchServer/src/main/resources/ru/gravit/launchserver/defaults/proguard.cfg +++ b/LaunchServer/src/main/resources/ru/gravit/launchserver/defaults/proguard.cfg @@ -24,11 +24,7 @@ -keeppackagenames com.eclipsesource.json.**,com.mojang.**,org.apache.**,com.google.gson.** --keep class com.eclipsesource.json.**,com.mojang.**,com.google.gson.** { - ; - ; -} --keep class org.apache.** { +-keep class com.mojang.**,org.apache.**,com.google.gson.**,com.eclipsesource.json.** { *; } diff --git a/Launcher/src/main/java/ru/gravit/launcher/LauncherEngine.java b/Launcher/src/main/java/ru/gravit/launcher/LauncherEngine.java index 2fb1351d..a8aa183c 100644 --- a/Launcher/src/main/java/ru/gravit/launcher/LauncherEngine.java +++ b/Launcher/src/main/java/ru/gravit/launcher/LauncherEngine.java @@ -205,7 +205,7 @@ public void start(String... args) throws Throwable { loadScript("dialog/dialog.js"); LogHelper.info("Invoking start() function"); Invocable invoker = (Invocable) engine; - if (JVMHelper.OS_TYPE == JVMHelper.OS.MUSTDIE) { + if (Launcher.isUsingAvanguard()) { AvanguardStarter.start((Path) invoker.invokeFunction("getPathDirHelper")); AvanguardStarter.loadVared(); AvanguardStarter.main(false); diff --git a/Launcher/src/main/java/ru/gravit/launcher/client/ClientLauncher.java b/Launcher/src/main/java/ru/gravit/launcher/client/ClientLauncher.java index 568cd9b2..632d72cb 100644 --- a/Launcher/src/main/java/ru/gravit/launcher/client/ClientLauncher.java +++ b/Launcher/src/main/java/ru/gravit/launcher/client/ClientLauncher.java @@ -320,7 +320,7 @@ public static Process launch( checkJVMBitsAndVersion(); // Fill CLI arguments List args = new LinkedList<>(); - boolean wrapper = isUsingWrapper(); + boolean wrapper = isUsingWrapper() && Launcher.isUsingAvanguard(); Path javaBin; if (wrapper) javaBin = JVMHelper.JVM_BITS == 64 ? AvanguardStarter.wrap64 : AvanguardStarter.wrap32; else @@ -383,7 +383,7 @@ public static void main(String... args) throws Throwable { Launcher.modulesManager = new ClientModuleManager(null); LauncherConfig.getAutogenConfig().initModules(); //INIT Launcher.modulesManager.preInitModules(); - if (JVMHelper.OS_TYPE == OS.MUSTDIE) { + if (Launcher.isUsingAvanguard()) { AvanguardStarter.loadVared(); AvanguardStarter.main(false); } diff --git a/LauncherAPI/src/main/java/ru/gravit/launcher/request/auth/AuthRequest.java b/LauncherAPI/src/main/java/ru/gravit/launcher/request/auth/AuthRequest.java index 7ee841f5..339ea99c 100644 --- a/LauncherAPI/src/main/java/ru/gravit/launcher/request/auth/AuthRequest.java +++ b/LauncherAPI/src/main/java/ru/gravit/launcher/request/auth/AuthRequest.java @@ -69,9 +69,9 @@ protected Result requestDo(HInput input, HOutput output) throws IOException { output.writeString(login, SerializeLimits.MAX_LOGIN); output.writeString(Launcher.profile.getTitle(), SerializeLimits.MAX_CLIENT); output.writeInt(auth_id); - output.writeLong(JVMHelper.OS_TYPE == JVMHelper.OS.MUSTDIE ? GuardBind.avnGetHddId() : 0); - output.writeLong(JVMHelper.OS_TYPE == JVMHelper.OS.MUSTDIE ? GuardBind.avnGetCpuid() : 0); - output.writeLong(JVMHelper.OS_TYPE == JVMHelper.OS.MUSTDIE ? GuardBind.avnGetSmbiosId() : 0); + output.writeLong(Launcher.isUsingAvanguard() ? GuardBind.avnGetHddId() : 0); + output.writeLong(Launcher.isUsingAvanguard() ? GuardBind.avnGetCpuid() : 0); + output.writeLong(Launcher.isUsingAvanguard() ? GuardBind.avnGetSmbiosId() : 0); output.writeByteArray(encryptedPassword, SecurityHelper.CRYPTO_MAX_LENGTH); output.flush(); diff --git a/libLauncher/src/main/java/ru/gravit/launcher/Launcher.java b/libLauncher/src/main/java/ru/gravit/launcher/Launcher.java index ea0a8b79..62ab4bc9 100644 --- a/libLauncher/src/main/java/ru/gravit/launcher/Launcher.java +++ b/libLauncher/src/main/java/ru/gravit/launcher/Launcher.java @@ -13,6 +13,7 @@ import ru.gravit.launcher.profiles.ClientProfile; import ru.gravit.utils.Version; import ru.gravit.utils.helper.IOHelper; +import ru.gravit.utils.helper.JVMHelper; import ru.gravit.utils.helper.SecurityHelper; import ru.gravit.launcher.modules.ModulesManagerInterface; import ru.gravit.launcher.serialize.HInput; @@ -109,4 +110,10 @@ public static String toHash(UUID uuid) { public static Version getVersion() { return new Version(MAJOR, MINOR, PATCH, BUILD, RELEASE); } + + public static final boolean useAvanguard = true; + + public static boolean isUsingAvanguard() { + return JVMHelper.OS_TYPE == JVMHelper.OS.MUSTDIE && useAvanguard; + } }