summaryrefslogtreecommitdiffstats
path: root/logic/LiteLoaderInstaller.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'logic/LiteLoaderInstaller.cpp')
-rw-r--r--logic/LiteLoaderInstaller.cpp32
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/");
-}