mirror of
https://github.com/GravitLauncher/Launcher
synced 2025-04-19 14:33:04 +03:00
[FEATURE] Возможность запрещать лаунчеру запуск на определенных OS
This commit is contained in:
parent
7755891139
commit
09ee2f5f05
2 changed files with 24 additions and 0 deletions
|
@ -25,6 +25,12 @@ var config = {
|
|||
jvmMustdie64Dir: "jre-8u211-win64", // Название папки JVM для Windows x64
|
||||
},
|
||||
|
||||
allowedOS: {
|
||||
windows: true,
|
||||
linux: true,
|
||||
mac: true
|
||||
},
|
||||
|
||||
settingsMagic: 0xC0DE5, // Магия вне хогвартса
|
||||
};
|
||||
|
||||
|
|
|
@ -80,6 +80,24 @@ function setRootParent(parent) {
|
|||
}
|
||||
|
||||
function start(args) {
|
||||
if (!config.allowedOS.windows) {
|
||||
if (JVMHelper.OS_TYPE == JVMHelperOS.MUSTDIE) {
|
||||
LogHelper.info("This OS is not allowed!");
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (!config.allowedOS.linux) {
|
||||
if (JVMHelper.OS_TYPE == JVMHelperOS.LINUX) {
|
||||
LogHelper.info("This OS is not allowed!");
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (!config.allowedOS.mac) {
|
||||
if (JVMHelper.OS_TYPE == JVMHelperOS.MACOSX) {
|
||||
LogHelper.info("This OS is not allowed!");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (config.jvm.enable) {
|
||||
switch (JVMHelper.OS_TYPE) {
|
||||
|
|
Loading…
Reference in a new issue