////////////////////////////////////////////////////////////////////////////////
// MechWarriorInstallers.h
// Copyright Bjoern Ganster 
// Developed since 2007
////////////////////////////////////////////////////////////////////////////////

#ifndef MechWarriorIIInstaller__H
#define MechWarriorIIInstaller__H

////////////////////////////////////////////////////////////////////////////////
// CD types

const int unknownCD = 0;
const int MW2_31stcc_DOS = 1;
const int MW2_31stcc_PE = 2;
const int MW2_31stcc_Hybrid_DOS_Win = 3;
const int MW2_NetMech = 4; // NetMech + 31stcc DOS + 31stcc Win
const int MW2_NetMechInstall = 5;
const int MW2_Netmech_InstallPackage = 6; // Zip file containing NetMech
const int MW2_31stcc_BP = 7;
const int MW2_31stcc_TITAN = 8;
const int MW2_31stcc_3DFX = 9;
const int MW2_31stcc_ATI = 10;
const int MW2_31stcc_TT_BP = 11;  // Install software, 8-bit Battlepack version from Titanium Trilogy
const int MW2_31stcc_Matrox = 12;
const int MW2_GBL_DOS = 20;
const int MW2_GBL_PE = MW2_GBL_DOS+1;
const int MW2_GBL_Hybrid_DOS_Win = MW2_GBL_DOS+2;
const int MW2_GBL_BP = MW2_GBL_DOS+3;
const int MW2_GBL_TT_BP = MW2_GBL_DOS+4; // Install software, 8-bit Battlepack version from Titanium Trilogy
const int MW2_GBL_TITAN = MW2_GBL_DOS+5;
const int MW2_Mercs_DOS = 30;
//const int MW2_Mercs_Win = MW2_Mercs_DOS+1; // Windows variant of basic CD, currently unused
const int MW2_Mercs_3DFX = MW2_Mercs_DOS+2;
const int MW2_Mercs_TT_BP = MW2_Mercs_DOS+3; // Install software, 8-bit Battlepack version from Titanium Trilogy
const int MW2_Mercs_TITAN = MW2_Mercs_DOS+4;

const int MW3_CD_eng = 50;
const int MW3_CD_ger = 51;
const int MW3_eng_installed = 60;
const int MW3_ger_installed = 61;
const int MW3_PM_CD = 80;
const int MW3_PM_installed = 81;

////////////////////////////////////////////////////////////////////////////////
// Exported functions

class Installers;

// Install method
bool install (int CDtype, const PathChar* source, const PathChar* imgFN, Installers* installerWin);

// Determine type of CD to install from
int getCDType (const PathChar* source);

// Create a report of what was installed, including a list of files
bool createInstallReport(const PathChar* source, const PathChar* target, 
   int CDType = unknownCD, bool appendDefaultFN = true);

// Install NetMech - requires the NetMech plugin
bool installNetMech(Installers* installerWin);

// Get a descriptive string for a CD, given its numeric ID
const char* getCDName (int CDID);

// Copy all files matching mask from source to target
void copyFiles (const PathChar* source, const char* mask, const PathChar* target);

#ifdef _WIN32
bool patch42 (const PathChar* target, const char* fn);
#endif

#endif
