summaryrefslogtreecommitdiffstats
path: root/logic/LegacyUpdate.cpp
diff options
context:
space:
mode:
authorAndrew <forkk@forkk.net>2013-12-09 12:06:33 -0600
committerAndrew <forkk@forkk.net>2013-12-09 12:06:33 -0600
commit712b87c643bbd7bc4ed2cfd459d0b9fdb69e5f0d (patch)
tree3a525b7e4488a7ea03521ddff33800ef81f92f07 /logic/LegacyUpdate.cpp
parent7f52bed9e3f559adcbcf3f3c1c7ac2251964db8c (diff)
parentb0dbd4f4afcf60e4021cbb3218bfe280c4989859 (diff)
downloadMultiMC-712b87c643bbd7bc4ed2cfd459d0b9fdb69e5f0d.tar
MultiMC-712b87c643bbd7bc4ed2cfd459d0b9fdb69e5f0d.tar.gz
MultiMC-712b87c643bbd7bc4ed2cfd459d0b9fdb69e5f0d.tar.lz
MultiMC-712b87c643bbd7bc4ed2cfd459d0b9fdb69e5f0d.tar.xz
MultiMC-712b87c643bbd7bc4ed2cfd459d0b9fdb69e5f0d.zip
Merge branch 'develop' of github.com:MultiMC/MultiMC5 into develop
Diffstat (limited to 'logic/LegacyUpdate.cpp')
-rw-r--r--logic/LegacyUpdate.cpp22
1 files changed, 19 insertions, 3 deletions
diff --git a/logic/LegacyUpdate.cpp b/logic/LegacyUpdate.cpp
index 3fc17351..6125101b 100644
--- a/logic/LegacyUpdate.cpp
+++ b/logic/LegacyUpdate.cpp
@@ -26,14 +26,30 @@
#include <JlCompress.h>
#include "logger/QsLog.h"
-LegacyUpdate::LegacyUpdate(BaseInstance *inst, bool prepare_for_launch, QObject *parent)
- : Task(parent), m_inst(inst), m_prepare_for_launch(prepare_for_launch)
+LegacyUpdate::LegacyUpdate(BaseInstance *inst, bool only_prepare, QObject *parent)
+ : Task(parent), m_inst(inst), m_only_prepare(only_prepare)
{
}
void LegacyUpdate::executeTask()
{
- lwjglStart();
+ if(m_only_prepare)
+ {
+ // FIXME: think this through some more.
+ LegacyInstance *inst = (LegacyInstance *)m_inst;
+ if (!inst->shouldUpdate() || inst->shouldUseCustomBaseJar())
+ {
+ ModTheJar();
+ }
+ else
+ {
+ emitSucceeded();
+ }
+ }
+ else
+ {
+ lwjglStart();
+ }
}
void LegacyUpdate::lwjglStart()