diff options
Diffstat (limited to 'logic/OneSixUpdate.cpp')
-rw-r--r-- | logic/OneSixUpdate.cpp | 52 |
1 files changed, 3 insertions, 49 deletions
diff --git a/logic/OneSixUpdate.cpp b/logic/OneSixUpdate.cpp index c056bc4c..d3ac80c2 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(); -} |