WIP remove jank previously added for a minimal forge hack

This commit is contained in:
Petr Mrázek 2019-08-13 23:58:15 +02:00
parent 406203e76b
commit 0272d6d7f7
3 changed files with 0 additions and 45 deletions

View File

@ -45,10 +45,6 @@ void Library::getApplicableFiles(
native += actualPath(raw_storage);
}
}
else if (!presenceOnly)
{
jar += actualPath(raw_storage);
}
}
QList< std::shared_ptr< NetAction > > Library::getDownloads(
@ -61,7 +57,6 @@ QList< std::shared_ptr< NetAction > > Library::getDownloads(
QList<NetActionPtr> out;
bool stale = isAlwaysStale();
bool instanceLocal = isInstanceLocal();
bool launcherLocal = isLocalBuilt();
auto check_instance_local_file = [&](QString storage)
{
@ -77,27 +72,12 @@ QList< std::shared_ptr< NetAction > > Library::getDownloads(
return true;
};
auto check_launcher_local_file = [&](QString storage)
{
QFileInfo localFileInfo("libraries/" + storage);
if(!localFileInfo.exists())
{
failedLocalFiles.append(localFileInfo.filePath());
return false;
}
return true;
};
auto add_download = [&](QString storage, QString url, QString sha1)
{
if(instanceLocal)
{
return check_instance_local_file(storage);
}
else if(launcherLocal)
{
return check_launcher_local_file(storage);
}
auto entry = cache->resolveEntry("libraries", storage);
if(stale)
{
@ -262,11 +242,6 @@ bool Library::isInstanceLocal() const
return m_hint == "local";
}
bool Library::isLocalBuilt() const
{
return localBuild;
}
bool Library::isAlwaysStale() const
{
return m_hint == "always-stale";

View File

@ -48,8 +48,6 @@ public:
newlib->m_rules = base->m_rules;
newlib->m_mojangDownloads = base->m_mojangDownloads;
newlib->m_filename = base->m_filename;
newlib->presenceOnly = base->presenceOnly;
newlib->localBuild = base->localBuild;
return newlib;
}
@ -214,12 +212,6 @@ protected: /* data */
/// true if the library had a rules section (even empty)
bool applyRules = false;
// MultiMC-specific: the artifact must be present, but is not part of the classpath
bool presenceOnly = false;
// MultiMC-specific: the artifact must be present, but cannot be downloaded, because it was created by some other mechanism
bool localBuild = false;
/// rules associated with the library
QList<std::shared_ptr<Rule>> m_rules;

View File

@ -21,14 +21,6 @@ LibraryPtr OneSixVersionFormat::libraryFromJson(const QJsonObject &libObj, const
readString(libObj, "MMC-absoluteUrl", out->m_absoluteURL);
readString(libObj, "MMC-filename", out->m_filename);
readString(libObj, "MMC-displayname", out->m_displayname);
if (libObj.contains("presenceOnly"))
{
out->presenceOnly = requireBoolean(libObj, "presenceOnly");
}
if (libObj.contains("localBuild"))
{
out->localBuild = requireBoolean(libObj, "localBuild");
}
return out;
}
@ -43,10 +35,6 @@ QJsonObject OneSixVersionFormat::libraryToJson(Library *library)
libRoot.insert("MMC-filename", library->m_filename);
if (library->m_displayname.size())
libRoot.insert("MMC-displayname", library->m_displayname);
if (library->presenceOnly)
libRoot.insert("presenceOnly", true);
if (library->localBuild)
libRoot.insert("localBuild", true);
return libRoot;
}