2022-07-09 03:14:43 +05:30
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "InstanceCreationTask.h"
|
|
|
|
|
|
|
|
#include "modplatform/flame/FileResolvingTask.h"
|
|
|
|
|
|
|
|
#include "net/NetJob.h"
|
|
|
|
|
|
|
|
class FlameCreationTask final : public InstanceCreationTask {
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
FlameCreationTask(QString staging_path, SettingsObjectPtr global_settings, QWidget* parent)
|
|
|
|
: InstanceCreationTask(), m_parent(parent)
|
|
|
|
{
|
|
|
|
setStagingPath(staging_path);
|
|
|
|
setParentSettings(global_settings);
|
|
|
|
}
|
|
|
|
|
|
|
|
bool abort() override;
|
|
|
|
|
2022-07-15 01:11:49 +05:30
|
|
|
bool updateInstance() override;
|
2022-07-09 03:14:43 +05:30
|
|
|
bool createInstance() override;
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
void idResolverSucceeded(QEventLoop&);
|
2022-07-22 01:13:08 +05:30
|
|
|
void setupDownloadJob(QEventLoop&);
|
2022-07-09 03:14:43 +05:30
|
|
|
|
|
|
|
private:
|
|
|
|
QWidget* m_parent = nullptr;
|
|
|
|
|
|
|
|
shared_qobject_ptr<Flame::FileResolvingTask> m_mod_id_resolver;
|
2022-07-15 01:11:49 +05:30
|
|
|
Flame::Manifest m_pack;
|
|
|
|
|
|
|
|
// Handle to allow aborting
|
|
|
|
NetJob* m_process_update_file_info_job = nullptr;
|
|
|
|
NetJob::Ptr m_files_job = nullptr;
|
2022-07-09 03:14:43 +05:30
|
|
|
};
|