NOISSUE add a linux system packaging install layout
This commit is contained in:
@ -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"
|
||||
|
@ -59,6 +59,8 @@ public:
|
||||
|
||||
shared_qobject_ptr<Meta::Index> metadataIndex();
|
||||
|
||||
QString getJarsPath();
|
||||
void setJarsPath(const QString & path);
|
||||
protected:
|
||||
Private * d;
|
||||
};
|
||||
|
@ -7,13 +7,15 @@
|
||||
#include <QCoreApplication>
|
||||
#include <QDebug>
|
||||
|
||||
#include "Env.h"
|
||||
|
||||
JavaChecker::JavaChecker(QObject *parent) : QObject(parent)
|
||||
{
|
||||
}
|
||||
|
||||
void JavaChecker::performCheck()
|
||||
{
|
||||
QString checkerJar = FS::PathCombine(QCoreApplication::applicationDirPath(), "jars", "JavaCheck.jar");
|
||||
QString checkerJar = FS::PathCombine(ENV.getJarsPath(), "JavaCheck.jar");
|
||||
|
||||
QStringList args;
|
||||
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include <minecraft/MinecraftInstance.h>
|
||||
#include <FileSystem.h>
|
||||
#include <QStandardPaths>
|
||||
#include "Env.h"
|
||||
|
||||
LauncherPartLaunch::LauncherPartLaunch(LaunchTask *parent) : LaunchStep(parent)
|
||||
{
|
||||
@ -43,7 +44,7 @@ void LauncherPartLaunch::executeTask()
|
||||
// make detachable - this will keep the process running even if the object is destroyed
|
||||
m_process.setDetachable(true);
|
||||
|
||||
args << "-jar" << FS::PathCombine(QCoreApplication::applicationDirPath(), "jars", "NewLaunch.jar");
|
||||
args << "-jar" << FS::PathCombine(ENV.getJarsPath(), "NewLaunch.jar");
|
||||
|
||||
QString wrapperCommand = instance->getWrapperCommand();
|
||||
if(!wrapperCommand.isEmpty())
|
||||
|
Reference in New Issue
Block a user