-
Notifications
You must be signed in to change notification settings - Fork 9
/
minecraftloader.h
63 lines (54 loc) · 1.55 KB
/
minecraftloader.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#ifndef MINECRAFTLOADER_H
#define MINECRAFTLOADER_H
#include <QString>
#include <json/reader.h>
#include <json/value.h>
#include <QStringList>
#include <QVector>
#include <QComboBox>
#include "FileUtilities.h"
#include "launcherprofileloader.h"
extern bool lpLoaded;
extern LauncherProfileLoader *loader;
struct Rules
{
QString action, osName, osVersion;
};
struct MinecraftLibrary
{
MinecraftLibrary(){}
MinecraftLibrary(QString name, Json::Value rules);
QString oldText, formatted;
QVector<Rules> rules;
};
struct Native
{
QString Linux, Windows, OSX;
};
struct MinecraftUnpackingLibrary : MinecraftLibrary
{
Native native;
QVector<QString> excludes;
MinecraftUnpackingLibrary(){}
MinecraftUnpackingLibrary(QString name, Json::Value rules, Json::Value natives);
};
class MinecraftLoader
{
private:
// void formatLibrary(QString name, MinecraftLibrary &res, QJSON rules);
QString MinecraftPath, MinecraftVersionText, LaunchMode, PlayerName,
Session, AuthSession, GameDir, GameAssets, JavaPath;
QString ID, Time, ReleaseTime, Type, ProcessArguments, MinecraftArguments,
MainClass, VersionName;
int MaxMemory;
Json::Value MinecraftVersionJson;
Json::Reader reader;
Profile profile;
public:
MinecraftLoader(QString mcp, QString mvt, QString lm, QString jp,
QString pn, QString ss, int mm, Profile *pro);
QString generateLaunchString();
QVector<MinecraftUnpackingLibrary> unPackingLibraries;
QVector<MinecraftLibrary> libraries;
};
#endif // MINECRAFTLOADER_H