diff options
author | Petr Mrázek <peterix@gmail.com> | 2013-11-24 06:36:16 +0100 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2013-11-24 06:36:16 +0100 |
commit | ca297fca79a7b1b96e41ba5abed4956af9383c16 (patch) | |
tree | 5c6cf2a486c4015f5e52842acb412e39b8498acd /logic/OneSixInstance.cpp | |
parent | 4124faf474908e4d79d93b0f624bf8fd81bd9972 (diff) | |
download | MultiMC-ca297fca79a7b1b96e41ba5abed4956af9383c16.tar MultiMC-ca297fca79a7b1b96e41ba5abed4956af9383c16.tar.gz MultiMC-ca297fca79a7b1b96e41ba5abed4956af9383c16.tar.lz MultiMC-ca297fca79a7b1b96e41ba5abed4956af9383c16.tar.xz MultiMC-ca297fca79a7b1b96e41ba5abed4956af9383c16.zip |
Prepare for rework of instance launch/update
Added missing licenses
Added a Java functionality checker (detects 32/64bit java)
Refactor of *Update - no longer based on BaseUpdate, but Task directly
Fixed runner script to not derp up on 32bit linux. Could add more detection and error reporting there.
Resources are now split into graphics and generated. Generated resources are placed in the build tree and included from there.
Used the Java checker in the main settings dialog (TODO: instance settings).
Partial support for ${arch}-using libraries - both 32 and 64 variants of ${arch} are downloaded.
Diffstat (limited to 'logic/OneSixInstance.cpp')
-rw-r--r-- | logic/OneSixInstance.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/logic/OneSixInstance.cpp b/logic/OneSixInstance.cpp index 7e0d48fd..7764d225 100644 --- a/logic/OneSixInstance.cpp +++ b/logic/OneSixInstance.cpp @@ -18,6 +18,7 @@ #include "OneSixUpdate.h" #include "MinecraftProcess.h" #include "OneSixVersion.h" +#include "JavaChecker.h" #include <setting.h> #include <pathutils.h> @@ -36,7 +37,7 @@ OneSixInstance::OneSixInstance(const QString &rootDir, SettingsObject *setting_o reloadFullVersion(); } -BaseUpdate *OneSixInstance::doUpdate() +Task *OneSixInstance::doUpdate() { return new OneSixUpdate(this); } @@ -122,6 +123,11 @@ MinecraftProcess *OneSixInstance::prepareForLaunch(LoginResponse response) for (auto lib : libs_to_extract) { + QString storage = lib->storagePath(); + if(storage.contains("${arch}")) + { + storage.replace("${arch}", "64"); + } QString path = "libraries/" + lib->storagePath(); QLOG_INFO() << "Will extract " << path.toLocal8Bit(); if (JlCompress::extractWithExceptions(path, natives_dir_raw, lib->extract_excludes) @@ -188,8 +194,8 @@ MinecraftProcess *OneSixInstance::prepareForLaunch(LoginResponse response) // create the process and set its parameters MinecraftProcess *proc = new MinecraftProcess(this); - proc->setMinecraftArguments(args); - proc->setMinecraftWorkdir(minecraftRoot()); + proc->setArguments(args); + proc->setWorkdir(minecraftRoot()); return proc; } |