summaryrefslogtreecommitdiffstats
path: root/logic/forge/ForgeInstaller.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2015-01-27 22:31:07 +0100
committerPetr Mrázek <peterix@gmail.com>2015-04-02 00:14:06 +0200
commit791221e923586bb717396ecf18bd13e57034df99 (patch)
tree9f608af07375b38626c8964671620477158341ba /logic/forge/ForgeInstaller.cpp
parent593111b14463e9d5d08256061b981b5ab1cfb710 (diff)
downloadMultiMC-791221e923586bb717396ecf18bd13e57034df99.tar
MultiMC-791221e923586bb717396ecf18bd13e57034df99.tar.gz
MultiMC-791221e923586bb717396ecf18bd13e57034df99.tar.lz
MultiMC-791221e923586bb717396ecf18bd13e57034df99.tar.xz
MultiMC-791221e923586bb717396ecf18bd13e57034df99.zip
NOISSUE Refactors and moving of things
Diffstat (limited to 'logic/forge/ForgeInstaller.cpp')
-rw-r--r--logic/forge/ForgeInstaller.cpp21
1 files changed, 10 insertions, 11 deletions
diff --git a/logic/forge/ForgeInstaller.cpp b/logic/forge/ForgeInstaller.cpp
index 13027ae7..01671306 100644
--- a/logic/forge/ForgeInstaller.cpp
+++ b/logic/forge/ForgeInstaller.cpp
@@ -14,14 +14,13 @@
*/
#include "ForgeInstaller.h"
-#include "logic/minecraft/InstanceVersion.h"
+#include "logic/minecraft/MinecraftProfile.h"
#include "logic/minecraft/OneSixLibrary.h"
#include "logic/net/HttpMetaCache.h"
#include "logic/tasks/Task.h"
#include "logic/OneSixInstance.h"
#include "logic/forge/ForgeVersionList.h"
-#include "logic/VersionFilterData.h"
-#include "gui/dialogs/ProgressDialog.h"
+#include "logic/minecraft/VersionFilterData.h"
#include <quazip.h>
#include <quazipfile.h>
@@ -41,7 +40,7 @@ ForgeInstaller::ForgeInstaller() : BaseInstaller()
void ForgeInstaller::prepare(const QString &filename, const QString &universalUrl)
{
- std::shared_ptr<InstanceVersion> newVersion;
+ std::shared_ptr<MinecraftProfile> newVersion;
m_universal_url = universalUrl;
QuaZip zip(filename);
@@ -74,7 +73,7 @@ void ForgeInstaller::prepare(const QString &filename, const QString &universalUr
// read the forge version info
{
- newVersion = InstanceVersion::fromJson(versionInfoVal.toObject());
+ newVersion = MinecraftProfile::fromJson(versionInfoVal.toObject());
if (!newVersion)
return;
}
@@ -116,7 +115,7 @@ void ForgeInstaller::prepare(const QString &filename, const QString &universalUr
file.close();
m_forge_json = newVersion;
- realVersionId = m_forge_json->id = installObj.value("minecraft").toString();
+ m_forge_json->id = installObj.value("minecraft").toString();
}
bool ForgeInstaller::add(OneSixInstance *to)
@@ -194,7 +193,7 @@ bool ForgeInstaller::add(OneSixInstance *to)
bool found = false;
bool equals = false;
// find an entry that matches this one
- for (auto tolib : to->getFullVersion()->vanillaLibraries)
+ for (auto tolib : to->getMinecraftProfile()->vanillaLibraries)
{
if (tolib->artifactId() != libName)
continue;
@@ -237,7 +236,7 @@ bool ForgeInstaller::add(OneSixInstance *to)
match = expression.match(args);
}
}
- if (!args.isEmpty() && args != to->getFullVersion()->vanillaMinecraftArguments)
+ if (!args.isEmpty() && args != to->getMinecraftProfile()->vanillaMinecraftArguments)
{
obj.insert("minecraftArguments", args);
}
@@ -246,7 +245,7 @@ bool ForgeInstaller::add(OneSixInstance *to)
obj.insert("+tweakers", QJsonArray::fromStringList(tweakers));
}
if (!m_forge_json->processArguments.isEmpty() &&
- m_forge_json->processArguments != to->getFullVersion()->vanillaProcessArguments)
+ m_forge_json->processArguments != to->getMinecraftProfile()->vanillaProcessArguments)
{
obj.insert("processArguments", m_forge_json->processArguments);
}
@@ -308,7 +307,7 @@ bool ForgeInstaller::addLegacy(OneSixInstance *to)
traitsPlus.append(QString("legacyFML"));
obj.insert("+traits", traitsPlus);
}
- auto fullversion = to->getFullVersion();
+ auto fullversion = to->getMinecraftProfile();
fullversion->remove("net.minecraftforge");
QFile file(filename(to->instanceRoot()));
@@ -409,7 +408,7 @@ protected:
{
try
{
- m_instance->reloadVersion();
+ m_instance->reloadProfile();
emitSucceeded();
}
catch (MMCError &e)