diff --git a/Launcher/runtime/config.js b/Launcher/runtime/config.js index 2d1cf88a..f13a245f 100644 --- a/Launcher/runtime/config.js +++ b/Launcher/runtime/config.js @@ -18,24 +18,12 @@ var config = { ramDefault: 1024, // Default RAM amount (0 for auto) jvm: { - enable: false, + enable: true, jvmMustdie32Dir: "jre-8u202-win32", jvmMustdie64Dir: "jre-8u202-win64", } }; -if(config.jvm.enable) { - switch (JVMHelper.OS_TYPE) { - case JVMHelperOS.MUSTDIE: - jvmDirName = JVMHelper.OS_BITS === 32 ? config.jvm.jvmMustdie32Dir : - jvmDirName = JVMHelper.OS_BITS === 64 ? config.jvm.jvmMustdie64Dir : config.jvm.enable = false; - break; - default: - config.jvm.enable = false; - break; - } -} - DirBridge.dir = DirBridge.getLauncherDir(config.dir); DirBridge.dirStore = DirBridge.getStoreDir(config.dir); DirBridge.dirProjectStore = DirBridge.getProjectStoreDir(config.dir); diff --git a/Launcher/runtime/dialog/dialog.js b/Launcher/runtime/dialog/dialog.js index dd971b7c..b2d89e62 100644 --- a/Launcher/runtime/dialog/dialog.js +++ b/Launcher/runtime/dialog/dialog.js @@ -302,7 +302,7 @@ function doAuth(login, rsaPassword, auth_type) { function doUpdate(profile, pp, accessToken) { var digest = profile.isUpdateFastCheck(); overlay.swap(0, update.overlay, function(event) { - if(config.jvm.enable) { + if (config.jvm.enable) { makeSetProfileRequest(profile, function() { ClientLauncher.setProfile(profile); var jvmDir = settings.updatesDir.resolve(jvmDirName); @@ -326,7 +326,7 @@ function doUpdate(profile, pp, accessToken) { }); }); }); - }else{ + } else { update.resetOverlay("Обновление файлов ресурсов"); var assetDirName = profile.getAssetDir(); var assetDir = settings.updatesDir.resolve(assetDirName); diff --git a/Launcher/runtime/init.js b/Launcher/runtime/init.js index 1db04f3b..9b1ccb43 100644 --- a/Launcher/runtime/init.js +++ b/Launcher/runtime/init.js @@ -79,6 +79,18 @@ function setRootParent(parent) { function start(args) { + if (config.jvm.enable) { + switch (JVMHelper.OS_TYPE) { + case JVMHelperOS.MUSTDIE: + jvmDirName = JVMHelper.OS_BITS === 32 ? config.jvm.jvmMustdie32Dir : + jvmDirName = JVMHelper.OS_BITS === 64 ? config.jvm.jvmMustdie64Dir : config.jvm.enable = false; + break; + default: + config.jvm.enable = false; + break; + } + } + LogHelper.debug("Setting FX properties"); java.lang.System.setProperty("prism.lcdtext", "false");