diff options
author | Jan Dalheimer <jan@dalheimer.de> | 2014-01-23 21:31:41 +0100 |
---|---|---|
committer | Jan Dalheimer <jan@dalheimer.de> | 2014-01-23 21:31:41 +0100 |
commit | 156bc8f27656c115bf1b023cd4ebc5f629df3887 (patch) | |
tree | 79e7ff327148f0841d7184a3882d8c2e6938ef4a /logic/LiteLoaderInstaller.cpp | |
parent | c39d26f4453166603749826eee1a732c815047d0 (diff) | |
download | MultiMC-156bc8f27656c115bf1b023cd4ebc5f629df3887.tar MultiMC-156bc8f27656c115bf1b023cd4ebc5f629df3887.tar.gz MultiMC-156bc8f27656c115bf1b023cd4ebc5f629df3887.tar.lz MultiMC-156bc8f27656c115bf1b023cd4ebc5f629df3887.tar.xz MultiMC-156bc8f27656c115bf1b023cd4ebc5f629df3887.zip |
Forge works now too, and so does forge+liteloader
Diffstat (limited to 'logic/LiteLoaderInstaller.cpp')
-rw-r--r-- | logic/LiteLoaderInstaller.cpp | 32 |
1 files changed, 3 insertions, 29 deletions
diff --git a/logic/LiteLoaderInstaller.cpp b/logic/LiteLoaderInstaller.cpp index d582f03a..71c7011f 100644 --- a/logic/LiteLoaderInstaller.cpp +++ b/logic/LiteLoaderInstaller.cpp @@ -27,6 +27,7 @@ QMap<QString, QString> LiteLoaderInstaller::m_launcherWrapperVersionMapping; LiteLoaderInstaller::LiteLoaderInstaller() + : BaseInstaller() { if (m_launcherWrapperVersionMapping.isEmpty()) { @@ -42,24 +43,11 @@ bool LiteLoaderInstaller::canApply(DerpInstance *instance) const return m_launcherWrapperVersionMapping.contains(instance->intendedVersionId()); } -bool LiteLoaderInstaller::isApplied(DerpInstance *on) -{ - return QFile::exists(filename(on->instanceRoot())); -} - bool LiteLoaderInstaller::add(DerpInstance *to) { - if (!patchesDir(to->instanceRoot()).exists()) - { - QDir(to->instanceRoot()).mkdir("patches"); - } - - if (isApplied(to)) + if (!BaseInstaller::add(to)) { - if (!remove(to)) - { - return false; - } + return false; } QJsonObject obj; @@ -102,17 +90,3 @@ bool LiteLoaderInstaller::add(DerpInstance *to) return true; } - -bool LiteLoaderInstaller::remove(DerpInstance *from) -{ - return QFile::remove(filename(from->instanceRoot())); -} - -QString LiteLoaderInstaller::filename(const QString &root) const -{ - return patchesDir(root).absoluteFilePath(id() + ".json"); -} -QDir LiteLoaderInstaller::patchesDir(const QString &root) const -{ - return QDir(root + "/patches/"); -} |