summaryrefslogtreecommitdiffstats
path: root/api/logic/minecraft/launch/LauncherPartLaunch.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'api/logic/minecraft/launch/LauncherPartLaunch.cpp')
-rw-r--r--api/logic/minecraft/launch/LauncherPartLaunch.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/api/logic/minecraft/launch/LauncherPartLaunch.cpp b/api/logic/minecraft/launch/LauncherPartLaunch.cpp
index d9441e56..b641968c 100644
--- a/api/logic/minecraft/launch/LauncherPartLaunch.cpp
+++ b/api/logic/minecraft/launch/LauncherPartLaunch.cpp
@@ -18,6 +18,7 @@
#include <launch/LaunchTask.h>
#include <minecraft/MinecraftInstance.h>
#include <FileSystem.h>
+#include <Commandline.h>
#include <QStandardPaths>
#include "Env.h"
@@ -46,9 +47,11 @@ void LauncherPartLaunch::executeTask()
args << "-jar" << FS::PathCombine(ENV.getJarsPath(), "NewLaunch.jar");
- QString wrapperCommand = instance->getWrapperCommand();
- if(!wrapperCommand.isEmpty())
+ QString wrapperCommandStr = instance->getWrapperCommand().trimmed();
+ if(!wrapperCommandStr.isEmpty())
{
+ auto wrapperArgs = Commandline::splitArgs(wrapperCommandStr);
+ auto wrapperCommand = wrapperArgs.takeFirst();
auto realWrapperCommand = QStandardPaths::findExecutable(wrapperCommand);
if (realWrapperCommand.isEmpty())
{
@@ -57,9 +60,9 @@ void LauncherPartLaunch::executeTask()
emitFailed(reason);
return;
}
- emit logLine("Wrapper command is:\n" + wrapperCommand + "\n\n", MessageLevel::MultiMC);
+ emit logLine("Wrapper command is:\n" + wrapperCommandStr + "\n\n", MessageLevel::MultiMC);
args.prepend(javaPath);
- m_process.start(wrapperCommand, args);
+ m_process.start(wrapperCommand, wrapperArgs + args);
}
else
{