1
Fork 0
mirror of https://github.com/redstrate/Astra.git synced 2025-04-22 12:47:44 +00:00
astra/launcher/include/gameinstaller.h
Joshua Goins dc01f3e214 Overhaul parts of the initial setup flow
This removes the separate "download new game" page and rolls in into the
main profile setup. Also adds a feature to install the game from an
existing executable, in the event the official servers are down or
missing. Also shifts around some of the buttons and text.
2024-04-01 14:54:41 -04:00

35 lines
No EOL
800 B
C++

// SPDX-FileCopyrightText: 2023 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 GameInstaller : public QObject
{
Q_OBJECT
QML_ELEMENT
QML_UNCREATABLE("Use LauncherCore.createInstaller")
public:
GameInstaller(LauncherCore &launcher, Profile &profile, QObject *parent = nullptr);
GameInstaller(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;
};