diff options
author | Petr Mrázek <peterix@gmail.com> | 2015-09-30 22:52:55 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2015-09-30 22:52:55 +0200 |
commit | 477a1a88c6b7f5e5a78a2bbc4a6fe7781b2a0525 (patch) | |
tree | 8afd9d2359717b77c9c842b27598543af9069471 /logic | |
parent | cf0308c970aba7e282e4e98782187bc636f8ce26 (diff) | |
download | MultiMC-477a1a88c6b7f5e5a78a2bbc4a6fe7781b2a0525.tar MultiMC-477a1a88c6b7f5e5a78a2bbc4a6fe7781b2a0525.tar.gz MultiMC-477a1a88c6b7f5e5a78a2bbc4a6fe7781b2a0525.tar.lz MultiMC-477a1a88c6b7f5e5a78a2bbc4a6fe7781b2a0525.tar.xz MultiMC-477a1a88c6b7f5e5a78a2bbc4a6fe7781b2a0525.zip |
GH-1262 fix relative paths for java binaries
Diffstat (limited to 'logic')
-rw-r--r-- | logic/launch/steps/CheckJava.cpp | 3 | ||||
-rw-r--r-- | logic/launch/steps/LaunchMinecraft.cpp | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/logic/launch/steps/CheckJava.cpp b/logic/launch/steps/CheckJava.cpp index 9c5fd404..7482624f 100644 --- a/logic/launch/steps/CheckJava.cpp +++ b/logic/launch/steps/CheckJava.cpp @@ -15,6 +15,7 @@ #include "CheckJava.h" #include <launch/LaunchTask.h> +#include <pathutils.h> #include <QStandardPaths> #include <QFileInfo> @@ -22,7 +23,7 @@ void CheckJava::executeTask() { auto instance = m_parent->instance(); auto settings = instance->settings(); - m_javaPath = settings->get("JavaPath").toString(); + m_javaPath = ResolveExecutable(settings->get("JavaPath").toString()); bool perInstance = settings->get("OverrideJava").toBool() || settings->get("OverrideJavaLocation").toBool(); auto realJavaPath = QStandardPaths::findExecutable(m_javaPath); diff --git a/logic/launch/steps/LaunchMinecraft.cpp b/logic/launch/steps/LaunchMinecraft.cpp index 95438003..84abb375 100644 --- a/logic/launch/steps/LaunchMinecraft.cpp +++ b/logic/launch/steps/LaunchMinecraft.cpp @@ -16,6 +16,7 @@ #include "LaunchMinecraft.h" #include <launch/LaunchTask.h> #include <minecraft/OneSixInstance.h> +#include <pathutils.h> #include <QStandardPaths> LaunchMinecraft::LaunchMinecraft(LaunchTask *parent) : LaunchStep(parent) @@ -33,7 +34,7 @@ void LaunchMinecraft::executeTask() QString allArgs = args.join(", "); emit logLine("Java Arguments:\n[" + m_parent->censorPrivateInfo(allArgs) + "]\n\n", MessageLevel::MultiMC); - auto javaPath = instance->settings()->get("JavaPath").toString(); + auto javaPath = ResolveExecutable(instance->settings()->get("JavaPath").toString()); m_process.setProcessEnvironment(instance->createEnvironment()); |