1 | /***************************************************************************\
|
---|
2 | | Project: AE Installer |
|
---|
3 | | By: Gumby & Iritscen |
|
---|
4 | | File: Installer.h |
|
---|
5 | | Function: Contains the real meat of the installation process. |
|
---|
6 | | Created: 24/05/2009 19:39:00 |
|
---|
7 | \***************************************************************************/
|
---|
8 |
|
---|
9 | #ifndef DOUBLE_HEADER
|
---|
10 | #define DOUBLE_HEADER
|
---|
11 |
|
---|
12 | #include <string>
|
---|
13 | #include <vector>
|
---|
14 | #include <iostream>
|
---|
15 | #include "globals.h"
|
---|
16 | #ifdef WIN32
|
---|
17 | #ifndef __GUICON_H__
|
---|
18 | #define __GUICON_H__
|
---|
19 | #endif
|
---|
20 | #include <fstream>
|
---|
21 | #include <windows.h>
|
---|
22 | #include <stdio.h>
|
---|
23 | #include <fcntl.h>
|
---|
24 | #include <io.h>
|
---|
25 |
|
---|
26 | void RedirectIOToConsole();
|
---|
27 | // maximum mumber of lines the output console should have
|
---|
28 | static const WORD MAX_CONSOLE_LINES = 500;
|
---|
29 | #endif
|
---|
30 |
|
---|
31 |
|
---|
32 | #pragma mark GLOBALS
|
---|
33 | static string SLASHSLASH = "//";
|
---|
34 | static string DIRSLASH = "\\";
|
---|
35 | extern bool busy;
|
---|
36 | extern string strInstallCfg;// = "../GameDataFolder/Add.cfg";
|
---|
37 | extern Install_info_cfg currentAE, updateAE;
|
---|
38 | extern bool splitInstances;
|
---|
39 | extern string strImportOption;
|
---|
40 | extern string strOniSplit;
|
---|
41 | extern vector<ModPackage> globalPackages;
|
---|
42 | extern string strEUFN; // I don't mind long variable names, but even I think strEditionUpdateFolderName is a bit much
|
---|
43 | #ifndef WIN32
|
---|
44 | void Sleep(int ms); // crudely converts the Windows sleep() call, which operates in ms, to the Mac sleep() call that operates in seconds
|
---|
45 | #endif
|
---|
46 |
|
---|
47 |
|
---|
48 | #pragma mark PROTOTYPES
|
---|
49 | int mainMenu(void);
|
---|
50 | vector<string> getInstallString(string = strInstallCfg);
|
---|
51 | int installPackages(void);
|
---|
52 | int uninstallPackages(void);
|
---|
53 | int listInstalledPackages(void);
|
---|
54 | int printInstallerInfo(void);
|
---|
55 | ModPackage fileToModPackage(fstream&, string);
|
---|
56 | bool StringIsLegalPathForDeletion(string);
|
---|
57 | vector<ModPackage> getPackages(string packageDir = "./packages");
|
---|
58 | void MakePathLocalToGlobalize(string*);
|
---|
59 | bool SortBySize(string, string);
|
---|
60 | void tokenize(const string&, vector<string>&, const string& delimiters = " ");
|
---|
61 | void StripNewlines(string *);
|
---|
62 | void clearOldDats(void);
|
---|
63 | void writeInstalledMods( vector<string> );
|
---|
64 | void copyBSL( string, vector<string>&, ModPackage );
|
---|
65 | bool ReadInstallInfoCfg(fstream *, Install_info_cfg *);
|
---|
66 |
|
---|
67 | /* End of File */
|
---|
68 |
|
---|
69 | //End of File
|
---|
70 |
|
---|
71 | #endif
|
---|