diff options
author | Petr Mrázek <peterix@gmail.com> | 2013-07-09 22:46:33 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2013-07-09 22:46:33 +0200 |
commit | c96ac2460522b9567a10831bcd1d8a6bc9f36d9d (patch) | |
tree | f9f77ebef91ee76652b1ae411fc375503977aa4a | |
parent | dd86061f0ff6d19482e9a43af99156a55e60cf00 (diff) | |
download | MultiMC-c96ac2460522b9567a10831bcd1d8a6bc9f36d9d.tar MultiMC-c96ac2460522b9567a10831bcd1d8a6bc9f36d9d.tar.gz MultiMC-c96ac2460522b9567a10831bcd1d8a6bc9f36d9d.tar.lz MultiMC-c96ac2460522b9567a10831bcd1d8a6bc9f36d9d.tar.xz MultiMC-c96ac2460522b9567a10831bcd1d8a6bc9f36d9d.zip |
Replace one line. Get downloading of 1.6 jars working. Yay.
-rw-r--r-- | libmultimc/include/gameupdatetask.h | 3 | ||||
-rw-r--r-- | libmultimc/src/gameupdatetask.cpp | 26 |
2 files changed, 28 insertions, 1 deletions
diff --git a/libmultimc/include/gameupdatetask.h b/libmultimc/include/gameupdatetask.h index f607db6b..b56c448b 100644 --- a/libmultimc/include/gameupdatetask.h +++ b/libmultimc/include/gameupdatetask.h @@ -98,6 +98,9 @@ private slots: void versionFileFinished(); void versionFileFailed(); + void jarlibFinished(); + void jarlibFailed(); + signals: /*! * \brief Signal emitted when the game update is complete. diff --git a/libmultimc/src/gameupdatetask.cpp b/libmultimc/src/gameupdatetask.cpp index 54e47410..a8abb0b6 100644 --- a/libmultimc/src/gameupdatetask.cpp +++ b/libmultimc/src/gameupdatetask.cpp @@ -131,8 +131,32 @@ void GameUpdateTask::versionFileFinished() vfile2.close(); // download the right jar, save it in versions/$version/$version.jar - // determine and download all the libraries, save them in libraries/whatever... + QString urlstr("http://s3.amazonaws.com/Minecraft.Download/versions/"); + urlstr += targetVersion->descriptor() + "/" + targetVersion->descriptor() + ".jar"; + QString targetstr ("versions/"); + targetstr += targetVersion->descriptor() + "/" + targetVersion->descriptor() + ".jar"; + auto dljob = DownloadJob::create(QUrl(urlstr), targetstr); + jarlibDownloadJob.reset(new JobList()); + jarlibDownloadJob->add(dljob); + connect(jarlibDownloadJob.data(), SIGNAL(finished()), SLOT(jarlibFinished())); + connect(jarlibDownloadJob.data(), SIGNAL(failed()), SLOT(jarlibFailed())); + connect(jarlibDownloadJob.data(), SIGNAL(progress(qint64,qint64)), SLOT(updateDownloadProgress(qint64,qint64))); + // determine and download all the libraries, save them in libraries/whatever... + download_queue.enqueue(jarlibDownloadJob); +} + +void GameUpdateTask::jarlibFinished() +{ + exit(1); + // YAYAYAYAYYAYAAUAYAYYAYYY!!!! + // WEE DID IT! + // YESSSSS! +} + +void GameUpdateTask::jarlibFailed() +{ + error("Failed to download the binary garbage. Try again. Maybe. IF YOU DARE"); exit(0); } |