CabPack v1.2
============
Written by Lars Hederer in 1998.


What is it?
-----------

CabPack is an extension to Microsoft's MakeCAB that makes it easy to create
.CAB files. The powerful CAB compression engine by Microsoft achieves a
significantly higher compression rate than any other compressor on the
market, with the new LZX compression scheme. Problem is that it is normally
difficult to create CABs with MakeCAB, and so I decided to write this little
program. It must be run in a DOS box under Win95, and will prompt for the
information necessary to create .CAB files (source, destination dir,
compression method, disk spanning etc.). I think that Microsoft did a great
job in creating MakeCAB and making it accessible to the public, and perhaps
my program helps someone make use of CAB compression.

Note that this program REQUIRES a Win95 DOS box to run; it will NOT work
with Windows NT.


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

This archive should contain the following files:

CABPACK.EXE         The main program.
CABPACK.TXT         The file you're just reading.
EXTRAC32.EXE        32bit extraction program.
EXTRACT.EXE         16bit extraction program.
MAKECAB.OVL         The MakeCAB engine.

Simply unzip them into any dir and run cabpack.exe.


Using CabPack
-------------

When you start CabPack, you will get a series of prompts in which you
specify the files to compress, where to place the resulting cabinets etc.
The options are as follows:


* SOURCE directory or file

  Here you can either specify a directory - or "folder" :-) - or a single
  file that should be compressed.

  Example: C:\My Files\Letter to Marcus.doc

  Depending on your choice, CabPack may additionally ask if you want to:

  * store the complete path of a single file,
  * recurse subdirectories, and if yes,
    * strip out the base path from the directory structure.


* DESTINATION directory for .CAB files

  The name of the directory (which will be created if it doesn't exist)
  where your CAB file(s) will be placed.


* Directory containing setup files

  Here you may optionally specify a directory that contains files to be
  copied to the destination directory, or to Disk 1 of the cabinet set, if
  you enable disk spanning (see below). May be a setup program, for example.


* CompressionType

  May be either MSZIP or LZX. While MSZIP is faster, LZX provides
  SIGNIFICANTLY better compression and should be the recommended option.

  If you use LZX, you must also specify the

  * CompressionMemory

    May be a number between 15..21: higher numbers provide better
    compression, but slow the compression process down.


* MaxDiskSize

  With this option, you can enable/disable disk spanning. For example, to
  create cabinets that fit on 1.44 MB floppy disks, you would specify
  1457664. The resulting cabinets are then placed in directories named
  DISK1, DISK2, DISK3, ..., DISKN under the destination directory.

  If you specified a setup directory (see above), files in there will be
  copied to the DISK1 directory, and the first cabinet file will
  automatically be smaller to provide space on the disk for these files.

  If you enter nothing, disk spanning will be disabled, and CabPack will
  create one single CAB file.

  If you specify a number for MaxDiskSize, CabPack will also prompt for the

  * ClusterSize

    1.2 and 1.44 MB floppies have a cluster size of 512 bytes. If you have
    media with other cluster sizes you can specify this here; it is used by
    MakeCAB to round up the sizes of files and cabinets to a cluster
    boundary, so it can determine when to switch to the next disk.


* CabinetNameTemplate

  The name of the resulting CAB file(s). If you insert * anywhere in the
  file name, it will be replaced with the actual disk number.

  Example: Disk * of the backup.cab

  would give you files named "Disk 1 of the backup.cab",
  "Disk 2 of the backup.cab" and so on, or if you disabled disk spanning,
  would give you just one file named "Disk 1 of the backup.cab".

  
  If you enabled disk spanning:

* DiskLabelTemplate

  The description of your cabinet set; will be stored inside each CAB file
  of the set and shown to the user during extraction ("Please insert the
  disk labeled '...'").

  Example: Disk *


At this point, CabPack has gathered all necessary information it needs to
start the CAB creation progress. It displays a summary of what you've
entered and asks you if you want to continue.


Long file names
---------------

If you specified a directory or file to compress which contains long file
names, CabPack will ask you if you want to use a 16 or 32bit CAB extractor.
This is necessary because cabinet files with long file names in it can NOT
be expanded by a 16bit extraction program. If, however, you choose to use a
16bit extractor, CabPack will store these long names in the 8.3 format.


OEM characters
--------------

CabPack may warn you that it has found OEM characters in the file names
(this is German characters, for example). These characters are extracted
DIFFERENTLY depending on whether you use a 16 or 32bit extractor. CabPack
therefore needs to know which type of extractor you wish to use.

If you want BOTH extractor types to work properly with cabinets created for
the 16bit extractor, you will have to avoid OEM characters in file names.


Self-extracting cabinets
------------------------

You can create SFX cabinets by simply concatenating a cabinet file to
EXTRACT.EXE (or EXTRAC32.EXE).

For example, if you've built test.cab, you can
  "copy /b extract.exe+test.cab test.exe"
and you have the self-extracting archive test.exe.

This also works for multi-volume CABs: in this case you just have to
concatenate the first file of the set to EXTRACT.EXE.


Version history
---------------

1.0   Initial release; no long file name support :-(

1.1   Added long file name support (MANY MANY THANKS to Cristi Streng for
      his Pascal unit DOS70!); and, therefore, added a 32bit extractor to
      the archive.
      Minor bug fixes in filename handling.

1.2   Improved LFN support, revised documentation, bug fixes.


Other useful CAB utilities
--------------------------

For more information on CAB compression and tools, visit the CAB homepage at
  http://www.microsoft.com/workshop/prog/cab

A useful tool called "Iexpress" can be found in Microsoft's Internet
Explorer 4 Administration Kit: with Iexpress you can create self-extracting
Windows CABs! If you have an IE4 CD, you probably have the Kit already, else
go to www.ftpsearch.com and search for "ieak4.cab".


Copyrights
----------

CabPack is public domain, please distribute freely.
MakeCAB and Extract are (c) Microsoft.


Comments, questions, bug reports?
---------------------------------
Please email me!

Lars Hederer
hhederer@t-online.de
