pollymc/api/logic/modplatform/modpacksch/FTBPackInstallTask.h
Jamie Mansfield 9d91cd496f
NOISSUE Download all mods before writing the instance for modpacks.ch
This is prepatory work for implementing jarmods support for
modpacks.ch, where we will need to look through files in a directory -
which would require that those files are present at such time.

This might even fix some weird bugs, maybe - I've not encountered any
bugs from how this previously worked, but I feel that what's going on
is slightly clearer now.
2021-02-25 14:34:51 +00:00

43 lines
699 B
C++

#pragma once
#include "FTBPackManifest.h"
#include "InstanceTask.h"
#include "multimc_logic_export.h"
#include "net/NetJob.h"
namespace ModpacksCH {
class MULTIMC_LOGIC_EXPORT PackInstallTask : public InstanceTask
{
Q_OBJECT
public:
explicit PackInstallTask(Modpack pack, QString version);
virtual ~PackInstallTask(){}
bool abort() override;
protected:
virtual void executeTask() override;
private slots:
void onDownloadSucceeded();
void onDownloadFailed(QString reason);
private:
void downloadPack();
void install();
private:
NetJobPtr jobPtr;
QByteArray response;
Modpack m_pack;
QString m_version_name;
Version m_version;
};
}