home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 9 Archive / 09-Archive.zip / unzip511.zip / INSTALL < prev    next >
Text File  |  1994-07-27  |  18KB  |  353 lines

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