home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 9 Archive / 09-Archive.zip / unzip52.zip / INSTALL < prev    next >
Text File  |  1996-04-24  |  22KB  |  405 lines

  1. __________________________________________________________________________
  2.  
  3.   This is the Info-ZIP file INSTALL (for UnZip), last updated 24 Apr 96.
  4. __________________________________________________________________________
  5.  
  6.   Yes, this is a rather long file, but don't be intimidated:  much of its
  7.   length is due to coverage of multiple operating systems and of optional
  8.   customization features, large portions of which may be skipped.  --GRR
  9. __________________________________________________________________________
  10.  
  11.  
  12.  
  13. To compile UnZip, UnZipSFX and/or fUnZip (quick-start instructions):
  14. =========================================
  15.  
  16. (1) Unpack everything into a work directory somewhere, and make sure you're
  17.     in the main UnZip directory (the one with this file in it).
  18.  
  19. (2) Copy the appropriate makefile into the current directory, except under
  20.     OS/2.
  21.  
  22. (3) Run your "make" utility on the makefile (e.g., "nmake -f makefile.msc").
  23.  
  24. (4) Try out your new UnZip the way you would any new utility:  read the
  25.     docs first.
  26.  
  27.     Ah ha ha ha!!  Oh, that kills me.  But seriously...for VMS, UnZip must
  28.     be installed as a "foreign symbol"; see the Install section below or
  29.     [.vms]readme.vms for details.  (It basically involves adding a line
  30.     sort of like this to login.com:    $ unzip == "$disk:[dir]unzip.exe")
  31.     For DOS and other OSes without explicit timezone support (i.e., every-
  32.     body but Unix), make sure the "TZ" environment variable is set to a
  33.     valid and reasonable value; see your compiler docs for details.
  34.  
  35.  
  36.  
  37. To compile UnZip, UnZipSFX and/or fUnZip (detailed instructions):
  38. =========================================
  39.  
  40. (1) Unpack *.c and *.h (the actual source files), preserving the directory
  41.     structure (e.g., ./unix/unix.c).  The sole exception is TOPS-20, where
  42.     tops20/* should be unpacked into the current directory, but TOPS-20
  43.     is no longer fully supported anyway.
  44.  
  45.     If you wish to compile with decryption enabled, you must get the zcrypt
  46.     package (see the "Where" file).  Unpack crypt.c and crypt.h from the
  47.     zcrypt archive, overwriting the dummy versions supplied with UnZip.  If
  48.     you don't have any sort of unzipper available, you'll have to compile the
  49.     non-crypt version first and use that to unpack the full crypt sources,
  50.     then recompile.  (The zipcloak.c file included in the zcrypt archive is
  51.     for use only with the Zip 2.x sources, so don't bother unpacking it.)
  52.  
  53.  
  54. (2) Choose the appropriate makefile based on the description in the Con-
  55.     tents file for your OS (that is, there's only one for Unix or OS/2, but
  56.     MS-DOS and several other OSes have several, depending on the compiler).
  57.     Copy it into the current directory and rename if necessary or desired.
  58.     (Some makefiles can be invoked in place; see (5) below.)
  59.  
  60.     Special point of confusion:  some MS-DOS targets are in non-MSDOS
  61.     makefiles.  In particular, for DOS emx+gcc use the gccdos target of
  62.     the OS/2 makefile (os2/makefile.os2), and for djgpp use the gcc_dos
  63.     target of the Unix makefile (unix/Makefile).  In addition, OS/2 users
  64.     of MSC can cross-compile to MS-DOS with makefile.os2's mscdos target.
  65.  
  66.     Extra special point of confusion:  makefile.os2 expects to remain in
  67.     the os2 subdirectory.  Invoke it as "nmake -f os2/makefile.os2 gcc",
  68.     for example.
  69.  
  70.  
  71. (3) If you want a non-standard version of UnZip, define one or more of the
  72.     following optional macros, either by adding them to the LOCAL_UNZIP
  73.     environment variable or by editing your makefile as appropriate.  The
  74.     syntax differs from compiler to compiler, but macros are often defined
  75.     via "-DMACRO_NAME" or similar (for one called MACRO_NAME).  Note that
  76.     some of these may not be fully supported in future releases (or even
  77.     in the current release).  Note also that very short command lines in
  78.     MS-DOS (128 characters) may place severe limits on how many of these
  79.     can be used; if need be, the definitions can be placed at the top of
  80.     unzip.h instead (it is included in all source files)--for example,
  81.     "#define MACRO_NAME".
  82.  
  83.       DOSWILD   (MS-DOS only)
  84.         Treat trailing "*.*" like Unix "*" (i.e., matches anything); treat
  85.         trailing "*." as match for files without a dot (i.e., matches any-
  86.         thing, as long as no dots in name).  Special treatment only occurs
  87.         if patterns are at end of arguments; i.e., "a*.*" matches all files
  88.         starting with "a", but "*.*c" matches all files ending in "c" *only*
  89.         if they have a dot somewhere before the "c".  Thus "*.*.*" could be
  90.         used (albeit awkwardly) to specify all filenames with at least one
  91.         dot in them, and "*." matches all filenames with no dots in them.
  92.         [The default method of specifying these would be "*.*" and "* -x *.*",
  93.         respectively, where the second example makes use of UnZip's exclude-
  94.         files option.]  All other regular expressions (including "?" and
  95.         "[range_of_chars]") retain their Unix-like behavior.
  96.  
  97.       VMSWILD   (VMS only)
  98.         Use parentheses rather than brackets to delimit sets (ranges), and
  99.         use '%' instead of '?' as the single-character wildcard for internal
  100.         filename matching.  (External matching of zipfile names always uses
  101.         the standard VMS wildcard facilities; character sets are disallowed.)
  102.  
  103.       VMSCLI   (VMS only)
  104.         Use VMS-style "slash options" (/FOOBAR) instead of the default Unix-
  105.         style hyphenated options (-f).  This capability was added quite late
  106.         in the beta cycle and isn't fully tested, so some features may not
  107.         work as expected.  Also, it doesn't affect options stored in environ-
  108.         ment variables (UNZIP_OPTS or ZIPINFO_OPTS); those use the Unix style
  109.         regardless.
  110.  
  111.       CHECK_VERSIONS   (VMS only)
  112.         UnZip "extra fields" are used to store VMS (RMS) filesystem info,
  113.         and the format of this information may differ in various versions
  114.         of VMS.  Defining this option will enable UnZip warnings when the
  115.         stored extra-field VMS version(s) do(es) not match the version of
  116.         VMS currently being used.  This is a common occurrence in zipfiles
  117.         received from other sites, but since the format of the filesystem
  118.         does not seem to have changed in years (including on Alpha and Open-
  119.         VMS systems), the warnings are not enabled by default.
  120.  
  121.       RETURN_CODES   (VMS only)
  122.         VMS interprets return codes according to a rigid set of guidelines,
  123.         which means it misinterprets normal UnZip return codes as all sorts
  124.         of really nasty errors.  Therefore VMS UnZip returns an alternate set
  125.         of return codes; since these may be difficult to interpret, define
  126.         RETURN_CODES for human-readable explanations.
  127.  
  128.       ASM_CRC   (Amiga/Aztec C; many x86 systems:  DOS, OS/2, Win32, Unix)
  129.         Use an assembler routine to calculate the CRC for each file (speed).
  130.  
  131.       ASM_INFLATECODES   (Amiga/Aztec C only, for now)
  132.         Use an assembler version of inflate_codes() for speed.
  133.  
  134.       OLD_EXDIR
  135.         No longer supported.
  136.  
  137.       SFX_EXDIR
  138.         Enable the "-d <extract_dir>" option for UnZipSFX.  By default it is
  139.         disabled so as to generate the smallest possible executable stub, but
  140.         for use with automated installation scripts and the like it may be
  141.         useful to enable -d.
  142.  
  143.       NO_ZIPINFO
  144.         Compile without ZipInfo mode (-Z) enabled; makes a smaller executable
  145.         because many text strings are left out.  Automatically enabled for
  146.         some small-model compiles under MS-DOS and OS/2, so ordinarily there
  147.         is no need to specify this explicitly.  (Note that even with this
  148.         defined, the resulting executable may still be too big to extract
  149.         some zipfiles correctly, if compiled with the small memory model.)
  150.  
  151.       LZW_CLEAN
  152.         The "shrinking" algorithm from PKZIP 1.0 is an LZW variant.  Unisys
  153.         patented the Lempel-Ziv-Welch algorithm in 1985 and has publicly
  154.         claimed that decompression is covered by it.  (IBM also patented the
  155.         same thing in a filing 3 weeks prior to Unisys's.)  Unisys has also
  156.         publicly said that freeware implementations will be allowed without
  157.         the requirement for licensing fees.  Therefore unshrinking is enabled
  158.         by default, but companies that wish to use the code for commercial
  159.         purposes may wish to disable unshrinking by compiling with LZW_CLEAN
  160.         defined.  Some older zipfiles still contain shrunk files, but all
  161.         newer archives use only the deflation method.
  162.  
  163.       COPYRIGHT_CLEAN   (now default)
  164.       USE_SMITH_CODE
  165.         The last chunk of code in UnZip that was blatantly derived from Sam
  166.         Smith's unzip 2.0 (as in, "substantially similar") is in unreduce.c.
  167.         Since reducing was only used by very early PKZIP beta versions (0.9x),
  168.         support for it is now omitted by default (COPYRIGHT_CLEAN).  To in-
  169.         clude unreducing capability, define USE_SMITH_CODE.  Note that this
  170.         subjects UnZip to any and all restrictions in Smith's copyright; see
  171.         the UnZip COPYING file for details.
  172.  
  173.       PASSWD_FROM_STDIN   (with full crypt sources only; Unix, VMS only)
  174.         Used to allow the password on encrypted files to be read from stdin
  175.         rather than the default stderr.  This is useful for those who wish
  176.         to automate the testing or decoding of encrypted archives (say, in a
  177.         shell script via ``echo "password" | unzip -tq archive'').  Note that
  178.         this is dangerous, however:  on many Unix systems the ps(1) command
  179.         can be used to read the command line associated with running processes,
  180.         and it's possible that the echo command could show up in a precisely
  181.         timed "ps".  Placing the password in a file on disk is orders of mag-
  182.         nitude worse, obviously, but that can be done as well (``unzip -tq foo
  183.         < file.password'').  Not recommended for security reasons.
  184.  
  185.       OS2_EAS
  186.         List the sizes of OS/2 EAs and ACLs for each file as two extra columns
  187.         in "unzip -l" output.  This is primarily useful for OS/2 systems, but
  188.         because zipfiles are portable, OS2_EAS can be defined for any system.
  189.         (May be extended someday to show sizes of Mac resource forks, RISCOS
  190.         and VMS file info, etc.)
  191.  
  192.       DEBUG
  193.         Used for debugging purposes; enables Trace() statements.  Generally
  194.         it's best to compile only one or two modules this way.
  195.  
  196.       DEBUG_TIME
  197.         Used for debugging the timezone code in fileio.c; enables TTrace()
  198.         statements.  This code is only used for the freshen/update options
  199.         (-f and -u), and non-Unix compilers often get it wrong.
  200.  
  201.  
  202. (4) If you regularly compile new versions of UnZip and always want the same
  203.     non-standard option(s), you may wish to add it (them) to the LOCAL_UNZIP
  204.     environment variable (assuming it's supported in your makefile).  Under
  205.     MS-DOS, for example, add this to AUTOEXEC.BAT:
  206.  
  207.         set LOCAL_UNZIP=-DDOSWILD -DOLD_EXDIR
  208.  
  209.     You can also use the variable to hold special compiler options (e.g.,
  210.     -FPi87 for Microsoft C, if the x87 libraries are the only ones on your
  211.     disk and they follow Microsoft's default naming conventions; MSC also
  212.     supports the CL environment variable, however).
  213.  
  214.  
  215. (5) Run the make utility on your chosen makefile:
  216.  
  217.       Unix
  218.         For most systems it's possible to invoke the makefile in place, at
  219.         the possible cost of an ignorable warning; do "make -f unix/Makefile
  220.         list" to get a list of possible system targets, and then "make -f
  221.         unix/Makefile target" for your chosen target.  The "generic" target
  222.         works for most systems, but if it fails with a message about ftime()
  223.         unresolved or timezone redefined, do "make clean", "make help", and
  224.         then either "make generic2" or "make generic3" as instructed.  If all
  225.         else fails, read the makefile itself; it contains numerous comments.
  226.         (One of these days we'll make a configure script that automates this
  227.         procedure better.)
  228.  
  229.       VMS
  230.         For a one-time build of the default UnZip, simply run the supplied
  231.         command file MAKE_UNZ.COM.  To use either DEC C on an Alpha or the
  232.         default compiler (DEC C if available, else VAX C) on a VAX, type
  233.         "@make_unz" (after copying make_unz.com into the current directory;
  234.         otherwise do "@[.vms]make_unz" to invoke it in place).
  235.         If you want to force the use of VAX C when both VAX C and DEC C are
  236.         available, do "@make_unz vaxc" (or "@[.vms]make_unz vaxc").
  237.         To use GNU C (gcc) on either platform, do "@make_unz gnuc".
  238.         (NOTE: Currently, gcc for VMS(AXP) is not yet available!)
  239.  
  240.         For repeated makes or other hacker-like tinkering with the sources,
  241.         or to create a custom version of UnZip (especially with VMSCLI), use
  242.         the included "MMS" makefile, DESCRIP.MMS.  Copy it into the current
  243.         directory, read the comments at the top of it and run MadGoat's free
  244.         MMS clone "MMK" on it.  Newer versions of DEC's MMS should work, too,
  245.         but older ones apparently choke on some MMK-specific extensions in
  246.         DESCRIP.MMS.  (If somebody has an "older" version that works, let us
  247.         know and we'll remove this caveat.)
  248.  
  249.       MS-DOS
  250.         See the msdos\Contents file for notes regarding which makefile(s) to
  251.         use with which compiler.  In summary:  pick one of msdos\makefile.*
  252.         as appropriate, or (as noted above) use the OS/2 gccdos target for
  253.         emx+gcc or the Unix gcc_dos target for djgpp.  There is also an
  254.         mscdos cross-compilation target in os2\makefile.os2, an sco_dos
  255.         cross-compilation target in unix\Makefile and bcc_dos and msc_dos
  256.         targets in unix\Makefile as well.  The latter two will disappear in
  257.         the next release, most likely.  For Watcom 16-bit or 32-bit versions,
  258.         see the comments in the OS/2 section below.
  259.  
  260.         After choosing the appropriate makefile and editing as necessary or
  261.         desired, invoke the corresponding make utility.  Microsoft's NMAKE
  262.         and the free dmake and GNU make utilities are generally the most
  263.         versatile.  Unfortunately, many current ports of GNU make 3.71 (djgpp,
  264.         emx and gnuish flavors) have bugs which may prevent their use with
  265.         the Unix makefile; the older djgpp port of make 3.69 still works and
  266.         for now is distributed with the MS-DOS executables on the primary
  267.         Info-ZIP ftp site (see the Where file).  The makefiles in the msdos
  268.         directory can be invoked in place ("nmake -f msdos\makefile.msc",
  269.         for example), but the MS-DOS targets in the Unix makefile (gcc_dos,
  270.         bcc_dos and msc_dos) cannot.
  271.  
  272.       OS/2
  273.         Either GNU make, nmake or dmake may be used with the OS/2 makefile;
  274.         all are freely available on the net.  Do "nmake -f os2\makefile.os2",
  275.         for example, to get a list of supported targets.  More generally,
  276.         read the comments at the top of the makefile for an explanation of
  277.         the differences between some of the same-compiler targets.
  278.  
  279.       Win32 (NT or Win95)
  280.         You will need Microsoft Visual C++ 2.x for Win95 or NT (Intel, MIPS,
  281.         Alpha, PowerPC?), or Watcom C++ for Win95 or NT (Intel only).  DEC
  282.         C/C++ for NT/Alpha may or may not still work.  For the Watcom com-
  283.         piler, use WMAKE and win32\makefile.wat; for the others, use NMAKE
  284.         and win32\Makefile.
  285.  
  286.       AmigaDOS
  287.         SAS/Lattice C and Manx Aztec C are supported.  For SAS C 6.x do "lmk
  288.         -f amiga/smakefile all"; for Aztec C do "make -f amiga/makefile.azt
  289.         all".  The Aztec C version supports assembly-language versions of two
  290.         routines; these are enabled by default.
  291.  
  292.       Atari TOS
  293.         Turbo C is no longer supported; use gcc and the MiNT libraries, and
  294.         do "make".  Note that all versions of gcc prior to 2.5.8 have a bug
  295.         affecting 68000-based machines (optimizer adds 68020 instructions).
  296.         See atari\README for comments on using other compilers.
  297.  
  298.       Macintosh
  299.         Think C is the only currently supported compiler, although the Mac
  300.         Programmer's Workbench (MPW) was supported at one time and still has
  301.         hooks in unzip.h.  For Think C, un-BinHex the Think C project file
  302.         and UnZip resource file (using BinHex 4.0 or later), then click on
  303.         something or other... :-)  (I'm just making this up, since I haven't
  304.         the faintest idea how Mac programming works.)
  305.  
  306.       Acorn (RISC OS)
  307.         Extract the files from the archive and place in standard 'Acorn' C
  308.         form (i.e., *.c, *.h and *.s become c.*, h.* and s.*, respectively),
  309.         either using the UNZIP$EXT environment variable and a pre-built UnZip
  310.         binary, or using Spark[FS] and doing it manually.  Then copy the
  311.         Acorn.Makefile to the main UnZip directory and either type 'amu' or
  312.         use the desktop make utility.
  313.  
  314.       VM/CMS
  315.         Unpack all the files and transfer them with ASCII -> EBCDIC conver-
  316.         sion to an appropriate directory/minidisk/whatever, then execute
  317.         UNZVMC to compile and link all the sources.  This requires C/370 2.1
  318.         or later and certain ``nucleus extensions''; see the README.CMS file
  319.         for details.  [This is a new port, but it has been tested and debugged
  320.         reasonably well.  It should compile and run cleanly.]
  321.  
  322.       MVS
  323.         Unpack all the files and transfer them to an appropriate PDS with
  324.         ASCII -> EBCDIC conversion enabled, then edit UNZMVSC.JOB as required,
  325.         and execute it to compile and link all the sources.  C/370 2.1 or
  326.         later is required.  See README.MVS for further details.  [This is a
  327.         new port and may need a little more work even to compile.]
  328.  
  329.       Human68K
  330.         [This is a Japanese machine and OS.]  It appears that GNU make and
  331.         gcc are required; presumably just do "gmake -f human68k/Makefile.gcc"
  332.         to build everything.  This port was not tested for the 5.20 release.
  333.  
  334.       TOPS-20
  335.         [No longer fully supported due to new, unported features, although
  336.         patches are always accepted.]  Unpack all files into the current
  337.         directory only (including those in the zipfile's tops20 directory),
  338.         then use make.mic and "do make".
  339.  
  340.     Running the appropriate make utility should produce three executables on
  341.     most systems, one for UnZip/ZipInfo, one for UnZipSFX, and one for fUnZip.
  342.     (VMS is one prominent exception:  fUnZip makes no sense on it.)  Read any
  343.     OS-specific README files for notes on setting things up for normal use
  344.     (especially for VMS) and for warnings about known quirks and bugs in var-
  345.     ious compilers (especially for MS-DOS).
  346.  
  347.     Also note that many OSes require a timezone variable to be set correctly
  348.     (often "TZ"); Unix and VMS generally do so by default, but PC-based OSes
  349.     generally do not.  See the discussion of the -f and -u options in the
  350.     unzip man page (or unzip.doc).
  351.  
  352.     Then test your new UnZip on a few archives and let us know if there are
  353.     problems (but *please* first make certain that the archives aren't actu-
  354.     ally corrupted and that you didn't make one of the silly mistakes dis-
  355.     cussed in the documentation).  If possible, double-check any problems
  356.     with PKUNZIP or with a previous version of UnZip prior to reporting a
  357.     "bug."  The zipfile itself may be damaged.
  358.  
  359.  
  360.  
  361. To install:
  362. ===========
  363.  
  364. Unix
  365.   The default prefix for the installation location is /usr/local (things
  366.   go into the bin and man/man1 subdirectories beneath the prefix), and
  367.   the default man-page extension is "1" (corresponding to man/man1, above).
  368.   To install as per the defaults, do "make install"; otherwise do "make
  369.   prefix=/your/path manext=your_extension install".  (For Intel Unix flavors
  370.   where the assembler CRC routines were used [ASM_CRC], use the install_asm
  371.   target instead of the regular install target.)  For example, to install
  372.   in your home directory with "l" as the man-page extension (for "local"),
  373.   do "make prefix=$HOME manext=l install".  Permissions will be 755 for the
  374.   executables and 644 for the man pages.  In general root must perform in-
  375.   stallation into a public directory.  Do "rehash" if your shell requires
  376.   it in order to find the new executables.
  377.  
  378. VMS
  379.   Install UnZip as foreign symbol by adding this to login.com:
  380.  
  381.        $ unzip == "$disk:[dir]unzip.exe"
  382.        $ zipinfo == "$disk:[dir]unzip.exe ""-Z"""
  383.  
  384.   where "disk" and "dir" are the location of the UnZip executable; the "$"
  385.   before the disk name is important, as are the double-double-quotes around
  386.   the -Z.  Some people, including the author, prefer a short alias such as
  387.   "ii" instead of "zipinfo"; edit to taste.  Optionally also install unzipsfx
  388.   for use with the MAKESFX.COM command file.  See vms/README (or [.VMS]README.)
  389.   for details on this and for notes/warnings about zipfiles and UnZip under
  390.   VMS.
  391.  
  392. OS/2, MS-DOS, NT, Atari, Amiga
  393.   Move or copy unzip.exe (or unzip.ttp, or UnZip, or whatever) to a direc-
  394.   tory in your path; also possibly copy the UnZip executable to zipinfo.exe
  395.   (or ii.exe), or else create an alias or a batch/command file for ZipInfo
  396.   ("@unzip -Z %1 %2 %3 %4 %5 %6 %7 %8 %9" under MS-DOS).  The latter is only
  397.   relevant if NO_ZIPINFO was *not* defined, obviously...
  398.  
  399. Acorn RISC OS
  400.   Copy the executables unzip, funzip and zipinfo to somewhere in your
  401.   Run$Path.  See your Welcome manual if you don't know about Run$Path.
  402.  
  403. Macintosh, Human68K, TOPS-20, AOS/VS, MVS, VM/CMS, etc.
  404.   Dunno...
  405.