From 40cf38bc3225c614e7e81d074f890e6f9da0507b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Sun, 12 Mar 2017 23:19:45 +0100 Subject: NOISSUE remove liteloader and forge --- api/logic/minecraft/MinecraftProfile.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'api/logic/minecraft/MinecraftProfile.cpp') diff --git a/api/logic/minecraft/MinecraftProfile.cpp b/api/logic/minecraft/MinecraftProfile.cpp index 46235a18..b74141d6 100644 --- a/api/logic/minecraft/MinecraftProfile.cpp +++ b/api/logic/minecraft/MinecraftProfile.cpp @@ -621,6 +621,11 @@ void MinecraftProfile::installJarMods(QStringList selectedFiles) m_strategy->installJarMods(selectedFiles); } +void MinecraftProfile::installVersion(BaseVersionPtr version) +{ + // TODO: implement +} + /* * TODO: get rid of this. Get rid of all order numbers. */ -- cgit v1.2.3 From 5fabb4f2546fa6b79a4e2c29679f506e587a0070 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Mon, 27 Mar 2017 03:34:39 +0200 Subject: NOISSUE Rough refactor of ProfilePatch and VersionFile internals. They are now distinct classes with distinct responsibilities. * ProfilePatch is an entry in MinecraftProfile and can hold VersionFile or Meta::Version. * VersionFile is the basic element that holds version information loaded from JSON. * Meta::Version is the loader class for VersionFile(s) from a server. --- api/logic/minecraft/MinecraftProfile.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'api/logic/minecraft/MinecraftProfile.cpp') diff --git a/api/logic/minecraft/MinecraftProfile.cpp b/api/logic/minecraft/MinecraftProfile.cpp index b74141d6..8638f5fa 100644 --- a/api/logic/minecraft/MinecraftProfile.cpp +++ b/api/logic/minecraft/MinecraftProfile.cpp @@ -80,7 +80,7 @@ void MinecraftProfile::clear() m_traits.clear(); m_jarMods.clear(); mojangDownloads.clear(); - m_problemSeverity = ProblemSeverity::PROBLEM_NONE; + m_problemSeverity = ProblemSeverity::None; } void MinecraftProfile::clearPatches() @@ -273,9 +273,9 @@ QVariant MinecraftProfile::data(const QModelIndex &index, int role) const auto severity = patch->getProblemSeverity(); switch (severity) { - case PROBLEM_WARNING: + case ProblemSeverity::Warning: return "warning"; - case PROBLEM_ERROR: + case ProblemSeverity::Error: return "error"; default: return QVariant(); -- cgit v1.2.3 From 8e58d61150b0bdbe9eb91065d36342f3004fe97b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Thu, 6 Apr 2017 23:31:23 +0200 Subject: NOISSUE fix issue with the narrator feature by splitting java and native libraries --- api/logic/minecraft/MinecraftProfile.cpp | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) (limited to 'api/logic/minecraft/MinecraftProfile.cpp') diff --git a/api/logic/minecraft/MinecraftProfile.cpp b/api/logic/minecraft/MinecraftProfile.cpp index 8638f5fa..c04669c1 100644 --- a/api/logic/minecraft/MinecraftProfile.cpp +++ b/api/logic/minecraft/MinecraftProfile.cpp @@ -491,20 +491,29 @@ void MinecraftProfile::applyLibrary(LibraryPtr library) { return; } + + QList * list = &m_libraries; + if(library->isNative()) + { + list = &m_nativeLibraries; + } + + auto libraryCopy = Library::limitedCopy(library); + // find the library by name. - const int index = findLibraryByName(m_libraries, library->rawName()); + const int index = findLibraryByName(*list, library->rawName()); // library not found? just add it. if (index < 0) { - m_libraries.append(Library::limitedCopy(library)); + list->append(libraryCopy); return; } - auto existingLibrary = m_libraries.at(index); + + auto existingLibrary = list->at(index); // if we are higher it means we should update if (Version(library->version()) > Version(existingLibrary->version())) { - auto libraryCopy = Library::limitedCopy(library); - m_libraries.replace(index, libraryCopy); + list->replace(index, libraryCopy); } } @@ -581,6 +590,11 @@ const QList & MinecraftProfile::getLibraries() const return m_libraries; } +const QList & MinecraftProfile::getNativeLibraries() const +{ + return m_nativeLibraries; +} + void MinecraftProfile::getLibraryFiles(const QString& architecture, QStringList& jars, QStringList& nativeJars, const QString& overridePath) const { QStringList native32, native64; @@ -590,6 +604,10 @@ void MinecraftProfile::getLibraryFiles(const QString& architecture, QStringList& { lib->getApplicableFiles(currentSystem, jars, nativeJars, native32, native64, overridePath); } + for (auto lib : getNativeLibraries()) + { + lib->getApplicableFiles(currentSystem, jars, nativeJars, native32, native64, overridePath); + } if(architecture == "32") { nativeJars.append(native32); -- cgit v1.2.3