INSTALL 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368
  1. HOW TO INSTALL ZIP
  2. Zip is distributed as C source code that can be compiled on a
  3. wide range of systems: Unix, VMS, MSDOS, OS/2, NT, Amiga, Atari,
  4. BeOS, VM/CMS, ... You will need Unzip 5.0p1 or later (under any
  5. system) or PKUNZIP 2.04g or later (under MSDOS) to unpack the
  6. distribution file, in this case zip30.zip. But since you read this,
  7. you have unpacked it already, or you cheated and got a tar.Z file...
  8. Note: Zip 3.0 distribution kits (unlike previously distributed
  9. Zip 2.x kits) are created with a top-level directory ("zip30") in
  10. the archive, making the creating of the zipsrc directory optional.
  11. Installation on Unix (see below for installation on other systems)
  12. Let's assume that you start from scratch and have not yet unpacked
  13. the sources. First step, then, is to unpack Zip. The following
  14. assumes that you have zip30.zip in the current directory.
  15. For example, to extract to a new zipsrc directory (assuming
  16. zip30.zip is in the current directory):
  17. mkdir zipsrc
  18. cd zipsrc
  19. cp ../zip30.zip .
  20. unzip zip30.zip
  21. cd zip30
  22. To extract in an existing directory, such as /usr/local/src/zip:
  23. cd /usr/local/src/zip
  24. (copy zip30.zip here)
  25. unzip zip30.zip
  26. cd zip30
  27. The first extracts all source files and documentation to the
  28. directory "zipsrc/zip30". The second places the zip30 directory
  29. in the "/usr/local/src/zip" directory. Both then cd in to the
  30. zip30 directory where Zip will be built.
  31. Note: This release now includes the standard encryption code
  32. previously in the separate package zcrypt29.zip, but you still
  33. can decide whether to activate the crypt code or not. Crypt is
  34. enabled by default, but you may disable it by specifying the
  35. option -DNO_CRYPT in the LOCAL_ZIP environment variable (or by
  36. adding this option to the compilation options in the appropiate
  37. makefile). See README.CR for more on crypt.
  38. You then do:
  39. make -f unix/Makefile system
  40. where "system" is one of: generic, generic_gcc,
  41. att6300, coherent, cray_v3, minix, sco_x286, xenix, zilog.
  42. For Unix systems where "cc" is the preferred C compiler command,
  43. try
  44. make -f unix/Makefile generic
  45. first. If "gcc" is preferred, specify "generic_gcc" instead of
  46. "generic". This should work on most systems and automatically
  47. selects compilation options based on a set of tests (in
  48. unix/configure), including detection of large file support
  49. sufficient to enable Zip64 large archive features. If "generic"
  50. (or "generic_gcc" if that is used) fail, then one of the special
  51. targets given above may work.
  52. Among other special systems are Cray Unicos, Zilog Zeus and MINIX.
  53. The optimization settings for many systems should be close, but
  54. if you see optimization for your system is not ideal, send in
  55. the changes so we can improve it.
  56. By default, Zip uses the "deflate" compression method. To add
  57. the additional optional "bzip2" compression method, see the file
  58. bzip2/install.txt. Note that bzip2 support is provided by
  59. compiling or linking in the bzip2 library. See the bzip2 site
  60. (http://www.bzip.org/) for more on bzip2.
  61. If you get error messages such as "constant expected" in
  62. deflate.c, add -DDYN_ALLOC to CFLAGS in your makefile entry.
  63. If you have lots of memory, try compiling with -DBIG_MEM. If your
  64. system supports mmap(), try compiling with -DMMAP. This generally
  65. gives faster compression but uses more memory. See the unix/Makefile
  66. entry mmap_gcc for an example.
  67. If none of these compiles, links, and functions properly on
  68. your Unix system, then your system apparently has specific
  69. requirements we did not account for. See the file README for how
  70. to get help.
  71. If the appropriate system was selected, then the executables zip,
  72. zipnote, zipcloak, and zipsplit will be created. You can copy
  73. them to an appropriate directory in the search path using:
  74. make -f unix/Makefile install
  75. The defaults are /usr/local/bin for the executables and
  76. /usr/local/man/man1 for the manual pages. Change the macros
  77. BINDIR and MANDIR in makefile to change these if needed.
  78. If necessary, add the directory with the Zip executables to your
  79. shell's PATH (or "path") variable. (C-shell users may need to
  80. use the "rehash" command so csh can find the new command in the
  81. path.) You should now be ready to use Zip.
  82. You can get rid of the now unnecessary source and object files
  83. with:
  84. cd ..
  85. rm -r zip30
  86. This will remove the directory zip30 and its contents created
  87. by unzip. You should keep the zip30.zip file around though,
  88. in case you need to build it again or want to give it to a
  89. colleague.
  90. You can add the following lines to the file /etc/magic for
  91. usage by the 'file' command:
  92. 0 string PK Zip archive
  93. >4 byte 011 (at least v0.9 to extract)
  94. >4 byte 012 (at least v1.0 to extract)
  95. >4 byte 013 (at least v1.1 to extract)
  96. >4 byte 024 (at least v2.0 to extract)
  97. >4 byte 025 (at least v2.1 to extract)
  98. Installation on other systems
  99. The steps for installation under VMS, MSDOS, OS/2, NT, Amiga and
  100. Atari are similar to the above: first unzip the distribution
  101. files into their own directory. The system-dependent files are
  102. stored in special subdirectories.
  103. For all the non-Unix ports which support the creation of "UT" extra
  104. fields (these ports contain USE_EF_UT_TIME in the list of optional
  105. features displayed with "zip -v"), the timezone environment variable TZ
  106. should be set according to the local timezone in order for the -f, -u,
  107. -o, and similar options to work correctly. This is not needed for the
  108. WIN32 and WinDLL ports, since they get the timezone information from
  109. the OS by other means.
  110. MSDOS:
  111. Do one of:
  112. make msdos\makefile.msc (Microsoft C 5.1)
  113. nmake -f msdos\makefile.msc (Microsoft C 6.0 and newer)
  114. make -fmsdos\makefile.bor -DCC_REV=1 (Borland Turbo C++ 1.0)
  115. make -fmsdos\makefile.bor (Borland C++ 2.0 and newer)
  116. make -fmsdos\makefile.tc (Borland Turbo C 2.0x)
  117. make -f msdos/makefile.dj1 (DJGPP v1.12m4)
  118. make -f msdos/makefile.dj2 (DJGPP v2.01 and newer)
  119. make -f msdos/makefile.emx (gcc/emx 0.9b and newer)
  120. make -f os2/makefile.os2 gccdos (gcc/emx 0.9b and newer)
  121. wmake -f msdos\makefile.wat (Watcom C 11.x 16-bit)
  122. wmake -f msdos\makefile.wat PM=1 (Watcom C 11.x 32-bit, PMODE/W)
  123. for Microsoft, Borland C++ and Turbo C, Watcom C/C++ and the various
  124. free GNU C implementations, respectively. More detailed instructions
  125. can be found in the respective makefiles.
  126. WIN32 (Windows NT/2K/XP/2K3 and Windows 95/98/ME):
  127. Supported compilers are Microsoft Visual C++, Borland C++, Watcom C/C++,
  128. and miscellaneous free GNU C implementations (gcc/mingw, CygWin, ...).
  129. The makefiles supplied in the win32/ subdirectory contain further
  130. information.
  131. Windows DLL (WIN32):
  132. Supported environments are Visual C++ (32-bit only, 5.x and newer).
  133. For instructions how to build the DLLs and where find the makefiles,
  134. look into windll/contents.
  135. OS/2:
  136. Type
  137. {make} -f os2/makefile.os2
  138. to get a list of supported targets/compiling environments.
  139. (replace "{make}" with the name of your OS/2 make utility.)
  140. To initiate the actual compiling process, you have to specify
  141. a system target:
  142. {make} -f os2/makefile.os2 {system}
  143. An example: type
  144. nmake -f os2/makefile.os2 msc
  145. for Microsoft C 6.00.
  146. VMS (OpenVMS):
  147. The most complete information on building and installing Zip on VMS
  148. is in [.vms]install_vms.txt. Optimists in a hurry may wish to try
  149. commands like these:
  150. @ [.VMS]BUILD_ZIP.COM
  151. or:
  152. MMS /DESCRIP = [.VMS]DESCRIP.MMS CLEAN ! Or MMK ...
  153. MMS /DESCRIP = [.VMS]DESCRIP.MMS ! Or MMK ...
  154. When the executables have been created (or located if already installed),
  155. most users define foreign command symbols for the Zip executables, like
  156. this:
  157. ZIP :== $ dev:[dir]ZIP.EXE ! UNIX-like command line.
  158. or:
  159. ZIP :== $ dev:[dir]ZIP_CLI.EXE ! VMS-like command line.
  160. Such symbol definitions are often added to a user's
  161. SYS$LOGIN:LOGIN.COM procedure, or to a common, site-specific
  162. procedure, like SYS$MANAGER:SYLOGIN.COM.
  163. Additional installation options are described in install_vms.txt.
  164. The builders create help text files, ZIP.HLP and ZIP_CLI.HLP. Also
  165. see install_vms.txt for how to create the help libraries.
  166. Mac OS:
  167. Mac OS X is part of the Unix port, so use the Unix installation above.
  168. Mac OS before Mac OS X use the Mac OS port, though little testing has
  169. been done for that port recently. See macos/README.TXT for more on
  170. this port.
  171. Compiler Flags
  172. Zip should compile fine out of the box for your port. In particular,
  173. for Unix the command
  174. make -f unix/Makefile generic
  175. should automatically detect the features available on your system and
  176. set the flags appropriately. In some cases, however, you may need to
  177. set one or more compiler flags yourself to get Zip to compile or to
  178. add features you want or remove features that cause trouble for your
  179. port. Below are the more common compiler macros you can set.
  180. LARGE_FILE_SUPPORT
  181. Tell Zip that the OS supports large files (generally files larger
  182. than 4 GB). Zip will try to compile in the large file calls
  183. (typically 64-bit) for the OS instead of using the standard
  184. (typically 32-bit) file calls. On Unix Zip tries to switch over to
  185. the 64-bit file environment. If setting this flag causes errors
  186. or Zip still can't handle large files on that port, then probably
  187. either Zip doesn't have the code to support large files on your OS
  188. (write a patch and send it in to us) or your OS doesn't support large
  189. files.
  190. Note that the flag ZIP64_SUPPORT must also be set to create archives
  191. with large files.
  192. This flag should be set automatically on Unix, Win32, and some
  193. other ports. Setting NO_LARGE_FILE_SUPPORT turns this flag off.
  194. ZIP64_SUPPORT
  195. Enable the Zip64 code in Zip that supports the Zip64 extensions noted
  196. in the PKWare AppNote. These extensions allow storing files larger
  197. than 4 GB in archives and the creating of archives larger than 4 GB.
  198. They also allow storing more than 64K files in an archive. Currently
  199. Zip does not handle archives of PKZip version 4.5 or later unless
  200. this flag is set.
  201. To enable large file support in Zip, you generally need to set both
  202. LARGE_FILE_SUPPORT (to read and write large files) and ZIP64_SUPPORT
  203. (to store them in and read them from archives). Files larger than
  204. 4 GB may be invisible to Zip (directory scans don't see them) if
  205. LARGE_FILE_SUPPORT is not enabled.
  206. Keeping LARGE_FILE_SUPPORT and ZIP64_SUPPORT separate allows easier
  207. debugging of these features. When testing large file support on an
  208. OS, first set just LARGE_FILE_SUPPORT to test the file calls (all
  209. should compile and work as before with small files), then turn on
  210. ZIP64_SUPPORT to let Zip recognize and handle large files.
  211. This flag should be set automatically on most ports if
  212. LARGE_FILE_SUPPORT is set. Setting NO_ZIP64_SUPPORT turns this flag
  213. off.
  214. UNICODE_SUPPORT
  215. Enable storing and using UTF-8 paths. These paths are stored in
  216. a backward-compatible way so that archives with UTF-8 paths still
  217. work on zips and unzips that don't support Unicode. This support
  218. follows the recent additions to the PKWare AppNote for Unicode
  219. support, except that Unicode comments on systems where UTF-8 is
  220. not the current character set is not implemented in this release.
  221. On some ports UNICODE_SUPPORT is set automatically if wide characters
  222. are supported. Setting NO_UNICODE_SUPPORT turns off this flag.
  223. USE_EF_UT_TIME
  224. Enables storing UT time in an extra field. This becomes useful
  225. for ports that normally store file times as local time, resulting
  226. in problems when files are moved across time zones and when
  227. there are daylight savings time changes. Zip and UnZip will
  228. automatically correct for time zone changes when UT time is stored.
  229. This is usually set by default. Use NO_EF_UT_TIME to turn this off.
  230. NTSD_EAS (Win32 only)
  231. Enable storing Windows NT file security descriptors. This allows
  232. restoring the descriptors (file ACL's, etc.).
  233. This is on by default for Win32. Use NO_NTSD_EAS to turn this off.
  234. BZIP2_SUPPORT
  235. Enable compressing zip entries using the bzip2 library. You must get
  236. the bzip2 library from somewhere else as we only provide a way to
  237. compile or link the library in and compress files using bzip2. Enables
  238. a new compression method, bzip2, that can be used instead of the default
  239. Zip compression method deflate.
  240. This flag is set on Unix, including Mac OS X, when compiling using
  241. generic if the bzip2 library is found. Set on Win32 if the bzip2
  242. projects are used. See the VMS documentation for when VMS sets this
  243. flag. Setting NO_BZIP2_SUPPORT turns this off.
  244. See bzip2/install.txt for more on installing bzip2 support.
  245. WIN32_OEM (Win32 only)
  246. Enable saving paths on Win32 in the OEM character set. Zip has stored
  247. paths using the standard ANSI local character set, but other zips have
  248. used the OEM character set on MSDOS and Win32. This flag should make
  249. Zip more compatible with other DOS and Win32 zips and unzips. It also
  250. enables the translation of OEM paths in DOS archives to ANSI and should
  251. eliminate some problems with funny characters showing up in path names.
  252. If Unicode is enabled and used, Unicode paths generally override
  253. local paths using OEM character sets.
  254. This flag is on by default on most Win32 ports. Some ports apparently
  255. have problems with OEM conversions. If your port or compiler does
  256. funny things with file names, you may want to turn this off. Defining
  257. NO_WIN32_OEM turns this flag off.
  258. NO_STREAMING_STORE
  259. Because storing zip archives inside a zip entry adds "false" signatures
  260. and this causes problems when using data descriptors if the archive
  261. needs fixing, this option is provided to force deflating when streaming.
  262. This version of Zip includes an advanced algorithm for correctly finding
  263. these signatures, but if an archive is "broke", there is no telling
  264. what's where. This is only a problem if an archive becomes broke for
  265. some reason, but to be safe define this.
  266. ALLOW_REGEX
  267. For MSDOS and Windows, now "[list]" wildcard matching (where any
  268. character between [ and ] can be used to match the character at that
  269. position) is turned off unless the new -RE option is used. Defining
  270. this flag forces "[list]" matching to be always on as in previous
  271. releases.
  272. For command help on any of the zip* utilities, simply enter
  273. the name with no arguments.