summaryrefslogtreecommitdiffstats
path: root/logic/OneSixUpdate.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2014-01-27 03:00:49 +0100
committerPetr Mrázek <peterix@gmail.com>2014-01-27 03:00:49 +0100
commitffbc5bb62c0cd771b26cb1d9b5afdccef77075b4 (patch)
tree78b10cee3dc25acba02954aaf4f0e44ee4c295de /logic/OneSixUpdate.cpp
parentd7113de3bd3cb43b1bc68792cd27a716b012f2b5 (diff)
downloadMultiMC-ffbc5bb62c0cd771b26cb1d9b5afdccef77075b4.tar
MultiMC-ffbc5bb62c0cd771b26cb1d9b5afdccef77075b4.tar.gz
MultiMC-ffbc5bb62c0cd771b26cb1d9b5afdccef77075b4.tar.lz
MultiMC-ffbc5bb62c0cd771b26cb1d9b5afdccef77075b4.tar.xz
MultiMC-ffbc5bb62c0cd771b26cb1d9b5afdccef77075b4.zip
Offline mode can be used even when online.
Allow the user to pick a player name for offline mode. Big auth refactor. Now using session objects instead of the accounts themselves. Sessions only last for one instance start and hold all the auth and player data.
Diffstat (limited to 'logic/OneSixUpdate.cpp')
-rw-r--r--logic/OneSixUpdate.cpp52
1 files changed, 3 insertions, 49 deletions
diff --git a/logic/OneSixUpdate.cpp b/logic/OneSixUpdate.cpp
index ae647bfe..7685952c 100644
--- a/logic/OneSixUpdate.cpp
+++ b/logic/OneSixUpdate.cpp
@@ -35,8 +35,8 @@
#include "pathutils.h"
#include <JlCompress.h>
-OneSixUpdate::OneSixUpdate(BaseInstance *inst, bool only_prepare, QObject *parent)
- : Task(parent), m_inst(inst), m_only_prepare(only_prepare)
+OneSixUpdate::OneSixUpdate(BaseInstance *inst, QObject *parent)
+ : Task(parent), m_inst(inst)
{
}
@@ -52,12 +52,6 @@ void OneSixUpdate::executeTask()
return;
}
- if (m_only_prepare)
- {
- prepareForLaunch();
- return;
- }
-
if (m_inst->shouldUpdate())
{
// Get a pointer to the version object that corresponds to the instance's version.
@@ -222,7 +216,7 @@ void OneSixUpdate::assetIndexFailed()
void OneSixUpdate::assetsFinished()
{
- prepareForLaunch();
+ emitSucceeded();
}
void OneSixUpdate::assetsFailed()
@@ -330,43 +324,3 @@ void OneSixUpdate::jarlibFailed()
emitFailed("Failed to download the following files:\n" + failed_all +
"\n\nPlease try again.");
}
-
-void OneSixUpdate::prepareForLaunch()
-{
- setStatus(tr("Preparing for launch..."));
- QLOG_INFO() << m_inst->name() << ": preparing for launch";
- auto onesix_inst = (OneSixInstance *)m_inst;
-
- // delete any leftovers, if they are present.
- onesix_inst->cleanupAfterRun();
-
- QString natives_dir_raw = PathCombine(onesix_inst->instanceRoot(), "natives/");
- auto version = onesix_inst->getFullVersion();
- if (!version)
- {
- emitFailed("The version information for this instance is not complete. Try re-creating "
- "it or changing the version.");
- return;
- }
- /*
- for (auto lib : version->getActiveNativeLibs())
- {
- if (!lib->filesExist())
- {
- emitFailed("Native library is missing some files:\n" + lib->storagePath() +
- "\n\nRun the instance at least once in online mode to get all the "
- "required files.");
- return;
- }
- if (!lib->extractTo(natives_dir_raw))
- {
- emitFailed("Could not extract the native library:\n" + lib->storagePath() + " to " +
- natives_dir_raw +
- "\n\nMake sure MultiMC has appropriate permissions and there is enough "
- "space on the storage device.");
- return;
- }
- }
-*/
- emitSucceeded();
-}