Reorganize logic code.
This commit is contained in:
		
							
								
								
									
										105
									
								
								CMakeLists.txt
									
									
									
									
									
								
							
							
						
						
									
										105
									
								
								CMakeLists.txt
									
									
									
									
									
								
							| @@ -359,17 +359,13 @@ SET(MULTIMC_SOURCES | |||||||
| 	gui/groupview/InstanceDelegate.cpp | 	gui/groupview/InstanceDelegate.cpp | ||||||
| 	gui/groupview/InstanceDelegate.h | 	gui/groupview/InstanceDelegate.h | ||||||
|  |  | ||||||
| 	# Base classes and infrastructure | 	# LOGIC - Base classes and infrastructure | ||||||
| 	logic/BaseVersion.h | 	logic/BaseVersion.h | ||||||
| 	logic/MinecraftVersion.h |  | ||||||
| 	logic/InstanceFactory.h | 	logic/InstanceFactory.h | ||||||
| 	logic/InstanceFactory.cpp | 	logic/InstanceFactory.cpp | ||||||
| 	logic/BaseInstance.h | 	logic/BaseInstance.h | ||||||
| 	logic/BaseInstance.cpp | 	logic/BaseInstance.cpp | ||||||
| 	logic/BaseInstance_p.h | 	logic/BaseInstance_p.h | ||||||
|  |  | ||||||
| 	logic/MinecraftProcess.h |  | ||||||
| 	logic/MinecraftProcess.cpp |  | ||||||
| 	logic/Mod.h | 	logic/Mod.h | ||||||
| 	logic/Mod.cpp | 	logic/Mod.cpp | ||||||
| 	logic/ModList.h | 	logic/ModList.h | ||||||
| @@ -379,9 +375,27 @@ SET(MULTIMC_SOURCES | |||||||
| 	logic/VersionFilterData.h | 	logic/VersionFilterData.h | ||||||
| 	logic/VersionFilterData.cpp | 	logic/VersionFilterData.cpp | ||||||
|  |  | ||||||
| 	# Basic instance launcher for starting from terminal | 	# Instance launch | ||||||
| 	logic/InstanceLauncher.h | 	logic/InstanceLauncher.h | ||||||
| 	logic/InstanceLauncher.cpp | 	logic/InstanceLauncher.cpp | ||||||
|  | 	logic/MinecraftProcess.h | ||||||
|  | 	logic/MinecraftProcess.cpp | ||||||
|  |  | ||||||
|  | 	# URN parser/resolver | ||||||
|  | 	logic/URNResolver.cpp | ||||||
|  | 	logic/URNResolver.h | ||||||
|  |  | ||||||
|  | 	# Annoying nag screen logic | ||||||
|  | 	logic/NagUtils.h | ||||||
|  | 	logic/NagUtils.cpp | ||||||
|  |  | ||||||
|  | 	# Player skin utilities | ||||||
|  | 	logic/SkinUtils.h | ||||||
|  | 	logic/SkinUtils.cpp | ||||||
|  | 	 | ||||||
|  | 	# misc model filter | ||||||
|  | 	logic/EnabledItemFilter.h | ||||||
|  | 	logic/EnabledItemFilter.cpp | ||||||
|  |  | ||||||
| 	# JSON parsing helpers | 	# JSON parsing helpers | ||||||
| 	logic/MMCJson.h | 	logic/MMCJson.h | ||||||
| @@ -453,22 +467,34 @@ SET(MULTIMC_SOURCES | |||||||
| 	logic/OneSixInstance_p.h | 	logic/OneSixInstance_p.h | ||||||
|  |  | ||||||
| 	# OneSix version json infrastructure | 	# OneSix version json infrastructure | ||||||
| 	logic/OneSixVersionBuilder.h | 	logic/minecraft/MinecraftVersion.h | ||||||
| 	logic/OneSixVersionBuilder.cpp | 	logic/minecraft/OneSixVersionBuilder.h | ||||||
| 	logic/VersionFile.h | 	logic/minecraft/OneSixVersionBuilder.cpp | ||||||
| 	logic/VersionFile.cpp | 	logic/minecraft/VersionFile.h | ||||||
| 	logic/VersionFinal.h | 	logic/minecraft/VersionFile.cpp | ||||||
| 	logic/VersionFinal.cpp | 	logic/minecraft/VersionFinal.h | ||||||
| 	logic/OneSixLibrary.h | 	logic/minecraft/VersionFinal.cpp | ||||||
| 	logic/OneSixLibrary.cpp | 	logic/minecraft/OneSixLibrary.h | ||||||
| 	logic/OneSixRule.h | 	logic/minecraft/OneSixLibrary.cpp | ||||||
| 	logic/OneSixRule.cpp | 	logic/minecraft/OneSixRule.h | ||||||
| 	logic/OpSys.h | 	logic/minecraft/OneSixRule.cpp | ||||||
| 	logic/OpSys.cpp | 	logic/minecraft/MinecraftVersionList.h | ||||||
|  | 	logic/minecraft/MinecraftVersionList.cpp | ||||||
|  |  | ||||||
| 	# Mod installers | 	# Trivial operating system utilities | ||||||
|  | 	logic/minecraft/OpSys.h | ||||||
|  | 	logic/minecraft/OpSys.cpp | ||||||
|  |  | ||||||
|  | 	# Various base classes | ||||||
| 	logic/BaseInstaller.h | 	logic/BaseInstaller.h | ||||||
| 	logic/BaseInstaller.cpp | 	logic/BaseInstaller.cpp | ||||||
|  | 	logic/BaseVersionList.h | ||||||
|  | 	logic/BaseVersionList.cpp | ||||||
|  |  | ||||||
|  | 	logic/InstanceList.h | ||||||
|  | 	logic/InstanceList.cpp | ||||||
|  | 	logic/LwjglVersionList.h | ||||||
|  | 	logic/LwjglVersionList.cpp | ||||||
|  |  | ||||||
| 	# FTB | 	# FTB | ||||||
| 	logic/OneSixFTBInstance.h | 	logic/OneSixFTBInstance.h | ||||||
| @@ -476,18 +502,6 @@ SET(MULTIMC_SOURCES | |||||||
| 	logic/LegacyFTBInstance.h | 	logic/LegacyFTBInstance.h | ||||||
| 	logic/LegacyFTBInstance.cpp | 	logic/LegacyFTBInstance.cpp | ||||||
|  |  | ||||||
| 	# Lists |  | ||||||
| 	logic/lists/InstanceList.h |  | ||||||
| 	logic/lists/InstanceList.cpp |  | ||||||
| 	logic/lists/BaseVersionList.h |  | ||||||
| 	logic/lists/BaseVersionList.cpp |  | ||||||
| 	logic/lists/MinecraftVersionList.h |  | ||||||
| 	logic/lists/MinecraftVersionList.cpp |  | ||||||
| 	logic/lists/LwjglVersionList.h |  | ||||||
| 	logic/lists/LwjglVersionList.cpp |  | ||||||
| 	logic/lists/JavaVersionList.h |  | ||||||
| 	logic/lists/JavaVersionList.cpp |  | ||||||
|  |  | ||||||
| 	# the screenshots feature | 	# the screenshots feature | ||||||
| 	logic/screenshots/Screenshot.h | 	logic/screenshots/Screenshot.h | ||||||
| 	logic/screenshots/Screenshot.cpp | 	logic/screenshots/Screenshot.cpp | ||||||
| @@ -504,11 +518,6 @@ SET(MULTIMC_SOURCES | |||||||
| 	logic/icons/IconList.h | 	logic/icons/IconList.h | ||||||
| 	logic/icons/IconList.cpp | 	logic/icons/IconList.cpp | ||||||
|  |  | ||||||
|  |  | ||||||
| 	# misc model/view |  | ||||||
| 	logic/EnabledItemFilter.h |  | ||||||
| 	logic/EnabledItemFilter.cpp |  | ||||||
|  |  | ||||||
| 	# Tasks | 	# Tasks | ||||||
| 	logic/tasks/ProgressProvider.h | 	logic/tasks/ProgressProvider.h | ||||||
| 	logic/tasks/Task.h | 	logic/tasks/Task.h | ||||||
| @@ -518,17 +527,15 @@ SET(MULTIMC_SOURCES | |||||||
| 	logic/tasks/SequentialTask.h | 	logic/tasks/SequentialTask.h | ||||||
| 	logic/tasks/SequentialTask.cpp | 	logic/tasks/SequentialTask.cpp | ||||||
|  |  | ||||||
| 	# Utilities | 	# Java related code | ||||||
| 	logic/JavaChecker.h | 	logic/java/JavaChecker.h | ||||||
| 	logic/JavaChecker.cpp | 	logic/java/JavaChecker.cpp | ||||||
| 	logic/JavaUtils.h | 	logic/java/JavaUtils.h | ||||||
| 	logic/JavaUtils.cpp | 	logic/java/JavaUtils.cpp | ||||||
| 	logic/NagUtils.h | 	logic/java/JavaVersionList.h | ||||||
| 	logic/NagUtils.cpp | 	logic/java/JavaVersionList.cpp | ||||||
| 	logic/SkinUtils.h | 	logic/java/JavaCheckerJob.h | ||||||
| 	logic/SkinUtils.cpp | 	logic/java/JavaCheckerJob.cpp | ||||||
| 	logic/JavaCheckerJob.h |  | ||||||
| 	logic/JavaCheckerJob.cpp |  | ||||||
|  |  | ||||||
| 	# Assets | 	# Assets | ||||||
| 	logic/assets/AssetsMigrateTask.h | 	logic/assets/AssetsMigrateTask.h | ||||||
| @@ -568,10 +575,6 @@ SET(MULTIMC_SOURCES | |||||||
| 	logic/liteloader/LiteLoaderInstaller.cpp | 	logic/liteloader/LiteLoaderInstaller.cpp | ||||||
| 	logic/liteloader/LiteLoaderVersionList.h | 	logic/liteloader/LiteLoaderVersionList.h | ||||||
| 	logic/liteloader/LiteLoaderVersionList.cpp | 	logic/liteloader/LiteLoaderVersionList.cpp | ||||||
| 	 |  | ||||||
| 	# MultiMC URN resolver |  | ||||||
| 	logic/URNResolver.cpp |  | ||||||
| 	logic/URNResolver.h |  | ||||||
| ) | ) | ||||||
|  |  | ||||||
|  |  | ||||||
|   | |||||||
| @@ -12,11 +12,11 @@ | |||||||
| #include <QDesktopServices> | #include <QDesktopServices> | ||||||
|  |  | ||||||
| #include "gui/dialogs/VersionSelectDialog.h" | #include "gui/dialogs/VersionSelectDialog.h" | ||||||
| #include "logic/lists/InstanceList.h" | #include "logic/InstanceList.h" | ||||||
| #include "logic/auth/MojangAccountList.h" | #include "logic/auth/MojangAccountList.h" | ||||||
| #include "logic/icons/IconList.h" | #include "logic/icons/IconList.h" | ||||||
| #include "logic/lists/LwjglVersionList.h" | #include "logic/LwjglVersionList.h" | ||||||
| #include "logic/lists/MinecraftVersionList.h" | #include "logic/minecraft/MinecraftVersionList.h" | ||||||
| #include "logic/liteloader/LiteLoaderVersionList.h" | #include "logic/liteloader/LiteLoaderVersionList.h" | ||||||
|  |  | ||||||
| #include "logic/forge/ForgeVersionList.h" | #include "logic/forge/ForgeVersionList.h" | ||||||
| @@ -29,7 +29,7 @@ | |||||||
| #include "logic/net/HttpMetaCache.h" | #include "logic/net/HttpMetaCache.h" | ||||||
| #include "logic/net/URLConstants.h" | #include "logic/net/URLConstants.h" | ||||||
|  |  | ||||||
| #include "logic/JavaUtils.h" | #include "logic/java/JavaUtils.h" | ||||||
|  |  | ||||||
| #include "logic/updater/UpdateChecker.h" | #include "logic/updater/UpdateChecker.h" | ||||||
| #include "logic/updater/NotificationChecker.h" | #include "logic/updater/NotificationChecker.h" | ||||||
|   | |||||||
| @@ -69,11 +69,11 @@ | |||||||
|  |  | ||||||
| #include "gui/ConsoleWindow.h" | #include "gui/ConsoleWindow.h" | ||||||
|  |  | ||||||
| #include "logic/lists/InstanceList.h" | #include "logic/InstanceList.h" | ||||||
| #include "logic/lists/MinecraftVersionList.h" | #include "logic/minecraft/MinecraftVersionList.h" | ||||||
| #include "logic/lists/LwjglVersionList.h" | #include "logic/LwjglVersionList.h" | ||||||
| #include "logic/icons/IconList.h" | #include "logic/icons/IconList.h" | ||||||
| #include "logic/lists/JavaVersionList.h" | #include "logic/java/JavaVersionList.h" | ||||||
|  |  | ||||||
| #include "logic/auth/flows/AuthenticateTask.h" | #include "logic/auth/flows/AuthenticateTask.h" | ||||||
| #include "logic/auth/flows/RefreshTask.h" | #include "logic/auth/flows/RefreshTask.h" | ||||||
| @@ -91,7 +91,7 @@ | |||||||
| #include "logic/InstanceFactory.h" | #include "logic/InstanceFactory.h" | ||||||
| #include "logic/MinecraftProcess.h" | #include "logic/MinecraftProcess.h" | ||||||
| #include "logic/OneSixUpdate.h" | #include "logic/OneSixUpdate.h" | ||||||
| #include "logic/JavaUtils.h" | #include "logic/java/JavaUtils.h" | ||||||
| #include "logic/NagUtils.h" | #include "logic/NagUtils.h" | ||||||
| #include "logic/SkinUtils.h" | #include "logic/SkinUtils.h" | ||||||
|  |  | ||||||
|   | |||||||
| @@ -19,11 +19,10 @@ | |||||||
| #include <QProcess> | #include <QProcess> | ||||||
| #include <QTimer> | #include <QTimer> | ||||||
|  |  | ||||||
| #include "logic/lists/InstanceList.h" | #include "logic/InstanceList.h" | ||||||
| #include "logic/BaseInstance.h" | #include "logic/BaseInstance.h" | ||||||
|  |  | ||||||
| #include "logic/auth/MojangAccount.h" | #include "logic/auth/MojangAccount.h" | ||||||
| #include <logic/net/NetJob.h> | #include "logic/net/NetJob.h" | ||||||
|  |  | ||||||
| class QToolButton; | class QToolButton; | ||||||
| class LabeledToolButton; | class LabeledToolButton; | ||||||
|   | |||||||
| @@ -28,7 +28,6 @@ | |||||||
| #include "logic/InstanceFactory.h" | #include "logic/InstanceFactory.h" | ||||||
| #include "logic/BaseVersion.h" | #include "logic/BaseVersion.h" | ||||||
| #include "logic/icons/IconList.h" | #include "logic/icons/IconList.h" | ||||||
| #include "logic/lists/MinecraftVersionList.h" |  | ||||||
| #include "logic/tasks/Task.h" | #include "logic/tasks/Task.h" | ||||||
| #include "logic/BaseInstance.h" | #include "logic/BaseInstance.h" | ||||||
|  |  | ||||||
|   | |||||||
| @@ -34,13 +34,13 @@ | |||||||
| #include "InstanceSettings.h" | #include "InstanceSettings.h" | ||||||
|  |  | ||||||
| #include "logic/ModList.h" | #include "logic/ModList.h" | ||||||
| #include "logic/VersionFinal.h" | #include "logic/minecraft/VersionFinal.h" | ||||||
| #include "logic/EnabledItemFilter.h" | #include "logic/EnabledItemFilter.h" | ||||||
| #include "logic/forge/ForgeVersionList.h" | #include "logic/forge/ForgeVersionList.h" | ||||||
| #include "logic/forge/ForgeInstaller.h" | #include "logic/forge/ForgeInstaller.h" | ||||||
| #include "logic/liteloader/LiteLoaderVersionList.h" | #include "logic/liteloader/LiteLoaderVersionList.h" | ||||||
| #include "logic/liteloader/LiteLoaderInstaller.h" | #include "logic/liteloader/LiteLoaderInstaller.h" | ||||||
| #include "logic/OneSixVersionBuilder.h" | #include "logic/minecraft/OneSixVersionBuilder.h" | ||||||
| #include "logic/auth/MojangAccountList.h" | #include "logic/auth/MojangAccountList.h" | ||||||
|  |  | ||||||
| #include <QAbstractItemModel> | #include <QAbstractItemModel> | ||||||
|   | |||||||
| @@ -23,10 +23,11 @@ | |||||||
| #include "gui/Platform.h" | #include "gui/Platform.h" | ||||||
| #include "gui/dialogs/VersionSelectDialog.h" | #include "gui/dialogs/VersionSelectDialog.h" | ||||||
|  |  | ||||||
| #include "logic/JavaUtils.h" |  | ||||||
| #include "logic/NagUtils.h" | #include "logic/NagUtils.h" | ||||||
| #include "logic/lists/JavaVersionList.h" |  | ||||||
| #include "logic/JavaChecker.h" | #include "logic/java/JavaUtils.h" | ||||||
|  | #include "logic/java/JavaVersionList.h" | ||||||
|  | #include "logic/java/JavaChecker.h" | ||||||
|  |  | ||||||
| #include <QFileDialog> | #include <QFileDialog> | ||||||
| #include <QMessageBox> | #include <QMessageBox> | ||||||
|   | |||||||
| @@ -17,7 +17,7 @@ | |||||||
|  |  | ||||||
| #include <QDialog> | #include <QDialog> | ||||||
| #include "settingsobject.h" | #include "settingsobject.h" | ||||||
| #include "logic/JavaChecker.h" | #include "logic/java/JavaChecker.h" | ||||||
|  |  | ||||||
| namespace Ui | namespace Ui | ||||||
| { | { | ||||||
|   | |||||||
| @@ -18,7 +18,7 @@ | |||||||
| #include "ui_LwjglSelectDialog.h" | #include "ui_LwjglSelectDialog.h" | ||||||
| #include "gui/Platform.h" | #include "gui/Platform.h" | ||||||
|  |  | ||||||
| #include "logic/lists/LwjglVersionList.h" | #include "logic/LwjglVersionList.h" | ||||||
|  |  | ||||||
| LWJGLSelectDialog::LWJGLSelectDialog(QWidget *parent) | LWJGLSelectDialog::LWJGLSelectDialog(QWidget *parent) | ||||||
| 	: QDialog(parent), ui(new Ui::LWJGLSelectDialog) | 	: QDialog(parent), ui(new Ui::LWJGLSelectDialog) | ||||||
|   | |||||||
| @@ -20,7 +20,7 @@ | |||||||
| #include "logic/InstanceFactory.h" | #include "logic/InstanceFactory.h" | ||||||
| #include "logic/BaseVersion.h" | #include "logic/BaseVersion.h" | ||||||
| #include "logic/icons/IconList.h" | #include "logic/icons/IconList.h" | ||||||
| #include "logic/lists/MinecraftVersionList.h" | #include "logic/minecraft/MinecraftVersionList.h" | ||||||
| #include "logic/tasks/Task.h" | #include "logic/tasks/Task.h" | ||||||
|  |  | ||||||
| #include "gui/Platform.h" | #include "gui/Platform.h" | ||||||
|   | |||||||
| @@ -22,10 +22,11 @@ | |||||||
| #include "gui/dialogs/VersionSelectDialog.h" | #include "gui/dialogs/VersionSelectDialog.h" | ||||||
| #include "gui/dialogs/CustomMessageBox.h" | #include "gui/dialogs/CustomMessageBox.h" | ||||||
|  |  | ||||||
| #include "logic/JavaUtils.h" |  | ||||||
| #include "logic/NagUtils.h" | #include "logic/NagUtils.h" | ||||||
| #include "logic/lists/JavaVersionList.h" |  | ||||||
| #include <logic/JavaChecker.h> | #include "logic/java/JavaUtils.h" | ||||||
|  | #include "logic/java/JavaVersionList.h" | ||||||
|  | #include "logic/java/JavaChecker.h" | ||||||
|  |  | ||||||
| #include "logic/updater/UpdateChecker.h" | #include "logic/updater/UpdateChecker.h" | ||||||
|  |  | ||||||
|   | |||||||
| @@ -18,7 +18,7 @@ | |||||||
| #include <memory> | #include <memory> | ||||||
| #include <QDialog> | #include <QDialog> | ||||||
|  |  | ||||||
| #include "logic/JavaChecker.h" | #include "logic/java/JavaChecker.h" | ||||||
|  |  | ||||||
| class SettingsObject; | class SettingsObject; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -24,7 +24,7 @@ | |||||||
| #include "gui/Platform.h" | #include "gui/Platform.h" | ||||||
|  |  | ||||||
| #include <logic/BaseVersion.h> | #include <logic/BaseVersion.h> | ||||||
| #include <logic/lists/BaseVersionList.h> | #include <logic/BaseVersionList.h> | ||||||
| #include <logic/tasks/Task.h> | #include <logic/tasks/Task.h> | ||||||
|  |  | ||||||
| VersionSelectDialog::VersionSelectDialog(BaseVersionList *vlist, QString title, QWidget *parent, | VersionSelectDialog::VersionSelectDialog(BaseVersionList *vlist, QString title, QWidget *parent, | ||||||
|   | |||||||
| @@ -22,7 +22,7 @@ | |||||||
|  |  | ||||||
| #include "GroupView.h" | #include "GroupView.h" | ||||||
| #include "logic/BaseInstance.h" | #include "logic/BaseInstance.h" | ||||||
| #include "logic/lists/InstanceList.h" | #include "logic/InstanceList.h" | ||||||
|  |  | ||||||
| QCache<QString, QPixmap> ListViewDelegate::m_pixmapCache; | QCache<QString, QPixmap> ListViewDelegate::m_pixmapCache; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -13,15 +13,10 @@ | |||||||
|  * limitations under the License. |  * limitations under the License. | ||||||
|  */ |  */ | ||||||
|  |  | ||||||
| #include "BaseInstaller.h" |  | ||||||
|  |  | ||||||
| #include <QFile> | #include <QFile> | ||||||
|  |  | ||||||
| #include "VersionFinal.h" | #include "logic/BaseInstaller.h" | ||||||
| #include "OneSixLibrary.h" | #include "logic/OneSixInstance.h" | ||||||
| #include "OneSixInstance.h" |  | ||||||
|  |  | ||||||
| #include "cmdutils.h" |  | ||||||
|  |  | ||||||
| BaseInstaller::BaseInstaller() | BaseInstaller::BaseInstaller() | ||||||
| { | { | ||||||
|   | |||||||
| @@ -27,7 +27,7 @@ | |||||||
|  |  | ||||||
| #include "pathutils.h" | #include "pathutils.h" | ||||||
| #include <cmdutils.h> | #include <cmdutils.h> | ||||||
| #include "lists/MinecraftVersionList.h" | #include "logic/minecraft/MinecraftVersionList.h" | ||||||
| #include "logic/icons/IconList.h" | #include "logic/icons/IconList.h" | ||||||
|  |  | ||||||
| BaseInstance::BaseInstance(BaseInstancePrivate *d_in, const QString &rootDir, | BaseInstance::BaseInstance(BaseInstancePrivate *d_in, const QString &rootDir, | ||||||
|   | |||||||
| @@ -22,7 +22,7 @@ | |||||||
| #include <settingsobject.h> | #include <settingsobject.h> | ||||||
|  |  | ||||||
| #include "inifile.h" | #include "inifile.h" | ||||||
| #include "lists/BaseVersionList.h" | #include "logic/BaseVersionList.h" | ||||||
| #include "logic/auth/MojangAccount.h" | #include "logic/auth/MojangAccount.h" | ||||||
|  |  | ||||||
| class QDialog; | class QDialog; | ||||||
|   | |||||||
| @@ -13,7 +13,7 @@ | |||||||
|  * limitations under the License. |  * limitations under the License. | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| #include "logic/lists/BaseVersionList.h" | #include "logic/BaseVersionList.h" | ||||||
| #include "logic/BaseVersion.h" | #include "logic/BaseVersion.h" | ||||||
| 
 | 
 | ||||||
| BaseVersionList::BaseVersionList(QObject *parent) : QAbstractListModel(parent) | BaseVersionList::BaseVersionList(QObject *parent) : QAbstractListModel(parent) | ||||||
| @@ -13,27 +13,26 @@ | |||||||
|  * limitations under the License. |  * limitations under the License. | ||||||
|  */ |  */ | ||||||
|  |  | ||||||
| #include "InstanceFactory.h" |  | ||||||
|  |  | ||||||
| #include <QDir> | #include <QDir> | ||||||
| #include <QFileInfo> | #include <QFileInfo> | ||||||
|  | #include <inifile.h> | ||||||
| #include "BaseInstance.h" |  | ||||||
| #include "LegacyInstance.h" |  | ||||||
| #include "LegacyFTBInstance.h" |  | ||||||
| #include "OneSixInstance.h" |  | ||||||
| #include "OneSixFTBInstance.h" |  | ||||||
| #include "OneSixInstance.h" |  | ||||||
| #include "BaseVersion.h" |  | ||||||
| #include "MinecraftVersion.h" |  | ||||||
|  |  | ||||||
| #include "inifile.h" |  | ||||||
| #include <inisettingsobject.h> | #include <inisettingsobject.h> | ||||||
| #include <setting.h> | #include <setting.h> | ||||||
|  |  | ||||||
| #include "pathutils.h" | #include <pathutils.h> | ||||||
| #include "logger/QsLog.h" | #include "logger/QsLog.h" | ||||||
|  |  | ||||||
|  | #include "logic/InstanceFactory.h" | ||||||
|  |  | ||||||
|  | #include "logic/BaseInstance.h" | ||||||
|  | #include "logic/LegacyInstance.h" | ||||||
|  | #include "logic/LegacyFTBInstance.h" | ||||||
|  | #include "logic/OneSixInstance.h" | ||||||
|  | #include "logic/OneSixFTBInstance.h" | ||||||
|  | #include "logic/OneSixInstance.h" | ||||||
|  | #include "logic/BaseVersion.h" | ||||||
|  | #include "logic/minecraft/MinecraftVersion.h" | ||||||
|  |  | ||||||
| InstanceFactory InstanceFactory::loader; | InstanceFactory InstanceFactory::loader; | ||||||
|  |  | ||||||
| InstanceFactory::InstanceFactory() : QObject(NULL) | InstanceFactory::InstanceFactory() : QObject(NULL) | ||||||
|   | |||||||
| @@ -22,7 +22,7 @@ | |||||||
| #include "gui/dialogs/ProgressDialog.h" | #include "gui/dialogs/ProgressDialog.h" | ||||||
|  |  | ||||||
| #include "logic/MinecraftProcess.h" | #include "logic/MinecraftProcess.h" | ||||||
| #include "logic/lists/InstanceList.h" | #include "logic/InstanceList.h" | ||||||
|  |  | ||||||
| InstanceLauncher::InstanceLauncher(QString instId) : QObject(), instId(instId) | InstanceLauncher::InstanceLauncher(QString instId) : QObject(), instId(instId) | ||||||
| { | { | ||||||
|   | |||||||
| @@ -27,13 +27,13 @@ | |||||||
| #include <pathutils.h> | #include <pathutils.h> | ||||||
| 
 | 
 | ||||||
| #include "MultiMC.h" | #include "MultiMC.h" | ||||||
| #include "logic/lists/InstanceList.h" | #include "logic/InstanceList.h" | ||||||
| #include "logic/icons/IconList.h" | #include "logic/icons/IconList.h" | ||||||
| #include "logic/lists/MinecraftVersionList.h" | #include "logic/minecraft/MinecraftVersionList.h" | ||||||
| #include "logic/BaseInstance.h" | #include "logic/BaseInstance.h" | ||||||
| #include "logic/InstanceFactory.h" | #include "logic/InstanceFactory.h" | ||||||
| #include "logger/QsLog.h" | #include "logger/QsLog.h" | ||||||
| #include <gui/groupview/GroupView.h> | #include "gui/groupview/GroupView.h" | ||||||
| 
 | 
 | ||||||
| const static int GROUP_FILE_FORMAT_VERSION = 1; | const static int GROUP_FILE_FORMAT_VERSION = 1; | ||||||
| 
 | 
 | ||||||
| @@ -13,20 +13,24 @@ | |||||||
|  * limitations under the License. |  * limitations under the License. | ||||||
|  */ |  */ | ||||||
|  |  | ||||||
| #include "LegacyUpdate.h" | #include <QStringList> | ||||||
| #include "lists/LwjglVersionList.h" |  | ||||||
| #include "lists/MinecraftVersionList.h" |  | ||||||
| #include "BaseInstance.h" |  | ||||||
| #include "LegacyInstance.h" |  | ||||||
| #include "MultiMC.h" |  | ||||||
| #include "ModList.h" |  | ||||||
| #include <pathutils.h> | #include <pathutils.h> | ||||||
| #include <quazip.h> | #include <quazip.h> | ||||||
| #include <quazipfile.h> | #include <quazipfile.h> | ||||||
| #include <JlCompress.h> | #include <JlCompress.h> | ||||||
|  |  | ||||||
|  | #include "logic/LegacyUpdate.h" | ||||||
|  | #include "logic/LwjglVersionList.h" | ||||||
|  | #include "logic/minecraft/MinecraftVersionList.h" | ||||||
|  | #include "logic/BaseInstance.h" | ||||||
|  | #include "logic/LegacyInstance.h" | ||||||
|  | #include "MultiMC.h" | ||||||
|  | #include "logic/ModList.h" | ||||||
|  |  | ||||||
| #include "logger/QsLog.h" | #include "logger/QsLog.h" | ||||||
| #include "logic/net/URLConstants.h" | #include "logic/net/URLConstants.h" | ||||||
| #include <QStringList> |  | ||||||
|  |  | ||||||
| LegacyUpdate::LegacyUpdate(BaseInstance *inst, QObject *parent) : Task(parent), m_inst(inst) | LegacyUpdate::LegacyUpdate(BaseInstance *inst, QObject *parent) : Task(parent), m_inst(inst) | ||||||
| { | { | ||||||
|   | |||||||
| @@ -1,12 +1,12 @@ | |||||||
| #include "OneSixFTBInstance.h" | #include "OneSixFTBInstance.h" | ||||||
|  |  | ||||||
| #include "VersionFinal.h" | #include "logic/minecraft/VersionFinal.h" | ||||||
| #include "OneSixLibrary.h" | #include "logic/minecraft/OneSixLibrary.h" | ||||||
|  | #include "logic/minecraft/OneSixVersionBuilder.h" | ||||||
| #include "tasks/SequentialTask.h" | #include "tasks/SequentialTask.h" | ||||||
| #include "forge/ForgeInstaller.h" | #include "forge/ForgeInstaller.h" | ||||||
| #include "forge/ForgeVersionList.h" | #include "forge/ForgeVersionList.h" | ||||||
| #include "OneSixInstance_p.h" | #include "OneSixInstance_p.h" | ||||||
| #include "OneSixVersionBuilder.h" |  | ||||||
| #include "MultiMC.h" | #include "MultiMC.h" | ||||||
| #include "pathutils.h" | #include "pathutils.h" | ||||||
|  |  | ||||||
|   | |||||||
| @@ -13,21 +13,22 @@ | |||||||
|  * limitations under the License. |  * limitations under the License. | ||||||
|  */ |  */ | ||||||
|  |  | ||||||
| #include "OneSixInstance.h" |  | ||||||
|  |  | ||||||
| #include <QIcon> | #include <QIcon> | ||||||
|  | #include <pathutils.h> | ||||||
| #include "OneSixInstance_p.h" |  | ||||||
| #include "OneSixUpdate.h" |  | ||||||
| #include "VersionFinal.h" |  | ||||||
| #include "pathutils.h" |  | ||||||
| #include "logger/QsLog.h" | #include "logger/QsLog.h" | ||||||
| #include "assets/AssetsUtils.h" |  | ||||||
| #include "MultiMC.h" | #include "MultiMC.h" | ||||||
|  | #include "MMCError.h" | ||||||
|  |  | ||||||
|  | #include "logic/OneSixInstance.h" | ||||||
|  |  | ||||||
|  | #include "logic/OneSixInstance_p.h" | ||||||
|  | #include "logic/OneSixUpdate.h" | ||||||
|  | #include "logic/minecraft/VersionFinal.h" | ||||||
|  |  | ||||||
|  | #include "logic/assets/AssetsUtils.h" | ||||||
| #include "icons/IconList.h" | #include "icons/IconList.h" | ||||||
| #include "MinecraftProcess.h" | #include "logic/MinecraftProcess.h" | ||||||
| #include "gui/dialogs/InstanceEditDialog.h" | #include "gui/dialogs/InstanceEditDialog.h" | ||||||
| #include <MMCError.h> |  | ||||||
|  |  | ||||||
| OneSixInstance::OneSixInstance(const QString &rootDir, SettingsObject *settings, | OneSixInstance::OneSixInstance(const QString &rootDir, SettingsObject *settings, | ||||||
| 							   QObject *parent) | 							   QObject *parent) | ||||||
|   | |||||||
| @@ -17,8 +17,8 @@ | |||||||
|  |  | ||||||
| #include "BaseInstance.h" | #include "BaseInstance.h" | ||||||
|  |  | ||||||
| #include "VersionFinal.h" | #include "logic/minecraft/VersionFinal.h" | ||||||
| #include "ModList.h" | #include "logic/ModList.h" | ||||||
|  |  | ||||||
| class OneSixInstance : public BaseInstance | class OneSixInstance : public BaseInstance | ||||||
| { | { | ||||||
|   | |||||||
| @@ -15,9 +15,10 @@ | |||||||
|  |  | ||||||
| #pragma once | #pragma once | ||||||
|  |  | ||||||
| #include "BaseInstance_p.h" | #include "logic/BaseInstance_p.h" | ||||||
| #include "VersionFinal.h" |  | ||||||
| #include "ModList.h" | class ModList; | ||||||
|  | class VersionFinal; | ||||||
|  |  | ||||||
| class OneSixInstancePrivate : public BaseInstancePrivate | class OneSixInstancePrivate : public BaseInstancePrivate | ||||||
| { | { | ||||||
|   | |||||||
| @@ -22,19 +22,18 @@ | |||||||
| #include <QFileInfo> | #include <QFileInfo> | ||||||
| #include <QTextStream> | #include <QTextStream> | ||||||
| #include <QDataStream> | #include <QDataStream> | ||||||
|  | #include <pathutils.h> | ||||||
| #include "BaseInstance.h" |  | ||||||
| #include "lists/MinecraftVersionList.h" |  | ||||||
| #include "VersionFinal.h" |  | ||||||
| #include "OneSixLibrary.h" |  | ||||||
| #include "OneSixInstance.h" |  | ||||||
| #include "logic/forge/ForgeMirrors.h" |  | ||||||
| #include "net/URLConstants.h" |  | ||||||
| #include "assets/AssetsUtils.h" |  | ||||||
|  |  | ||||||
| #include "pathutils.h" |  | ||||||
| #include <JlCompress.h> | #include <JlCompress.h> | ||||||
|  |  | ||||||
|  | #include "logic/BaseInstance.h" | ||||||
|  | #include "logic/minecraft/MinecraftVersionList.h" | ||||||
|  | #include "logic/minecraft/VersionFinal.h" | ||||||
|  | #include "logic/minecraft/OneSixLibrary.h" | ||||||
|  | #include "logic/OneSixInstance.h" | ||||||
|  | #include "logic/forge/ForgeMirrors.h" | ||||||
|  | #include "logic/net/URLConstants.h" | ||||||
|  | #include "logic/assets/AssetsUtils.h" | ||||||
|  |  | ||||||
| OneSixUpdate::OneSixUpdate(OneSixInstance *inst, QObject *parent) | OneSixUpdate::OneSixUpdate(OneSixInstance *inst, QObject *parent) | ||||||
| 	: Task(parent), m_inst(inst) | 	: Task(parent), m_inst(inst) | ||||||
| { | { | ||||||
|   | |||||||
| @@ -14,8 +14,8 @@ | |||||||
|  */ |  */ | ||||||
|  |  | ||||||
| #include "ForgeInstaller.h" | #include "ForgeInstaller.h" | ||||||
| #include "logic/VersionFinal.h" | #include "logic/minecraft/VersionFinal.h" | ||||||
| #include "logic/OneSixLibrary.h" | #include "logic/minecraft/OneSixLibrary.h" | ||||||
| #include "logic/net/HttpMetaCache.h" | #include "logic/net/HttpMetaCache.h" | ||||||
| #include "logic/tasks/Task.h" | #include "logic/tasks/Task.h" | ||||||
| #include "logic/OneSixInstance.h" | #include "logic/OneSixInstance.h" | ||||||
|   | |||||||
| @@ -20,7 +20,7 @@ | |||||||
| #include <QUrl> | #include <QUrl> | ||||||
| #include <QNetworkReply> | #include <QNetworkReply> | ||||||
|  |  | ||||||
| #include "logic/lists/BaseVersionList.h" | #include "logic/BaseVersionList.h" | ||||||
| #include "logic/tasks/Task.h" | #include "logic/tasks/Task.h" | ||||||
| #include "logic/net/NetJob.h" | #include "logic/net/NetJob.h" | ||||||
| #include "logic/forge/ForgeVersion.h" | #include "logic/forge/ForgeVersion.h" | ||||||
|   | |||||||
| @@ -16,7 +16,6 @@ | |||||||
| #include <QStringList> | #include <QStringList> | ||||||
| #include <QString> | #include <QString> | ||||||
| #include <QDir> | #include <QDir> | ||||||
| #include <QMessageBox> |  | ||||||
| #include <QStringList> | #include <QStringList> | ||||||
| 
 | 
 | ||||||
| #include <setting.h> | #include <setting.h> | ||||||
| @@ -24,11 +23,10 @@ | |||||||
| 
 | 
 | ||||||
| #include "MultiMC.h" | #include "MultiMC.h" | ||||||
| 
 | 
 | ||||||
| #include "JavaUtils.h" |  | ||||||
| #include "logger/QsLog.h" | #include "logger/QsLog.h" | ||||||
| #include "gui/dialogs/VersionSelectDialog.h" | #include "logic/java/JavaUtils.h" | ||||||
| #include "JavaCheckerJob.h" | #include "logic/java/JavaCheckerJob.h" | ||||||
| #include "lists/JavaVersionList.h" | #include "logic/java/JavaVersionList.h" | ||||||
| 
 | 
 | ||||||
| JavaUtils::JavaUtils() | JavaUtils::JavaUtils() | ||||||
| { | { | ||||||
| @@ -21,7 +21,7 @@ | |||||||
| #include <osutils.h> | #include <osutils.h> | ||||||
| #include "JavaCheckerJob.h" | #include "JavaCheckerJob.h" | ||||||
| #include "JavaChecker.h" | #include "JavaChecker.h" | ||||||
| #include "lists/JavaVersionList.h" | #include "JavaVersionList.h" | ||||||
| 
 | 
 | ||||||
| #if WINDOWS | #if WINDOWS | ||||||
| #include <windows.h> | #include <windows.h> | ||||||
| @@ -13,16 +13,16 @@ | |||||||
|  * limitations under the License. |  * limitations under the License. | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| #include "JavaVersionList.h" |  | ||||||
| #include "MultiMC.h" |  | ||||||
| 
 |  | ||||||
| #include <QtNetwork> | #include <QtNetwork> | ||||||
| #include <QtXml> | #include <QtXml> | ||||||
| #include <QRegExp> | #include <QRegExp> | ||||||
| 
 | 
 | ||||||
|  | #include "MultiMC.h" | ||||||
| #include "logger/QsLog.h" | #include "logger/QsLog.h" | ||||||
| #include "logic/JavaCheckerJob.h" | 
 | ||||||
| #include "logic/JavaUtils.h" | #include "logic/java/JavaVersionList.h" | ||||||
|  | #include "logic/java/JavaCheckerJob.h" | ||||||
|  | #include "logic/java/JavaUtils.h" | ||||||
| 
 | 
 | ||||||
| JavaVersionList::JavaVersionList(QObject *parent) : BaseVersionList(parent) | JavaVersionList::JavaVersionList(QObject *parent) : BaseVersionList(parent) | ||||||
| { | { | ||||||
| @@ -18,9 +18,9 @@ | |||||||
| #include <QObject> | #include <QObject> | ||||||
| #include <QAbstractListModel> | #include <QAbstractListModel> | ||||||
| 
 | 
 | ||||||
| #include "BaseVersionList.h" | #include "logic/BaseVersionList.h" | ||||||
| #include "logic/tasks/Task.h" | #include "logic/tasks/Task.h" | ||||||
| #include "logic/JavaCheckerJob.h" | #include "logic/java/JavaCheckerJob.h" | ||||||
| 
 | 
 | ||||||
| class JavaListLoadTask; | class JavaListLoadTask; | ||||||
| 
 | 
 | ||||||
| @@ -20,8 +20,8 @@ | |||||||
|  |  | ||||||
| #include "logger/QsLog.h" | #include "logger/QsLog.h" | ||||||
|  |  | ||||||
| #include "logic/VersionFinal.h" | #include "logic/minecraft/VersionFinal.h" | ||||||
| #include "logic/OneSixLibrary.h" | #include "logic/minecraft/OneSixLibrary.h" | ||||||
| #include "logic/OneSixInstance.h" | #include "logic/OneSixInstance.h" | ||||||
| #include "MultiMC.h" | #include "MultiMC.h" | ||||||
| #include "logic/liteloader/LiteLoaderVersionList.h" | #include "logic/liteloader/LiteLoaderVersionList.h" | ||||||
|   | |||||||
| @@ -19,9 +19,9 @@ | |||||||
|  |  | ||||||
| #include <QString> | #include <QString> | ||||||
| #include <QStringList> | #include <QStringList> | ||||||
| #include "logic/lists/BaseVersionList.h" |  | ||||||
| #include "logic/tasks/Task.h" |  | ||||||
| #include "logic/BaseVersion.h" | #include "logic/BaseVersion.h" | ||||||
|  | #include "logic/BaseVersionList.h" | ||||||
|  | #include "logic/tasks/Task.h" | ||||||
| #include "logic/net/NetJob.h" | #include "logic/net/NetJob.h" | ||||||
|  |  | ||||||
| class LLListLoadTask; | class LLListLoadTask; | ||||||
|   | |||||||
| @@ -15,7 +15,7 @@ | |||||||
| 
 | 
 | ||||||
| #pragma once | #pragma once | ||||||
| 
 | 
 | ||||||
| #include "BaseVersion.h" | #include "logic/BaseVersion.h" | ||||||
| #include <QStringList> | #include <QStringList> | ||||||
| #include <QSet> | #include <QSet> | ||||||
| 
 | 
 | ||||||
| @@ -19,9 +19,9 @@ | |||||||
| #include <QList> | #include <QList> | ||||||
| #include <QSet> | #include <QSet> | ||||||
| 
 | 
 | ||||||
| #include "BaseVersionList.h" | #include "logic/BaseVersionList.h" | ||||||
| #include "logic/tasks/Task.h" | #include "logic/tasks/Task.h" | ||||||
| #include "logic/MinecraftVersion.h" | #include "logic/minecraft/MinecraftVersion.h" | ||||||
| 
 | 
 | ||||||
| class MCVListLoadTask; | class MCVListLoadTask; | ||||||
| class QNetworkReply; | class QNetworkReply; | ||||||
| @@ -23,7 +23,7 @@ | |||||||
| #include <memory> | #include <memory> | ||||||
| 
 | 
 | ||||||
| #include "logic/net/URLConstants.h" | #include "logic/net/URLConstants.h" | ||||||
| #include "OpSys.h" | #include "logic/minecraft/OpSys.h" | ||||||
| 
 | 
 | ||||||
| class Rule; | class Rule; | ||||||
| 
 | 
 | ||||||
| @@ -17,7 +17,7 @@ | |||||||
| 
 | 
 | ||||||
| #include <QString> | #include <QString> | ||||||
| 
 | 
 | ||||||
| #include "logic/OneSixLibrary.h" | #include "logic/minecraft/OneSixLibrary.h" | ||||||
| 
 | 
 | ||||||
| enum RuleAction | enum RuleAction | ||||||
| { | { | ||||||
| @@ -13,8 +13,6 @@ | |||||||
|  * limitations under the License. |  * limitations under the License. | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| #include "OneSixVersionBuilder.h" |  | ||||||
| 
 |  | ||||||
| #include <QList> | #include <QList> | ||||||
| #include <QJsonObject> | #include <QJsonObject> | ||||||
| #include <QJsonArray> | #include <QJsonArray> | ||||||
| @@ -25,13 +23,16 @@ | |||||||
| #include <QObject> | #include <QObject> | ||||||
| #include <QDir> | #include <QDir> | ||||||
| #include <QDebug> | #include <QDebug> | ||||||
|  | #include <modutils.h> | ||||||
|  | 
 | ||||||
|  | #include "logic/minecraft/OneSixVersionBuilder.h" | ||||||
|  | #include "logic/minecraft/VersionFinal.h" | ||||||
|  | #include "logic/minecraft/OneSixRule.h" | ||||||
|  | #include "logic/minecraft/VersionFile.h" | ||||||
|  | 
 | ||||||
|  | #include "logic/OneSixInstance.h" | ||||||
|  | #include "logic/MMCJson.h" | ||||||
| 
 | 
 | ||||||
| #include "VersionFinal.h" |  | ||||||
| #include "OneSixInstance.h" |  | ||||||
| #include "OneSixRule.h" |  | ||||||
| #include "VersionFile.h" |  | ||||||
| #include "MMCJson.h" |  | ||||||
| #include "modutils.h" |  | ||||||
| #include "logger/QsLog.h" | #include "logger/QsLog.h" | ||||||
| 
 | 
 | ||||||
| OneSixVersionBuilder::OneSixVersionBuilder() | OneSixVersionBuilder::OneSixVersionBuilder() | ||||||
| @@ -1,13 +1,13 @@ | |||||||
| #include <QJsonArray> | #include <QJsonArray> | ||||||
| #include <QJsonDocument> | #include <QJsonDocument> | ||||||
| 
 |  | ||||||
| #include <modutils.h> | #include <modutils.h> | ||||||
| 
 | 
 | ||||||
| #include "logger/QsLog.h" | #include "logger/QsLog.h" | ||||||
| #include "logic/VersionFile.h" | 
 | ||||||
| #include "logic/OneSixLibrary.h" | #include "logic/minecraft/VersionFile.h" | ||||||
| #include "logic/VersionFinal.h" | #include "logic/minecraft/OneSixLibrary.h" | ||||||
| #include "MMCJson.h" | #include "logic/minecraft/VersionFinal.h" | ||||||
|  | #include "logic/MMCJson.h" | ||||||
| 
 | 
 | ||||||
| using namespace MMCJson; | using namespace MMCJson; | ||||||
| 
 | 
 | ||||||
| @@ -3,8 +3,8 @@ | |||||||
| #include <QString> | #include <QString> | ||||||
| #include <QStringList> | #include <QStringList> | ||||||
| #include <memory> | #include <memory> | ||||||
| #include "logic/OpSys.h" | #include "logic/minecraft/OpSys.h" | ||||||
| #include "logic/OneSixRule.h" | #include "logic/minecraft/OneSixRule.h" | ||||||
| #include "MMCError.h" | #include "MMCError.h" | ||||||
| 
 | 
 | ||||||
| class VersionFinal; | class VersionFinal; | ||||||
| @@ -13,17 +13,15 @@ | |||||||
|  * limitations under the License. |  * limitations under the License. | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| #include "VersionFinal.h" |  | ||||||
| 
 |  | ||||||
| #include <QDebug> | #include <QDebug> | ||||||
| #include <QFile> | #include <QFile> | ||||||
| #include <QDir> | #include <QDir> | ||||||
| 
 |  | ||||||
| #include "OneSixVersionBuilder.h" |  | ||||||
| #include "OneSixInstance.h" |  | ||||||
| #include "VersionFilterData.h" |  | ||||||
| #include <pathutils.h> | #include <pathutils.h> | ||||||
| 
 | 
 | ||||||
|  | #include "logic/minecraft/VersionFinal.h" | ||||||
|  | #include "logic/minecraft/OneSixVersionBuilder.h" | ||||||
|  | #include "logic/OneSixInstance.h" | ||||||
|  | 
 | ||||||
| VersionFinal::VersionFinal(OneSixInstance *instance, QObject *parent) | VersionFinal::VersionFinal(OneSixInstance *instance, QObject *parent) | ||||||
| 	: QAbstractListModel(parent), m_instance(instance) | 	: QAbstractListModel(parent), m_instance(instance) | ||||||
| { | { | ||||||
		Reference in New Issue
	
	Block a user