From 868669a497fd08524eec6d31ac483f431b95198c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Sat, 13 May 2017 01:24:15 +0200 Subject: NOISSUE add a linux system packaging install layout --- api/logic/Env.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'api/logic/Env.cpp') 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 +#include #include #include #include #include "tasks/Task.h" #include "meta/Index.h" +#include "FileSystem.h" #include @@ -19,6 +21,7 @@ public: std::shared_ptr m_iconlist; QMap> m_versionLists; shared_qobject_ptr 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" -- cgit v1.2.3