mirror of
https://github.com/redstrate/Astra.git
synced 2025-04-22 12:47:44 +00:00
The data directory has been rearranged, and all the Dalamud data is stored separately, so it's no longer clogging up everything. Dalamud logs (and our own logs, when that's implemented) now exist in XDG_STATE_HOME, instead of the data directory. The game directory now exists under the data directory, instead of ~/.wine. The user path is set before launching the game, and it now exists under the data directory too. These are also prefixed to the user and profile UUID that it belongs to. The "keep patches" option is now implemented (which is off by default) and it lives in the temporary directory now.
57 lines
1.2 KiB
C++
57 lines
1.2 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:
|
|
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;
|
|
};
|