Delphi Zip
Version 1.40
by Eric W. Engler


See \zip\doc\CHANGES.TXT for note on changes since version 1.30.  
If you already have v1.30 installed, then install this update right
over the top of it.  Make sure you rebuild the Component library with
the updated VCLs included with this release.


This is a complete release, so you DO NOT need to have any prior   
version before installing this release.


  IMPORTANT NOTE FOR C++ BUILDER DEVELOPERS
  -----------------------------------------
  We now have a native C++ port of TZipMaster to C++ Builder!
  The new C++ version is called TZipBuilder, and was coded by 
  Chris Vleghert.  See the file:
     \ZIP\BCB\INST-BCB.TXT 
  for C++ Builder instructions!  By the way, the \ZIP\BCB 
  subdirectory has all the BCB subdirectories and files.


New Change to Installation For v1.40:
-------------------------------------
You need to copy the redistributable modules to your desired
directory on your development computer.  Version 1.30 did this
for you automatically.

Copy \zip\dll\*.DLL to your Windows System directory.
Copy \zip\sfx\*.BIN to your Windows System directory.


Installation
------------

This is one of the biggest freeware software releases for Delphi and
C++ Builder.  To get going quickly and correctly, please follow these
instructions.  Read them over once before starting.  If you don't
understand a step, get help before you start the install!


1. You MUST install this package on a computer that has Delphi 2 or 3.
   Minor version upgrades to any of these compilers should not affect 
   this package, but you should always rebuild your VCL component
   library after doing a minor or major upgrade.

2.  The VCLs included with this release are:
      TZipMaster - the main ZIP support VCL
                   (used by demo1, demo2)
      TSortGrid  - a very handy descendant from TStringGrid
                   (used by demo1, demo3, and demo4)
      TZipDir    - a simple utility VCL to get the contents 
                   of a ZIP archive (used demo3 and demo4)

    The files required to support these VCLs are located in the
    VCL subdirectory.  You have two choices for how to proceed
    (option A is recommended):

      A) add the directory C:\ZIP\VCL to your VCL search path
                             or
      B) copy the files in C:\ZIP\VCL to another directory already
         in your VCL search path

    If you want to use option A, the instructions for this are
    included below.  If you want option B, then please copy those
    files now.
  

3.  Install the three VCLs       

    This procedure will install the VCLs into the IDE.  After
    this, you will be able to see them on the "Samples" tab.


   IMPORTANT: When opening the demo projects in Delphi 2 you
   will get some errors for properties that did not exist in
   Delphi 2.  Just "ignore all" and the projects will work fine.

   Delphi 2:
      a) Close any Files or Projects that are open.
      b) Select the "Component...Install" choice.
      c) If you want to add C:\ZIP\VCL to the library search
         path, you may do it now using the second edit box.

      d) Click on the Add button.  
      e) Enter the path and filename of where the ZIPMSTR.PAS 
         file is located, or find it now with Browse. 

      f) Click on the Add button.  
      g) Enter the path and filename of where the SORTGRID.PAS 
         file is located, or find it now with Browse. 

      h) Click on the Add button.  
      i) Enter the path and filename of where the ZIPDIR.PAS 
         file is located, or find it now with Browse. 

      j) Click on OK.  The component library will rebuild.

    Delphi 3:
      These instructions assume you will place the VCLs into
      the standard user package "DCLUSR30.DPK".  Advanced 
      developers may want to use a different package, or to
      make a new package.  Packages can be confusing, so I will
      only document the simplest case, of putting them into 
      "DCLUSR30.DPK", which will work fine for most developers.
 
      a) Close any Files or Projects that are open.
      b) Select the "Component, Install Component" choice. Make
         sure the "Into existing package" tab is selected.
      c) Check to see if package: "DCLUSR30.DPK" is already 
         selected.  If not, you should now locate "dclusr30.dpk".
      d) Add the C:\ZIP\VCL directory to the search path
         box (unless you copied the files to a path already
         in the search path).

      e) In the Unit name block, enter ZIPMSTR.PAS. Click OK.
      f) It will ask if you want to rebuild the Component Library.
         ANSWER NO (saves time to do it only 1 time later).

      g) Click on Add.
      h) In the Unit name block, enter SORTGRID.PAS. Click OK.
      i) It will ask if you want to rebuild the Component Library.
         ANSWER NO (saves time to do it only 1 time later).

      j) Click on Add.
      k) In the Unit name block, enter ZIPDIR.PAS. Click OK.

      l) It will ask if you want to rebuild the Component Library.
         ANSWER YES this time.  The component library will rebuild.
         If it does not automatically install the new VCLs to the
         component palette, then click on the "install" button of
         the package option dialog box.

      m) When done, close the package option dialog box by
         clicking on it's upper right corner.  Say "Yes" to
         keep the changes.


                      DELPHI 2 HELP INSTALLATION
                   
1) Make sure Delphi is NOT running now.

2) Copy the .kwf file from \zip\help to Delphi's HELP directory.

3) Copy the .hlp file from \zip\help to Delphi's BIN directory.
   Make a backup copy of the .HDX file in the BIN directory.

4) Run HelpInst.exe from Delphi's HELP\TOOLS subdir.

5) Open the .HDX file from HelpInst menu 
   (which is now in Delphi's BIN directory).

6) Press + to add the .kwf file
   (which is now in Delphi's HELP directory)

7) Save the new .HDX file from HelpInst menu.

8) Exit from HelpInst.


                      DELPHI 3 HELP INSTALLATION

1) Make sure Delphi is NOT running now.

2) Copy ZipMstr.hlp and ZipMstr.cnt from \zip\help
   to Delphi 3's help subdirectory.

3) In Delphi 3's Help subdirectory, edit Delphi3.cnt and 
   add the following two lines (add each one to the appropriate
   section in that small file):
:Index ZipMaster Component Help=ZipMstr.hlp
:include ZipMstr.cnt

4) In Delphi 3's Help subdirectory, delete the old 
   DELPHI3.GID and DELPHI3.FTS files.  This can be done easily 
   from Explorer.  Make sure Delphi is NOT running when you do 
   this. If you want to do it from an MS-DOS prompt, 
   you may need to un-hide them first:
C>attrib -r -h -s delphi3.gid 
C>del delphi3.gid
C>attrib -r -h -s delphi3.fts 
C>del delphi3.fts

5) The next time you use Delphi's Help feature, it'll say
   "preparing help file for first use".  This is when it is
   rebuilding the .GID file to include the new Help topics.
   The next time you do a full text search in Help, it'll 
   rebuild DELPHI3.FTS.  


                            DELPHI DEMOS

   NOTE: You should have the compiler option "break on exception"
   turned off because the demos that use the SortGrid VCL use 
   exceptions to determine datatypes.  This is only a concern 
   when running the demo programs from the IDE.


1.  From the IDE, open the project C:\ZIP\DEMO1\DEMO1.DPR.
    Select Run.  

    Examine the forms and decide if you need to resize any of
    the controls, or change the position of anything. This is
    sometimes necessary if I developed the forms at a different
    screen resolution than you are using.

    The demo1 program is a fairly straight-forward example
    of what you can do with this package!  Everything revolves
    around the TSortGrid, which always shows you the contents 
    of your ZIP archive.  Use right-click on a column header to
    do an descending sort, or a left-click for an ascending sort.
 
2.  Now, you can look at the simplest demo program.  This is
    especially useful because it doesn't have so much "clutter".
    It just shows you the easiest way to use TZipMaster from 
    within any of your programs.

    From the Delphi IDE, open the project C:\ZIP\DEMO2\DEMO2.DPR.
    Select Run.  

3.  Demo program #3 is not intended for use by most programmers.
    If you're not extremely curious about the inner workings of
    the DLL interface to Delphi, I advise you to skip this demo!
    It shows very advanced programmers how they can access the
    DLL's without using the TZipMaster VCL.  This gives them a
    few more options, but can be difficult to code and debug.
    This level of programming is how I had to start out in
    developing the DLL interface.  The last step I did was to
    create TZipMaster and demo programs 1 and 2.  The moral of
    the story: sometimes things have to get complex in order to
    make them easy!

4.  Demo program #4 is a NEW ADDITION to this release!  It includes
    example code to let you install the program into Windows via
    a separate Installation menu.  It also supports uninstalls
    thru the Control Panel Add/Remove Programs option.

    Since this uses a new Delphi 3 "ShlObj" unit, it won't work
    on Delphi 2.

    This is very advanced code that is set up for English Win95
    systems.  You may need to adapt it for use in other countries,
    or for use with WinNT.  

    WARNING: Use DEMO4 AT YOUR OWN RISK!!!  I still consider it
    a "work in progress", but it is very handy code, so I decided
    to include it with this release.


                    NOTE on WIN/NT Debugging

On WinNT, the Borland integrated debugger (in both Delphi and 
C++ Builder) will sometimes act as though it hit a breakpoint
in the DLL.  You may see an error regarding the RTL freeHeap.
This is only a problem when debugging - it does not pose a
problem if run outside of the IDE.


                  Deployment of Your Programs

Any program you write using this package will require the two 
DLLs: ZIPDLL.DLL and UNZDLL.DLL to be present of each user's
hard disk.  You should have your install procedures put these
files into the WINDOWS SYSTEM directory (which is named differently
on some systems - especially WinNT systems).  If that isn't 
possible, then you should put them into the same directory as 
your .EXE program that uses them.

Also, the ZIPSFX.BIN module must be installed into the same
directory as the DLLs.  This module is only needed if your
application program needs to make .EXE archives.

IMPORTANT: Any .EXE archives you make with this package do
NOT need any supporting files on the end-user's computer!
This is very handy!

Microsoft is said to be recommending that DLLs should be
installed in application directory, rather than the Windows
system directory.  This may become a requirement of a future
version of Windows.

Of course, there are no distribution fees for the DLLs, or
any other part of the package.  This whole package is 
freeware, but does have some minor distribution restrictions
(mainly that you can't profit from the ZIP DLLs, and you need
to document where users can get source code).  Please see 
README.TXT for these restrictions.
    

See README.TXT for more general information about this release,
and also check out the DOC subdirectory.


Eric Engler
englere@swcp.com
