diff options
author | Sefa Eyeoglu <contact@scrumplex.net> | 2022-06-14 22:00:24 +0200 |
---|---|---|
committer | Sefa Eyeoglu <contact@scrumplex.net> | 2022-07-03 17:31:01 +0200 |
commit | 474d77ac574c24918759413c2a77dc657e1e8581 (patch) | |
tree | d1a516863a97caec0443e949580017c8d9a91cc2 /launcher/JavaCommon.cpp | |
parent | 412fdb0f7b363e91d4f4ef3e973f29ab2b5a3613 (diff) | |
download | PrismLauncher-474d77ac574c24918759413c2a77dc657e1e8581.tar.gz PrismLauncher-474d77ac574c24918759413c2a77dc657e1e8581.tar.bz2 PrismLauncher-474d77ac574c24918759413c2a77dc657e1e8581.zip |
feat: resolve JARs dynamically
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
Diffstat (limited to 'launcher/JavaCommon.cpp')
-rw-r--r-- | launcher/JavaCommon.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/launcher/JavaCommon.cpp b/launcher/JavaCommon.cpp index 17278d86..ae6cd247 100644 --- a/launcher/JavaCommon.cpp +++ b/launcher/JavaCommon.cpp @@ -1,4 +1,5 @@ #include "JavaCommon.h" +#include "java/JavaUtils.h" #include "ui/dialogs/CustomMessageBox.h" #include <MMCStrings.h> @@ -65,6 +66,13 @@ void JavaCommon::javaBinaryWasBad(QWidget *parent, JavaCheckResult result) CustomMessageBox::selectable(parent, QObject::tr("Java test failure"), text, QMessageBox::Warning)->show(); } +void JavaCommon::javaCheckNotFound(QWidget *parent) +{ + QString text; + text += QObject::tr("Java checker library could not be found. Please check your installation"); + CustomMessageBox::selectable(parent, QObject::tr("Java test failure"), text, QMessageBox::Warning)->show(); +} + void JavaCommon::TestCheck::run() { if (!JavaCommon::checkJVMArgs(m_args, m_parent)) @@ -72,6 +80,11 @@ void JavaCommon::TestCheck::run() emit finished(); return; } + if (JavaUtils::getJavaCheckPath().isEmpty()) { + javaCheckNotFound(m_parent); + emit finished(); + return; + } checker.reset(new JavaChecker()); connect(checker.get(), SIGNAL(checkFinished(JavaCheckResult)), this, SLOT(checkFinished(JavaCheckResult))); |