Class TInstall (unit Install)

Inherits from

TComponent

Constructors


constructor Create(AOwner: TComponent);

Procedures

Implementation of the TBaseHelperComponent } {$I InciFI.



Functions

function Comp(I: Integer;ComponentType: Integer): TBaseHelperComponent;


function CompCount(ComponentType: Integer): Integer;


destructor Destroy;


procedure EraseExistingInstallInfo;

If we create a new directory, we must log it

procedure ExpandInstallDir(var Str: String;CallComponent: TComponent);


function FileGroupByName(Name: String): TInstallFileGroup;

Public methods

procedure InsertHelperComponent(Value: TBaseHelperComponent);


procedure Install;


procedure Loaded;

Re-route the OnActivate handler for the parent form through our own event handler.

procedure LogToINIs(Section,Ident,Value: String);

Private methods that no one can override

procedure PrepareInstall;


procedure RefreshFiles;


procedure RemoveHelperComponent(Value: TBaseHelperComponent);


procedure InstallAliases;

This try.

procedure InstallFileGroups;


procedure InstallINIFiles;


procedure InstallProgramItems;


procedure InstallRSConnections;


procedure SetInstallTypes(Value: InstallTypeSet);


procedure SetPresetupFiles(Value: TStrings);

Since we do not want to have conflicting installtypes, if one is gotten, we need to exclude that one from all the base helper components

procedure DoAbort(Sender: TObject);

YsflCompress event handlers

procedure DoActivate(Sender: TObject);

YsflCompress event handlers

This handler takes over the original OnActivate handler for the parent form.


procedure DoAfterExtracting(YsflCompress: TYsflCompress;const FileStats: TlzhFileStats);


procedure DoBeforeExtracting(YsflCompress: TYsflCompress;const FileStats: TlzhFileStats);


procedure DoListing(YsflCompress: TYsflCompress;const FileStats: TlzhFileStats);

This procedure updates the Date, Size, and Version run-time properties of all the TInstallFile components

procedure DoNewDisk(YsflCompress: TYsflCompress;const DiskNumber: Integer;var Path: String);


procedure DoReplace(YsflCompress: TYsflCompress;const FileStats: TlzhFileStats);


procedure DoStatus(YsflCompress: TYsflCompress;const FileStats: TlzhFileStats);


function GetHC(I: Integer): TBaseHelperComponent;


function GetHCCount: Integer;


function GetInstallFileGroupCount: Integer;


function GetInstallFileGroups(I: Integer): TInstallFileGroup;


function GetRunningDir: String;


function GetSize: LongInt;


procedure ReadDiskInfo;


Properties

property AfterInstallFile : TInstallFileNotifyEvent

Events

property AfterReadSetupInfo : TAfterReadSetupInfoEvent


property BeforeInstallFile : TInstallFileNotifyEvent


property CustomBadInstallationDlg : TNotifyEvent


property CustomCopyingFileDlgHide : TNotifyEvent


property CustomCopyingFileDlgUpdate : TCopyFileStatusEvent


property CustomFileGroupsDlg : TNotifyEvent


property CustomGoodInstallationDlg : TNotifyEvent


property CustomInstallTypeDlg : TCustomInstallTypeDlgEvent


property CustomNewDiskDlg : TCustomNewDiskDlgEvent


property CustomVerifyCancelDlg : TCustomVerifyCancelDlgEvent


property DestDir : TMetaVariableString

Published declarations

property DoneInstallingAliases : TNotifyEvent


property DoneInstallingFiles : TNotifyEvent


property DoneInstallingINIFiles : TNotifyEvent


property DoneInstallingPMItems : TNotifyEvent


property DoneInstallingRSConnections : TNotifyEvent


property InstallTypes : InstallTypeSet


property Options : InstallOptionSet


property PresetupFiles : TStrings


property RunAutomatic : Boolean


property StartInstallingAliases : TNotifyEvent


property StartInstallingFiles : TNotifyEvent


property StartInstallingINIFiles : TNotifyEvent


property StartInstallingPMItems : TNotifyEvent


property StartInstallingRSConns : TNotifyEvent


property WindowGroupName : String


property BDEFileGroup : TInstallFileGroup

Public declarations

property CopyingFile : TInstallFile


property FileGroupCount : Integer


property FileGroups : TInstallFileGroup


property FilePercentDone : Integer


property HC : TBaseHelperComponent


property HCCount : Integer


property RunningDir : String


property SelectedInstallType : TInstallType


property Size : LongInt


property SourceDir : String


property TotalPercentDone : Integer


property VerifyCancel : Boolean


Events

Variables

ExternalComponentCall : TExternalComponentCall;


FAfterInstallFile : TInstallFileNotifyEvent;

Events

FAfterReadSetupInfoEvent : TAfterReadSetupInfoEvent;


FBeforeInstallFile : TInstallFileNotifyEvent;


FCopyingFile : TInstallFile;


FCustomBadInstallationDlgEvent : TNotifyEvent;


FCustomCopyingFileDlgHide : TNotifyEvent;


FCustomCopyingFileDlgUpdate : TCopyFileStatusEvent;


FCustomFileGroupsDlg : TNotifyEvent;


FCustomGoodInstallationDlgEvent : TNotifyEvent;


FCustomInstallTypeDlg : TCustomInstallTypeDlgEvent;


FCustomNewDiskDlg : TCustomNewDiskDlgEvent;


FCustomVerifyCancelDlg : TCustomVerifyCancelDlgEvent;


FDoneInstallingAliases : TNotifyEvent;


FDoneInstallingFiles : TNotifyEvent;


FDoneInstallingINIFiles : TNotifyEvent;


FDoneInstallingPMItems : TNotifyEvent;


FDoneInstallingRSConnections : TNotifyEvent;


FFilePercentDone : Integer;


FStartInstallingAliases : TNotifyEvent;


FStartInstallingFiles : TNotifyEvent;


FStartInstallingINIFiles : TNotifyEvent;


FStartInstallingPMItems : TNotifyEvent;


FStartInstallingRSConns : TNotifyEvent;


FTotalPercentDone : Integer;


TotalBytesWritten : LongInt;


FBDEFileGroup : TInstallFileGroup;

Property storage fields

FDestDir : TMetaVariableString;


FFileGroups : TList;


FHC : TList;


FInstallTypes : InstallTypeSet;


FOptions : InstallOptionSet;


FPresetupFiles : TStrings;


FRunAutomatic : Boolean;


FRunningDir : String;


FSelectedInstallType : TInstallType;


FSourceDir : String;


FVerifyCancel : Boolean;


FWindowGroupName : String;


Installing : Boolean;

Private declarations

PreviousOnActivate : TNotifyEvent;



Constructors


constructor Create(AOwner: TComponent);

Procedures

Implementation of the TBaseHelperComponent } {$I InciFI.PAS} { Implementation of the TInstallFile component } {$I InciFG.PAS} { Implementation of the TInstallFileGroup component } { TInstall Methods and Such


Functions


function Comp(I: Integer;ComponentType: Integer): TBaseHelperComponent;


function CompCount(ComponentType: Integer): Integer;


destructor Destroy;


procedure EraseExistingInstallInfo;

If we create a new directory, we must log it


procedure ExpandInstallDir(var Str: String;CallComponent: TComponent);


function FileGroupByName(Name: String): TInstallFileGroup;

Public methods


procedure InsertHelperComponent(Value: TBaseHelperComponent);


procedure Install;


procedure Loaded;

Re-route the OnActivate handler for the parent form through our own event handler.


procedure LogToINIs(Section,Ident,Value: String);

Private methods that no one can override


procedure PrepareInstall;


procedure RefreshFiles;


procedure RemoveHelperComponent(Value: TBaseHelperComponent);


procedure InstallAliases;

This try..except block is here to convert any exceptions raised by the component to the EAIExtractionError exception type.


procedure InstallFileGroups;


procedure InstallINIFiles;


procedure InstallProgramItems;


procedure InstallRSConnections;


procedure SetInstallTypes(Value: InstallTypeSet);


procedure SetPresetupFiles(Value: TStrings);

Since we do not want to have conflicting installtypes, if one is gotten, we need to exclude that one from all the base helper components


procedure DoAbort(Sender: TObject);

YsflCompress event handlers


procedure DoActivate(Sender: TObject);

YsflCompress event handlers

This handler takes over the original OnActivate handler for the parent form. Note, that we should call this "default" handler before we do our stuff.


procedure DoAfterExtracting(YsflCompress: TYsflCompress;const FileStats: TlzhFileStats);


procedure DoBeforeExtracting(YsflCompress: TYsflCompress;const FileStats: TlzhFileStats);


procedure DoListing(YsflCompress: TYsflCompress;const FileStats: TlzhFileStats);

This procedure updates the Date, Size, and Version run-time properties of all the TInstallFile components


procedure DoNewDisk(YsflCompress: TYsflCompress;const DiskNumber: Integer;var Path: String);


procedure DoReplace(YsflCompress: TYsflCompress;const FileStats: TlzhFileStats);


procedure DoStatus(YsflCompress: TYsflCompress;const FileStats: TlzhFileStats);


function GetHC(I: Integer): TBaseHelperComponent;


function GetHCCount: Integer;


function GetInstallFileGroupCount: Integer;


function GetInstallFileGroups(I: Integer): TInstallFileGroup;


function GetRunningDir: String;


function GetSize: LongInt;


procedure ReadDiskInfo;


Properties


property AfterInstallFile : TInstallFileNotifyEvent

Events


property AfterReadSetupInfo : TAfterReadSetupInfoEvent


property BeforeInstallFile : TInstallFileNotifyEvent


property CustomBadInstallationDlg : TNotifyEvent


property CustomCopyingFileDlgHide : TNotifyEvent


property CustomCopyingFileDlgUpdate : TCopyFileStatusEvent


property CustomFileGroupsDlg : TNotifyEvent


property CustomGoodInstallationDlg : TNotifyEvent


property CustomInstallTypeDlg : TCustomInstallTypeDlgEvent


property CustomNewDiskDlg : TCustomNewDiskDlgEvent


property CustomVerifyCancelDlg : TCustomVerifyCancelDlgEvent


property DestDir : TMetaVariableString

Published declarations


property DoneInstallingAliases : TNotifyEvent


property DoneInstallingFiles : TNotifyEvent


property DoneInstallingINIFiles : TNotifyEvent


property DoneInstallingPMItems : TNotifyEvent


property DoneInstallingRSConnections : TNotifyEvent


property InstallTypes : InstallTypeSet


property Options : InstallOptionSet


property PresetupFiles : TStrings


property RunAutomatic : Boolean


property StartInstallingAliases : TNotifyEvent


property StartInstallingFiles : TNotifyEvent


property StartInstallingINIFiles : TNotifyEvent


property StartInstallingPMItems : TNotifyEvent


property StartInstallingRSConns : TNotifyEvent


property WindowGroupName : String


property BDEFileGroup : TInstallFileGroup

Public declarations


property CopyingFile : TInstallFile


property FileGroupCount : Integer


property FileGroups : TInstallFileGroup


property FilePercentDone : Integer


property HC : TBaseHelperComponent


property HCCount : Integer


property RunningDir : String


property SelectedInstallType : TInstallType


property Size : LongInt


property SourceDir : String


property TotalPercentDone : Integer


property VerifyCancel : Boolean


Events


Variables


ExternalComponentCall : TExternalComponentCall;


FAfterInstallFile : TInstallFileNotifyEvent;

Events


FAfterReadSetupInfoEvent : TAfterReadSetupInfoEvent;


FBeforeInstallFile : TInstallFileNotifyEvent;


FCopyingFile : TInstallFile;


FCustomBadInstallationDlgEvent : TNotifyEvent;


FCustomCopyingFileDlgHide : TNotifyEvent;


FCustomCopyingFileDlgUpdate : TCopyFileStatusEvent;


FCustomFileGroupsDlg : TNotifyEvent;


FCustomGoodInstallationDlgEvent : TNotifyEvent;


FCustomInstallTypeDlg : TCustomInstallTypeDlgEvent;


FCustomNewDiskDlg : TCustomNewDiskDlgEvent;


FCustomVerifyCancelDlg : TCustomVerifyCancelDlgEvent;


FDoneInstallingAliases : TNotifyEvent;


FDoneInstallingFiles : TNotifyEvent;


FDoneInstallingINIFiles : TNotifyEvent;


FDoneInstallingPMItems : TNotifyEvent;


FDoneInstallingRSConnections : TNotifyEvent;


FFilePercentDone : Integer;


FStartInstallingAliases : TNotifyEvent;


FStartInstallingFiles : TNotifyEvent;


FStartInstallingINIFiles : TNotifyEvent;


FStartInstallingPMItems : TNotifyEvent;


FStartInstallingRSConns : TNotifyEvent;


FTotalPercentDone : Integer;


TotalBytesWritten : LongInt;


FBDEFileGroup : TInstallFileGroup;

Property storage fields


FDestDir : TMetaVariableString;


FFileGroups : TList;


FHC : TList;


FInstallTypes : InstallTypeSet;


FOptions : InstallOptionSet;


FPresetupFiles : TStrings;


FRunAutomatic : Boolean;


FRunningDir : String;


FSelectedInstallType : TInstallType;


FSourceDir : String;


FVerifyCancel : Boolean;


FWindowGroupName : String;


Installing : Boolean;

Private declarations


PreviousOnActivate : TNotifyEvent;