summaryrefslogtreecommitdiffstats
path: root/logic/ftb
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2015-05-27 01:30:18 +0200
committerPetr Mrázek <peterix@gmail.com>2015-05-27 01:30:18 +0200
commitf9e186ab704401416832d723c2e70a0f7a7435b3 (patch)
treeac6e7fd9ed66a503a276339b8d1159a1ff56bde4 /logic/ftb
parent50a4a1e19ef148972eb9eb116f0fdd1b6b0bcdda (diff)
downloadMultiMC-f9e186ab704401416832d723c2e70a0f7a7435b3.tar
MultiMC-f9e186ab704401416832d723c2e70a0f7a7435b3.tar.gz
MultiMC-f9e186ab704401416832d723c2e70a0f7a7435b3.tar.lz
MultiMC-f9e186ab704401416832d723c2e70a0f7a7435b3.tar.xz
MultiMC-f9e186ab704401416832d723c2e70a0f7a7435b3.zip
GH-967 make libraries handle their own path prefix
Makes it possible to mix libraries managed by FTB and MultiMC Backport from unstable
Diffstat (limited to 'logic/ftb')
-rw-r--r--logic/ftb/FTBProfileStrategy.cpp2
-rw-r--r--logic/ftb/OneSixFTBInstance.cpp4
2 files changed, 4 insertions, 2 deletions
diff --git a/logic/ftb/FTBProfileStrategy.cpp b/logic/ftb/FTBProfileStrategy.cpp
index ff40b642..293d0fdc 100644
--- a/logic/ftb/FTBProfileStrategy.cpp
+++ b/logic/ftb/FTBProfileStrategy.cpp
@@ -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);
diff --git a/logic/ftb/OneSixFTBInstance.cpp b/logic/ftb/OneSixFTBInstance.cpp
index a8ea3031..88c885b9 100644
--- a/logic/ftb/OneSixFTBInstance.cpp
+++ b/logic/ftb/OneSixFTBInstance.cpp
@@ -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();
}