summaryrefslogtreecommitdiffstats
path: root/logic/updater/DownloadTask.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2015-06-08 02:43:16 +0200
committerPetr Mrázek <peterix@gmail.com>2015-06-09 00:03:42 +0200
commit82e05661d207621f917d79ebd513abc57a36c084 (patch)
treeb13eb12af54ff1a6214d9b0c7b34ce6a9e5aa975 /logic/updater/DownloadTask.cpp
parent166813cb918ebd029325e12377989bfdc2021074 (diff)
downloadMultiMC-82e05661d207621f917d79ebd513abc57a36c084.tar
MultiMC-82e05661d207621f917d79ebd513abc57a36c084.tar.gz
MultiMC-82e05661d207621f917d79ebd513abc57a36c084.tar.lz
MultiMC-82e05661d207621f917d79ebd513abc57a36c084.tar.xz
MultiMC-82e05661d207621f917d79ebd513abc57a36c084.zip
GH-1060 implement very basic updater (only linux and maybe osx right now)
Diffstat (limited to 'logic/updater/DownloadTask.cpp')
-rw-r--r--logic/updater/DownloadTask.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/logic/updater/DownloadTask.cpp b/logic/updater/DownloadTask.cpp
index 352f1f0d..4a42f583 100644
--- a/logic/updater/DownloadTask.cpp
+++ b/logic/updater/DownloadTask.cpp
@@ -89,7 +89,6 @@ void DownloadTask::processDownloadedVersionInfo()
{
VersionFileList m_currentVersionFileList;
VersionFileList m_newVersionFileList;
- OperationList operationList;
setStatus(tr("Reading file list for new version..."));
qDebug() << "Reading file list for new version...";
@@ -125,19 +124,12 @@ void DownloadTask::processDownloadedVersionInfo()
NetJobPtr netJob (new NetJob("Update Files"));
// fill netJob and operationList
- if (!processFileLists(m_currentVersionFileList, m_newVersionFileList, m_status.rootPath, m_updateFilesDir.path(), netJob, operationList))
+ if (!processFileLists(m_currentVersionFileList, m_newVersionFileList, m_status.rootPath, m_updateFilesDir.path(), netJob, m_operations))
{
emitFailed(tr("Failed to process update lists..."));
return;
}
- // write the instruction file for the file swapper
- if(!writeInstallScript(operationList, PathCombine(m_updateFilesDir.path(), "file_list.xml")))
- {
- emitFailed(tr("Failed to write update script file."));
- return;
- }
-
// Now start the download.
QObject::connect(netJob.get(), &NetJob::succeeded, this, &DownloadTask::fileDownloadFinished);
QObject::connect(netJob.get(), &NetJob::progress, this, &DownloadTask::fileDownloadProgressChanged);
@@ -170,4 +162,9 @@ QString DownloadTask::updateFilesDir()
return m_updateFilesDir.path();
}
+OperationList DownloadTask::operations()
+{
+ return m_operations;
+}
+
} \ No newline at end of file