mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-06-29 18:09:59 +03:00
NOISSUE finalize support for new mojang version format
This commit is contained in:
parent
d587720010
commit
f032e32133
42 changed files with 805 additions and 612 deletions
|
|
@ -25,14 +25,14 @@ bool VersionFile::hasJarMods()
|
|||
void VersionFile::applyTo(MinecraftProfile *profile)
|
||||
{
|
||||
auto theirVersion = profile->getMinecraftVersion();
|
||||
if (!theirVersion.isNull() && !mcVersion.isNull())
|
||||
if (!theirVersion.isNull() && !dependsOnMinecraftVersion.isNull())
|
||||
{
|
||||
if (QRegExp(mcVersion, Qt::CaseInsensitive, QRegExp::Wildcard).indexIn(theirVersion) == -1)
|
||||
if (QRegExp(dependsOnMinecraftVersion, Qt::CaseInsensitive, QRegExp::Wildcard).indexIn(theirVersion) == -1)
|
||||
{
|
||||
throw MinecraftVersionMismatch(fileId, mcVersion, theirVersion);
|
||||
throw MinecraftVersionMismatch(fileId, dependsOnMinecraftVersion, theirVersion);
|
||||
}
|
||||
}
|
||||
profile->applyMinecraftVersion(id);
|
||||
profile->applyMinecraftVersion(minecraftVersion);
|
||||
profile->applyMainClass(mainClass);
|
||||
profile->applyAppletClass(appletClass);
|
||||
profile->applyMinecraftArguments(minecraftArguments);
|
||||
|
|
@ -51,4 +51,10 @@ void VersionFile::applyTo(MinecraftProfile *profile)
|
|||
profile->applyLibrary(library);
|
||||
}
|
||||
profile->applyProblemSeverity(getProblemSeverity());
|
||||
auto iter = mojangDownloads.begin();
|
||||
while(iter != mojangDownloads.end())
|
||||
{
|
||||
profile->applyMojangDownload(iter.key(), iter.value());
|
||||
iter++;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue