NOISSUE add instance-local library storage

Any libraries stored in $instanceroot/libraries/ will override
the libraries from MultiMC's global folders, as long as they are marked 'local'
in the json patch.
This commit is contained in:
Petr Mrázek
2016-10-02 00:26:10 +02:00
parent 69f3ab019d
commit 6e80f03409
13 changed files with 182 additions and 45 deletions

View File

@ -55,18 +55,23 @@ struct GradleSpecifier
}
return retval;
}
QString getFileName() const
{
QString filename = m_artifactId + '-' + m_version;
if(!m_classifier.isEmpty())
{
filename += "-" + m_classifier;
}
filename += "." + m_extension;
return filename;
}
QString toPath() const
{
if(!m_valid)
return "INVALID";
QString path = m_groupId;
path.replace('.', '/');
path += '/' + m_artifactId + '/' + m_version + '/' + m_artifactId + '-' + m_version;
if(!m_classifier.isEmpty())
{
path += "-" + m_classifier;
}
path += "." + m_extension;
path += '/' + m_artifactId + '/' + m_version + '/' + getFileName();
return path;
}
inline bool valid() const