Merge pull request #794 from Scrumplex/resolve-jars-dynamically
This commit is contained in:
commit
f1902a4471
13 changed files with 87 additions and 19 deletions
|
@ -96,6 +96,15 @@ bool fitsInLocal8bit(const QString & string)
|
|||
|
||||
void LauncherPartLaunch::executeTask()
|
||||
{
|
||||
QString jarPath = APPLICATION->getJarPath("NewLaunch.jar");
|
||||
if (jarPath.isEmpty())
|
||||
{
|
||||
const char *reason = QT_TR_NOOP("Launcher library could not be found. Please check your installation.");
|
||||
emit logLine(tr(reason), MessageLevel::Fatal);
|
||||
emitFailed(tr(reason));
|
||||
return;
|
||||
}
|
||||
|
||||
auto instance = m_parent->instance();
|
||||
std::shared_ptr<MinecraftInstance> minecraftInstance = std::dynamic_pointer_cast<MinecraftInstance>(instance);
|
||||
|
||||
|
@ -112,7 +121,7 @@ void LauncherPartLaunch::executeTask()
|
|||
m_process.setDetachable(true);
|
||||
|
||||
auto classPath = minecraftInstance->getClassPath();
|
||||
classPath.prepend(FS::PathCombine(APPLICATION->getJarsPath(), "NewLaunch.jar"));
|
||||
classPath.prepend(jarPath);
|
||||
|
||||
auto natPath = minecraftInstance->getNativePath();
|
||||
#ifdef Q_OS_WIN
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue