[FEATURE] LauncherGuard задает битность JVM

This commit is contained in:
Gravit 2019-02-17 18:19:54 +07:00
parent ca0e8c0299
commit 44a4feacde
No known key found for this signature in database
GPG key ID: 061981E1E85D3216
4 changed files with 17 additions and 0 deletions

View file

@ -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);

View file

@ -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) {

View file

@ -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");

View file

@ -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 {