diff --git a/Launcher/runtime/config.js b/Launcher/runtime/config.js index 28f92dba..a38ae38f 100644 --- a/Launcher/runtime/config.js +++ b/Launcher/runtime/config.js @@ -25,6 +25,12 @@ var config = { jvmMustdie64Dir: "jre-8u211-win64", // Название папки JVM для Windows x64 }, + allowedOS: { + windows: true, + linux: true, + mac: true + }, + settingsMagic: 0xC0DE5, // Магия вне хогвартса }; diff --git a/Launcher/runtime/init.js b/Launcher/runtime/init.js index b3d9a949..c3f6dae0 100644 --- a/Launcher/runtime/init.js +++ b/Launcher/runtime/init.js @@ -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) {