diff options
author | Petr Mrázek <peterix@gmail.com> | 2014-01-08 01:27:40 +0100 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2014-01-08 01:28:33 +0100 |
commit | fb83299e592ef7627d5914e0fbce70c570981124 (patch) | |
tree | 573fb7524aed0059ec596bc9b426d8417469fd0f /logic/JavaChecker.cpp | |
parent | 28cb66e85cad786f08b40cf242cb17a70d9e7432 (diff) | |
download | MultiMC-fb83299e592ef7627d5914e0fbce70c570981124.tar MultiMC-fb83299e592ef7627d5914e0fbce70c570981124.tar.gz MultiMC-fb83299e592ef7627d5914e0fbce70c570981124.tar.lz MultiMC-fb83299e592ef7627d5914e0fbce70c570981124.tar.xz MultiMC-fb83299e592ef7627d5914e0fbce70c570981124.zip |
Deploy jars instead of extracting them at runtime, remove non-working nvidia fix
Diffstat (limited to 'logic/JavaChecker.cpp')
-rw-r--r-- | logic/JavaChecker.cpp | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/logic/JavaChecker.cpp b/logic/JavaChecker.cpp index a470bfa2..6ee7b4cf 100644 --- a/logic/JavaChecker.cpp +++ b/logic/JavaChecker.cpp @@ -1,26 +1,20 @@ #include "JavaChecker.h" +#include "MultiMC.h" +#include <pathutils.h> #include <QFile> #include <QProcess> #include <QMap> #include <QTemporaryFile> -#define CHECKER_FILE "JavaChecker.jar" - JavaChecker::JavaChecker(QObject *parent) : QObject(parent) { } void JavaChecker::performCheck() { - checkerJar.setFileTemplate("checker_XXXXXX.jar"); - checkerJar.open(); - QFile inner(":/java/checker.jar"); - inner.open(QIODevice::ReadOnly); - checkerJar.write(inner.readAll()); - inner.close(); - checkerJar.close(); + QString checkerJar = PathCombine(MMC->bin(), "jars", "JavaCheck.jar"); - QStringList args = {"-jar", checkerJar.fileName()}; + QStringList args = {"-jar", checkerJar}; process.reset(new QProcess()); process->setArguments(args); @@ -42,7 +36,6 @@ void JavaChecker::finished(int exitcode, QProcess::ExitStatus status) killTimer.stop(); QProcessPtr _process; _process.swap(process); - checkerJar.remove(); JavaCheckResult result; { @@ -100,7 +93,6 @@ void JavaChecker::error(QProcess::ProcessError err) if(err == QProcess::FailedToStart) { killTimer.stop(); - checkerJar.remove(); JavaCheckResult result; { |