1
Fork 0
mirror of https://github.com/redstrate/Astra.git synced 2025-04-24 13:27:45 +00:00
astra/src/assetupdater.h
Joshua Goins 511763e33f Add Dalamud asset updating support
Note: Our Dalamud injection DOES not use this yet.
2022-02-25 18:08:57 -05:00

40 lines
815 B
C++

#pragma once
#include <QObject>
#include <QTemporaryDir>
class LauncherCore;
class QNetworkReply;
struct ProfileSettings;
class AssetUpdater : public QObject {
Q_OBJECT
public:
AssetUpdater(LauncherCore& launcher);
void update(const ProfileSettings& profile);
void finishDownload(QNetworkReply* reply);
void beginInstall();
void checkIfDalamudAssetsDone();
void checkIfFinished();
signals:
void finishedUpdating();
private:
LauncherCore& launcher;
const ProfileSettings* currentSettings = nullptr;
QString remoteDalamudVersion;
QTemporaryDir tempDir;
bool doneDownloadingDalamud = true;
bool doneDownloadingNativelauncher = true;
bool needsInstall = false;
int remoteDalamudAssetVersion;
QList<QString> dalamudAssetNeededFilenames;
};