From 5f781b3053c5ba8a25d354903acf2c31dc9a56c5 Mon Sep 17 00:00:00 2001 From: Andrew Date: Wed, 8 May 2013 12:56:43 -0500 Subject: Implement basic game updater. Resolves MMC-4: https://jira.forkk.net/browse/MMC-4 --- libmultimc/src/minecraftprocess.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'libmultimc/src/minecraftprocess.cpp') diff --git a/libmultimc/src/minecraftprocess.cpp b/libmultimc/src/minecraftprocess.cpp index f1b63e3d..e8b9959e 100644 --- a/libmultimc/src/minecraftprocess.cpp +++ b/libmultimc/src/minecraftprocess.cpp @@ -73,7 +73,7 @@ QStringList MinecraftProcess::splitArgs(QString args) } // prepare tools -inline void MinecraftProcess::extractIcon(InstancePtr inst, QString destination) +inline void MinecraftProcess::extractIcon(Instance *inst, QString destination) { // QImage(":/icons/instances/" + inst->iconKey()).save(destination); } @@ -83,14 +83,14 @@ inline void MinecraftProcess::extractLauncher(QString destination) QFile(":/launcher/launcher.jar").copy(destination); } -void MinecraftProcess::prepare(InstancePtr inst) +void MinecraftProcess::prepare(Instance *inst) { extractLauncher(PathCombine(inst->minecraftDir(), LAUNCHER_FILE)); extractIcon(inst, PathCombine(inst->minecraftDir(), "icon.png")); } // constructor -MinecraftProcess::MinecraftProcess(InstancePtr inst, QString user, QString session) : +MinecraftProcess::MinecraftProcess(Instance *inst, QString user, QString session) : m_instance(inst), m_user(user), m_session(session) { connect(this, SIGNAL(finished(int, QProcess::ExitStatus)), SLOT(finish(int, QProcess::ExitStatus))); @@ -254,9 +254,8 @@ void MinecraftProcess::genArgs() #endif // lwjgl - QString lwjgl = m_instance->lwjglVersion(); - if (lwjgl != "Mojang") - lwjgl = QDir(globalSettings->get("LWJGLDir").toString() + "/" + lwjgl).absolutePath(); + QString lwjgl = QDir(globalSettings->get("LWJGLDir").toString() + "/" + + m_instance->lwjglVersion()).absolutePath(); // launcher arguments m_arguments << QString("-Xms%1m").arg(m_instance->settings().get("MinMemAlloc").toInt()); -- cgit v1.2.3