2021-11-23 14:37:37 -05:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <QObject>
|
|
|
|
#include <QTemporaryDir>
|
|
|
|
|
2021-11-23 15:34:23 -05:00
|
|
|
class LauncherCore;
|
2021-11-23 14:37:37 -05:00
|
|
|
class QNetworkReply;
|
2021-11-23 15:34:23 -05:00
|
|
|
struct ProfileSettings;
|
2021-11-23 14:37:37 -05:00
|
|
|
|
|
|
|
class AssetUpdater : public QObject {
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2021-11-23 15:34:23 -05:00
|
|
|
AssetUpdater(LauncherCore& launcher);
|
2021-11-23 14:37:37 -05:00
|
|
|
|
2021-11-23 15:34:23 -05:00
|
|
|
void update(const ProfileSettings& profile);
|
2021-11-23 14:37:37 -05:00
|
|
|
void finishDownload(QNetworkReply* reply);
|
|
|
|
void beginInstall();
|
|
|
|
|
2022-02-25 18:08:57 -05:00
|
|
|
void checkIfDalamudAssetsDone();
|
|
|
|
void checkIfFinished();
|
|
|
|
|
2021-11-23 14:37:37 -05:00
|
|
|
signals:
|
|
|
|
void finishedUpdating();
|
|
|
|
|
|
|
|
private:
|
2021-11-23 15:34:23 -05:00
|
|
|
LauncherCore& launcher;
|
2021-11-23 14:37:37 -05:00
|
|
|
|
2022-01-27 10:46:22 -05:00
|
|
|
const ProfileSettings* currentSettings = nullptr;
|
|
|
|
|
|
|
|
QString remoteDalamudVersion;
|
2022-02-25 20:06:29 -05:00
|
|
|
QString remoteRuntimeVersion;
|
2022-01-27 10:46:22 -05:00
|
|
|
|
2021-11-23 14:37:37 -05:00
|
|
|
QTemporaryDir tempDir;
|
2022-02-25 18:08:57 -05:00
|
|
|
|
|
|
|
bool doneDownloadingDalamud = true;
|
|
|
|
bool doneDownloadingNativelauncher = true;
|
2022-02-25 20:06:29 -05:00
|
|
|
bool doneDownloadingRuntimeCore = true;
|
|
|
|
bool doneDownloadingRuntimeDesktop = true;
|
|
|
|
bool needsRuntimeInstall = false;
|
|
|
|
bool needsDalamudInstall = false;
|
|
|
|
bool needsNativeInstall = false;
|
2022-02-25 18:08:57 -05:00
|
|
|
|
|
|
|
int remoteDalamudAssetVersion;
|
|
|
|
QList<QString> dalamudAssetNeededFilenames;
|
2022-01-27 10:46:22 -05:00
|
|
|
};
|