#define MIRINST_INFOMSG_STARTING (WM_USER + 20) // starting a new batch
#define MIRINST_INFOMSG_STARTITEM (WM_USER + 21) // wParam is ID (from ListView) - starting a new installation
#define MIRINST_INFOMSG_FINISHEDITEM (WM_USER + 22) // wParam is ID, lParam is 2 if we canceled, lParam is 0 if everything went well, 1 if error
#define MIRINST_INFOMSG_EXTRACTING (WM_USER + 23) // extracting a file. wParam is package ID. lParam is a pointer to the file name - extraction will begin in a sec
#define MIRINST_INFOMSG_DONE (WM_USER + 24) // the thread finished work. yippie. wParam is true if error occured (no need to pop msg)
char *lpszName; // name (taken from script, if not found in script, filename is used)
char *lpszAuthor; // author
char *lpszVersion;
char *lpszType; // priority first goes to type declared in script, otherwise - extension is tested.
bool fScripted; // is an install script available?
WORD wTotalPackages; // if this info is not available, this will be 0
WORD wMainPackages;
// these are used internally, in a sense
bool fGotEmptyPackage; // parser found an empty package (i.e. a package with no files)
GENERAL_FILELIST *pFileList; // pFileList lists ALL files mentioned by the script! everything!! :)
// it's up to the caller to go through the list and find irregularities like dupes, and invalid files
// slashes are reversed before being added to the list (to slashes - '/')
// btw: nameless packages are not deal breakers, a stupid name is used for them instead
// deal breakers: (w/o - this package cannot be installed)
// if ((lpszType == NULL) || (lpszName == NULL)) -> no given type (scripted) or by extension
// if ((fScripted) && (wMainPackages == 0)) -> install script is no good, an error should be given
// if (fGotEmptyPackage) -> an empty package was found
// if (after_going_thru_file_list,dupes_and_invalid_files_were_found) -> :)
} ADDON_BASICINFO;
// each listview item points to a ADDON_LISTINFO structure. must be deallocated later
typedef struct ADDON_LISTINFO_TYPE
{
byte bType; // type. (INSTALLTYPE_*)
char *lpFilePath; // absolute path to file
} ADDON_LISTINFO;
// defining it in the header gives way too many problems
extern const char* INSTALLATION_EXTS_ARR[10];
void InstallList_AddFile(HWND hwndDlg,const char *lpFilePath,bool fQuiet=false); // install a file. :) this function gives out errors and such on its own (fQuiet means that msg boxes won't be shown on invalid packages. good for adding a bunch of files at the same time)