GH-1060 implement very basic updater (only linux and maybe osx right now)
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user