1 |
/* AE/Mod Installer header file */ |
2 |
|
3 |
#include <string> |
4 |
#include <vector> |
5 |
#include <fstream> |
6 |
|
7 |
using namespace std; |
8 |
|
9 |
static string SLASHSLASH = "//"; |
10 |
static string DIRSLASH = "\\"; |
11 |
|
12 |
#define STRUCT_DEFS |
13 |
struct ModPackage |
14 |
{ |
15 |
bool isInstalled; //replace with function |
16 |
string name; |
17 |
string modStringName; |
18 |
int modStringVersion; |
19 |
bool hasOnis; |
20 |
bool hasDeltas; |
21 |
bool hasBSL; |
22 |
bool hasDats; |
23 |
string category; |
24 |
string creator; |
25 |
bool isEngine; |
26 |
string readme; |
27 |
bool globalNeeded; |
28 |
ModPackage(); |
29 |
void doOutput() |
30 |
{ |
31 |
cout << "Mod: " << name; cout << "\n"; // remove this when done |
32 |
cout << " String: " << modStringName << " v." << modStringVersion << "\n"; |
33 |
cout << " Category: " << category << "\n"; |
34 |
cout << " Creator: " << creator << "\n"; |
35 |
cout << " HasOnis: " << hasOnis << "\n"; |
36 |
cout << " HasBSL: " << hasBSL << "\n"; |
37 |
cout << " HasDeltas: " << hasDeltas << "\n"; |
38 |
cout << " HasDats: " << hasDats << "\n"; |
39 |
cout << " IsEngine: " << isEngine << "\n"; |
40 |
cout << " GlobalNeeded: " << globalNeeded << "\n"; |
41 |
cout << " Readme: " << readme << "\n"; |
42 |
cout << "\n"; |
43 |
} |
44 |
|
45 |
}; |
46 |
|
47 |
#define METHOD_DEFS |
48 |
// Initialization to default values |
49 |
ModPackage::ModPackage() |
50 |
{ |
51 |
isInstalled = true; // replace with function |
52 |
name = ""; |
53 |
modStringName = ""; |
54 |
modStringVersion = 0; |
55 |
hasOnis = false; |
56 |
hasDeltas = false; |
57 |
hasBSL = false; |
58 |
hasDats = false; |
59 |
category = ""; |
60 |
creator = ""; |
61 |
isEngine = false; |
62 |
readme = ""; |
63 |
globalNeeded = true; |
64 |
// void doOutput() const |
65 |
// { }; |
66 |
} |
67 |
|
68 |
#define FUNCTION_PROTOTYPES |
69 |
int mainMenu(void); |
70 |
int globalizeData(void); |
71 |
int installPackages(void); |
72 |
int uninstallPackages(void); |
73 |
int listInstalledPackages(void); |
74 |
int printInstallerInfo(void); |
75 |
vector<ModPackage> getPackages(void); |
76 |
ModPackage fileToModPackage(fstream&); |
77 |
void recompileAll(vector<string>); |
78 |
vector<string> getInstallString(void); |
79 |
void tokenize(const string&, vector<string>&, const string& delimiters = " "); |
80 |
//bool getDirectoryContents(char , char &); |