feat: add update scenario

This commit is contained in:
semenov
2025-11-19 14:03:24 +03:00
parent c0d6571f2c
commit 560b7ff4cb
16 changed files with 469 additions and 313 deletions

View File

@@ -46,6 +46,7 @@ void UpdateController::changeAssetVersion(QString versionName)
qDebug() << "UpdateController thread ID " << QThread::currentThreadId();
currentStreamingPath = assetManager->setVersion(versionName);
setUpCurrentServerHash();
emit sigUpdateDocs();
commonClientHandler->slot_sendPacketToAllClients(PacketType::HASH_READY);
commonClientHandler->sendCurrentVersionToAllClient();
@@ -107,7 +108,7 @@ void UpdateController::calculateFullHash()
void UpdateController::calculateFullHashWithSetup()
{
commonClientHandler->slot_sendPacketToAllClients(PacketType::HASH_CALCULATE_START);
commonClientHandler->slot_sendPacketToAllClients(PacketType::RECALCULATE_HASH);
calculateCurrentSharedHash();
setUpCurrentServerHash();
commonClientHandler->slot_sendPacketToAllClients(PacketType::HASH_READY);
@@ -259,6 +260,7 @@ bool UpdateController::checkNeedUpdate(ClientHandler *handler)
for (auto &item:clientDataList) //проверка на недостающие файлы по адресам
{
if(item.path.contains("Temp")) continue;
if(item.path.contains("docs.xml")) continue;
if (!serverDataList.contains(item))
{
@@ -269,6 +271,7 @@ bool UpdateController::checkNeedUpdate(ClientHandler *handler)
for (auto &item:serverDataList)
{
if(item.path.contains("Temp")) continue;
if(item.path.contains("docs.xml")) continue;
if (!clientDataList.contains(item))
{