summaryrefslogtreecommitdiffstats
path: root/api/logic/Env.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2017-05-13 01:24:15 +0200
committerPetr Mrázek <peterix@gmail.com>2017-05-13 01:24:15 +0200
commit868669a497fd08524eec6d31ac483f431b95198c (patch)
treea46fa4fa4e6baaf14720f10b3a2d09df3c98aaf6 /api/logic/Env.cpp
parent4cf4110d9dc694d2c28feca38656925980b57a4d (diff)
downloadMultiMC-868669a497fd08524eec6d31ac483f431b95198c.tar
MultiMC-868669a497fd08524eec6d31ac483f431b95198c.tar.gz
MultiMC-868669a497fd08524eec6d31ac483f431b95198c.tar.lz
MultiMC-868669a497fd08524eec6d31ac483f431b95198c.tar.xz
MultiMC-868669a497fd08524eec6d31ac483f431b95198c.zip
NOISSUE add a linux system packaging install layout
Diffstat (limited to 'api/logic/Env.cpp')
-rw-r--r--api/logic/Env.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/api/logic/Env.cpp b/api/logic/Env.cpp
index d7be4a28..59d4c4a8 100644
--- a/api/logic/Env.cpp
+++ b/api/logic/Env.cpp
@@ -3,11 +3,13 @@
#include "BaseVersion.h"
#include "BaseVersionList.h"
#include <QDir>
+#include <QCoreApplication>
#include <QNetworkProxy>
#include <QNetworkAccessManager>
#include <QDebug>
#include "tasks/Task.h"
#include "meta/Index.h"
+#include "FileSystem.h"
#include <QDebug>
@@ -19,6 +21,7 @@ public:
std::shared_ptr<IIconList> m_iconlist;
QMap<QString, std::shared_ptr<BaseVersionList>> m_versionLists;
shared_qobject_ptr<Meta::Index> m_metadataIndex;
+ QString m_jarsPath;
};
static Env * instance;
@@ -190,4 +193,18 @@ void Env::updateProxySettings(QString proxyTypeStr, QString addr, int port, QStr
qDebug() << proxyDesc;
}
+QString Env::getJarsPath()
+{
+ if(d->m_jarsPath.isEmpty())
+ {
+ return FS::PathCombine(QCoreApplication::applicationDirPath(), "jars");
+ }
+ return d->m_jarsPath;
+}
+
+void Env::setJarsPath(const QString& path)
+{
+ d->m_jarsPath = path;
+}
+
#include "Env.moc"