diff options
author | Petr Mrázek <peterix@gmail.com> | 2015-08-24 00:56:45 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2015-08-24 00:56:45 +0200 |
commit | bc917668ff9ab193ed66b390dd4f0e0bcef4cb43 (patch) | |
tree | 129d298e57732bc97161a0074124bfa983f1cdff /logic/launch/steps/CheckJava.cpp | |
parent | 961c1c61b8b8d0e1242edcc59a4db97ad6fb7d7b (diff) | |
download | MultiMC-bc917668ff9ab193ed66b390dd4f0e0bcef4cb43.tar MultiMC-bc917668ff9ab193ed66b390dd4f0e0bcef4cb43.tar.gz MultiMC-bc917668ff9ab193ed66b390dd4f0e0bcef4cb43.tar.lz MultiMC-bc917668ff9ab193ed66b390dd4f0e0bcef4cb43.tar.xz MultiMC-bc917668ff9ab193ed66b390dd4f0e0bcef4cb43.zip |
GH-1133 fix bad java path detection some more
Diffstat (limited to 'logic/launch/steps/CheckJava.cpp')
-rw-r--r-- | logic/launch/steps/CheckJava.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/logic/launch/steps/CheckJava.cpp b/logic/launch/steps/CheckJava.cpp index 22f62057..4a9fcbf9 100644 --- a/logic/launch/steps/CheckJava.cpp +++ b/logic/launch/steps/CheckJava.cpp @@ -21,15 +21,19 @@ void CheckJava::executeTask() { auto instance = m_parent->instance(); - auto javaPath = instance->settings()->get("JavaPath").toString(); - emit logLine("Java path is:\n" + m_javaPath + "\n\n", MessageLevel::MultiMC); + m_javaPath = instance->settings()->get("JavaPath").toString(); auto realJavaPath = QStandardPaths::findExecutable(m_javaPath); if (realJavaPath.isEmpty()) { - emit logLine(tr("The java binary \"%1\" couldn't be found. You may have to set up java " - "if Minecraft fails to launch.").arg(m_javaPath), + emit logLine(tr("The java binary \"%1\" couldn't be found. Please set up java in the settings.").arg(m_javaPath), MessageLevel::Warning); + emitFailed(tr("Java path is not valid.")); + return; + } + else + { + emit logLine("Java path is:\n" + m_javaPath + "\n\n", MessageLevel::MultiMC); } QFileInfo javaInfo(realJavaPath); @@ -47,6 +51,7 @@ void CheckJava::executeTask() connect(m_JavaChecker.get(), &JavaChecker::checkFinished, this, &CheckJava::checkJavaFinished); m_JavaChecker->m_path = realJavaPath; m_JavaChecker->performCheck(); + return; } emitSucceeded(); } |