home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 9 Archive / 09-Archive.zip / unzip512.zip / INSTALL < prev    next >
Text File  |  1994-08-23  |  20KB  |  382 lines

  1. __________________________________________________________________________
  2.  
  3.   This is the Info-ZIP file INSTALL (for UnZip), last updated 23 Aug 94.
  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:
  14. =========================================
  15.  
  16. (1) Unpack *.c and *.h (the actual source files), preserving the directory
  17.     structure (e.g., ./unix/unix.c).  The sole exception is TOPS-20, where
  18.     tops20/* should be unpacked into the current directory, but TOPS-20
  19.     is no longer fully supported in this version.
  20.  
  21.     If you wish to compile with decryption enabled, you must get the zcrypt
  22.     package (see "Where").  Unpack crypt.c and crypt.h from the zcrypt ar-
  23.     chive, overwriting the dummy versions supplied with UnZip.  If you don't
  24.     have any sort of unzipper available, you'll have to compile the non-
  25.     crypt version first and use that to unpack the full crypt sources, then
  26.     recompile.  (The included zipcloak.c file is for use only with the Zip
  27.     2.0.x sources, so don't bother unpacking it.)
  28.  
  29.  
  30. (2) Choose the appropriate makefile based on the description in the Con-
  31.     tents file for your OS (that is, there's only one for Unix or OS/2, but
  32.     MS-DOS and several other OSes have several, depending on the compiler).
  33.     Copy it into the current directory and rename if necessary or desired.
  34.     (Some makefiles can be invoked in place; see (5) below.)
  35.  
  36.     Special point of confusion:  some MS-DOS targets are in non-MSDOS
  37.     makefiles.  In particular, for DOS emx+gcc use the gccdos target of
  38.     the OS/2 makefile (os2/makefile.os2), and for djgpp use the gcc_dos
  39.     target of the Unix makefile (unix/Makefile).  In addition, OS/2 users
  40.     of MSC can cross-compile to MS-DOS with makefile.os2's mscdos target.
  41.  
  42.  
  43. (3) If you want a non-standard version of UnZip, define one or more of the
  44.     following optional macros, either by adding them to the LOCAL_UNZIP
  45.     environment variable or by editing your makefile as appropriate.  The
  46.     syntax differs from compiler to compiler, but macros are often defined
  47.     via "-DMACRO_NAME" or similar (for one called MACRO_NAME).  Note that
  48.     some of these may not be fully supported in future releases (or even
  49.     in the current release).  Note also that very short command lines in
  50.     MS-DOS (128 characters) may place severe limits on how many of these
  51.     can be used; if need be, the definitions can be placed at the top of
  52.     unzip.h instead (it is included in all source files).
  53.  
  54.       CHECK_EOF   (recommended!)
  55.         Corrupt zipfiles and zipfiles stored on damaged media (e.g., bad
  56.         floppies) may cause UnZip to go into an infinite loop and either
  57.         fill the disk(!) or, in some cases (notably under MS-DOS), hang the
  58.         system.  (This only applies to testing or extraction of *damaged*
  59.         archives, however.)  Defining CHECK_EOF enables special code which
  60.         corrects the problem on most systems; DEC Ultrix may be one excep-
  61.         tion.  The only reason this option is not defined by default is that
  62.         it was introduced too late in the testing process.
  63.  
  64.       DOSWILD   (MS-DOS only)
  65.         Treat trailing "*.*" like Unix "*" (i.e., matches anything); treat
  66.         trailing "*." as match for files without a dot (i.e., matches any-
  67.         thing, as long as no dots in name).  Special treatment only occurs
  68.         if patterns are at end of arguments; i.e., "a*.*" matches all files
  69.         starting with "a", but "*.*c" matches all files ending in "c" *only*
  70.         if they have a dot somewhere before the "c".  Thus "*.*.*" could be
  71.         used (albeit awkwardly) to specify all filenames with at least one
  72.         dot in them, and "*." matches all filenames with no dots in them.
  73.         [The default method of specifying these would be "*.*" and "* -x *.*",
  74.         respectively, where the second example makes use of UnZip's exclude-
  75.         files option.]  All other regular expressions (including "?" and
  76.         "[range_of_chars]") retain their Unix-like behavior.
  77.  
  78.       VMSWILD   (VMS only)
  79.         Use parentheses rather than brackets to delimit sets (ranges), and
  80.         use '%' instead of '?' as the single-character wildcard for internal
  81.         filename matching.  (External matching of zipfile names always uses
  82.         the standard VMS wildcard facilities; character sets are disallowed.)
  83.  
  84.       VMSCLI   (VMS only)
  85.         Use VMS-style "slash options" (/FOOBAR) instead of the default Unix-
  86.         style hyphenated options (-f).  This capability was added quite late
  87.         in the beta cycle and isn't fully tested, so some features may not
  88.         work as expected.  Also, it doesn't affect options stored in environ-
  89.         ment variables (UNZIP_OPTS or ZIPINFO_OPTS); those use the Unix style
  90.         regardless.
  91.  
  92.       CHECK_VERSIONS   (VMS only)
  93.         UnZip "extra fields" are used to store VMS (RMS) filesystem info,
  94.     and the format of this information may differ in various versions
  95.     of VMS.  Defining this option will enable UnZip warnings when the
  96.     stored extra-field VMS version(s) do(es) not match the version of
  97.     VMS currently being used.  This is a common occurrence in zipfiles 
  98.     received from other sites, but since the format of the filesystem
  99.     does not seem to have changed in years (including on Alpha and Open-
  100.     VMS systems), the warnings are not enabled by default.
  101.  
  102.       RETURN_SEVERITY   (VMS only)
  103.         Return a VMS-style value in the range 0x7fff0001 to 0x7fff0332 for
  104.         warnings or errors, or 1 for successful completion.  See unzip.doc
  105.         for an explanation of the encoding of the normal UnZip return value.
  106.         This option was added late in the beta cycle and hasn't been tested
  107.         much yet, but it will likely become the default in future versions
  108.         (assuming no collisions with official VMS error codes).
  109.  
  110.       RETURN_CODES   (VMS only)
  111.         VMS interprets return codes according to a rigid set of guidelines,
  112.         which means it misinterprets normal UnZip return codes as all sorts
  113.         of really nasty errors.  Therefore by default VMS UnZip always returns
  114.         zero regardless of whether any warnings or errors occurred (but see
  115.         RETURN_SEVERITY above).  Define RETURN_CODES for a human-readable ex-
  116.         planation of UnZip's return codes.  Note that this is often annoying.
  117.  
  118.       ASM_CRC   (Amiga/Aztec C only, for now)
  119.         Use an assembler routine to calculate the CRC for each file (speed).
  120.  
  121.       ASM_INFLATECODES   (Amiga/Aztec C only, for now)
  122.         Use an assembler version of inflate_codes() for speed.
  123.  
  124.       OLD_EXDIR   (not VMS or TOPS-20)
  125.         Use old behavior regarding the directory to which to extract:  the
  126.         argument immediately after the zipfile name is the extraction dir;
  127.         if the directory doesn't exist, create it if it was specified as
  128.         "dir/" (i.e., with trailing path separator), else treat it as a
  129.         stored file; if -d is used, treat the argument as a stored file re-
  130.         gardless of trailing '/'.  For example:
  131.             unzip foo bar       if bar is a dir, extract everything into it;
  132.                                   otherwise extract bar as stored file
  133.             unzip foo bar/      extract everything into bar, creating if nec.
  134.             unzip -d foo bar/   treat bar/ as a stored directory and extract it
  135.  
  136.       SFX_EXDIR
  137.         Enable the "-d <extract_dir>" option for UnZipSFX.  By default it is
  138.         disabled so as to generate the smallest possible executable stub, but
  139.         for use with automated installation scripts and the like it may be
  140.         useful to enable -d.  Be sure to read unzipsfx.doc for restrictions
  141.         on the use of this option and of -x; these restrictions should be 
  142.         lifted in a later release.
  143.  
  144.       NO_ZIPINFO
  145.         Compile without zipinfo mode (-Z) enabled; makes a smaller executable
  146.         because many text strings are left out.  Automatically enabled for
  147.         some small-model compiles under MS-DOS and OS/2, so ordinarily there
  148.         is no need to specify this explicitly.  (Note that even with this
  149.         defined, the resulting executable may still be too big to extract
  150.         some zipfiles correctly.)
  151.  
  152.       DEBUG
  153.         Used for debugging purposes; enables Trace() statements.  Generally
  154.         it's best to compile only one or two modules this way.
  155.  
  156.       DEBUG_TIME
  157.         Used for debugging the timezone code in file_io.c; enables TTrace()
  158.         statements.  This code is only used for the freshen/update options
  159.         (-f and -u), and non-Unix compilers often get it wrong.
  160.  
  161.  
  162. (4) If you regularly compile new versions of UnZip and always want the same
  163.     non-standard option(s), you may wish to add it (them) to the LOCAL_UNZIP
  164.     environment variable (assuming it's supported in your makefile).  Under
  165.     MS-DOS, for example, add this to AUTOEXEC.BAT:
  166.  
  167.         set LOCAL_UNZIP -DDOSWILD -DOLD_EXDIR
  168.  
  169.     You can also use the variable to hold special compiler options (e.g.,
  170.     -FPi87 for Microsoft C, if the x87 libraries are the only ones on your
  171.     disk and they follow Microsoft's default naming conventions; MSC also
  172.     supports the CL environment variable, however).
  173.  
  174.  
  175. (5) Run the make utility on your chosen makefile:
  176.  
  177.       Unix
  178.         For most systems it's possible to invoke the makefile in place, at
  179.         the possible cost of an ignorable warning; do "make -f unix/Makefile
  180.         list" to get a list of possible system targets, and then "make -f
  181.         unix/Makefile target" for your chosen target.  The "generic" target
  182.         works for most systems, but if it fails with a message about ftime()
  183.         unresolved or timezone redefined, do "make clean", "make help", and
  184.         then either "make generic2" or "make generic3" as instructed.  If all
  185.         else fails, read the makefile itself; it contains numerous comments.
  186.  
  187.       VMS
  188.         For a one-time build of the default UnZip, simply run the supplied
  189.         command file MAKE.COM.  To use either DEC C on an Alpha or VAX C on
  190.         a VAX, type "@make" (after copying make.com into the current direc-
  191.         tory; otherwise do "@[.vms]make" to invoke it in place).  To use GNU
  192.         C (gcc) on either platform, do "@make gcc".
  193.  
  194.         For repeated makes or other hacker-like tinkering with the sources,
  195.         or to create a custom version of UnZip (especially with VMSCLI), use
  196.         the included "MMS" makefile, DESCRIP.MMS.  Copy it into the current
  197.         directory, read the comments at the top of it and run MadGoat's free
  198.         MMS clone "MMK" on it.  DEC's MMS is no longer supported due to the
  199.         use of MMK-specific extensions in DESCRIP.MMS.
  200.  
  201.       MS-DOS
  202.         See the msdos\Contents file for notes regarding which makefile(s) to
  203.         use with which compiler.  In summary:  pick one of msdos\makefile.*
  204.         as appropriate, or (as noted above) use the OS/2 gccdos target for
  205.         emx+gcc or the Unix gcc_dos target for djgpp.  There is also an
  206.         mscdos cross-compilation target in os2\makefile.os2, an sco_dos
  207.         cross-compilation target in unix\Makefile and bcc_dos and msc_dos
  208.         targets in unix\Makefile as well.  The latter may disappear soon.
  209.         For Watcom 16-bit or 32-bit versions, see the comments in the OS/2
  210.         section below.
  211.  
  212.         After choosing the appropriate makefile and editing as necessary or
  213.         desired, invoke the corresponding make utility.  Microsoft's NMAKE
  214.         and the free dmake and GNU make utilities are generally the most
  215.         versatile.  Unfortunately, all current ports of GNU make 3.71 (djgpp,
  216.         emx and gnuish flavors) have bugs which prevent their use with the
  217.         Unix makefile; the older djgpp port of make 3.69 still works and for
  218.         now is distributed with the MS-DOS executables on the primary Info-
  219.         ZIP mirror site (see the Where file).  The makefiles in the msdos dir-
  220.         ectory can be invoked in place (e.g., "nmake -f msdos\makefile.msc"),
  221.         but the MS-DOS targets in the Unix makefile (gcc_dos, bcc_dos and
  222.         msc_dos) cannot.
  223.  
  224.       OS/2
  225.         Either GNU make, nmake or dmake may be used with the OS/2 makefile;
  226.         all are freely available on the net.  Do "nmake -f os2\makefile.os2",
  227.         for example, to get a list of supported targets.  For Watcom C/386 it
  228.         is necessary to edit makefile.os2 and change the os2$(OBJ) target so
  229.         it uses backslashes (i.e., "os2/os2.c" -> "os2\os2.c").  For Watcom
  230.         16-bit OS/2 versions or any Watcom DOS version (cross-compilation),
  231.         or for Metaware High C++ (OS/2 32-bit), it is necessary to apply the
  232.         patch in os2\wat_met.dif.  (This patch arrived too late to be fully
  233.         tested.)
  234.  
  235.         More generally, read the comments at the top of the makefile for an
  236.         explanation of the differences between some of the same-compiler tar-
  237.         gets.
  238.  
  239.       NT (also applies to Chicago/Windows 4)
  240.         You will need the Windows NT SDK or Visual C++ for NT, both from
  241.         Microsoft; or DEC C/C++ for DECpc AXP and NT.  Use the command line
  242.         to compile.  For the DEC compiler edit out the "cdebug" line in
  243.         nt\makefile as noted in the comments at the top of the makefile.
  244.         From the main source directory do "nmake -F nt\makefile".
  245.  
  246.         If you are using VC++ you will get warnings about CL386 invoking CL,
  247.         etc.  Don't worry, this is for compatibility with the SDK.  Microsoft
  248.         should have changed the definition of $(cc) in ntwin32.mak for VC++.
  249.  
  250.         If you have VC++ 1.5 (16-bit) installed together with VC++ 1.0 (32-
  251.         bit), make sure that you don't run the 16-bit compiler when you run
  252.         nmake.
  253.  
  254.         At least with MSC 8.x (VC++ 1.x), it is possible to make a dual-mode
  255.         self-extractor (DOS and NT/Chicago).  This is not built by default,
  256.         but for those who don't care too much about the size, here's how:
  257.  
  258.             From: Steve Salisbury <stevesa@microsoft.com>
  259.             Date: Fri, 22 Jul 94 17:18:06 PDT
  260.  
  261.             Did y'all know that you can build a dual mode (MS-DOS and Win32
  262.             (NT + Chicago)) unzipsfx.exe by just making a 16-bit unzipsfx.exe
  263.             and then specifying that as the 16-bit stub for the 32-bit unzip-
  264.             sfx.exe?  You also have to specify the /Knoweas flag to the 16-bit
  265.             linker.  I suspect that this won't work with C 6.0 and earlier,
  266.             maybe not even with MS C/C++ 7.0.  Anyway, I use C 8.0 (a.k.a.
  267.             Visual C 1.X), which has been shipping for 15+ months now.
  268.  
  269.             Make a little change to MSDOS\MAKEFILE.MSC to add the /KNOWEAS
  270.             flag:
  271.  
  272.                 LDFLAGS = /KNOWEAS /nologo/noi/e/st:0x0c00
  273.  
  274.             rename the output file
  275.  
  276.                 ren UNZIPSFX.EXE UNZIPSFX.E16
  277.  
  278.             and then make a little change to NT\MAKEFILE to add the -STUB
  279.             directive:
  280.  
  281.                 .obj.exe:
  282.                     $(link) $(ldebug) $(conflags) $(conflibs) $** \
  283.                              -out:$@ -STUB:$*.e16
  284.  
  285.             This is pretty useful.  It's nice to have dual-mode self-extracting
  286.             files.
  287.  
  288.             I do notice that they are pretty huge files (41K for 16-bit 
  289.             unzipsfx.exe, 69k for the 32-bit version, 110k for the dual).  Oh
  290.             well.
  291.  
  292.       AmigaDOS
  293.         SAS/Lattice C and Manx Aztec C are supported.  For SAS C 6.x do "lmk
  294.         -f amiga/SMakeFile all"; for Aztec C do "make -f amiga/makefile.azt
  295.         all".  The Aztec C version supports assembly-language versions of two
  296.         routines; these are enabled by default.
  297.  
  298.       Atari TOS
  299.         Turbo C is no longer supported; use gcc (tested with 2.4.5 and 2.5.8)
  300.         and the MiNT libraries, and do "make".  Note that all versions of gcc
  301.         prior to 2.5.8 have a bug affecting 68000-based machines (optimizer
  302.         adds 68020 instructions).  See atari\README for comments on using
  303.         other compilers.
  304.  
  305.       Macintosh
  306.         Think C is the only currently supported compiler, although the Mac
  307.         Programmer's Workbench (MPW) was supported at one time and still has
  308.         hooks in unzip.h.  For Think C, un-BinHex the Think C project file
  309.         and UnZip resource file (using BinHex 4.0 or later), then click on
  310.         something or other... :-)  (I'm just making this up, since I haven't
  311.         the faintest idea how Mac programming works.)
  312.  
  313.       Human68K
  314.         [This is a Japanese machine and OS.]  It appears that GNU make and
  315.         gcc are required; presumably just do "gmake -f human68k/Makefile.gcc"
  316.         to build everything.
  317.  
  318.       TOPS-20
  319.         [No longer fully supported due to new, unported features, although
  320.         patches always accepted.]  Unpack all files into the current directory
  321.         only (including those in the zipfile's tops20 directory), then use
  322.         make.mic and "do make".
  323.  
  324.     Running the appropriate make utility should produce three executables on
  325.     most systems, one for UnZip/ZipInfo, one for UnZipSFX, and one for fUnZip.
  326.     (VMS is one prominent exception:  fUnZip makes no sense on it.)  Read any
  327.     OS-specific README files for notes on setting things up for normal use
  328.     (especially for VMS) and for warnings about known quirks and bugs in var-
  329.     ious compilers (especially for MS-DOS).
  330.  
  331.     Also note that many OSes require a timezone variable to be set correctly
  332.     (often "TZ"); Unix and VMS generally do so by default, but PC-based OSes
  333.     generally do not.  See the discussion of the -f and -u options in the
  334.     unzip man page (or unzip.doc).
  335.  
  336.     Then test your new UnZip on a few archives and let us know if there are
  337.     problems (but *please* first make certain that the archives aren't actu-
  338.     ally corrupted and that you didn't make one of the silly mistakes dis-
  339.     cussed in the documentation).  If possible, test with PKUNZIP or with a
  340.     previous version of UnZip, if you have one.
  341.  
  342.  
  343.  
  344. To install:
  345. ===========
  346.  
  347. Unix
  348.   The default prefix for the installation location is /usr/local (things
  349.   go into the bin and man/man1 subdirectories beneath the prefix), and
  350.   the default man-page extension is "1" (corresponding to man/man1, above).
  351.   To install as per the defaults, do "make install"; otherwise do "make
  352.   prefix=/your/path manext=your_extension install".  For example, to install
  353.   in your home directory with "l" as the man-page extension (for "local"),
  354.   do "make prefix=$HOME manext=l install".  Permissions will be 755 for the
  355.   executables and 644 for the man pages.  In general root must perform in-
  356.   stallation into a public directory.  Do "rehash" if your shell requires
  357.   it in order to find the new executables.
  358.  
  359. VMS
  360.   Install UnZip as foreign symbol by adding this to login.com:
  361.  
  362.        $ unzip == "$disk:[dir]unzip.exe"
  363.        $ zipinfo == "$disk:[dir]unzip.exe ""-Z"""
  364.  
  365.   where "disk" and "dir" are the location of the UnZip executable; the "$"
  366.   before the disk name is important, as are the double-double-quotes around
  367.   the -Z.  Some people, including the author, prefer a short alias such as
  368.   "ii" instead of "zipinfo"; edit to taste.  Optionally also install unzipsfx
  369.   for use with the MAKESFX.COM command file.  See vms/README (or [.VMS]README.)
  370.   for details on this and for notes/warnings about zipfiles and UnZip under
  371.   VMS.
  372.  
  373. OS/2, MS-DOS, NT, Atari, Amiga
  374.   Move or copy unzip.exe (or unzip.ttp, or UnZip, or whatever) to a direc-
  375.   tory in your path; also possibly copy the UnZip executable to zipinfo.exe
  376.   (or ii.exe), or else create an alias or a batch or command file for zipinfo
  377.   ("@unzip -Z %1 %2 %3 %4 %5 %6 %7 %8 %9" under MS-DOS).  The latter is only
  378.   relevant if NO_ZIPINFO was not defined, obviously...
  379.  
  380. Macintosh, Human68K, TOPS-20
  381.   Dunno...
  382.