SCRATCH remove remaining references to MultiMC.h and fix legacy LWJGL

This commit is contained in:
Petr Mrázek
2015-02-02 01:09:28 +01:00
parent 382ae78a0b
commit d313e9ab09
28 changed files with 209 additions and 121 deletions

View File

@ -1,10 +1,11 @@
#include "JavaChecker.h"
#include "MultiMC.h"
#include <pathutils.h>
#include <QFile>
#include <QProcess>
#include <QMap>
#include <QTemporaryFile>
#include <QCoreApplication>
#include <QDebug>
JavaChecker::JavaChecker(QObject *parent) : QObject(parent)
{
@ -20,9 +21,9 @@ void JavaChecker::performCheck()
process->setArguments(args);
process->setProgram(path);
process->setProcessChannelMode(QProcess::SeparateChannels);
QLOG_DEBUG() << "Running java checker!";
QLOG_DEBUG() << "Java: " + path;
QLOG_DEBUG() << "Args: {" + args.join("|") + "}";
qDebug() << "Running java checker!";
qDebug() << "Java: " + path;
qDebug() << "Args: {" + args.join("|") + "}";
connect(process.get(), SIGNAL(finished(int, QProcess::ExitStatus)), this,
SLOT(finished(int, QProcess::ExitStatus)));
@ -45,18 +46,18 @@ void JavaChecker::finished(int exitcode, QProcess::ExitStatus status)
result.path = path;
result.id = id;
}
QLOG_DEBUG() << "Java checker finished with status " << status << " exit code " << exitcode;
qDebug() << "Java checker finished with status " << status << " exit code " << exitcode;
if (status == QProcess::CrashExit || exitcode == 1)
{
QLOG_DEBUG() << "Java checker failed!";
qDebug() << "Java checker failed!";
emit checkFinished(result);
return;
}
bool success = true;
QString p_stdout = _process->readAllStandardOutput();
QLOG_DEBUG() << p_stdout;
qDebug() << p_stdout;
QMap<QString, QString> results;
QStringList lines = p_stdout.split("\n", QString::SkipEmptyParts);
@ -77,7 +78,7 @@ void JavaChecker::finished(int exitcode, QProcess::ExitStatus status)
if(!results.contains("os.arch") || !results.contains("java.version") || !success)
{
QLOG_DEBUG() << "Java checker failed - couldn't extract required information.";
qDebug() << "Java checker failed - couldn't extract required information.";
emit checkFinished(result);
return;
}
@ -92,7 +93,7 @@ void JavaChecker::finished(int exitcode, QProcess::ExitStatus status)
result.mojangPlatform = is_64 ? "64" : "32";
result.realPlatform = os_arch;
result.javaVersion = java_version;
QLOG_DEBUG() << "Java checker succeeded.";
qDebug() << "Java checker succeeded.";
emit checkFinished(result);
}
@ -101,7 +102,7 @@ void JavaChecker::error(QProcess::ProcessError err)
if(err == QProcess::FailedToStart)
{
killTimer.stop();
QLOG_DEBUG() << "Java checker has failed to start.";
qDebug() << "Java checker has failed to start.";
JavaCheckResult result;
{
result.path = path;
@ -118,7 +119,7 @@ void JavaChecker::timeout()
// NO MERCY. NO ABUSE.
if(process)
{
QLOG_DEBUG() << "Java checker has been killed by timeout.";
qDebug() << "Java checker has been killed by timeout.";
process->kill();
}
}

View File

@ -15,7 +15,6 @@
#include "JavaCheckerJob.h"
#include "pathutils.h"
#include "MultiMC.h"
#include "logger/QsLog.h"

View File

@ -21,8 +21,6 @@
#include <logic/settings/Setting.h>
#include <pathutils.h>
#include "MultiMC.h"
#include "logger/QsLog.h"
#include "logic/java/JavaUtils.h"
#include "logic/java/JavaCheckerJob.h"

View File

@ -17,7 +17,6 @@
#include <QtXml>
#include <QRegExp>
#include "MultiMC.h"
#include "logger/QsLog.h"
#include "logic/java/JavaVersionList.h"