Debian Codegraph @

INSTALL

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