feat: add send scenario

This commit is contained in:
semenov
2025-11-18 12:04:31 +03:00
parent b706de2961
commit 4829647e98
17 changed files with 15980 additions and 6952 deletions

View File

@@ -25,11 +25,12 @@ void UpdateController::calculateCommonHash()
QElapsedTimer timer;
timer.start();
qDebug() << "Start calculate... ";
//appDataList = calculateHash(applicationFolderPath,"StreamingAssets");
hashCalculator->calculateHashes(applicationFolderPath,"StreamingAssets");
appDataList = *hashCalculator->getHashList();
calculateStreamingHash();
appDataList.append(streamingDataList);
qDebug() << "Hash count: " << appDataList.count() ;
dataParserOut->createFileDataList(appDataList,fullStaticDataFolderName + hashFilename);
qDebug() << "UpdateController threadID " << QThread::currentThreadId();
@@ -39,10 +40,8 @@ void UpdateController::calculateCommonHash()
void UpdateController::calculateStreamingHash()
{
streamingDataList.clear();
//streamingDataList = calculateHash(QDir::currentPath() + streamingAssetsPath,"");
hashCalculator->calculateHashes(QDir::currentPath() + streamingAssetsPath,"");
streamingDataList = *hashCalculator->getHashList();
//std::sort(streamingDataList.begin(),streamingDataList.end());
dataParserOut->createFileDataList(streamingDataList,streamingHashFilename);
}
@@ -147,8 +146,8 @@ void UpdateController::updateFilesOnServer(QList<FileData> *fileSendList){
}
calculateCommonHash();
sendSystem->sendFinish();
sendSystem->sendPacketType(PacketType::TYPE_FINISH);
sendSystem->sendPacketType(PacketType::RECALCULATE_DOCS);
emit sigUpdateComplete(true);
}
catch (...)