From 55e62a81b69663041cb2402f779d0d957c499cb1 Mon Sep 17 00:00:00 2001 From: Jan Dalheimer Date: Sat, 28 Dec 2013 14:22:36 +0100 Subject: LiteLoader support --- logic/LiteLoaderInstaller.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 logic/LiteLoaderInstaller.h (limited to 'logic/LiteLoaderInstaller.h') diff --git a/logic/LiteLoaderInstaller.h b/logic/LiteLoaderInstaller.h new file mode 100644 index 00000000..6a5ee1f2 --- /dev/null +++ b/logic/LiteLoaderInstaller.h @@ -0,0 +1,28 @@ +/* Copyright 2013 MultiMC Contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once +#include +#include + +class OneSixVersion; + +class LiteLoaderInstaller +{ +public: + LiteLoaderInstaller(); + + bool apply(std::shared_ptr to); +}; -- cgit v1.2.3 From 5b54a4ca8c4849a4476bb9a5e1c2414463949621 Mon Sep 17 00:00:00 2001 From: Jan Dalheimer Date: Sat, 28 Dec 2013 23:34:18 +0100 Subject: Don't hardcode stuff!!! --- logic/LiteLoaderInstaller.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'logic/LiteLoaderInstaller.h') diff --git a/logic/LiteLoaderInstaller.h b/logic/LiteLoaderInstaller.h index 6a5ee1f2..44b306d6 100644 --- a/logic/LiteLoaderInstaller.h +++ b/logic/LiteLoaderInstaller.h @@ -15,6 +15,7 @@ #pragma once #include +#include #include class OneSixVersion; @@ -22,7 +23,17 @@ class OneSixVersion; class LiteLoaderInstaller { public: - LiteLoaderInstaller(); + LiteLoaderInstaller(const QString &mcVersion); + + bool canApply() const; bool apply(std::shared_ptr to); + +private: + QString m_mcVersion; + + void applyLaunchwrapper(std::shared_ptr to); + void applyLiteLoader(std::shared_ptr to); + + static QMap m_launcherWrapperVersionMapping; }; -- cgit v1.2.3