summaryrefslogtreecommitdiffstats
path: root/wonkoclient
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2017-03-10 23:34:03 +0100
committerPetr Mrázek <peterix@gmail.com>2017-04-07 00:20:01 +0200
commit1fbe03f982f130bf675b7f94dd9c06aee62da54f (patch)
treecbe08ea1debf18f10cc10cac77249b6e993c050f /wonkoclient
parent7382360771f78e351740393262358bed3297d44c (diff)
downloadMultiMC-1fbe03f982f130bf675b7f94dd9c06aee62da54f.tar
MultiMC-1fbe03f982f130bf675b7f94dd9c06aee62da54f.tar.gz
MultiMC-1fbe03f982f130bf675b7f94dd9c06aee62da54f.tar.lz
MultiMC-1fbe03f982f130bf675b7f94dd9c06aee62da54f.tar.xz
MultiMC-1fbe03f982f130bf675b7f94dd9c06aee62da54f.zip
NOISSUE remove unused wonkoclient
Diffstat (limited to 'wonkoclient')
-rw-r--r--wonkoclient/CMakeLists.txt10
-rw-r--r--wonkoclient/WonkoClient.cpp84
-rw-r--r--wonkoclient/WonkoClient.h36
-rw-r--r--wonkoclient/main.cpp29
4 files changed, 0 insertions, 159 deletions
diff --git a/wonkoclient/CMakeLists.txt b/wonkoclient/CMakeLists.txt
deleted file mode 100644
index 381857e0..00000000
--- a/wonkoclient/CMakeLists.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-project(wonkoclient)
-
-SET( SRC_FILES
-main.cpp
-WonkoClient.cpp
-WonkoClient.h
-)
-
-add_executable(MMCClient ${SRC_FILES})
-target_link_libraries(MMCClient MultiMC_logic)
diff --git a/wonkoclient/WonkoClient.cpp b/wonkoclient/WonkoClient.cpp
deleted file mode 100644
index a45939b3..00000000
--- a/wonkoclient/WonkoClient.cpp
+++ /dev/null
@@ -1,84 +0,0 @@
-//
-// Created by robotbrain on 3/27/16.
-//
-
-#include <minecraft/MinecraftVersionList.h>
-#include <Env.h>
-#include <minecraft/liteloader/LiteLoaderVersionList.h>
-#include <minecraft/forge/ForgeVersionList.h>
-#include <minecraft/legacy/LwjglVersionList.h>
-#include <java/JavaInstallList.h>
-#include <settings/INISettingsObject.h>
-#include "WonkoClient.h"
-
-WonkoClient &WonkoClient::getInstance() {
- static WonkoClient instance;
- return instance;
-}
-
-void WonkoClient::registerLists() {
- ENV.initHttpMetaCache();
- auto mcList = std::make_shared<MinecraftVersionList>();
- ENV.registerVersionList("net.minecraft", mcList);
- runTask(mcList->getLoadTask());
- auto llList = std::make_shared<LiteLoaderVersionList>();
- ENV.registerVersionList("com.mumfrey.liteloader", llList);
- runTask(llList->getLoadTask());
- auto forgeList = std::make_shared<ForgeVersionList>();
- ENV.registerVersionList("net.minecraftforge", forgeList);
- runTask(forgeList->getLoadTask());
- auto lwjglList = std::make_shared<LWJGLVersionList>();
- ENV.registerVersionList("org.lwjgl.legacy", lwjglList);
- runTask(lwjglList->getLoadTask());
- auto javaList = std::make_shared<JavaInstallList>();
- ENV.registerVersionList("com.java", javaList);
-}
-
-WonkoClient::WonkoClient() {
- m_settings.reset(new INISettingsObject("multimc.cfg", this));
- m_instanceList.reset(new InstanceList(m_settings, ".", this));
-}
-
-void WonkoClient::runTask(Task *pTask) {
- if (pTask == nullptr)
- return;
- QEventLoop loop;
- QObject::connect(pTask, &Task::finished, &loop, &QEventLoop::quit);
- pTask->start();
- loop.exec();
- delete pTask;
-}
-
-void WonkoClient::initGlobalSettings()
-{
- m_settings->registerSetting("ShowConsole", true);
- m_settings->registerSetting("AutoCloseConsole", true);
- m_settings->registerSetting("LogPrePostOutput", true);
- // Window Size
- m_settings->registerSetting({"LaunchMaximized", "MCWindowMaximize"}, false);
- m_settings->registerSetting({"MinecraftWinWidth", "MCWindowWidth"}, 854);
- m_settings->registerSetting({"MinecraftWinHeight", "MCWindowHeight"}, 480);
-
- // Memory
- m_settings->registerSetting({"MinMemAlloc", "MinMemoryAlloc"}, 512);
- m_settings->registerSetting({"MaxMemAlloc", "MaxMemoryAlloc"}, 1024);
- m_settings->registerSetting("PermGen", 128);
-
- // Java Settings
- m_settings->registerSetting("JavaPath", "");
- m_settings->registerSetting("JavaTimestamp", 0);
- m_settings->registerSetting("JavaArchitecture", "");
- m_settings->registerSetting("JavaVersion", "");
- m_settings->registerSetting("LastHostname", "");
- m_settings->registerSetting("JvmArgs", "");
-
- // Wrapper command for launch
- m_settings->registerSetting("WrapperCommand", "");
-
- // Custom Commands
- m_settings->registerSetting({"PreLaunchCommand", "PreLaunchCmd"}, "");
- m_settings->registerSetting({"PostExitCommand", "PostExitCmd"}, "");
-
- // Minecraft launch method
- m_settings->registerSetting("MCLaunchMethod", "LauncherPart");
-}
diff --git a/wonkoclient/WonkoClient.h b/wonkoclient/WonkoClient.h
deleted file mode 100644
index e6b35805..00000000
--- a/wonkoclient/WonkoClient.h
+++ /dev/null
@@ -1,36 +0,0 @@
-//
-// Created by robotbrain on 3/27/16.
-//
-
-#pragma once
-
-#include <memory>
-#include <InstanceList.h>
-
-#if defined(MMCC)
-#undef MMCC
-#endif
-#define MMCC (WonkoClient::getInstance())
-
-class WonkoClient : public QObject {
-Q_OBJECT
-
-private:
- WonkoClient();
-
-public:
- static WonkoClient &getInstance();
-
- void registerLists();
- void initGlobalSettings();
-
- std::shared_ptr<InstanceList> instances() const {
- return m_instanceList;
- }
-
-private:
- std::shared_ptr<InstanceList> m_instanceList;
- std::shared_ptr<SettingsObject> m_settings;
-
- void runTask(Task *pTask);
-};
diff --git a/wonkoclient/main.cpp b/wonkoclient/main.cpp
deleted file mode 100644
index eaf92c5d..00000000
--- a/wonkoclient/main.cpp
+++ /dev/null
@@ -1,29 +0,0 @@
-//
-// Created by robotbrain on 3/26/16.
-//
-
-#include "WonkoClient.h"
-#include <QCoreApplication>
-#include <QDebug>
-#include <QtWidgets/QInputDialog>
-#include <QtGui/QDesktopServices>
-#include <QDir>
-
-int main(int argc, char *argv[])
-{
- QCoreApplication a(argc, argv);
- if (a.arguments().contains("-d"))
- {
- int i = a.arguments().lastIndexOf("-d") + 1;
- if (i < a.arguments().length())
- {
- QDir dir = QDir::current();
- dir.cd(a.arguments()[i]);
- QDir::setCurrent(dir.absolutePath());
- qDebug() << "Using " << dir.absolutePath();
- }
- }
- MMCC.initGlobalSettings();
- MMCC.registerLists();
- return a.exec();
-}