**********************************************************************
Author: TMS Software
        Copyright  1998-2005
        E-mail: info@tmssoftware.com
        Web: http://www.tmssoftware.com
**********************************************************************

Delphi 5.0/6.0/7.0/2005/2006 & C++Builder 5.0/6.0/2006


Files :
-----
  cabfd5.zip : component files for Delphi 5.0
  cabfd6.zip : component files for Delphi 6.0
  cabfd7.zip : component files for Delphi 7.0
  cabfd2005.zip : component files for Delphi 2005
  cabfd2006.zip : component files for Delphi 2006
  cabfc5.zip : component files for C++Builder 5.0
  cabfc6.zip : component files for C++Builder 6.0
  cabfd2006.zip : component files for C++Builder 2006
  
Release 1.5 :
-------------
  Wrapper around the CABINET.DLL functions to create CAB files
  or extract files from CAB files. Can create self extracting
  .EXE files as well.


Feature Revision history :
------------------------

  10/10/1999 : first release
  30/6/2000  : added C++Builder 5 support
               added OnCompressProgress event
               added LZX compression type support
               improved : moved TMP file creation to Windows temp folder
               added public read-only properties CompressionRatio, CompressedSize,OriginalSize
  29/9/2000  : added new property to store internal relative path 
               new event OnOverwriteFile, OnDecompressProgress
               new method : MakeSFX
  2/8/2001   : Added Delphi 6 support
             : Improved property editing
             : Fixed but w.r.t. extraction to root directory
  23/4/2002  : Added C++Builder 6 support
               Added CABFile.CABFileContents.AddFolder method
               Added CABFile.CABFileContents.AddRelFolder method
  27/12/2005 : Added support for Delphi 2005, Delphi 2006, C++Builder 2006


Installation :
--------------

 In Delphi 5,6,7,2005,2006 or C++Builder 5,6,2006

 Unzip files cabfdx or cabfcx into a separate component directory


 In Delphi :

 Choose File, Open, browse for CABFilePkgDx.DPK file
 
 From the package editor choose Install


 In C++Builder :

 Choose File, Open, browse for CABFilePkgCx.BPK file
 
 From the package editor choose Install


 Add the path where the component is installed to your environment or project's library path




Using TCABFile :
----------------

 Interface :

 Methods
 procedure GetContents;
 procedure ExtractAll;
 procedure ExtractSelected;
 procedure ExtractFile(const fName:string);
 function Compress:boolean;
 function MakeSFX:boolean;

 Properties 
 property CABFileContents:TCABFileContents;
 property CABFile:string;
 property CompressionType:TCompressionType; Can be typNone,typMSZIP,typLZX
 property LZXMemory:TLZXMemory; can be value from lzxLowest to lzxHighest
 property TargetPath:string;

 Following properties are read-only and have a value only after the Compress method

 property CompressionRatio:double r/o
 property CompressedSize:integer r/o
 property OriginalSize:integer r/o


 With TCABFileContents being a TCollection of TCABFileEntry.
 TCABFileEntry is a collection item with 4 properties :
 Name:string, Size:integer, Date:tdatetime, Selected:boolean


 Decompressing files :

 1) Set the property CABFile to the full path + filename of the CAB file
 2) Call the method GetContents
    This method fills the collection with details about the files included
    in the CAB file
 3) Call either ExtractAll, ExtractSelected, ExtractFile(filename:string)
    The first method extracts all files to the TargetPath, regardless of
    the Selected state in each CABFileEntry in the CABFileContents collection

    The ExtractSelected method only extract files with Selected=true in
    the CABFileContents collection

    ExtractFile extracts only one file, regardless of its Selected state


 Compressing files :

 1) Fill the CABFileContents collection with CABFileEntry elements,
    where Name is the full path to the file that needs to be added
    to the CAB file. The RelPath property contains the relative path
    where the file will be decompressed.

 2) Set the CABFile property to the CAB file that needs to be created
    Note that the CAB API doesn't allow to add files to an existing
    CAB file, so you must choose a non-existing file!

 3) Call the Compress or MakeSFX method



 Compressing multiple files in a directory :

 CABFile.CABFileContents.Clear; 
 CABFile.CABFileContents.AddFolder('\my directory\*.DOC');
 CABFile.CABFileName := 'mycabfile.CAB';
 CABFile.Compress;


Usage :
-------
 This component is freeware for non-commercial applications.
 License for commercial use is equivalent to buying source code,
 and is available for $30. Licensed users get source code updates
 for all 1.x versions. Send cheque or cash for $30 to address above
 and source code will be sent by email immediately upon receipt.
 If you would like to register TCABFile online, you can do the
 registration at http://www.shareit.com/programs/103312.htm.
 Alternatively, you can go to http://www.shareit.com and enter
 the program number there: 103312. Since the online registration
 for a TMS basic component is valid for several TMS components,
 do not forget to request TCABFile by email as well via
 info@tmssoftware.com
 TCABFile is also part of the TMS Component Pack, see
 http://www.tmssoftware.com/tmspack.htm


Help, hints, tips, bug reports :
------------------------------
 Send any remarks to : help@tmssoftware.com
 Please clearly state which Delphi or C++Builder version you are using
 and which version of the component you are using. In case of doubt,
 download the latest version first at http://www.tmssoftware.com


