mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-23 00:51:01 +03:00
[FEATURE] Отключение использования javaagent на стороне клиента
This commit is contained in:
parent
a350b3bd77
commit
73e0ed53bb
2 changed files with 3 additions and 11 deletions
|
@ -75,9 +75,6 @@ public static void main(String... args) throws Throwable {
|
|||
HWIDProvider.registerHWIDs();
|
||||
LauncherEngine.modulesManager.invokeEvent(new PreConfigPhase());
|
||||
LauncherConfig config = Launcher.getConfig();
|
||||
if (config.environment.equals(LauncherConfig.LauncherEnvironment.PROD)) {
|
||||
if (!LauncherAgent.isStarted()) throw new SecurityException("LauncherAgent must started");
|
||||
}
|
||||
long startTime = System.currentTimeMillis();
|
||||
try {
|
||||
new LauncherEngine().start(args);
|
||||
|
|
|
@ -356,13 +356,12 @@ public static Process launch(
|
|||
}
|
||||
}
|
||||
// Add classpath and main class
|
||||
String pathLauncher = IOHelper.getCodeSource(ClientLauncher.class).toString();
|
||||
context.pathLauncher = pathLauncher;
|
||||
context.pathLauncher = IOHelper.getCodeSource(ClientLauncher.class).toString();
|
||||
context.args.add(ClientLauncherWrapper.MAGIC_ARG);
|
||||
Collections.addAll(context.args, profile.getJvmArgs());
|
||||
profile.pushOptionalJvmArgs(context.args);
|
||||
context.args.add("-Djava.library.path=".concat(params.clientDir.resolve(NATIVES_DIR).toString())); // Add Native Path
|
||||
context.args.add("-javaagent:".concat(pathLauncher));
|
||||
//context.args.add("-javaagent:".concat(pathLauncher));
|
||||
ClientHookManager.clientLaunchHook.hook(context);
|
||||
LauncherGuardManager.guard.addCustomParams(context);
|
||||
context.args.add(ClientLauncher.class.getName());
|
||||
|
@ -443,10 +442,7 @@ public static void main(String... args) throws Throwable {
|
|||
LauncherConfig.getAutogenConfig().initModules(); //INIT
|
||||
LauncherEngine.modulesManager.initModules(null);
|
||||
initGson(LauncherEngine.modulesManager);
|
||||
if (!LauncherAgent.isStarted()) {
|
||||
NativeJVMHalt.haltA(100);
|
||||
return;
|
||||
}
|
||||
LauncherEngine.verifyNoAgent();
|
||||
LauncherEngine.modulesManager.invokeEvent(new PreConfigPhase());
|
||||
JVMHelper.verifySystemProperties(ClientLauncher.class, true);
|
||||
EnvHelper.checkDangerousParams();
|
||||
|
@ -507,7 +503,6 @@ public static void main(String... args) throws Throwable {
|
|||
};
|
||||
AuthService.username = params.pp.username;
|
||||
AuthService.uuid = params.pp.uuid;
|
||||
ClientService.instrumentation = LauncherAgent.inst;
|
||||
ClientService.classLoader = classLoader;
|
||||
classLoader.addURL(IOHelper.getCodeSource(ClientLauncher.class).toUri().toURL());
|
||||
//classForName(classLoader, "com.google.common.collect.ForwardingMultimap");
|
||||
|
|
Loading…
Reference in a new issue