Rev 1530 | Blame | Compare with Previous | Last modification | View Log | RSS feed
// --- Includes ---#include "pkgdef.h"//////////////////// installation declarations /////////////////////#define ERGAFC_PKG_REGISTRY_BASE "SOFTWARE\\ERG\\AFC\\"#define ERGAFC_DEVICE_REGISTRY_BASE "SOFTWARE\\ERG\\AFC\\device\\"#define ERGAFC_PATCH_REGISTRY_BASE "SOFTWARE\\ERG\\AFC\\patch\\"#define MAX_PKGNAME_LENGTH 20#define NUM_PATCHID_SECTIONS 2#define MAX_PATCHID_FORMAT_LENGTH 19#define MAX_PATCHID_NUMBER_FORMAT_LENGTH 2#define MAX_PATCHID_NAME_FORMAT_LENGTH 16#define MAX_NUM_FEATURE_LEVELS 2#define MAX_NUM_TOP_LEVEL_FEATURES 1#define NUM_LOCATIONID_SECTIONS 4#define MAX_LOCATIONID_SECTION_1_FORMAT_LENGTH 10#define MAX_LOCATIONID_SECTION_2_FORMAT_LENGTH 3#define MAX_LOCATIONID_SECTION_3_FORMAT_LENGTH 6#define MAX_LOCATIONID_SECTION_4_FORMAT_LENGTH 8#define PATCHID_DIR INSTALLDIR^"admin\\patch\\" + PATCH_ID#define PATCHID_SAVE_DIR PATCHID_DIR + "\\save"#define PATCHID_LOGFILE_NAME "patchLog.txt"#define PATCHID_LOGFILE_LOCATION PATCHID_DIR + "\\" + PATCHID_LOGFILE_NAME#define ISLIB_SUCCESS 1#define ISLIB_ERROR -1#define ISLIB_VERSION_EQUALS 0#define ISLIB_VERSION_LESS_THAN 1#define ISLIB_VERSION_GREATER_THAN 2#define MAX_NUM_VERSION_FORMAT_SECTIONS 3#define JAVA_JRE_VERSION "1.4"#define DEFAULT_DEBUGGER_AUTO "1"#define DEFAULT_DEBUGGER "drwtsn32 -p %ld -e %ld -g"// Added by dgreeve 17/11/04// Support for Hex conversions//#define STIF_SUPPORT_HEX 0x00000001// --- registry types ---//#define PKG_REGTYPE 0#define DEVICE_REGTYPE 1// ---- script function prototypes -----//prototype islib_MessageBox ( STRING, NUMBER );prototype islib_FileStrReplace( STRING, STRING, STRING );prototype islib_ModString( STRING, STRING, BYREF STRING );prototype islib_UpdateIniFile( STRING, STRING, STRING );prototype islib_LocalHostname( BYREF STRING );prototype islib_Interbase( BYREF STRING, BYREF STRING );prototype islib_AccessControl( BYREF STRING );prototype islib_getHostIPAddress( BYREF STRING );prototype islib_checkActiveStatePerl( NUMBER, STRING );prototype islib_setSystemPathEntry( STRING, BOOL, BOOL );prototype islib_removeSystemPathEntry( STRING, BOOL );prototype islib_setSystemEnvironmentVariable( STRING, STRING );// islib_forceSetSystemEnvironmentVariable// Added by dgreeve 24/10/05prototype islib_forceSetSystemEnvironmentVariable( STRING, STRING );prototype islib_addAtItem( STRING, STRING );prototype islib_removeAtItem( STRING );prototype islib_getCmdOutputItemList (BYREF LIST, STRING);prototype islib_WriteLineToEndOfFile(STRING, STRING, STRING);prototype islib_verifyIPAddressStrFormat(STRING);prototype islib_verifyLocationIDFormat( STRING );prototype islib_verifyVersionFormat( STRING );prototype islib_compareVersions( STRING, STRING );prototype islib_CheckCSTrace ();prototype islib_SetCSTrace ();prototype islib_verifyProcmgrInstall();// Application Package Functions//prototype islib_setErgAfcPkgRegistryKeys( NUMBER );prototype islib_getErgAfcPkgRegistryDetails( BYREF STRING, BYREF STRING, BYREF STRING,BYREF STRING, BYREF STRING,BYREF STRING, BYREF STRING, BYREF STRING );prototype islib_getErgAfcPkgLatestPatchIDRegistryDetails( BYREF STRING, BYREF STRING );prototype islib_checkErgAfcPkgExists( STRING );prototype islib_preinstallCheckErgAfcPkgExists( STRING, STRING );// Java application checks// Added by dgreeve 05/09/04prototype islib_preinstallCheckJavaJREExists();prototype islib_preinstallCheckJavaJREExists2(STRING);prototype islib_preinstallCheckJavaExists(STRING,STRING,STRING);prototype islib_updateRegistryKey(STRING, STRING, NUMBER, STRING, NUMBER);prototype islib_pkgPreRemove();prototype islib_pkgPreInstall();prototype islib_checkRemovePkg();prototype islib_setPkgBuildDependenciesRegistry( STRING );// Added by dgreeve 17/11/04// Support for Hex conversions//prototype Shlwapi.StrToIntExA ( BYREF STRING, LONG, POINTER );prototype islib_convertHexStringToIntString (BYREF STRING);prototype islib_validateHexString (STRING);// patching stuff.//prototype islib_setErgAfcPatchRegistryKeys();prototype islib_getPatchDetailsToRestore(BYREF STRING, BYREF STRING );prototype islib_updatePkgPatchRegistryKeys( STRING, STRING, STRING );prototype islib_getPatchNumber( STRING, BYREF STRING );prototype islib_verifyPatchIDFormat( STRING );prototype islib_checkInstallPatch();prototype islib_checkRemovePatch( BYREF STRING );prototype islib_getPatchItemsList ( BYREF LIST );prototype islib_savePatchItems( LIST );prototype islib_getPatchSaveItemsList ( BYREF LIST );prototype islib_restorePatchItems( LIST );prototype islib_updatePatchLog( STRING, STRING );prototype islib_deletePatchIDDir();prototype islib_patchPreInstall();prototype islib_patchPostInstall();prototype islib_patchPostRemove();prototype islib_patchPreRemove();prototype islib_getline(NUMBER, BYREF STRING);// ----- global variables ------STRING svDir;// patching stuff.STRING svRestorePatchID;STRING svRestorePatchInstalled;// EOF.