diff options
author | Jan Dalheimer <jan@dalheimer.de> | 2014-02-01 19:58:13 +0100 |
---|---|---|
committer | Jan Dalheimer <jan@dalheimer.de> | 2014-02-01 19:58:13 +0100 |
commit | 983a40698c47739fee3786cf54c917004523ea36 (patch) | |
tree | 4a0d73577afbf430934cd878ff23674aaa7aea74 /logic/OneSixUpdate.cpp | |
parent | 866d7029afa10293a57d71aecbe3629399c95d06 (diff) | |
parent | 1936bd181f57a554ce0dd757ffe9419100eb47f4 (diff) | |
download | PrismLauncher-983a40698c47739fee3786cf54c917004523ea36.tar.gz PrismLauncher-983a40698c47739fee3786cf54c917004523ea36.tar.bz2 PrismLauncher-983a40698c47739fee3786cf54c917004523ea36.zip |
Merge remote-tracking branch 'upstream/feature_derpstances' into feature_derpstances
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(); -} |