| 3 |
|
#include <fstream> |
| 4 |
|
|
| 5 |
|
using namespace std; |
| 6 |
< |
|
| 6 |
> |
static string SLASHSLASH = "//"; |
| 7 |
> |
static string DIRSLASH = "\\"; |
| 8 |
|
struct ModPackage { |
| 9 |
|
bool isInstalled; //replace with function |
| 10 |
|
string name; |
| 21 |
|
bool globalNeeded; |
| 22 |
|
ModPackage(); |
| 23 |
|
void doOutput() { |
| 24 |
< |
cout << "Mod: " << name; cout << "\n"; //remove this when done |
| 25 |
< |
cout << " String: " << modStringName << " v." << modStringVersion << "\n"; |
| 26 |
< |
cout << " Category: " << category << "\n"; |
| 27 |
< |
cout << " Creator: " << creator << "\n"; |
| 28 |
< |
cout << " HasOnis: " << hasOnis << "\n"; |
| 29 |
< |
cout << " HasBSL: " << hasBSL << "\n"; |
| 30 |
< |
cout << " HasDeltas: " << hasDeltas << "\n"; |
| 31 |
< |
cout << " HasDats: " << hasDats << "\n"; |
| 32 |
< |
cout << " IsEngine: " << isEngine << "\n"; |
| 33 |
< |
cout << " GlobalNeeded: " << globalNeeded << "\n"; |
| 34 |
< |
cout << " Readme: " << readme << "\n"; |
| 35 |
< |
cout << "\n"; |
| 36 |
< |
} |
| 24 |
> |
cout << "Mod: " << name; cout << "\n"; //remove this when done |
| 25 |
> |
cout << " String: " << modStringName << " v." << modStringVersion << "\n"; |
| 26 |
> |
cout << " Category: " << category << "\n"; |
| 27 |
> |
cout << " Creator: " << creator << "\n"; |
| 28 |
> |
cout << " HasOnis: " << hasOnis << "\n"; |
| 29 |
> |
cout << " HasBSL: " << hasBSL << "\n"; |
| 30 |
> |
cout << " HasDeltas: " << hasDeltas << "\n"; |
| 31 |
> |
cout << " HasDats: " << hasDats << "\n"; |
| 32 |
> |
cout << " IsEngine: " << isEngine << "\n"; |
| 33 |
> |
cout << " GlobalNeeded: " << globalNeeded << "\n"; |
| 34 |
> |
cout << " Readme: " << readme << "\n"; |
| 35 |
> |
cout << "\n"; |
| 36 |
> |
} |
| 37 |
|
|
| 38 |
|
}; |
| 39 |
|
//Initialization |
| 40 |
|
ModPackage::ModPackage() { |
| 41 |
< |
isInstalled = 0; //replace with function |
| 42 |
< |
name = ""; |
| 43 |
< |
modStringName = ""; |
| 44 |
< |
modStringVersion = 0; |
| 45 |
< |
hasOnis = 0; |
| 46 |
< |
hasDeltas = 0; |
| 47 |
< |
hasBSL = 0; |
| 48 |
< |
hasDats = 0; |
| 49 |
< |
category = ""; |
| 50 |
< |
creator = ""; |
| 51 |
< |
isEngine = 0; |
| 52 |
< |
readme = ""; |
| 53 |
< |
globalNeeded = 1; |
| 54 |
< |
// void doOutput() const |
| 55 |
< |
// { }; |
| 41 |
> |
isInstalled = 1; //replace with function |
| 42 |
> |
name = ""; |
| 43 |
> |
modStringName = ""; |
| 44 |
> |
modStringVersion = 0; |
| 45 |
> |
hasOnis = 0; |
| 46 |
> |
hasDeltas = 0; |
| 47 |
> |
hasBSL = 0; |
| 48 |
> |
hasDats = 0; |
| 49 |
> |
category = ""; |
| 50 |
> |
creator = ""; |
| 51 |
> |
isEngine = 0; |
| 52 |
> |
readme = ""; |
| 53 |
> |
globalNeeded = 1; |
| 54 |
> |
// void doOutput() const |
| 55 |
> |
// { }; |
| 56 |
|
} |
| 57 |
|
|
| 58 |
|
int mainMenu(); |
| 59 |
|
vector<ModPackage> getPackages(); |
| 60 |
+ |
vector<string> getInstallString(); |
| 61 |
|
ModPackage fileToModPackage(fstream&); |
| 62 |
|
|
| 63 |
|
void installPackages(); |
| 64 |
|
void uninstallPackages(); |
| 65 |
|
void getInstalledPackages(); |
| 66 |
+ |
void RecompileAll( vector<string>); |
| 67 |
|
|
| 68 |
|
bool getDirectoryContents(char , char &); |
| 69 |
|
|
| 70 |
< |
|
| 70 |
> |
//stolen token function... |
| 71 |
|
void Tokenize(const string& str, |
| 72 |
|
vector<string>& tokens, |
| 73 |
|
const string& delimiters = " ") |
| 86 |
|
// Find next "non-delimiter" |
| 87 |
|
pos = str.find_first_of(delimiters, lastPos); |
| 88 |
|
} |
| 89 |
< |
} |
| 89 |
> |
} |
| 90 |
> |
|