1
Fork 0
mirror of https://github.com/redstrate/Astra.git synced 2025-04-22 12:47:44 +00:00
astra/include/assetupdater.h
Joshua Goins 3469c99953 Add support for changing Dalamud update channel
This also fixes a bug where Astra couldn't get the correct version
number for a future .Net 6 Dalamud release
2022-04-13 10:45:00 -04:00

55 lines
1.2 KiB
C++

#pragma once
#include <QObject>
#include <QTemporaryDir>
#include <QProgressDialog>
#include <QJsonArray>
#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;
QString remoteNativeLauncherVersion;
QTemporaryDir tempDir;
bool doneDownloadingDalamud = false;
bool doneDownloadingNativelauncher = false;
bool doneDownloadingRuntimeCore = false;
bool doneDownloadingRuntimeDesktop = false;
bool needsRuntimeInstall = false;
bool needsDalamudInstall = false;
bool needsNativeInstall = false;
int remoteDalamudAssetVersion = -1;
QList<QString> dalamudAssetNeededFilenames;
QJsonArray remoteDalamudAssetArray;
QString dataDir;
};