mirror of
https://github.com/redstrate/Astra.git
synced 2025-04-21 20:27:45 +00:00
Not every domain and server will be around forever, so now you can configure the two Square Enix domains used for login and patching. And you can configure the Dalamud domain used to download assets, etc.
61 lines
1.4 KiB
C++
61 lines
1.4 KiB
C++
// SPDX-FileCopyrightText: 2023 Joshua Goins <josh@redstrate.com>
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
#pragma once
|
|
|
|
#include <QJsonArray>
|
|
#include <QObject>
|
|
#include <QTemporaryDir>
|
|
|
|
#include "launchercore.h"
|
|
|
|
class LauncherCore;
|
|
class QNetworkReply;
|
|
|
|
class AssetUpdater : public QObject
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit AssetUpdater(Profile &profile, LauncherCore &launcher, QObject *parent = nullptr);
|
|
|
|
void update();
|
|
void beginInstall();
|
|
|
|
void checkIfCheckingIsDone();
|
|
void checkIfDalamudAssetsDone();
|
|
void checkIfFinished();
|
|
|
|
signals:
|
|
void finishedUpdating();
|
|
|
|
private:
|
|
QUrl dalamudVersionManifestUrl(Profile::DalamudChannel channel) const;
|
|
QUrl dalamudLatestPackageUrl(Profile::DalamudChannel channel) const;
|
|
QUrl dalamudAssetManifestUrl() const;
|
|
|
|
LauncherCore &launcher;
|
|
|
|
Profile::DalamudChannel chosenChannel;
|
|
|
|
QString remoteDalamudVersion;
|
|
QString remoteRuntimeVersion;
|
|
|
|
QTemporaryDir tempDir;
|
|
QDir dataDir;
|
|
QDir appDataDir;
|
|
QDir dalamudDir;
|
|
QDir dalamudAssetDir;
|
|
QDir dalamudRuntimeDir;
|
|
|
|
bool doneDownloadingDalamud = false;
|
|
bool doneDownloadingRuntimeCore = false;
|
|
bool doneDownloadingRuntimeDesktop = false;
|
|
bool needsRuntimeInstall = false;
|
|
bool needsDalamudInstall = false;
|
|
|
|
int remoteDalamudAssetVersion = -1;
|
|
QList<QString> dalamudAssetNeededFilenames;
|
|
QJsonArray remoteDalamudAssetArray;
|
|
|
|
Profile &m_profile;
|
|
};
|