diff options
author | Petr Mrázek <peterix@gmail.com> | 2017-04-20 05:22:04 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2017-04-20 05:22:04 +0200 |
commit | 6bd2605a79bec9267740f223c87d56d2263d98b8 (patch) | |
tree | 9ded863e6f84b52fd2c003e2dd1c22f19427658c /api/logic/InstanceImportTask.h | |
parent | e9a61995077eb15027cf3d044aa15a8cb67c13ae (diff) | |
download | MultiMC-6bd2605a79bec9267740f223c87d56d2263d98b8.tar MultiMC-6bd2605a79bec9267740f223c87d56d2263d98b8.tar.gz MultiMC-6bd2605a79bec9267740f223c87d56d2263d98b8.tar.lz MultiMC-6bd2605a79bec9267740f223c87d56d2263d98b8.tar.xz MultiMC-6bd2605a79bec9267740f223c87d56d2263d98b8.zip |
NOISSUE add import from curse zip packs
Does not actually grab mods, but resolves them and prints the results in logs.
Diffstat (limited to 'api/logic/InstanceImportTask.h')
-rw-r--r-- | api/logic/InstanceImportTask.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/api/logic/InstanceImportTask.h b/api/logic/InstanceImportTask.h index fe227e07..0bd7ddf8 100644 --- a/api/logic/InstanceImportTask.h +++ b/api/logic/InstanceImportTask.h @@ -7,8 +7,13 @@ #include <QFuture> #include <QFutureWatcher> #include "settings/SettingsObject.h" +#include "QObjectPtr.h" class BaseInstanceProvider; +namespace Curse +{ + class FileResolvingTask; +} class MULTIMC_LOGIC_EXPORT InstanceImportTask : public Task { @@ -23,6 +28,8 @@ protected: private: void extractAndTweak(); + void processMultiMC(const QFileInfo &config); + void processCurse(const QFileInfo &manifest); private slots: void downloadSucceeded(); @@ -30,14 +37,18 @@ private slots: void downloadProgressChanged(qint64 current, qint64 total); void extractFinished(); void extractAborted(); + void curseResolvingSucceeded(); + void curseResolvingFailed(QString reason); private: /* data */ SettingsObjectPtr m_globalSettings; NetJobPtr m_filesNetJob; + shared_qobject_ptr<Curse::FileResolvingTask> m_curseResolver; QUrl m_sourceUrl; BaseInstanceProvider * m_target; QString m_archivePath; bool m_downloadRequired = false; + QString m_packRoot; QString m_instName; QString m_instIcon; QString m_instGroup; |