HOW TO INSTALL ZIP

     Zip is distributed as C source code that can be compiled on a
     wide range of systems: Unix, VMS, MSDOS, OS/2, NT, Amiga, Atari,
     BeOS, VM/CMS, ...  You will need Unzip 5.0p1 or later (under any
     system) or PKUNZIP 2.04g or later (under MSDOS) to unpack the
     distribution file, for example zip30.zip. But since you read this,
     you have unpacked it already, or you cheated and got a tar.Z file...

Installation on Unix (see below for installation on other systems)

     Let's assume that you start from scratch and have not yet
     unpacked the sources. First, unpack the source as follows,
     assuming that you have zip30.zip in the current directory.

          mkdir zipsrc
          cd zipsrc
          unzip ../zip30

     This extracts all source files and documentation in the
     directory called "zipsrc".  It's likely the source will be
     distributed in its own directory, zip30/, in the archive,
     making the creating of the zipsrc directory optional.

     This release now includes the standard encryption code previously
     in the separate package zcrypt29.zip, but you still can decide
     whether to activate the crypt code or not.  Crypt is enabled by
     default, but you may disable it by specifying the option -DNO_CRYPT
     in the LOCAL_ZIP environment variable (or by adding this option
     to the compilation options in the appropiate makefile).  See
     Readme.cr for more on crypt.

     You then do:

          make -f unix/Makefile system

     where "system" is one of: generic, generic_gcc,
     att6300, coherent, cray_v3, minix, sco_x286, xenix, zilog.

     For unix systems, try "make -f unix/Makefile generic" first, as this
     should work on most systems and automatically selects compilation
     options based on a set of tests, including detection of large file
     support sufficient to enable Zip64 support.  If generic fails, then
     use one of the special targets given above.

     Among other special systems are Cray Unicos, Zilog Zeus and MINIX.

     By default, Zip uses the "deflate" compression method.  To add
     support for the optional "bzip2" compression method, see the file
     bzip2/install.txt.  Note that bzip2 support is provided by compiling
     or linking in the bzip2 library.  See the bzip2 site
     (http://www.bzip.org/) for more on bzip2.

     If you get error messages "constant expected" in deflate.c, add
     -DDYN_ALLOC to CFLAGS in your makefile entry.

     If you have lots of memory, try compiling with -DBIG_MEM. If your
     system supports mmap(), try compiling with -DMMAP. This generally
     gives faster compression but uses more memory. See the unix/Makefile
     entry mmap_gcc for an example.

     If none of these compiles, links, and functions properly on
     your Unix system, see the file README for how to get help.

     If the appropriate system was selected, then the executables zip,
     zipnote, zipcloak, and zipsplit will be created.  You can copy
     them to an appropriate directory in the search path using:

          make -f unix/Makefile install

     The defaults are /usr/local/bin for the executables and
     /usr/local/man/man1 for the manual page. Change the macros
     BINDIR and MANDIR in makefile if appropriate.

     You can use the command "set" to see the current search
     path.  If you are using the C-Shell (csh), enter the com-
     mand:

          rehash

     so csh can find the new command in the path.  You are now
     ready to use Zip.

     You can get rid of the now unnecessary source and object
     files with:

          cd ..
          rm -r zipsrc

     This will remove the directory zip and its contents created
     by unzip.  You should keep the zip30.zip file around though,
     in case you need to build it again or want to give it to a
     colleague.

     You can add the following lines to the file /etc/magic for
     usage by the 'file' command:

0       string          PK              Zip archive
>4      byte            011             (at least v0.9 to extract)
>4      byte            012             (at least v1.0 to extract)
>4      byte            013             (at least v1.1 to extract)
>4      byte            024             (at least v2.0 to extract)
>4      byte            025             (at least v2.1 to extract)


Installation on other systems

     The steps for installation under VMS, MSDOS, OS/2, NT, Amiga and
     Atari are similar to the above: first unzip the distribution
     files into their own directory.  The system dependant files are
     stored in special subdirectories.

     For all the non-unix ports which support the creation of "UT" extra
     fields (these ports contain USE_EF_UT_TIME in the list of optional
     features displayed with "zip -v"), the timezone environment variable TZ
     should be set according to the local timezone in order for the -f,
     -u and -o options to work correctly.  This is not needed for the WIN32
     and WinDLL ports, since they get the timezone information from the OS by
     other means.

  MSDOS:

     Do one of:

          make msdos\makefile.msc               (Microsoft C 5.1)
          nmake -f msdos\makefile.msc           (Microsoft C 6.0 and newer)
          make -fmsdos\makefile.bor -DCC_REV=1  (Borland Turbo C++ 1.0)
          make -fmsdos\makefile.bor             (Borland C++ 2.0 and newer)
          make -fmsdos\makefile.tc              (Borland Turbo C 2.0x)
          make -f msdos/makefile.dj1            (DJGPP v1.12m4)
          make -f msdos/makefile.dj2            (DJGPP v2.01 and newer)
          make -f msdos/makefile.emx            (gcc/emx 0.9b and newer)
          make -f os2/makefile.os2 gccdos       (gcc/emx 0.9b and newer)
          wmake -f msdos\makefile.wat           (Watcom C 11.x 16-bit)
          wmake -f msdos\makefile.wat PM=1      (Watcom C 11.x 32-bit, PMODE/W)


     for Microsoft, Borland C++ and Turbo C, Watcom C/C++ and the various
     free GNU C implementations, respectively. More detailed instructions
     can be found in the respective makefiles.


  WIN32 (Windows NT/2K/XP/2K3 and Windows 95/98/ME):

     Supported compilers are Microsoft Visual C++, Borland C++, Watcom C/C++,
     and miscellaneous free GNU C implementations (gcc/mingw, CygWin, ...).
     The makefiles supplied in the win32/ subdirectory contain further
     information.


  Windows DLL (WIN32):

     Supported environments are Visual C++ (32-bit only, 5.x and newer).
     For instructions how to build the DLLs and where find the makefiles,
     look into windll/contents.


  OS/2:

     Type

          {make} -f os2/makefile.os2

     to get a list of supported targets/compiling environments.
     (replace "{make}" with the name of your OS/2 make utility.)

     To initiate the actual compiling process, you have to specify
     a system target:

          {make} -f os2/makefile.os2 {system}

     An example: type

          nmake -f os2/makefile.os2 msc

     for Microsoft C 6.00.


  VMS (OpenVMS):

     The most complete information on building and installation for VMS
     is in [.VMS]INSTALL_VMS.TXT.  Optimists in a hurry may wish to try
     commands like these:

           @ [.VMS]BUILD_ZIP.COM
     or:
           MMS /DESCRIP = [.VMS]DESCRIP.MMS CLEAN        ! Or MMK ...
           MMS /DESCRIP = [.VMS]DESCRIP.MMS              ! Or MMK ...

     When the executables have been created (or located), most users
     define foreign command symbols for the Zip executables, like this:

          ZIP :== $ dev:[dir]ZIP.EXE            ! UNIX-like command line.
     or:
          ZIP :== $ dev:[dir]ZIP_CLI.EXE        ! VMS-like command line.

     Such symbol definitions are often added to a user's
     SYS$LOGIN:LOGIN.COM procedure, or to a common, site-specific
     procedure, like SYS$MANAGER:SYLOGIN.COM.

     Additional installation options are described in INSTALL_VMS.TXT.

     The builders create help text files, ZIP.HLP and ZIP_CLI.HLP.  Also
     see INSTALL_VMS.TXT for how to create the help libraries.

Compiler Flags

  Zip should compile fine out of the box for your port.  In particular,
  for Unix the command
    make -f unix/Makefile generic
  should automatically detect the features available on your system and
  set the flags appropriately.  In some cases, however, you may need to
  set one or more compiler flags yourself to get Zip to compile or to
  add features you want or remove features that cause trouble for your
  port.  Below are the more common compiler macros you can set.

  LARGE_FILE_SUPPORT
    Tell Zip that the OS supports large files (generally files larger
    than 4 GB).  Zip will try to compile in the large file calls
    (typically 64-bit) for the OS instead of using the standard
    (typically 32-bit) file calls.  On Unix Zip tries to switch over to
    the 64-bit file environment.  If setting this flag causes errors
    or Zip still can't handle large files, then probably either Zip
    doesn't have the code to support large files on your OS (write a
    patch and send it in to us) or your OS doesn't support large files.

    This flag should be set automatically on Unix, Win32, VMS, and some
    other ports.  Setting NO_LARGE_FILE_SUPPORT turns this flag off.

  ZIP64_SUPPORT
    Enable the Zip64 code in Zip that supports the Zip64 extensions noted
    in the PKWare AppNote.  These extensions allow storing files larger
    than 4 GB in archives and the creating of archives larger than 4 GB.
    They also allow storing more than 64K files in an archive.

    This flag should be set automatically on most ports if
    LARGE_FILE_SUPPORT is set.  Setting NO_ZIP64_SUPPORT turns this flag
    off.

    To enable large file support in Zip, you generally need to set both
    LARGE_FILE_SUPPORT (to read and write large files) and ZIP64_SUPPORT
    (to store them in and read them from archives).  Files larger than
    4 GB may be invisible to Zip if LARGE_FILE_SUPPORT is not enabled.

    Keeping LARGE_FILE_SUPPORT and ZIP64_SUPPORT separate allows easier
    debugging of these features.  When testing large file support on an
    OS, first set just LARGE_FILE_SUPPORT to test the file calls (all
    should compile and work as before with small files), then turn on
    ZIP64_SUPPORT to let Zip recognize and handle large files.

  UNICODE_SUPPORT
    Enable storing and using UTF-8 paths.  These paths are stored in
    a backward-compatible way so that archives with UTF-8 paths still
    work on zips and unzips that don't support Unicode.  This support
    is preliminary and only paths are currently stored, though UTF-8
    comment support should also be implemented in the next release.
    This flag also enables recognizing and using the new Unicode flag
    bit in the PKWare AppNote, but this flag is not fully backward
    compatible and is only supported on systems where UTF-8 is the
    native character set.

    On some ports UNICODE_SUPPORT is set automatically if wide characters
    are supported.  Setting NO_UNICODE_SUPPORT turns off this flag.

  USE_EF_UT_TIME
    Enables storing UT time in an extra field.  This becomes useful
    for ports that normally store file times as local time, resulting
    in problems when files are moved across time zones and when
    there are daylight savings time changes.  Zip and UnZip will
    automatically correct for time zone changes when UT time is stored.

    This is usually set by default.  Use NO_EF_UT_TIME to turn this off.

  NTSD_EAS (Win32 only)
    Enable storing Windows NT file security descriptors.  This allows
    restoring the descriptors (file ACL's, etc.).

    This is on by default for Win32.  Use NO_NTSD_EAS to turn this off.

  BZIP2_SUPPORT
    Enable compressing zip entries using the bzip2 library.  You must get
    the bzip2 library from somewhere else as we only provide a way to link
    the library in and compress files using bzip2.  Enables a new compression
    method, bzip2, that can be used instead of the default Zip compression
    method deflate.

    Set on Unix, including Mac OS X, when compiling using generic if the
    bzip2 library is found.  Set on Win32 if the bzip2 projects are used.
    See the VMS documentation for when VMS sets this flag.  Setting
    NO_BZIP2_SUPPORT turns this off.

    See bzip2/install.txt for more on installing bzip2 support.

  WIN32_OEM (Win32 only)
    Enable saving paths on Win32 in the OEM character set.  Zip has stored
    paths using the standard ANSI local character set, but other zips have
    used the OEM character set on MSDOS and Win32.  This flag should make
    Zip more compatible with other DOS and Win32 zips and unzips.  It also
    enables the translation of OEM paths in DOS archives to ANSI and should
    eliminate some problems with funny characters showing up in path names.

    This flag is on by default on Win32.  Defining NO_WIN32_OEM turns
    this flag off.

  NO_STREAMING_STORE
    Because storing zip archives inside a zip entry adds "false" signatures
    and this causes problems when using data descriptors if the archive
    needs fixing, this option is provided to force deflating when streaming.
    This version of Zip includes an advanced algorithm for correctly finding
    these signatures, but if an archive is "broke", there is no telling
    what's where.  This is only a problem if an archive becomes broke for
    some reason.  To be safe, define this.

  ALLOW_REGEX
    For MSDOS and Windows, now [list] wildcard matching is turned off unless
    the new -RE option is used.  Defining this forces [list] to be always on.


For command help on any of the zip* utilities, simply enter
the name with no arguments.
