This commit is contained in:
2026-09-29 09:40:37 +03:00
parent 441021b9a6
commit 6567e731d1
34 changed files with 57 additions and 709 deletions
+2 -7
View File
@@ -97,8 +97,6 @@ QStringList GameLauncher::missingFiles(const LaunchOptions &options,
namespace {
// -DignoreList у Forge 1.17+ — список префиксов имён файлов, которые
// BootstrapLauncher не берёт в слой модулей. Сравнение идёт по началу имени.
bool ignoreListCovers(const QString &ignoreListArgument, const QString &fileName)
{
const QString value = ignoreListArgument.mid(QStringLiteral("-DignoreList=").size());
@@ -119,7 +117,7 @@ QStringList GameLauncher::buildArguments(const LaunchOptions &options,
QStringList classpath;
for (const MinecraftLibrary &library : version.libraries) {
if (library.native)
continue; // натив-библиотеки только распаковываются
continue;
classpath << nativeToken(libraryPath(options.gameDir, library));
}
classpath << nativeToken(version.clientJarPath);
@@ -204,7 +202,6 @@ QStringList GameLauncher::buildArguments(const LaunchOptions &options,
arguments << resolved;
}
// Разрешение окна: у старых версий фич-флага нет, аргументы всё равно понимаются.
if (options.windowWidth > 0 && options.windowHeight > 0
&& !version.hasCustomResolutionArgs && !arguments.contains(QStringLiteral("--width"))) {
arguments << QStringLiteral("--width") << QString::number(options.windowWidth)
@@ -269,8 +266,6 @@ bool GameLauncher::extractNatives(const LaunchOptions &options,
if (excluded)
continue;
// java.library.path ищет библиотеки только в корне папки, поэтому
// складываем их плоско, без структуры каталогов внутри jar.
const QString fileName = QFileInfo(entry.filePath).fileName();
if (!isNativeLibraryFile(fileName))
continue;
@@ -278,7 +273,7 @@ bool GameLauncher::extractNatives(const LaunchOptions &options,
const QString target = nativesDir + u'/' + fileName;
const QByteArray data = reader.fileData(entry.filePath);
if (QFileInfo(target).size() == data.size() && QFile::exists(target))
continue; // уже распаковано этим же лаунчером
continue;
QFile file(target);
if (!file.open(QIODevice::WriteOnly) || file.write(data) != data.size()) {