1
Fork 0
mirror of https://github.com/redstrate/Astra.git synced 2025-04-21 20:27:45 +00:00
astra/launcher/core/include/assetupdater.h
Joshua Goins 9832e66ca9 Move asset updater to core, and remove the stupid dependency on desktop
It makes no sense for Core to depend on Desktop, and this removes that
circular dependency.
2022-09-05 16:54:05 -04:00

52 lines
1.1 KiB
C++

#pragma once
#include <QJsonArray>
#include <QObject>
#include <QProgressDialog>
#include <QTemporaryDir>
#include "launchercore.h"
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;
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;
};