mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-11-16 03:59:14 +03:00
f00c0489a7
* [ANY] Автоматический запуск task build при запуске gradle без параметров. * [ANY] Пересмотр modulesManager. * [ANY] Закончен review libLauncher`а. * [FIX] Logger и ServerWrapper или e.printStackTrace вместо нормального логгирования. * [ANY] Разгрёб auth* и hwidHandler. * [FEATURE] Modules этап finish. + [FIX] Правки LauncherEngine. * [FIX] Проверки безопасности в loadModuleFull. + [FIX] finishModules в launchServer.
32 lines
878 B
Java
32 lines
878 B
Java
package ru.gravit.launcher;
|
|
|
|
import ru.gravit.utils.helper.LogHelper;
|
|
|
|
import java.io.IOException;
|
|
import java.lang.instrument.Instrumentation;
|
|
import java.util.jar.JarFile;
|
|
|
|
@LauncherAPI
|
|
public final class LauncherAgent {
|
|
private static boolean isAgentStarted = false;
|
|
public static Instrumentation inst;
|
|
|
|
public static void addJVMClassPath(String path) throws IOException {
|
|
LogHelper.debug("Launcher Agent addJVMClassPath");
|
|
inst.appendToSystemClassLoaderSearch(new JarFile(path));
|
|
}
|
|
|
|
public boolean isAgentStarted() {
|
|
return isAgentStarted;
|
|
}
|
|
|
|
public static void premain(String agentArgument, Instrumentation instrumentation) {
|
|
System.out.println("Launcher Agent");
|
|
inst = instrumentation;
|
|
isAgentStarted = true;
|
|
}
|
|
|
|
public static boolean isStarted() {
|
|
return isAgentStarted;
|
|
}
|
|
}
|