mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-11-15 11:39:11 +03:00
[FEATURE] LauncherGuard задает битность JVM
This commit is contained in:
parent
ca0e8c0299
commit
44a4feacde
4 changed files with 17 additions and 0 deletions
|
@ -7,6 +7,7 @@
|
|||
public interface LauncherGuardInterface {
|
||||
String getName();
|
||||
Path getJavaBinPath();
|
||||
int getClientJVMBits();
|
||||
void init(boolean clientInstance);
|
||||
void addCustomParams(ClientLauncherContext context);
|
||||
void addCustomEnv(ClientLauncherContext context);
|
||||
|
|
|
@ -23,6 +23,11 @@ public Path getJavaBinPath() {
|
|||
return IOHelper.resolveJavaBin(Paths.get(System.getProperty("java.home")));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getClientJVMBits() {
|
||||
return JVMHelper.OS_BITS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init(boolean clientInstance) {
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
import ru.gravit.launcher.client.ClientLauncherContext;
|
||||
import ru.gravit.utils.helper.IOHelper;
|
||||
import ru.gravit.utils.helper.JVMHelper;
|
||||
import ru.gravit.utils.helper.LogHelper;
|
||||
|
||||
import java.nio.file.Path;
|
||||
|
@ -19,6 +20,11 @@ public Path getJavaBinPath() {
|
|||
return IOHelper.resolveJavaBin(Paths.get(System.getProperty("java.home")));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getClientJVMBits() {
|
||||
return JVMHelper.JVM_BITS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init(boolean clientInstance) {
|
||||
LogHelper.warning("Using noGuard interface");
|
||||
|
|
|
@ -30,6 +30,11 @@ public Path getJavaBinPath() {
|
|||
return IOHelper.resolveJavaBin(Paths.get(System.getProperty("java.home")));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getClientJVMBits() {
|
||||
return JVMHelper.JVM_BITS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init(boolean clientInstance) {
|
||||
try {
|
||||
|
|
Loading…
Reference in a new issue