1 Star 2 Fork 1

SeaLoong / SMCCC

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
smcccjson.h 1.92 KB
一键复制 编辑 原始数据 按行查看 历史
SeaLoong 提交于 2017-08-07 14:08 . update
#ifndef SMCCCJSON_H
#define SMCCCJSON_H
#include <QFile>
#include <QDir>
#include <QJsonDocument>
#include <QJsonObject>
#include <QJsonArray>
#include <QUrl>
#include <QLinkedList>
#include <QCryptographicHash>
#include "smcccdownloadinfo.h"
#include "smcccjsonassets.h"
#include "smcccjsondownloads.h"
#include "smcccjsoninheritsfrom.h"
#include "smcccjsonlibraries.h"
#include "smcccjsonnatives.h"
class SMCCCJson
{
public:
SMCCCJson();
SMCCCJson(const QString &version,const QString &dotminecraftdirpath);
int process();
/*返回值:
* -1:未设置DotMinecraftDirPath或Version,
* 0:OK,
* 1:Download,
* 2:JsonFileNotFound,
* 3:InheritsFromJsonFileNotFound
* 4:LibrariesFileNotFound
* 5:JsonError
*/
friend class SMCCCJsonAssets;
friend class SMCCCJsonDownloads;
friend class SMCCCJsonInheritsFrom;
friend class SMCCCJsonLibraries;
friend class SMCCCJsonNatives;
friend class SMCCC;
private:
bool AssetsCheck,FileCheck,MergeInheritsFrom;
QString Arch,OS;
QString Version,DotMinecraftDirPath,AssetsDirPath,LibrariesDirPath,VersionsDirPath,NativesDirPath,JarFilePath;
QLinkedList<SMCCCDownloadInfo> DownloadInfoList;
int _Step;
QString _args_cp;
QJsonObject _JsonObj;
QJsonObject _assetIndex;
QString _assets;
QJsonObject _downloads;
QString _id;
QJsonArray _libraries;
QString _mainClass;
QString _minecraftArguments;
QString _inheritsFrom;
QString _jar;
QString _type;
SMCCCJsonAssets *_JsonAssets;
SMCCCJsonDownloads *_JsonDownloads;
SMCCCJsonInheritsFrom *_JsonInheritsFrom;
SMCCCJsonLibraries *_JsonLibraries;
SMCCCJsonNatives *_JsonNatives;
bool isFileExist(const QString &filePath);
bool isDirExist(const QString &dirPath);
bool checkFileSize(const QString &filePath,int size);
bool checkFileSHA1(const QString &filePath,const QString &sha1);
};
#endif // SMCCCJSON_H
C++
1
https://gitee.com/SeaLoong/SMCCC.git
git@gitee.com:SeaLoong/SMCCC.git
SeaLoong
SMCCC
SMCCC
master

搜索帮助