NOISSUE get rid of the obsolete version builder
This commit is contained in:
parent
234f57b8e6
commit
c8687a8d05
@ -42,7 +42,6 @@
|
|||||||
#include "forge/ForgeInstaller.h"
|
#include "forge/ForgeInstaller.h"
|
||||||
#include "liteloader/LiteLoaderVersionList.h"
|
#include "liteloader/LiteLoaderVersionList.h"
|
||||||
#include "liteloader/LiteLoaderInstaller.h"
|
#include "liteloader/LiteLoaderInstaller.h"
|
||||||
#include "minecraft/VersionBuilder.h"
|
|
||||||
#include "auth/MojangAccountList.h"
|
#include "auth/MojangAccountList.h"
|
||||||
#include "minecraft/Mod.h"
|
#include "minecraft/Mod.h"
|
||||||
#include "icons/IconList.h"
|
#include "icons/IconList.h"
|
||||||
|
@ -132,8 +132,6 @@ SET(LOGIC_SOURCES
|
|||||||
minecraft/ProfileStrategy.h
|
minecraft/ProfileStrategy.h
|
||||||
minecraft/RawLibrary.cpp
|
minecraft/RawLibrary.cpp
|
||||||
minecraft/RawLibrary.h
|
minecraft/RawLibrary.h
|
||||||
minecraft/VersionBuilder.cpp
|
|
||||||
minecraft/VersionBuilder.h
|
|
||||||
minecraft/VersionBuildError.h
|
minecraft/VersionBuildError.h
|
||||||
minecraft/VersionFile.cpp
|
minecraft/VersionFile.cpp
|
||||||
minecraft/VersionFile.h
|
minecraft/VersionFile.h
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
|
|
||||||
#include "minecraft/MinecraftProfile.h"
|
#include "minecraft/MinecraftProfile.h"
|
||||||
#include "minecraft/OneSixLibrary.h"
|
#include "minecraft/OneSixLibrary.h"
|
||||||
#include "minecraft/VersionBuilder.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"
|
||||||
|
@ -20,7 +20,6 @@
|
|||||||
#include <pathutils.h>
|
#include <pathutils.h>
|
||||||
|
|
||||||
#include "minecraft/MinecraftProfile.h"
|
#include "minecraft/MinecraftProfile.h"
|
||||||
#include "minecraft/VersionBuilder.h"
|
|
||||||
#include "ProfileUtils.h"
|
#include "ProfileUtils.h"
|
||||||
#include "NullProfileStrategy.h"
|
#include "NullProfileStrategy.h"
|
||||||
|
|
||||||
@ -241,7 +240,10 @@ std::shared_ptr<MinecraftProfile> MinecraftProfile::fromJson(const QJsonObject &
|
|||||||
std::shared_ptr<MinecraftProfile> version(new MinecraftProfile(new NullProfileStrategy()));
|
std::shared_ptr<MinecraftProfile> version(new MinecraftProfile(new NullProfileStrategy()));
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
VersionBuilder::readJsonAndApplyToVersion(version.get(), obj);
|
version->clear();
|
||||||
|
auto file = VersionFile::fromJson(QJsonDocument(obj), QString(), false);
|
||||||
|
file->applyTo(version.get());
|
||||||
|
version->appendPatch(file);
|
||||||
}
|
}
|
||||||
catch(MMCError & err)
|
catch(MMCError & err)
|
||||||
{
|
{
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
#include "MinecraftVersion.h"
|
#include "MinecraftVersion.h"
|
||||||
#include "MinecraftProfile.h"
|
#include "MinecraftProfile.h"
|
||||||
#include "VersionBuildError.h"
|
#include "VersionBuildError.h"
|
||||||
#include "VersionBuilder.h"
|
|
||||||
#include "ProfileUtils.h"
|
#include "ProfileUtils.h"
|
||||||
#include "settings/SettingsObject.h"
|
#include "settings/SettingsObject.h"
|
||||||
|
|
||||||
|
@ -26,7 +26,6 @@
|
|||||||
|
|
||||||
#include "ParseUtils.h"
|
#include "ParseUtils.h"
|
||||||
#include "ProfileUtils.h"
|
#include "ProfileUtils.h"
|
||||||
#include "VersionBuilder.h"
|
|
||||||
#include "VersionFilterData.h"
|
#include "VersionFilterData.h"
|
||||||
|
|
||||||
#include <pathutils.h>
|
#include <pathutils.h>
|
||||||
|
@ -1,83 +0,0 @@
|
|||||||
/* Copyright 2013-2015 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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <QList>
|
|
||||||
#include <QJsonObject>
|
|
||||||
#include <QJsonArray>
|
|
||||||
#include <QJsonDocument>
|
|
||||||
#include <QFile>
|
|
||||||
#include <QFileInfo>
|
|
||||||
#include <QMessageBox>
|
|
||||||
#include <QObject>
|
|
||||||
#include <QDir>
|
|
||||||
#include <qresource.h>
|
|
||||||
#include <modutils.h>
|
|
||||||
#include <pathutils.h>
|
|
||||||
|
|
||||||
#include "minecraft/VersionBuilder.h"
|
|
||||||
#include "minecraft/MinecraftProfile.h"
|
|
||||||
#include "minecraft/OneSixRule.h"
|
|
||||||
#include "minecraft/ProfilePatch.h"
|
|
||||||
#include "minecraft/VersionFile.h"
|
|
||||||
#include "VersionBuildError.h"
|
|
||||||
#include "MinecraftVersionList.h"
|
|
||||||
#include "ProfileUtils.h"
|
|
||||||
|
|
||||||
#include "minecraft/OneSixInstance.h"
|
|
||||||
#include "MMCJson.h"
|
|
||||||
|
|
||||||
#include <QDebug>
|
|
||||||
|
|
||||||
VersionBuilder::VersionBuilder()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void VersionBuilder::build(MinecraftProfile *version, OneSixInstance *instance)
|
|
||||||
{
|
|
||||||
VersionBuilder builder;
|
|
||||||
builder.m_version = version;
|
|
||||||
builder.m_instance = instance;
|
|
||||||
builder.buildInternal();
|
|
||||||
}
|
|
||||||
|
|
||||||
void VersionBuilder::readJsonAndApplyToVersion(MinecraftProfile *version, const QJsonObject &obj)
|
|
||||||
{
|
|
||||||
VersionBuilder builder;
|
|
||||||
builder.m_version = version;
|
|
||||||
builder.m_instance = 0;
|
|
||||||
builder.readJsonAndApply(obj);
|
|
||||||
}
|
|
||||||
|
|
||||||
void VersionBuilder::readJsonAndApply(const QJsonObject &obj)
|
|
||||||
{
|
|
||||||
m_version->clear();
|
|
||||||
|
|
||||||
auto file = VersionFile::fromJson(QJsonDocument(obj), QString(), false);
|
|
||||||
|
|
||||||
file->applyTo(m_version);
|
|
||||||
m_version->appendPatch(file);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void VersionBuilder::readInstancePatches()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void VersionBuilder::buildInternal()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,43 +0,0 @@
|
|||||||
/* Copyright 2013-2015 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 <QString>
|
|
||||||
#include <QMap>
|
|
||||||
#include "VersionFile.h"
|
|
||||||
|
|
||||||
class MinecraftProfile;
|
|
||||||
class OneSixInstance;
|
|
||||||
class QJsonObject;
|
|
||||||
class QFileInfo;
|
|
||||||
|
|
||||||
class VersionBuilder
|
|
||||||
{
|
|
||||||
VersionBuilder();
|
|
||||||
public:
|
|
||||||
static void build(MinecraftProfile *version, OneSixInstance *instance);
|
|
||||||
static void readJsonAndApplyToVersion(MinecraftProfile *version, const QJsonObject &obj);
|
|
||||||
|
|
||||||
private:
|
|
||||||
MinecraftProfile *m_version;
|
|
||||||
OneSixInstance *m_instance;
|
|
||||||
|
|
||||||
void buildInternal();
|
|
||||||
|
|
||||||
void readInstancePatches();
|
|
||||||
|
|
||||||
void readJsonAndApply(const QJsonObject &obj);
|
|
||||||
};
|
|
Loading…
Reference in New Issue
Block a user