GH-1314 add UI for custom minecraft jar addition

Also changes the text of the jar mod addition button.
It should be clearer what it does and hopefully will not confuse
as many people.
This commit is contained in:
Petr Mrázek
2017-08-07 00:46:29 +02:00
parent 117bfef151
commit 8cf88ffc58
16 changed files with 147 additions and 52 deletions

View File

@ -45,7 +45,7 @@ void FMLLibrariesTask::executeTask()
// now check the lib folder inside the instance for files.
for (auto &lib : libList)
{
QFileInfo libInfo(FS::PathCombine(inst->libDir(), lib.filename));
QFileInfo libInfo(FS::PathCombine(inst->FMLlibDir(), lib.filename));
if (libInfo.exists())
continue;
fmlLibsToProcess.append(lib);
@ -95,13 +95,13 @@ void FMLLibrariesTask::fmllibsFinished()
{
progress(index, fmlLibsToProcess.size());
auto entry = metacache->resolveEntry("fmllibs", lib.filename);
auto path = FS::PathCombine(inst->libDir(), lib.filename);
auto path = FS::PathCombine(inst->FMLlibDir(), lib.filename);
if (!FS::ensureFilePathExists(path))
{
emitFailed(tr("Failed creating FML library folder inside the instance."));
return;
}
if (!QFile::copy(entry->getFullPath(), FS::PathCombine(inst->libDir(), lib.filename)))
if (!QFile::copy(entry->getFullPath(), FS::PathCombine(inst->FMLlibDir(), lib.filename)))
{
emitFailed(tr("Failed copying Forge/FML library: %1.").arg(lib.filename));
return;