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 {
|
public interface LauncherGuardInterface {
|
||||||
String getName();
|
String getName();
|
||||||
Path getJavaBinPath();
|
Path getJavaBinPath();
|
||||||
|
int getClientJVMBits();
|
||||||
void init(boolean clientInstance);
|
void init(boolean clientInstance);
|
||||||
void addCustomParams(ClientLauncherContext context);
|
void addCustomParams(ClientLauncherContext context);
|
||||||
void addCustomEnv(ClientLauncherContext context);
|
void addCustomEnv(ClientLauncherContext context);
|
||||||
|
|
|
@ -23,6 +23,11 @@ public Path getJavaBinPath() {
|
||||||
return IOHelper.resolveJavaBin(Paths.get(System.getProperty("java.home")));
|
return IOHelper.resolveJavaBin(Paths.get(System.getProperty("java.home")));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getClientJVMBits() {
|
||||||
|
return JVMHelper.OS_BITS;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void init(boolean clientInstance) {
|
public void init(boolean clientInstance) {
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
import ru.gravit.launcher.client.ClientLauncherContext;
|
import ru.gravit.launcher.client.ClientLauncherContext;
|
||||||
import ru.gravit.utils.helper.IOHelper;
|
import ru.gravit.utils.helper.IOHelper;
|
||||||
|
import ru.gravit.utils.helper.JVMHelper;
|
||||||
import ru.gravit.utils.helper.LogHelper;
|
import ru.gravit.utils.helper.LogHelper;
|
||||||
|
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
|
@ -19,6 +20,11 @@ public Path getJavaBinPath() {
|
||||||
return IOHelper.resolveJavaBin(Paths.get(System.getProperty("java.home")));
|
return IOHelper.resolveJavaBin(Paths.get(System.getProperty("java.home")));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getClientJVMBits() {
|
||||||
|
return JVMHelper.JVM_BITS;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void init(boolean clientInstance) {
|
public void init(boolean clientInstance) {
|
||||||
LogHelper.warning("Using noGuard interface");
|
LogHelper.warning("Using noGuard interface");
|
||||||
|
|
|
@ -30,6 +30,11 @@ public Path getJavaBinPath() {
|
||||||
return IOHelper.resolveJavaBin(Paths.get(System.getProperty("java.home")));
|
return IOHelper.resolveJavaBin(Paths.get(System.getProperty("java.home")));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getClientJVMBits() {
|
||||||
|
return JVMHelper.JVM_BITS;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void init(boolean clientInstance) {
|
public void init(boolean clientInstance) {
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in a new issue