mirror of
https://github.com/redstrate/Astra.git
synced 2025-04-21 20:27:45 +00:00
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.
35 lines
No EOL
824 B
C++
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;
|
|
}; |