mirror of
https://github.com/redstrate/Astra.git
synced 2025-04-20 11:47:46 +00:00
52 lines
1.1 KiB
C++
52 lines
1.1 KiB
C++
#pragma once
|
|
|
|
#include <QObject>
|
|
#include <QTemporaryDir>
|
|
#include <QProgressDialog>
|
|
#include <QJsonArray>
|
|
|
|
class LauncherCore;
|
|
class QNetworkReply;
|
|
struct ProfileSettings;
|
|
|
|
class AssetUpdater : public QObject {
|
|
Q_OBJECT
|
|
public:
|
|
AssetUpdater(LauncherCore& launcher);
|
|
|
|
void update(const ProfileSettings& profile);
|
|
void beginInstall();
|
|
|
|
void checkIfCheckingIsDone();
|
|
void checkIfDalamudAssetsDone();
|
|
void checkIfFinished();
|
|
|
|
signals:
|
|
void finishedUpdating();
|
|
|
|
private:
|
|
LauncherCore& launcher;
|
|
|
|
QProgressDialog* dialog;
|
|
|
|
const ProfileSettings* currentSettings = nullptr;
|
|
|
|
QString remoteDalamudVersion;
|
|
QString remoteRuntimeVersion;
|
|
|
|
QTemporaryDir tempDir;
|
|
|
|
bool doneDownloadingDalamud = true;
|
|
bool doneDownloadingNativelauncher = true;
|
|
bool doneDownloadingRuntimeCore = true;
|
|
bool doneDownloadingRuntimeDesktop = true;
|
|
bool needsRuntimeInstall = false;
|
|
bool needsDalamudInstall = false;
|
|
bool needsNativeInstall = false;
|
|
|
|
int remoteDalamudAssetVersion = -1;
|
|
QList<QString> dalamudAssetNeededFilenames;
|
|
QJsonArray remoteDalamudAssetArray;
|
|
|
|
QString dataDir;
|
|
};
|