Pascal Scripting: CreateExtractionPage

Prototype:

function CreateExtractionPage(const ACaption, ADescription: String; const OnExtractionProgress: TOnExtractionProgress): TExtractionWizardPage;

Description:

Creates a wizard page to extract archives and show progress.

The supported archive formats, beyond .7z, and the support for password-protected and multi-volume archives, depend on the ArchiveExtraction [Setup] section directive.

To allow the extraction of archives with custom extensions, such as self-extracting archives, call MapArchiveExtensions.

Set OnExtractionProgress to a function to be informed of progress, or nil otherwise.

Unlike the other types of wizard pages, progress pages are not displayed as part of the normal page sequence (note that there is no AfterID parameter). A progress page can only be displayed programmatically by calling its Show method.

Remarks:

Call the Show method to activate and show the page. When you're finished with it, call the Hide method to revert to the previous page.

Always put the Hide call inside the finally part of a try..finally language construct, as demonstrated in CodeDownloadFiles.iss. Not calling Hide will result in the wizard being permanently stuck on the progress page.

To add a new archive to extract, call the Add method or the AddEx method if the archive is password-protected. Always call the Clear method before adding the first file.

To start the extraction, call the Extract method. An exception will be raised if there was an error. Otherwise, Extract returns the number of archives extracted.

Set the ShowArchiveInsteadFile property to True to show the name of the archive which is being extracted to the user instead of the names of the files inside the archive.

See ExtractArchive for the definition of TOnExtractionProgress.

Example:

See CodeDownloadFiles.iss for an example of CreateDownloadPage which works very similar to CreateExtractionPage.

See DownloadFiles.iss for an example of archive extraction using just a [Files] entry instead.

See also:

TExtractionWizardPage
ExtractArchive
MapArchiveExtensions
CreateOutputProgressPage