2023-08-05 22:14:05 -04:00
|
|
|
// SPDX-FileCopyrightText: 2023 Joshua Goins <josh@redstrate.com>
|
|
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
|
2023-07-30 08:49:34 -04:00
|
|
|
#pragma once
|
|
|
|
|
2024-07-04 20:53:06 -04:00
|
|
|
#include <QtQml>
|
2023-07-30 08:49:34 -04:00
|
|
|
|
|
|
|
class LauncherCore;
|
|
|
|
class Profile;
|
|
|
|
|
|
|
|
class GameInstaller : public QObject
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
2023-09-16 18:01:02 -04:00
|
|
|
QML_ELEMENT
|
2023-10-08 13:19:23 -04:00
|
|
|
QML_UNCREATABLE("Use LauncherCore.createInstaller")
|
2023-09-16 18:01:02 -04:00
|
|
|
|
2023-07-30 08:49:34 -04:00
|
|
|
public:
|
|
|
|
GameInstaller(LauncherCore &launcher, Profile &profile, QObject *parent = nullptr);
|
2024-04-01 14:54:41 -04:00
|
|
|
GameInstaller(LauncherCore &launcher, Profile &profile, const QString &filePath, QObject *parent = nullptr);
|
2023-07-30 08:49:34 -04:00
|
|
|
|
2024-04-01 14:54:41 -04:00
|
|
|
Q_INVOKABLE void start();
|
2023-07-30 08:49:34 -04:00
|
|
|
|
|
|
|
Q_SIGNALS:
|
|
|
|
void installFinished();
|
2023-08-18 21:59:42 -04:00
|
|
|
void error(QString message);
|
2023-07-30 08:49:34 -04:00
|
|
|
|
|
|
|
private:
|
2024-04-01 14:54:41 -04:00
|
|
|
void installGame();
|
|
|
|
|
2023-07-30 08:49:34 -04:00
|
|
|
LauncherCore &m_launcher;
|
|
|
|
Profile &m_profile;
|
2024-04-01 14:54:41 -04:00
|
|
|
QString m_localInstallerPath;
|
2023-07-30 08:49:34 -04:00
|
|
|
};
|