NOISSUE Support custom,latest,recommended loader versions for ATL

This provides support for modpacks using the new loader mechanism in
ATLauncher and using a non-specific version target.
This commit is contained in:
Jamie Mansfield
2021-04-13 18:30:37 +01:00
parent 8b926d29d7
commit 87dbe82474
5 changed files with 109 additions and 26 deletions

View File

@ -15,12 +15,23 @@
namespace ATLauncher {
class MULTIMC_LOGIC_EXPORT UserInteractionSupport {
public:
/**
* Requests a user interaction to select a component version from a given version list
* and constrained to a given Minecraft version.
*/
virtual QString chooseVersion(Meta::VersionListPtr vlist, QString minecraftVersion) = 0;
};
class MULTIMC_LOGIC_EXPORT PackInstallTask : public InstanceTask
{
Q_OBJECT
public:
explicit PackInstallTask(QString pack, QString version);
explicit PackInstallTask(UserInteractionSupport *support, QString pack, QString version);
virtual ~PackInstallTask(){}
bool abort() override;
@ -54,6 +65,8 @@ private:
void install();
private:
UserInteractionSupport *m_support;
NetJobPtr jobPtr;
QByteArray response;
@ -76,9 +89,6 @@ private:
QFuture<bool> m_modExtractFuture;
QFutureWatcher<bool> m_modExtractFutureWatcher;
QFuture<bool> m_decompFuture;
QFutureWatcher<bool> m_decompFutureWatcher;
};
}