diff options
Diffstat (limited to 'MultiMC.cpp')
-rw-r--r-- | MultiMC.cpp | 35 |
1 files changed, 33 insertions, 2 deletions
diff --git a/MultiMC.cpp b/MultiMC.cpp index 6c5c4db6..f6e4e995 100644 --- a/MultiMC.cpp +++ b/MultiMC.cpp @@ -16,6 +16,7 @@ #include "logic/lists/LwjglVersionList.h" #include "logic/lists/MinecraftVersionList.h" #include "logic/lists/ForgeVersionList.h" +#include "logic/lists/LiteLoaderVersionList.h" #include "logic/news/NewsChecker.h" @@ -30,6 +31,10 @@ #include "logic/updater/UpdateChecker.h" #include "logic/updater/NotificationChecker.h" +#include "logic/tools/JProfiler.h" +#include "logic/tools/JVisualVM.h" +#include "logic/tools/MCEditTool.h" + #include "pathutils.h" #include "cmdutils.h" #include <inisettingsobject.h> @@ -45,8 +50,9 @@ static const int APPDATA_BUFFER_SIZE = 1024; using namespace Util::Commandline; MultiMC::MultiMC(int &argc, char **argv, bool root_override) - : QApplication(argc, argv), m_version{VERSION_MAJOR, VERSION_MINOR, VERSION_HOTFIX, - VERSION_BUILD, MultiMCVersion::VERSION_TYPE, VERSION_CHANNEL, BUILD_PLATFORM} + : QApplication(argc, argv), + m_version{VERSION_MAJOR, VERSION_MINOR, VERSION_HOTFIX, VERSION_BUILD, + MultiMCVersion::VERSION_TYPE, VERSION_CHANNEL, BUILD_PLATFORM} { setOrganizationName("MultiMC"); setApplicationName("MultiMC5"); @@ -215,6 +221,21 @@ MultiMC::MultiMC(int &argc, char **argv, bool root_override) // init proxy settings updateProxySettings(); + m_profilers.insert("jprofiler", + std::shared_ptr<BaseProfilerFactory>(new JProfilerFactory())); + m_profilers.insert("jvisualvm", + std::shared_ptr<BaseProfilerFactory>(new JVisualVMFactory())); + for (auto profiler : m_profilers.values()) + { + profiler->registerSettings(m_settings.get()); + } + m_tools.insert("mcedit", + std::shared_ptr<BaseDetachedToolFactory>(new MCEditFactory())); + for (auto tool : m_tools.values()) + { + tool->registerSettings(m_settings.get()); + } + // launch instance, if that's what should be done // WARNING: disabled until further notice /* @@ -449,6 +470,7 @@ void MultiMC::initHttpMetaCache() m_metacache->addBase("versions", QDir("versions").absolutePath()); m_metacache->addBase("libraries", QDir("libraries").absolutePath()); m_metacache->addBase("minecraftforge", QDir("mods/minecraftforge").absolutePath()); + m_metacache->addBase("liteloader", QDir("mods/liteloader").absolutePath()); m_metacache->addBase("skins", QDir("accounts/skins").absolutePath()); m_metacache->addBase("root", QDir(root()).absolutePath()); m_metacache->Load(); @@ -549,6 +571,15 @@ std::shared_ptr<ForgeVersionList> MultiMC::forgelist() return m_forgelist; } +std::shared_ptr<LiteLoaderVersionList> MultiMC::liteloaderlist() +{ + if (!m_liteloaderlist) + { + m_liteloaderlist.reset(new LiteLoaderVersionList()); + } + return m_liteloaderlist; +} + std::shared_ptr<MinecraftVersionList> MultiMC::minecraftlist() { if (!m_minecraftlist) |