GH-967 make libraries handle their own path prefix
Makes it possible to mix libraries managed by FTB and MultiMC Backport from unstable
This commit is contained in:
@ -41,6 +41,7 @@ void FTBProfileStrategy::loadDefaultBuiltinPatches()
|
||||
}
|
||||
profile->appendPatch(minecraftPatch);
|
||||
|
||||
auto nativeInstance = dynamic_cast<OneSixFTBInstance *>(m_instance);
|
||||
ProfilePatchPtr packPatch;
|
||||
{
|
||||
auto mcJson = m_instance->minecraftRoot() + "/pack.json";
|
||||
@ -58,6 +59,7 @@ void FTBProfileStrategy::loadDefaultBuiltinPatches()
|
||||
{
|
||||
addLib->m_hint = "local";
|
||||
addLib->insertType = RawLibrary::Prepend;
|
||||
addLib->setStoragePrefix(nativeInstance->librariesPath().absolutePath());
|
||||
}
|
||||
file->fileId = "org.multimc.ftb.pack";
|
||||
file->setVanilla(true);
|
||||
|
@ -78,7 +78,7 @@ void OneSixFTBInstance::copy(const QDir &newDir)
|
||||
for (auto library : libraryNames)
|
||||
{
|
||||
OneSixLibrary *lib = new OneSixLibrary(library);
|
||||
const QString out = QDir::current().absoluteFilePath("libraries/" + lib->storagePath());
|
||||
const QString out = QDir::current().absoluteFilePath("libraries/" + lib->storageSuffix());
|
||||
if (QFile::exists(out))
|
||||
{
|
||||
continue;
|
||||
@ -87,7 +87,7 @@ void OneSixFTBInstance::copy(const QDir &newDir)
|
||||
{
|
||||
qCritical() << "Couldn't create folder structure for" << out;
|
||||
}
|
||||
if (!QFile::copy(librariesPath().absoluteFilePath(lib->storagePath()), out))
|
||||
if (!QFile::copy(librariesPath().absoluteFilePath(lib->storageSuffix()), out))
|
||||
{
|
||||
qCritical() << "Couldn't copy" << lib->rawName();
|
||||
}
|
||||
|
Reference in New Issue
Block a user