summaryrefslogtreecommitdiffstats
path: root/logic/ForgeInstaller.cpp
diff options
context:
space:
mode:
authorJan Dalheimer <jan@dalheimer.de>2014-01-22 07:33:32 +0100
committerJan Dalheimer <jan@dalheimer.de>2014-01-22 07:33:32 +0100
commita1a06cc89f7f1d904a1b71d330d6129b866ff29b (patch)
tree6732552b4bfa547dcad83b1aa7af94818d7ac314 /logic/ForgeInstaller.cpp
parentb182f12c2076505c31b96eb7e8a8869fbadecd2d (diff)
downloadMultiMC-a1a06cc89f7f1d904a1b71d330d6129b866ff29b.tar
MultiMC-a1a06cc89f7f1d904a1b71d330d6129b866ff29b.tar.gz
MultiMC-a1a06cc89f7f1d904a1b71d330d6129b866ff29b.tar.lz
MultiMC-a1a06cc89f7f1d904a1b71d330d6129b866ff29b.tar.xz
MultiMC-a1a06cc89f7f1d904a1b71d330d6129b866ff29b.zip
Derpstances. Everything renamed. Launching does not yet work.
Diffstat (limited to 'logic/ForgeInstaller.cpp')
-rw-r--r--logic/ForgeInstaller.cpp22
1 files changed, 13 insertions, 9 deletions
diff --git a/logic/ForgeInstaller.cpp b/logic/ForgeInstaller.cpp
index 8d4c5b41..29735a7d 100644
--- a/logic/ForgeInstaller.cpp
+++ b/logic/ForgeInstaller.cpp
@@ -14,8 +14,8 @@
*/
#include "ForgeInstaller.h"
-#include "OneSixVersion.h"
-#include "OneSixLibrary.h"
+#include "DerpVersion.h"
+#include "DerpLibrary.h"
#include "net/HttpMetaCache.h"
#include <quazip.h>
#include <quazipfile.h>
@@ -23,9 +23,15 @@
#include <QStringList>
#include "MultiMC.h"
+#include <QJsonDocument>
+#include <QSaveFile>
+#include <QCryptographicHash>
+
+// DERPFIX
+
ForgeInstaller::ForgeInstaller(QString filename, QString universal_url)
{
- std::shared_ptr<OneSixVersion> newVersion;
+ std::shared_ptr<DerpVersion> newVersion;
m_universal_url = universal_url;
QuaZip zip(filename);
@@ -58,7 +64,7 @@ ForgeInstaller::ForgeInstaller(QString filename, QString universal_url)
// read the forge version info
{
- newVersion = OneSixVersion::fromJson(versionInfoVal.toObject());
+ // DERPFIX newVersion = DerpVersion::fromJson(versionInfoVal.toObject());
if (!newVersion)
return;
}
@@ -68,7 +74,7 @@ ForgeInstaller::ForgeInstaller(QString filename, QString universal_url)
internalPath = installObj.value("filePath").toString();
// where do we put the library? decode the mojang path
- OneSixLibrary lib(libraryName);
+ DerpLibrary lib(libraryName);
lib.finalize();
auto cacheentry = MMC->metacache()->resolveEntry("libraries", lib.storagePath());
@@ -103,11 +109,10 @@ ForgeInstaller::ForgeInstaller(QString filename, QString universal_url)
realVersionId = m_forge_version->id = installObj.value("minecraft").toString();
}
-bool ForgeInstaller::apply(std::shared_ptr<OneSixVersion> to)
+bool ForgeInstaller::apply(std::shared_ptr<DerpVersion> to)
{
if (!m_forge_version)
return false;
- to->externalUpdateStart();
int sliding_insert_window = 0;
{
// for each library in the version we are adding (except for the blacklisted)
@@ -150,6 +155,5 @@ bool ForgeInstaller::apply(std::shared_ptr<OneSixVersion> to)
to->minecraftArguments = m_forge_version->minecraftArguments;
to->processArguments = m_forge_version->processArguments;
}
- to->externalUpdateFinish();
- return to->toOriginalFile();
+ return true;
}