1
Fork 0
mirror of https://github.com/redstrate/Astra.git synced 2025-04-21 12:17:45 +00:00
astra/launcher/include/benchmarkinstaller.h
Joshua Goins 49f8aae877 Add support for installing the official benchmark
This uses the same profile system as the regular game, and can be used
to download the current benchmark (currently hardcoded, to be fixed
later.) Or as always, install it offline from an existing zip.
2024-04-19 20:32:28 -04:00

35 lines
No EOL
824 B
C++

// SPDX-FileCopyrightText: 2024 Joshua Goins <josh@redstrate.com>
// SPDX-License-Identifier: GPL-3.0-or-later
#pragma once
#include <QObject>
#include <QString>
#include <QtQml/qqmlregistration.h>
class LauncherCore;
class Profile;
class BenchmarkInstaller : public QObject
{
Q_OBJECT
QML_ELEMENT
QML_UNCREATABLE("Use LauncherCore.createBenchmarkInstaller")
public:
BenchmarkInstaller(LauncherCore &launcher, Profile &profile, QObject *parent = nullptr);
BenchmarkInstaller(LauncherCore &launcher, Profile &profile, const QString &filePath, QObject *parent = nullptr);
Q_INVOKABLE void start();
Q_SIGNALS:
void installFinished();
void error(QString message);
private:
void installGame();
LauncherCore &m_launcher;
Profile &m_profile;
QString m_localInstallerPath;
};