aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2017-04-07 00:27:24 +0200
committerPetr Mrázek <peterix@gmail.com>2017-04-07 00:27:24 +0200
commit795889d934e8f4ebe89be1a49a3417fd98e89be1 (patch)
treec5b0d30d425003c4b88e84a2908e63eb5ed797b9
parent160b5033a79e6b5ee9f3e2a001b96c677f41ddcb (diff)
parent8e58d61150b0bdbe9eb91065d36342f3004fe97b (diff)
downloadPrismLauncher-795889d934e8f4ebe89be1a49a3417fd98e89be1.tar.gz
PrismLauncher-795889d934e8f4ebe89be1a49a3417fd98e89be1.tar.bz2
PrismLauncher-795889d934e8f4ebe89be1a49a3417fd98e89be1.zip
Merge branch 'feature/meta' into develop
-rw-r--r--CMakeLists.txt1
-rw-r--r--api/logic/BaseInstance.cpp1
-rw-r--r--api/logic/BaseVersionList.cpp9
-rw-r--r--api/logic/BaseVersionList.h20
-rw-r--r--api/logic/CMakeLists.txt61
-rw-r--r--api/logic/Env.cpp27
-rw-r--r--api/logic/Env.h11
-rw-r--r--api/logic/InstanceCreationTask.cpp4
-rw-r--r--api/logic/ProblemProvider.h61
-rw-r--r--api/logic/Version.cpp57
-rw-r--r--api/logic/Version.h4
-rw-r--r--api/logic/Version_test.cpp38
-rw-r--r--api/logic/java/JavaInstallList.cpp2
-rw-r--r--api/logic/java/JavaInstallList.h18
-rw-r--r--api/logic/java/JavaVersion.h8
-rw-r--r--api/logic/meta/BaseEntity.cpp153
-rw-r--r--api/logic/meta/BaseEntity.h74
-rw-r--r--api/logic/meta/Index.cpp (renamed from api/logic/wonko/WonkoIndex.cpp)67
-rw-r--r--api/logic/meta/Index.h (renamed from api/logic/wonko/WonkoIndex.h)35
-rw-r--r--api/logic/meta/Index_test.cpp44
-rw-r--r--api/logic/meta/JsonFormat.cpp150
-rw-r--r--api/logic/meta/JsonFormat.h (renamed from api/logic/wonko/WonkoUtil.h)29
-rw-r--r--api/logic/meta/Version.cpp125
-rw-r--r--api/logic/meta/Version.h (renamed from api/logic/wonko/WonkoVersion.h)82
-rw-r--r--api/logic/meta/VersionList.cpp235
-rw-r--r--api/logic/meta/VersionList.h (renamed from api/logic/wonko/WonkoVersionList.h)68
-rw-r--r--api/logic/minecraft/Library.cpp23
-rw-r--r--api/logic/minecraft/Library_test.cpp2
-rw-r--r--api/logic/minecraft/MinecraftInstance.cpp7
-rw-r--r--api/logic/minecraft/MinecraftProfile.cpp39
-rw-r--r--api/logic/minecraft/MinecraftProfile.h12
-rw-r--r--api/logic/minecraft/MinecraftVersion.cpp230
-rw-r--r--api/logic/minecraft/MinecraftVersion.h132
-rw-r--r--api/logic/minecraft/MinecraftVersionList.cpp677
-rw-r--r--api/logic/minecraft/MinecraftVersionList.h73
-rw-r--r--api/logic/minecraft/MojangVersionFormat.cpp21
-rw-r--r--api/logic/minecraft/ProfilePatch.cpp175
-rw-r--r--api/logic/minecraft/ProfilePatch.h136
-rw-r--r--api/logic/minecraft/ProfileStrategy.h1
-rw-r--r--api/logic/minecraft/ProfileUtils.cpp6
-rw-r--r--api/logic/minecraft/VersionBuildError.h17
-rw-r--r--api/logic/minecraft/VersionFile.cpp42
-rw-r--r--api/logic/minecraft/VersionFile.h121
-rw-r--r--api/logic/minecraft/VersionFilterData.cpp11
-rw-r--r--api/logic/minecraft/VersionFilterData.h4
-rw-r--r--api/logic/minecraft/forge/ForgeInstaller.cpp458
-rw-r--r--api/logic/minecraft/forge/ForgeInstaller.h52
-rw-r--r--api/logic/minecraft/forge/ForgeVersion.cpp55
-rw-r--r--api/logic/minecraft/forge/ForgeVersion.h42
-rw-r--r--api/logic/minecraft/forge/ForgeVersionList.cpp333
-rw-r--r--api/logic/minecraft/forge/ForgeVersionList.h90
-rw-r--r--api/logic/minecraft/forge/LegacyForge.cpp56
-rw-r--r--api/logic/minecraft/forge/LegacyForge.h25
-rw-r--r--api/logic/minecraft/ftb/FTBInstanceProvider.cpp14
-rw-r--r--api/logic/minecraft/ftb/FTBPlugin.cpp2
-rw-r--r--api/logic/minecraft/ftb/FTBProfileStrategy.cpp13
-rw-r--r--api/logic/minecraft/ftb/FTBVersion.h32
-rw-r--r--api/logic/minecraft/legacy/LegacyUpdate.cpp1
-rw-r--r--api/logic/minecraft/legacy/LwjglVersionList.cpp5
-rw-r--r--api/logic/minecraft/legacy/LwjglVersionList.h4
-rw-r--r--api/logic/minecraft/liteloader/LiteLoaderInstaller.cpp106
-rw-r--r--api/logic/minecraft/liteloader/LiteLoaderInstaller.h39
-rw-r--r--api/logic/minecraft/liteloader/LiteLoaderVersionList.cpp332
-rw-r--r--api/logic/minecraft/liteloader/LiteLoaderVersionList.h123
-rw-r--r--api/logic/minecraft/onesix/OneSixInstance.cpp66
-rw-r--r--api/logic/minecraft/onesix/OneSixInstance.h4
-rw-r--r--api/logic/minecraft/onesix/OneSixProfileStrategy.cpp226
-rw-r--r--api/logic/minecraft/onesix/OneSixUpdate.cpp49
-rw-r--r--api/logic/minecraft/onesix/OneSixVersionFormat.cpp32
-rw-r--r--api/logic/minecraft/onesix/update/LibrariesTask.cpp18
-rw-r--r--api/logic/wonko/BaseWonkoEntity.cpp39
-rw-r--r--api/logic/wonko/BaseWonkoEntity.h51
-rw-r--r--api/logic/wonko/WonkoIndex_test.cpp50
-rw-r--r--api/logic/wonko/WonkoReference.cpp44
-rw-r--r--api/logic/wonko/WonkoReference.h41
-rw-r--r--api/logic/wonko/WonkoUtil.cpp47
-rw-r--r--api/logic/wonko/WonkoVersion.cpp102
-rw-r--r--api/logic/wonko/WonkoVersionList.cpp283
-rw-r--r--api/logic/wonko/format/WonkoFormat.cpp80
-rw-r--r--api/logic/wonko/format/WonkoFormat.h54
-rw-r--r--api/logic/wonko/format/WonkoFormatV1.cpp158
-rw-r--r--api/logic/wonko/format/WonkoFormatV1.h30
-rw-r--r--api/logic/wonko/tasks/BaseWonkoEntityLocalLoadTask.cpp117
-rw-r--r--api/logic/wonko/tasks/BaseWonkoEntityLocalLoadTask.h81
-rw-r--r--api/logic/wonko/tasks/BaseWonkoEntityRemoteLoadTask.cpp126
-rw-r--r--api/logic/wonko/tasks/BaseWonkoEntityRemoteLoadTask.h90
-rw-r--r--application/BuildConfig.cpp.in1
-rw-r--r--application/BuildConfig.h5
-rw-r--r--application/CMakeLists.txt12
-rw-r--r--application/MainWindow.cpp28
-rw-r--r--application/MainWindow.h1
-rw-r--r--application/MultiMC.cpp36
-rw-r--r--application/MultiMC.h9
-rw-r--r--application/VersionProxyModel.cpp20
-rw-r--r--application/WonkoGui.cpp74
-rw-r--r--application/WonkoGui.h29
-rw-r--r--application/dialogs/NewInstanceDialog.cpp41
-rw-r--r--application/dialogs/NewInstanceDialog.h4
-rw-r--r--application/main.cpp1
-rw-r--r--application/pages/VersionPage.cpp130
-rw-r--r--application/pages/global/PackagesPage.cpp (renamed from application/pages/global/WonkoPage.cpp)117
-rw-r--r--application/pages/global/PackagesPage.h (renamed from application/pages/global/WonkoPage.h)14
-rw-r--r--application/pages/global/PackagesPage.ui (renamed from application/pages/global/WonkoPage.ui)12
-rw-r--r--application/resources/versions/LWJGL/2.9.0.json45
-rw-r--r--application/resources/versions/LWJGL/2.9.1-nightly-20130708-debug3.json45
-rw-r--r--application/resources/versions/LWJGL/2.9.1.json45
-rw-r--r--application/resources/versions/LWJGL/2.9.2-nightly-20140822.json45
-rw-r--r--application/resources/versions/minecraft.json587
-rw-r--r--application/resources/versions/versions.qrc12
-rw-r--r--application/widgets/VersionSelectWidget.cpp46
-rw-r--r--application/widgets/VersionSelectWidget.h5
-rw-r--r--wonkoclient/CMakeLists.txt10
-rw-r--r--wonkoclient/WonkoClient.cpp84
-rw-r--r--wonkoclient/WonkoClient.h36
-rw-r--r--wonkoclient/main.cpp29
115 files changed, 1850 insertions, 6356 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d3dcac78..86f8e20a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -109,4 +109,3 @@ add_subdirectory(api/logic)
add_subdirectory(api/gui)
add_subdirectory(application)
-add_subdirectory(wonkoclient)
diff --git a/api/logic/BaseInstance.cpp b/api/logic/BaseInstance.cpp
index 6d719c32..ee9e919d 100644
--- a/api/logic/BaseInstance.cpp
+++ b/api/logic/BaseInstance.cpp
@@ -23,7 +23,6 @@
#include "settings/Setting.h"
#include "settings/OverrideSetting.h"
-#include "minecraft/MinecraftVersionList.h"
#include "FileSystem.h"
#include "Commandline.h"
diff --git a/api/logic/BaseVersionList.cpp b/api/logic/BaseVersionList.cpp
index 5ad4df3c..8b424c11 100644
--- a/api/logic/BaseVersionList.cpp
+++ b/api/logic/BaseVersionList.cpp
@@ -30,7 +30,7 @@ BaseVersionPtr BaseVersionList::findVersion(const QString &descriptor)
return BaseVersionPtr();
}
-BaseVersionPtr BaseVersionList::getLatestStable() const
+BaseVersionPtr BaseVersionList::getRecommended() const
{
if (count() <= 0)
return BaseVersionPtr();
@@ -38,11 +38,6 @@ BaseVersionPtr BaseVersionList::getLatestStable() const
return at(0);
}
-BaseVersionPtr BaseVersionList::getRecommended() const
-{
- return getLatestStable();
-}
-
QVariant BaseVersionList::data(const QModelIndex &index, int role) const
{
if (!index.isValid())
@@ -93,7 +88,7 @@ QHash<int, QByteArray> BaseVersionList::roleNames() const
QHash<int, QByteArray> roles = QAbstractListModel::roleNames();
roles.insert(VersionRole, "version");
roles.insert(VersionIdRole, "versionId");
- roles.insert(ParentGameVersionRole, "parentGameVersion");
+ roles.insert(ParentVersionRole, "parentGameVersion");
roles.insert(RecommendedRole, "recommended");
roles.insert(LatestRole, "latest");
roles.insert(TypeRole, "type");
diff --git a/api/logic/BaseVersionList.h b/api/logic/BaseVersionList.h
index eadc6933..655bbd43 100644
--- a/api/logic/BaseVersionList.h
+++ b/api/logic/BaseVersionList.h
@@ -22,6 +22,7 @@
#include "BaseVersion.h"
#include "tasks/Task.h"
#include "multimc_logic_export.h"
+#include "QObjectPtr.h"
/*!
* \brief Class that each instance type's version list derives from.
@@ -44,7 +45,7 @@ public:
VersionPointerRole = Qt::UserRole,
VersionRole,
VersionIdRole,
- ParentGameVersionRole,
+ ParentVersionRole,
RecommendedRole,
LatestRole,
TypeRole,
@@ -63,7 +64,7 @@ public:
* The task returned by this function should reset the model when it's done.
* \return A pointer to a task that reloads the version list.
*/
- virtual Task *getLoadTask() = 0;
+ virtual shared_qobject_ptr<Task> getLoadTask() = 0;
//! Checks whether or not the list is loaded. If this returns false, the list should be
//loaded.
@@ -76,28 +77,23 @@ public:
virtual int count() const = 0;
//////// List Model Functions ////////
- virtual QVariant data(const QModelIndex &index, int role) const;
- virtual int rowCount(const QModelIndex &parent) const;
- virtual int columnCount(const QModelIndex &parent) const;
- virtual QHash<int, QByteArray> roleNames() const override;
+ QVariant data(const QModelIndex &index, int role) const override;
+ int rowCount(const QModelIndex &parent) const override;
+ int columnCount(const QModelIndex &parent) const override;
+ virtual QHash<int, QByteArray> roleNames() const;
//! which roles are provided by this version list?
virtual RoleList providesRoles() const;
/*!
* \brief Finds a version by its descriptor.
- * \param The descriptor of the version to find.
+ * \param descriptor The descriptor of the version to find.
* \return A const pointer to the version with the given descriptor. NULL if
* one doesn't exist.
*/
virtual BaseVersionPtr findVersion(const QString &descriptor);
<