2015-01-28 03:01:07 +05:30
|
|
|
#pragma once
|
2016-03-07 06:31:28 +05:30
|
|
|
#include "Library.h"
|
2015-01-28 03:01:07 +05:30
|
|
|
#include "VersionFile.h"
|
|
|
|
|
|
|
|
namespace ProfileUtils
|
|
|
|
{
|
|
|
|
typedef QStringList PatchOrder;
|
|
|
|
|
|
|
|
/// Read and parse a OneSix format order file
|
|
|
|
bool readOverrideOrders(QString path, PatchOrder &order);
|
|
|
|
|
|
|
|
/// Write a OneSix format order file
|
|
|
|
bool writeOverrideOrders(QString path, const PatchOrder &order);
|
|
|
|
|
|
|
|
|
|
|
|
/// Parse a version file in JSON format
|
2015-04-04 05:31:52 +05:30
|
|
|
VersionFilePtr parseJsonFile(const QFileInfo &fileInfo, const bool requireOrder);
|
2015-01-28 03:01:07 +05:30
|
|
|
|
2017-11-11 06:08:31 +05:30
|
|
|
/// Save a JSON file (in any format)
|
|
|
|
bool saveJsonFile(const QJsonDocument doc, const QString & filename);
|
|
|
|
|
2015-01-28 03:01:07 +05:30
|
|
|
/// Parse a version file in binary JSON format
|
|
|
|
VersionFilePtr parseBinaryJsonFile(const QFileInfo &fileInfo);
|
|
|
|
|
|
|
|
/// Remove LWJGL from a patch file. This is applied to all Mojang-like profile files.
|
|
|
|
void removeLwjglFromPatch(VersionFilePtr patch);
|
|
|
|
|
|
|
|
}
|