diff options
Diffstat (limited to 'launcher/minecraft')
-rw-r--r-- | launcher/minecraft/Library.cpp | 3 | ||||
-rw-r--r-- | launcher/minecraft/MinecraftInstance.cpp | 5 | ||||
-rw-r--r-- | launcher/minecraft/launch/LauncherPartLaunch.cpp | 25 | ||||
-rw-r--r-- | launcher/minecraft/update/FMLLibrariesTask.cpp | 3 |
4 files changed, 13 insertions, 23 deletions
diff --git a/launcher/minecraft/Library.cpp b/launcher/minecraft/Library.cpp index c7982705..ba7aed4b 100644 --- a/launcher/minecraft/Library.cpp +++ b/launcher/minecraft/Library.cpp @@ -88,6 +88,9 @@ QList<NetAction::Ptr> Library::getDownloads( options |= Net::Download::Option::AcceptLocalFiles; } + // Don't add a time limit for the libraries cache entry validity + options |= Net::Download::Option::MakeEternal; + if(sha1.size()) { auto rawSha1 = QByteArray::fromHex(sha1.toLatin1()); diff --git a/launcher/minecraft/MinecraftInstance.cpp b/launcher/minecraft/MinecraftInstance.cpp index 94b4776e..cf127525 100644 --- a/launcher/minecraft/MinecraftInstance.cpp +++ b/launcher/minecraft/MinecraftInstance.cpp @@ -570,6 +570,11 @@ QString MinecraftInstance::createLaunchScript(AuthSessionPtr session, MinecraftS if(!profile) return QString(); + for (auto cp : getClassPath()) + { + launchScript += "classPath " + cp + "\n"; + } + auto mainClass = getMainClass(); if (!mainClass.isEmpty()) { diff --git a/launcher/minecraft/launch/LauncherPartLaunch.cpp b/launcher/minecraft/launch/LauncherPartLaunch.cpp index 63e4d90f..3b905bf5 100644 --- a/launcher/minecraft/launch/LauncherPartLaunch.cpp +++ b/launcher/minecraft/launch/LauncherPartLaunch.cpp @@ -95,8 +95,8 @@ bool fitsInLocal8bit(const QString & string) void LauncherPartLaunch::executeTask() { - QString jarPath = APPLICATION->getJarPath("NewLaunch.jar"); - if (jarPath.isEmpty()) + QString newLaunchJar = APPLICATION->getJarPath("NewLaunch.jar"); + if (newLaunchJar.isEmpty()) { const char *reason = QT_TR_NOOP("Launcher library could not be found. Please check your installation."); emit logLine(tr(reason), MessageLevel::Fatal); @@ -119,9 +119,6 @@ void LauncherPartLaunch::executeTask() // make detachable - this will keep the process running even if the object is destroyed m_process.setDetachable(true); - auto classPath = minecraftInstance->getClassPath(); - classPath.prepend(jarPath); - auto natPath = minecraftInstance->getNativePath(); #ifdef Q_OS_WIN if (!fitsInLocal8bit(natPath)) @@ -137,23 +134,7 @@ void LauncherPartLaunch::executeTask() #endif args << "-cp"; -#ifdef Q_OS_WIN - QStringList processed; - for(auto & item: classPath) - { - if (!fitsInLocal8bit(item)) - { - processed << shortPathName(item); - } - else - { - processed << item; - } - } - args << processed.join(';'); -#else - args << classPath.join(':'); -#endif + args << newLaunchJar; args << "org.polymc.EntryPoint"; qDebug() << args.join(' '); diff --git a/launcher/minecraft/update/FMLLibrariesTask.cpp b/launcher/minecraft/update/FMLLibrariesTask.cpp index b6238ce9..7a0bd2f3 100644 --- a/launcher/minecraft/update/FMLLibrariesTask.cpp +++ b/launcher/minecraft/update/FMLLibrariesTask.cpp @@ -63,11 +63,12 @@ void FMLLibrariesTask::executeTask() setStatus(tr("Downloading FML libraries...")); auto dljob = new NetJob("FML libraries", APPLICATION->network()); auto metacache = APPLICATION->metacache(); + Net::Download::Options options = Net::Download::Option::MakeEternal; for (auto &lib : fmlLibsToProcess) { auto entry = metacache->resolveEntry("fmllibs", lib.filename); QString urlString = BuildConfig.FMLLIBS_BASE_URL + lib.filename; - dljob->addNetAction(Net::Download::makeCached(QUrl(urlString), entry)); + dljob->addNetAction(Net::Download::makeCached(QUrl(urlString), entry, options)); } connect(dljob, &NetJob::succeeded, this, &FMLLibrariesTask::fmllibsFinished); |