More than a set of
Zip and Unzip Components!

ZipTV is a suite of over 37
compression related components!

   
Home
  What's New
Product Info
  Archive Filter
Downloads
Ordering Info
Problem Report
Upgrades
Contact Us
Home- | -What's New- | -Product Info- -Archive Filter- | -Downloads- | -Ordering Info- | -Upgrade- | -Contact

 

TZipRun Component
v2006.2+

This article references the TZipRun component revisions to v2006.2. It includes the ability to extract selected files from an archive and shell to (execute) only one of them. It recreates the directory structure stored within the archive and extracts the selected files accordingly.

This functionality is demonstrated in the following example. The following screen shots are from the demo application (demos\MainDemo\MainDemo.dpr) from the ZipTV Compression components v2006.2.

 

Demo Start:

In the above screen shot (some columns were collasped for this demo), notice the files that are hilighted. One is a Delphi project file (Project1.dpr) we'll call the "action file", the other two are supporting files that Delphi will attempt to open when it opens Project1.dpr.

TZipRun will execute the action file, and simply extract the other two dependant files for support of the action file. Example:

Var
ZipRun1: TZipRun;
ZipRun1.FileSpec.Add(All selected files);
ZipRun1.Execute('Project1.dpr');

 

Ever clicked on a .pas file (unit1.pas) in an archiver and get this ever so familiar error message from Delphi? This is because there was no functionality in the archiver to also extract the action files supporting files.

 

Now that we have our three files selected, lets extract them and run the action file. On the menu bar, select the "View/Run" item:

Note the files selected in the previous screen are added to the listbox in this screen.

Select file to run (from screen show above): When the screen displayed, no files were selected. we hilighted "Examples\Project1.dpr" as the action file. One file must alwasys be the action file. The remaining files are considered support files. In this demo, the selected file from the list is the action file.

OpenMethod Property

The radio buttons in this section coincide with TZipRun.OpenMethod property.

Support files to 'extract': this demo uses these radio buttons to assign TZipRun's FileSpec property.

 

The focus in TZipRun are the FileSpec, OpenMethod, and CommandLineParams properties. The TZipRun's "execute" method must always be called with an action file. The action file must actually exists as a compressed file with the archive. The example method call for this demo is ZipRun1.Execute('Project1.dpr');

Other examples of the usage of this component would be an application containing database or image files that the application are dependant on to function properly.