1
Fork 0
mirror of https://github.com/redstrate/Astra.git synced 2025-04-21 20:27:45 +00:00
astra/launcher/include/assetupdater.h
Joshua Goins 16420b7421 Complete rewrite to Kirigami
Giant commit overhauling the interface to use KDE's Kirigami framework,
which is based on Qt Quick. The logic is all but rewritten, allowing
accounts to be separate from profiles.
2023-07-30 08:49:34 -04:00

50 lines
1 KiB
C++

#pragma once
#include <QJsonArray>
#include <QObject>
#include <QTemporaryDir>
#include "launchercore.h"
class LauncherCore;
class QNetworkReply;
class AssetUpdater : public QObject
{
Q_OBJECT
public:
explicit AssetUpdater(Profile &profile, LauncherCore &launcher, QObject *parent = nullptr);
void update();
void beginInstall();
void checkIfCheckingIsDone();
void checkIfDalamudAssetsDone();
void checkIfFinished();
signals:
void finishedUpdating();
private:
LauncherCore &launcher;
Profile::DalamudChannel chosenChannel;
QString remoteDalamudVersion;
QString remoteRuntimeVersion;
QTemporaryDir tempDir;
bool doneDownloadingDalamud = false;
bool doneDownloadingRuntimeCore = false;
bool doneDownloadingRuntimeDesktop = false;
bool needsRuntimeInstall = false;
bool needsDalamudInstall = false;
int remoteDalamudAssetVersion = -1;
QList<QString> dalamudAssetNeededFilenames;
QJsonArray remoteDalamudAssetArray;
QString dataDir;
Profile &m_profile;
};