INSTALL 46 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862
  1. __________________________________________________________________________
  2. This is the Info-ZIP file INSTALL (for UnZip), last updated 16 Apr 2009.
  3. __________________________________________________________________________
  4. Yes, this is a rather long file, but don't be intimidated: much of its
  5. length is due to coverage of multiple operating systems and of optional
  6. customization features, large portions of which may be skipped.
  7. __________________________________________________________________________
  8. To compile UnZip, UnZipSFX and/or fUnZip (quick-start instructions):
  9. ========================================
  10. (1) Unpack everything into a work directory somewhere, and make sure you're
  11. in the main UnZip directory (the one with this file in it).
  12. * (See note below concerning line termination format used in the source
  13. distribution)
  14. (2) Copy the appropriate makefile into the current directory, except under
  15. OS/2.
  16. (3) Run your "make" utility on the makefile (e.g., "nmake -f makefile.msc").
  17. (4) Try out your new UnZip the way you would any new utility: read the
  18. docs first.
  19. Ah ha ha ha!! Oh, that kills me. But seriously... For VMS, see the
  20. Install section below or [.vms]README. for details.
  21. For DOS and other OSes without explicit timezone support (i.e., everybody
  22. but Unix, Windows 95 and NT), make sure the "TZ" environment variable is
  23. set to a valid and reasonable value; see your compiler docs for details.
  24. (*) The unzip sources as well as other Info-ZIP source archives are packaged
  25. in Unix format. All text files use single LF (Ascii 0x0a) characters as
  26. line terminators. On systems that use different conventions for plain text
  27. files (e.g.:DOS,Win9x,WinNT,OS/2 -> combined CR+LF; MacOS -> single CR),
  28. some utilities (editors, compilers, etc.) may not accept source files
  29. with LF line terminators.
  30. For these systems, we recommend to use Info-ZIP's UnZip utility for
  31. extraction of our distribution archives, applying the command option
  32. "-a" (= translate text files to native format) in the extraction command.
  33. In case this procedure is not applicable, an appropiate third-party
  34. conversion utility may be used to achieve the desired line termination
  35. style (examples: "flip", available for Unix, DOS, OS/2; or "tr" on Unix).
  36. To compile UnZip, UnZipSFX and/or fUnZip (detailed instructions):
  37. ========================================
  38. (1) Unpack *.c and *.h (the actual source files), preserving the directory
  39. structure (e.g., ./unix/unix.c). The sole exception is TOPS-20, where
  40. tops20/* should be unpacked into the current directory, but TOPS-20
  41. is no longer fully supported anyway.
  42. As of UnZip 5.41, full decryption support has been integrated in the
  43. UnZip source distribution. If you wish to compile binaries without
  44. decryption support, you must define the preprocessor flag NO_CRYPT.
  45. For many environments, you may add this flag to the custom compilation
  46. flags supplied by the environment variable LOCAL_UNZIP. For more
  47. details, see the make procedures and accompanied documentation for your
  48. particular target OS.
  49. As of UnZip 5.53, support for the bzip2 compression algorithm has been
  50. added to UnZip. However, this support requires the original sources of
  51. the bzip2 compression library which have to be aquired separately;
  52. see "http://www.bzip.org/" for further reference.
  53. (2) Choose the appropriate makefile based on the description in the Con-
  54. tents file for your OS (that is, there's only one for Unix or OS/2, but
  55. MS-DOS and several other OSes have several, depending on the compiler).
  56. Copy it into the current directory and rename if necessary or desired.
  57. (Some makefiles can be invoked in place; see (5) below.)
  58. Don't be afraid to read the makefile! Many options will be explained only
  59. in the comments contained therein. The defaults may not quite suit your
  60. system. When making changes, remember that some "make" utilities expect
  61. tabs as part of the makefile syntax. Failure with cryptic error messages
  62. will result if your editor quietly replaces those tabs with spaces.
  63. Special point of confusion: some non-MSDOS makefiles contain MS-DOS
  64. targets (useful for cross-compilations). An example is the OS/2 makefile
  65. os2/makefile.os2 that contains the gccdos target for DOS emx+gcc and
  66. some more DOS related targets for Watcom C and MSC. But since version 5.3,
  67. the msdos subdirectory contains makefiles for all supported DOS compilers.
  68. [The old djgpp, djgpp1 and gcc_dos targets in unix/Makefile have been
  69. removed in 5.3; use msdos/makefile.dj* instead.]
  70. Extra-special point of confusion: makefile.os2 expects to remain in
  71. the os2 subdirectory. Invoke it via "nmake -f os2/makefile.os2 gcc",
  72. for example.
  73. (3) If you want a non-standard version of UnZip, define one or more of the
  74. following optional macros, either by adding them to the LOCAL_UNZIP
  75. environment variable or by editing your makefile as appropriate. The
  76. syntax differs from compiler to compiler, but macros are often defined
  77. via "-DMACRO_NAME" or similar (for one called MACRO_NAME). Note that
  78. some of these may not be fully supported in future releases (or even
  79. in the current release). Note also that very short command lines in
  80. MS-DOS (128 characters) may place severe limits on how many of these
  81. can be used; if need be, the definitions can be placed at the top of
  82. unzip.h instead (it is included in all source files)--for example,
  83. "#define MACRO_NAME", one macro per line.
  84. DOSWILD (MS-DOS only)
  85. Treat trailing "*.*" like Unix "*" (i.e., matches anything); treat
  86. trailing "*." as match for files without a dot (i.e., matches any-
  87. thing, as long as no dots in name). Special treatment only occurs
  88. if patterns are at end of arguments; i.e., "a*.*" matches all files
  89. starting with "a", but "*.*c" matches all files ending in "c" *only*
  90. if they have a dot somewhere before the "c". [The default method of
  91. specifying files without a dot would be "* -x *.*", making use of
  92. UnZip's exclude-files option.] The matching is actually the same as
  93. Unix, if you assume that undotted filenames really have an invisible
  94. dot at the end, which is how DOS and related systems treat filenames
  95. in general. All other regular expressions (including "?" and
  96. "[range_of_chars]") retain their Unix-like behavior.
  97. WILD_STOP_AT_DIR (incompatible with WINDLL!)
  98. Enables an additional option "-W". When this qualifier is specified,
  99. the pattern matching routine is modified so that both '?' (single-char
  100. wildcard) and '*' (multi-char wildcard) do not match the directory
  101. separator character '/'. Examples:
  102. "*.c" matches "foo.c" but not "mydir/foo.c"
  103. "*/*.c" matches "bar/foo.c" but not "baz/bar/foo.c"
  104. "??*/*" matches "ab/foo" and "abc/foo" but not "a/foo" or "a/b/foo"
  105. To enable matching across directory separator chars, two consecutive
  106. multi-char wildcards "**" should be specified.
  107. This modified behaviour is equivalent to the pattern matching style
  108. used by the shells of some of UnZip's supported target OSs (one
  109. example is Acorn RISC OS).
  110. VMSWILD (VMS only)
  111. Use parentheses rather than brackets to delimit sets (ranges), and
  112. use '%' instead of '?' as the single-character wildcard for internal
  113. filename matching. (External matching of zipfile names always uses
  114. the standard VMS wildcard facilities; character sets are disallowed.)
  115. VMSCLI (VMS only)
  116. Use VMS-style "slash options" (/FOOBAR) instead of the default Unix-
  117. style hyphenated options (-f). This capability does not affect options
  118. stored in environment variables (UNZIP_OPTS or ZIPINFO_OPTS); those use
  119. the Unix style regardless. Beginning with UnZip 5.32, the supplied
  120. VMS build methods generate both VMS-style and default "UNIX-style"
  121. executables; you should NOT add VMSCLI to the custom options.
  122. CHECK_VERSIONS (VMS only)
  123. UnZip "extra fields" are used to store VMS (RMS) filesystem info,
  124. and the format of this information may differ in various versions
  125. of VMS. Defining this option will enable UnZip warnings when the
  126. stored extra-field VMS version(s) do(es) not match the version of
  127. VMS currently being used. This is a common occurrence in zipfiles
  128. received from other sites, but since the format of the filesystem
  129. does not seem to have changed in years (including on Alpha and
  130. IA64 systems), the warnings are not enabled by default.
  131. RETURN_CODES (VMS only)
  132. VMS interprets return codes according to a rigid set of guidelines,
  133. which means it misinterprets normal UnZip return codes as all sorts
  134. of really nasty errors. Therefore VMS UnZip returns an alternate set
  135. of return codes; since these may be difficult to interpret, define
  136. RETURN_CODES for human-readable explanations.
  137. VMS_TEXT_CONV (everybody except VMS)
  138. VMS Stream_LF-format text files archived with the "-V" option
  139. (/VMS), but NOT with -VV (/VMS=ALL), should be fine when extracted
  140. on other systems. Stream_LF-files archived with -VV should be
  141. readable as well, but they may get some junk appended.
  142. Text files with other formats (like the default VFC, with its
  143. embedded byte counts) may be only semi-readable at best when
  144. extracted on other systems. Defining this option enables UnZip's
  145. -aa option to detect and convert VMS VFC-record text files into
  146. native text format. Non-VMS UnZips now use a rudimentary VMS extra
  147. field analyser to relyably determine such text files. (Earlier
  148. versions of UnZip applied some heuristics instead.)
  149. Therefore this option is now enabled by default for the main program
  150. (but not the SFX stub), because it can be extremely useful on those
  151. rare occasions when a VMS text file must be extracted as normal text.
  152. USE_DJGPP_ENV (MS-DOS DJGPP 2.0x only)
  153. Regular DJGPP v2.0x compiled programs which use ENVIRONMENT are
  154. able to read from the file "djgpp.env" as well as those set in the
  155. environment. This adds about 1KB to the size of the executable.
  156. This option is disabled by default in Info-ZIP source. If you are
  157. able to use "djgpp.env" and don't like to clutter the environment
  158. with many special purpose variables, you may want to compile with
  159. this option set.
  160. USE_DJGPP_GLOB (MS-DOS DJGPP 2.0x only)
  161. If you like to get UnZip binaries that handle command line arguments
  162. similar to Unix tools which are run in an Unix shell, you might want
  163. to set this compilation option. This option enables the support for
  164. globbing command line arguments containing wildcards that is built
  165. into the DJGPP startup code. When using a binary compiled with this
  166. option, you may have to enclose wildcard arguments in double quotes
  167. to get them passed to the program unmodified. Enabling this option
  168. is not recommended, because it results in Info-Zip binaries that do
  169. not behave as expected for MS-DOS programs.
  170. USE_VFAT (MS-DOS only, for using same executable under DOS and Win95/NT)
  171. djgpp 2.x and emx/gcc+RSX 5.1 can detect when they are running under a
  172. Win32 DOS box and will accordingly enable long-filename support. For
  173. now only djgpp 2.x and emx/gcc with RSX 5.1 or later have this feature
  174. (and it is defined by default in msdos/makefile.dj2 and makefile.emx),
  175. but if/when other compilers build in similar support, define this
  176. macro to enable its use. See also msdos/doscfg.h. [Note that djgpp
  177. 2.0's LFN support is flaky; users should upgrade to 2.01 or later.]
  178. NO_W32TIMES_IZFIX (Win32 including WinDLL, and WinCE)
  179. By specifying this option, you can disable Info-ZIP's special timestamp
  180. adjustment to get stable time stamps on NTFS disks that do not change
  181. depending on the current time being normal vs. daylight saving time.
  182. When this option is set, UnZip behaves exactly like other programs;
  183. file timestamps on NTFS partitions are created so that their >current<
  184. local time representation displayed by directory listings (cmd.exe
  185. "dir" command or Windows Explorer listings) is the same as shown by
  186. UnZip's listing. But the actual UTC timestamp values stored in the
  187. NTFS file attributes vary depending on whether extraction is done
  188. at summer or winter time.
  189. This option is not recommended because it sacrifies the timestamp
  190. comparison checks when extracting or modifying archives in "update
  191. only newer" mode.
  192. However, for environments where consistency of >displayed< dates
  193. of files extracted to NTFS vs. FAT disks is considered more important
  194. than correctly working update/freshen tasks of Zip&UnZip, this
  195. option may be used.
  196. >> DO NOT DISTRIBUTE OR PUBLISH executables that were compiled with
  197. this option! <<
  198. NOTIMESTAMP
  199. This option disables the -T option, which basically does exactly what
  200. Zip's -go options do (i.e., set the timestamp of the zipfile to that of
  201. the newest file in the archive without rewriting the archive). Unlike
  202. Zip, however, UnZip supports wildcard specifications for the archive
  203. name; for example, "unzip -T *.zip" will set the dates of all zipfiles
  204. in the current directory. (UnZip's option is also much faster.)
  205. DATE_FORMAT=DF_DMY or DF_MDY or DF_YMD
  206. This option controls the order in which date components are printed
  207. in non-ZipInfo-mode listings: day-month-year or month-day-year or
  208. year-month-day.
  209. For DOS, FlexOS, OS2, Theos and Win32, the format is automatically
  210. obtained from the operating system; most others default to DF_MDY.
  211. DATE_SEPCHAR='-' or '.' or '/' etc.
  212. This option controls the character that separates the date components
  213. shown in (non-ZipInfo-mode) listings. The Win32 port obtains the
  214. separator automatically from the operating system's locale settings;
  215. all others default to '-'.
  216. ACORN_FTYPE_NFS (needs support for long filenames with embedded commas)
  217. This option enables a -F option that instructs UnZip to interpret the
  218. filetype information extracted from Acorn RiscOS extra field blocks.
  219. The filetype IDs are translated into "NFS filetype extensions" and
  220. appended to the names of the extracted files. This feature facilitates
  221. maintenance of Unix-based NFS volumes that are exported to Acorn RiscOS
  222. systems.
  223. QLZIP (Unix only)
  224. Add some support for QDOS extra fields. This option enables Unix
  225. UnZip to append "datalen info" to QDOS exec type files in the same
  226. format as used by QDOS cross-compilers on Unix or the qltools v2.2(+).
  227. UNIXBACKUP (default on OS/2, Unix, Win32)
  228. This option enables a -B option that instructs UnZip to rename files
  229. that would normally be overwritten. The renamed files are given a
  230. tilde suffix and a unique sequence number (`~#####'). Note that
  231. previously renamed files may be overwritten without notice, even
  232. if the -n option is given.
  233. On target ports where UNIXBACKUP is enabled by default, the negated
  234. option NO_UNIXBACKUP may be used to disable this feature.
  235. OS2_EAS
  236. List the sizes of OS/2 EAs and ACLs for each file as two extra columns
  237. in "unzip -l" output. This is primarily useful for OS/2 systems, but
  238. because zipfiles are portable, OS2_EAS can be defined for any system.
  239. (May be extended someday to show sizes of Mac resource forks, RISCOS
  240. and VMS file info, etc.)
  241. DELETE_IF_FULL (anybody with unlink() function)
  242. If a write error is encountered (most likely due to a full disk),
  243. enabling this option will cause the incomplete file to be deleted
  244. instead of closed normally. This is particularly useful for the
  245. Windows CE port, which must generally contend with extremely limited
  246. resources.
  247. ASM_CRC (Amiga/Aztec C; many x86 systems: DOS, OS/2, Win32, Unix)
  248. Use an assembler routine to calculate the CRC for each file (speed).
  249. ASM_INFLATECODES (Amiga/Aztec C only, for now)
  250. Use an assembler version of inflate_codes() for speed.
  251. OLD_EXDIR
  252. No longer supported.
  253. SFX_EXDIR
  254. Enable the "-d <extract_dir>" option for UnZipSFX. This is now
  255. enabled by default (since UnZip 5.5) to facilitate use with
  256. automated installation scripts and the like. For disabling
  257. this feature, see the NO_SFX_EXDIR option.
  258. NO_SFX_EXDIR
  259. Disables the "-d <extract_dir>" option for UnZipSFX to generate the
  260. smallest possible executable stub. (Prior to the UnZip 5.5 release,
  261. this was the default.)
  262. CHEAP_SFX_AUTORUN
  263. Enable a simple "run command after extraction" feature for
  264. the (command line) UnZipSFX stub. This feature is currently
  265. incompatible with the "-d <extract_dir>" command line option,
  266. therefore CHEAP_SFX_AUTORUN implicitely sets the NO_SFX_EXDIR
  267. option.
  268. NO_ZIPINFO
  269. Compile without ZipInfo mode (-Z) enabled; makes a smaller executable
  270. because many text strings are left out. Automatically enabled for
  271. some small-model compiles under MS-DOS and OS/2, so ordinarily there
  272. is no need to specify this explicitly. (Note that even with this
  273. defined, the resulting executable may still be too big to extract
  274. some zipfiles correctly, if compiled with the small memory model.)
  275. USE_DEFLATE64 (default for UnZip and fUnZip)
  276. NO_DEFLATE64 (default for UnZipSFX stub)
  277. The "deflate64" algorithm from PKZIP 4.0 (or newer) is an enhanced
  278. variant of the deflate algorithm that achieves slightly better
  279. compression ratios on highly redundant data. Normally, UnZip should
  280. be compiled with support for this compression algorithm enabled.
  281. However, this results in significantly larger memory requirements
  282. to run the program. For 16-bit executables (DOS and OS/2), the
  283. special memory management to support the 64k history buffer results
  284. in a slight performance (= speed) penalty. And for the SFX stub,
  285. "deflate64" support might be unnessessary as long as the Info-ZIP
  286. Zip utility does not support it (quite likely, this will never
  287. get implemented). So, the NO_DEFLATE64 option is provided to allow
  288. exclusion of the deflate64 support.
  289. USE_BZIP2 (requires additional external code distribution)
  290. UnZip can optionally support the "bzip2" compression algorithm for
  291. most ports on 32-bit (or higher) platforms. Currently, this support
  292. is integrated in the Make procedures of MSDOS 32-bit (DJGPP), VMS,
  293. Win32, and many Unix systems.
  294. Prerequisites:
  295. You have to obtain the bzip2 source distribution (version 1.03 or
  296. higher) and extract it into the "bzip2" subdirectory.
  297. Compilation:
  298. - MSDOS, Win32: You have to supply the symbol definition
  299. "USEBZ2=1" on the command line when you invoke the make program.
  300. - Unix: The target "generic" automatically activates bzip2 support
  301. when its configure script detects the presence of the bzip2 sources.
  302. For other targets, there are two options:
  303. a) Use the command
  304. "make -f unix/Makefile D_USE_BZ2=-DUSE_BZIP2 L_BZ2=-lbz2 \
  305. LIBBZ2=bzip2/libbz2.a YourTarget"
  306. (Do not use the continuation line and replace YourTarget with
  307. the appropiate target name.)
  308. b) Edit the Makefile and remove the comment signs from the lines
  309. that define the macros D_USE_BZ2, L_BZ2, and LIBBZ2 (at about
  310. line 84 ff.).
  311. - VMS: The MMS/MMK build program should automatically activate the
  312. bzip2 support when it detects the presence of the bzip2 sources.
  313. MULT_VOLUME (experimental for 5.5x, do NOT use in production versions!)
  314. NO_MULT_VOLUME (default)
  315. The symbol MULT_VOLUME is used to flag code portions needed for
  316. support of multi-volume archives. For now, this flag MUST NOT be
  317. used to compile a production versions of UnZip. This flag has been
  318. introduced to allow integration of experimental code for multi-volume
  319. support in the master source tree. This feature will become a default
  320. option in the future 6.1 release of UnZip.
  321. LZW_CLEAN
  322. USE_UNSHRINK (now default, as of January 2005)
  323. The "shrinking" algorithm from PKZIP 1.0 is an LZW variant. Unisys
  324. patented the Lempel-Ziv-Welch algorithm in 1985 and has publicly
  325. claimed that decompression is covered by it. (IBM also patented the
  326. same thing in a filing 3 weeks prior to Unisys's.) In 2004, the
  327. Unisys and IBM patents expired worldwide, so unshrinking is now
  328. enabled again by default. If you do not wish to include the LZW
  329. method, you may still disable it by defining LZW_CLEAN.
  330. (Unshrinking was used by PKZIP 1.0 and 1.1, and Zip 1.0 and 1.1.
  331. All newer archives use only the deflation method.)
  332. COPYRIGHT_CLEAN (now default)
  333. USE_SMITH_CODE
  334. The last chunk of code in UnZip that was blatantly derived from Sam
  335. Smith's unzip 2.0 (as in, "substantially similar") is in unreduce.c.
  336. Since reducing was only used by very early PKZIP beta versions (0.9x),
  337. support for it is now omitted by default (COPYRIGHT_CLEAN). To in-
  338. clude unreducing capability, define USE_SMITH_CODE and replace the
  339. stub unreduce.c source file by the separatly distributed full source
  340. code module. Note that this subjects UnZip to any and all restrictions
  341. in Smith's copyright; see the UnZip COPYING.OLD file for details.
  342. USE_CRYPT
  343. Enable decryption support for all binaries. The default setting
  344. is to disable decryption support for the SFX stub to keep its size
  345. as small as possible. For other binaries of the UnZip distribution,
  346. decryption support is enabled by default.
  347. NO_CRYPT
  348. Disable decryption support for all binaries.
  349. PASSWD_FROM_STDIN (with full crypt sources only; Unix, VMS only)
  350. Used to allow the password on encrypted files to be read from stdin
  351. rather than the default stderr. This was useful for those who wished
  352. to automate the testing or decoding of encrypted archives (say, in a
  353. shell script via ``echo "password" | unzip -tq archive''), but as of
  354. version 5.3, UnZip has a -P option for passing a password directly to
  355. the program. PASSWD_FROM_STDIN will therefore probably be phased out
  356. in future versions. Note that the same security warnings given in the
  357. description of the -P option apply here as well.
  358. UNICODE_SUPPORT
  359. Enable restoring from UTF-8 encoded paths. These paths are stored
  360. in extra fields in a backward-compatible way so that archives with
  361. UTF-8 paths still work on zips and unzips that don't support Unicode.
  362. This support follows the recent additions to the PKWare AppNote for
  363. Unicode support, except that Unicode comments on systems where UTF-8
  364. is not the current character set is not implemented in this release.
  365. Internally, Unicode support can be achieved by three methods:
  366. a) The charset encoding used by the system is already UTF-8, so
  367. the program just has to select the UTF-8 versions of the stored
  368. filenames for file name handling.
  369. This method is enabled by setting the symbol UTF8_MAYBE_NATIVE;
  370. this activates code to check for native UTF-8 encoding in the
  371. locale settings.
  372. b) The operating system and the compilation environment support
  373. "wide character" data in Unicode encoding (UCS-2/UTF-16 or UCS-4),
  374. which are used to translate between UTF-8 and the native
  375. extended-ASCII character encoding.
  376. The code for this method is activated by setting the preprocessor
  377. symbol UNICODE_WCHAR.
  378. It may be activated together with UTF8_MAYBE_NATIVE to provide
  379. more versatile Unicode support and additional "debugging" options
  380. for checking the correct recognition of non-ASCII Unicode
  381. characters.
  382. c) The operating system and the compilation environment allow to use
  383. unicode-encoded "wide character" data for native text strings
  384. support.
  385. Complete support for this method requires a throughout revision
  386. of the UnZip code. All internal string handling and text output
  387. needs to be ported to use wchar_t character storage.
  388. This porting is still in an experimental stage and not ready
  389. for general distribution.
  390. On some ports UNICODE_SUPPORT is set automatically:
  391. - WIN32 (and WinCE) use method b) by defining UNICODE_SUPPORT and
  392. UNICODE_WCHAR.
  393. - On Unix, the automatic configuration script enables UNICODE_WCHAR
  394. if ISO-10646 compatible wide characters are supported and
  395. UTF8_MAYBE_NATIVE if the locale detection call is available.
  396. For these ports, setting NO_UNICODE_SUPPORT forces deactivation of
  397. the Unicode support.
  398. NO_SETLOCALE (for Unix)
  399. On Unix, it is now assumed that <locale.h> and the setlocale function
  400. are available, to setup locale-aware filtering of displayed filenames.
  401. The option NO_SETLOCALE allows to disable the dependency on <locale.h>
  402. and setlocale() on systems where this assumption is invalid (and the
  403. auto-configuring make target "generic" cannot be used for capabilities
  404. detection).
  405. _MBCS
  406. NO_MBCS
  407. Enable multi-byte character set support. This is the default for the
  408. Human68k system (originated from Japan) and for Win32 (here only DBCS
  409. "double-byte character set" support). The MBCS support should also be
  410. enabled on systems which are capable of using UTF-8 as native charset.
  411. For MBCS support, the C runtime library must supply implementations
  412. for the mblen() function and the MB_CUR_MAX runtime macro/function.
  413. The NO_MBCS symbol allows to explicitely disable MBCS support for
  414. testing purpose, or when MBCS support does not work as expected.
  415. HAVE_WORKING_ISPRINT
  416. NO_WORKING_ISPRINT
  417. The symbol HAVE_WORKING_ISPRINT enables enhanced non-printable chars
  418. filtering for filenames in the fnfilter() function. On some systems
  419. (Unix, VMS, some Win32 compilers), this setting is enabled by default.
  420. In cases where isprint() flags printable extended characters as
  421. unprintable, defining NO_WORKING_ISPRINT allows to disable the enhanced
  422. filtering capability in fnfilter(). (The ASCII control codes 0x01 to
  423. 0x1f are always escaped on ASCII systems.)
  424. DEBUG
  425. Used for debugging purposes; enables Trace() statements. Generally
  426. it's best to compile only one or two modules this way.
  427. DEBUG_TIME
  428. Used for debugging the timezone code in fileio.c; enables TTrace()
  429. statements. This code is only used for the freshen/update options
  430. (-f and -u), and non-Unix compilers often get it wrong.
  431. (4) If you regularly compile new versions of UnZip and always want the same
  432. non-standard option(s), you may wish to add it (them) to the LOCAL_UNZIP
  433. environment variable (assuming it's supported in your makefile). Under
  434. MS-DOS, for example, add this to AUTOEXEC.BAT:
  435. set LOCAL_UNZIP=-DDOSWILD -DDATE_FORMAT=DF_DMY
  436. You can also use the variable to hold special compiler options (e.g.,
  437. -FPi87 for Microsoft C, if the x87 libraries are the only ones on your
  438. disk and they follow Microsoft's default naming conventions; MSC also
  439. supports the CL environment variable, however).
  440. (5) Run the make utility on your chosen makefile:
  441. Unix
  442. For most systems it's possible to invoke the makefile in place, at
  443. the possible cost of an ignorable warning; do "make -f unix/Makefile
  444. list" to get a list of possible system targets, and then "make -f
  445. unix/Makefile target" for your chosen target. The "generic" target
  446. works for most systems, but if it fails with a message about ftime()
  447. unresolved or timezone redefined, do "make clean", "make help", and
  448. then either "make generic2" or "make generic3" as instructed. If all
  449. else fails, read the makefile itself; it contains numerous comments.
  450. (One of these days we'll make a configure script that automates this
  451. procedure better.)
  452. VMS (OpenVMS):
  453. On VMS, two build methods are provided: a command procedure, and
  454. description files for MMS or MMK. Both methods must be run from
  455. the main directory, not the [.VMS] subdirectory.
  456. A simple build using the command procedure looks like this:
  457. @ [.VMS]BUILD_UNZIP.COM
  458. A simple build using MMS or MMK looks like this:
  459. MMS /DESCRIP = [.VMS]DESCRIP.MMS ! Or, with MMK, ...
  460. MMK /DESCRIP = [.VMS]DESCRIP.MMS
  461. Various options for each build method are explained in comments in
  462. the main builder file, either BUILD_UNZIP.COM or DESCRIP.MMS.
  463. Here are some more complex build examples:
  464. o Build with the large-file option enabled (non-VAX only):
  465. @ [.VMS]BUILD_UNZIP LARGE
  466. or:
  467. MMS /DESC = [.VMS] /MACRO = LARGE=1
  468. o Re-link the executables (small-file and large-file):
  469. @ [.VMS]BUILD_UNZIP LINK
  470. @ [.VMS]BUILD_UNZIP LARGE LINK
  471. or
  472. MMK /DESC = [.VMS] CLEAN_EXE ! Deletes existing executables.
  473. MMK /DESC = [.VMS] ! Builds new executables.
  474. MMK /DESC = [.VMS] /MACRO = LARGE=1 CLEAN_EXE
  475. MMK /DESC = [.VMS] /MACRO = LARGE=1
  476. o Build a large-file product from scratch, for debug, getting
  477. compiler listings and link maps:
  478. mms /desc = [.vms] clean
  479. mms /desc = [.vms] /macro = (DBG=1, LARGE=1. LIST=1)
  480. On VAX, the builders attempt to cope with the various available C
  481. compilers: DEC/Compaq/HP C, VAX C, or GNU C. If DEC/Compaq/HP C is
  482. not available or not desired, comments in the relevant builder file
  483. explain the command-line options used to select a different
  484. compiler.
  485. System-architecture-specific files (like objects and executables)
  486. are placed in separate directories, such as [.ALPHA], [.IA64], or
  487. [.VAX]. Large-file products get their own directories, [.ALPHAL]
  488. or [.IA64L]. On VAX, VAX C products are placed in [.VAXV], GNU C
  489. products in [.VAXG]. Each product builder announces what the
  490. destination directory will be when it is run.
  491. Common files, such as the help libraries (UNZIP.HLP for the
  492. default UNIX-like command-line interface, UNZIP_CLI.HLP for the
  493. VMS-like command-line interface), are placed in the main
  494. directory. With a mixed-architecture VMS cluster, the same main
  495. directory on a shared disk may may be used by all system types.
  496. (Using the NOHELP option with BUILD_UNZIP.COM can keep it from
  497. making the same help files repeatedly.)
  498. Some further information may be found in the files
  499. [.VMS]README. and [.VMS]00BINARY.VMS, though much of what's
  500. there is now obsolete.
  501. MS-DOS
  502. See the msdos\Contents file for notes regarding which makefile(s) to
  503. use with which compiler. In summary: pick one of msdos\makefile.*
  504. as appropriate, or (as noted above) use the OS/2 gccdos target for
  505. emx+gcc. There is also an mscdos cross-compilation target in
  506. os2\makefile.os2 and a sco_dos cross-compilation target in the Unix
  507. makefile. For Watcom 16-bit or 32-bit versions, see the comments in
  508. the OS/2 section below.
  509. After choosing the appropriate makefile and editing as necessary or
  510. desired, invoke the corresponding make utility. Microsoft's NMAKE
  511. and the free dmake and GNU make utilities are generally the most
  512. versatile. The makefiles in the msdos directory can be invoked in
  513. place ("nmake -f msdos\makefile.msc", for example).
  514. OS/2
  515. Either GNU make, nmake or dmake may be used with the OS/2 makefile;
  516. all are freely available on the net. Do "nmake -f os2\makefile.os2",
  517. for example, to get a list of supported targets. More generally,
  518. read the comments at the top of the makefile for an explanation of
  519. the differences between some of the same-compiler targets.
  520. Win32 (WinNT or Win9x)
  521. For creating Win32 executables, the Microsoft Visual C++ compiler
  522. platforms from version 2.x up to 8.0 (Visual Studio .Net C++ 2005)
  523. are supported. Recent build test have been run on VC++ 6.0, 7.1
  524. and 8.0. The linker of newer Microsoft Visual C++ versions (beginning
  525. with Visual C++ 2008 - [VC++ 9.0]) create executables that are marked
  526. to run on Windows 2000 and newer, only. Although these Visual C++
  527. environments may succeed in building Win32 Info-ZIP executables,
  528. they cannot (and must not) be used to create binaries for public
  529. distribution.
  530. Alternative compilers for the Intel platforms are OpenWatcom C++,
  531. GNU C (preferably the mingw32 port, CygWin and emx/rsxnt may also
  532. work), Borland C++, or lcc-win32.
  533. DEC C/C++ for NT/Alpha may or may not still work.
  534. For the Watcom compiler, use WMAKE and win32\makefile.wat; for the
  535. Microsoft compilers, use NMAKE and win32\Makefile; for mingw32 and
  536. CygWin, GNU Make and win32\Makefile.gcc should do the job.
  537. With emx+gcc, a good choice is GNUMake 3.75 (or higher) from the
  538. djgpp V2 distribution used on win32\Makefile.emx.
  539. The unzip32.dll WinDLL executables can be built using the appropiate
  540. Makefile in the win32\ subdirectory, or by using the Microsoft Visual
  541. C++ project files supplied below the windll subdirectory. Besides the
  542. MSC compilers, gcc-mingw32, Watcom C and Borland C allow to build the
  543. Windows UnZip DLL. By default, the Makefiles for compilers that use
  544. the Microsoft C runtime are configured to link against the shared
  545. multithreading C runtime DLL. Depending on the intended usage for
  546. unzip32.dll, a statically linked dll might be more suitable. The
  547. make scripts for MSC support build variants with static linking; you
  548. should look up the configuration switch DLLSTANDALONE in the MSC
  549. Makefile or the "Static..." build configurations in the Visual Studio
  550. project files.
  551. WinCE (WinCE or WinNT)
  552. Only Microsoft Visual C++ 5.0, 6.0 or Visual C++ embedded 3.0 or later
  553. are supported. Use the appropiate version of the included project
  554. files and check wince\README for details.
  555. AmigaDOS
  556. SAS/Lattice C and Manx Aztec C are supported. For SAS C 6.x do "smake
  557. -f amiga/smakefile all"; for Aztec C do "make -f amiga/makefile.azt
  558. all". The Aztec C version supports assembly-language versions of two
  559. routines; these are enabled by default.
  560. Atari TOS
  561. Turbo C is no longer supported; use gcc and the MiNT libraries, and
  562. do "make". Note that all versions of gcc prior to 2.5.8 have a bug
  563. affecting 68000-based machines (optimizer adds 68020 instructions).
  564. See atari\README for comments on using other compilers.
  565. Macintosh
  566. Metrowerks CodeWarrior Pro 4 with Universal Interfaces 3.1 is the only
  567. currently supported compiler, although the Mac Programmer's Workbench
  568. (MPW) and Think C were supported at one time and still have some hooks.
  569. Other Compilers may work too, no compiler specific instructions
  570. (pragma, header, macros, ...) were used in the code.
  571. For CodeWarrior Pro 4, un-BinHex the CodeWarrior project file and
  572. UnZip resource file (using Stuffit Expander or BinHex 4.0 or later),
  573. then open the project and click on the compile button.
  574. See ":macos:Contents" for the possible project targets.
  575. Link order of the standard libraries is very important: Link all
  576. sources first and all standard libraries last.
  577. Acorn (RISC OS)
  578. Extract the files from the archive and place in standard 'Acorn' C
  579. form (i.e., *.c, *.h and *.s become c.*, h.* and s.*, respectively),
  580. either using the UNZIP$EXTS environment variable and a pre-built UnZip
  581. binary, or using Spark[FS] and doing it manually. Then copy the
  582. Acorn.Makefile to the main UnZip directory and either type 'amu' or
  583. use the desktop make utility.
  584. VM/CMS
  585. Unpack all the files and transfer them with ASCII -> EBCDIC conver-
  586. sion to an appropriate directory/minidisk/whatever, then execute
  587. UNZVMC to compile and link all the sources. This may require C/370
  588. version 2.1 or later and certain `nucleus extensions,' although
  589. UnZip 5.3 has been reported to compile fine with the `ADCYCLE C/370
  590. v1.2 compiler.' Note that it will abend without access to the C/370
  591. runtime library. See the README.CMS file for more details.
  592. MVS
  593. Unpack all the files and transfer them to an appropriate PDS with
  594. ASCII -> EBCDIC conversion enabled, then edit UNZMVSC.JOB as required,
  595. and execute it to compile and link all the sources. C/370 2.1 or
  596. later is required. See README.MVS for further details. [This is a
  597. new port and may need a little more work even to compile.]
  598. Human68K
  599. [This is a Japanese machine and OS.] It appears that GNU make and
  600. gcc are required; presumably just do "gmake -f human68k/Makefile.gcc"
  601. to build everything. This port has not been tested since the 5.12
  602. release.
  603. TOPS-20
  604. [No longer fully supported due to new, unported features, although
  605. patches are always accepted.] Unpack all files into the current
  606. directory only (including those in the zipfile's tops20 directory),
  607. then use make.mic and "do make".
  608. BeOS
  609. You can run the BeOS makefile in place by typing "make -f
  610. beos/Makefile". In fact, this is how the author tests it.
  611. Running the appropriate make utility should produce three executables on
  612. most systems, one for UnZip/ZipInfo, one for UnZipSFX, and one for fUnZip.
  613. (VMS is one prominent exception: fUnZip makes no sense on it. The Amiga
  614. produces a fourth executable called MakeSFX, which is necessary because
  615. Amiga self-extracting archives cannot be created by simple concatenation.
  616. If necessary the source amiga/makesfx.c can be compiled on other systems.)
  617. Read any OS-specific README files for notes on setting things up for
  618. normal use (especially for VMS) and for warnings about known quirks and
  619. bugs in various compilers (especially for MS-DOS).
  620. Also note that many OSes require a timezone variable to be set correctly
  621. (often "TZ"); Unix and VMS generally do so by default, Win95/NT do if set
  622. up properly, but other OSes generally do not. See the discussion of the
  623. -f and -u options in the UnZip man page (or unzip.txt). BeOS doesn't
  624. currently support timezone information at all, but this will probably be
  625. added soon.
  626. Then test your new UnZip on a few archives and let us know if there are
  627. problems (but *please* first make certain that the archives aren't actu-
  628. ally corrupted and that you didn't make one of the silly mistakes dis-
  629. cussed in the documentation). If possible, double-check any problems
  630. with PKUNZIP or with a previous version of UnZip prior to reporting a
  631. "bug." The zipfile itself may be damaged.
  632. To install:
  633. ===========
  634. Unix
  635. The default prefix for the installation location is /usr/local (things
  636. go into the bin and man/man1 subdirectories beneath the prefix), and
  637. the default man-page extension is "1" (corresponding to man/man1, above).
  638. To install as per the defaults, do "make install"; otherwise do "make
  639. prefix=/your/path manext=your_extension install". (For Intel Unix flavors
  640. where the assembler CRC routines were used [ASM_CRC], use the install_asm
  641. target instead of the regular install target.) For example, to install
  642. in your home directory with "l" as the man-page extension (for "local"),
  643. do "make prefix=$HOME manext=l install". Permissions will be 755 for the
  644. executables and 644 for the man pages. In general root must perform in-
  645. stallation into a public directory. Do "rehash" if your shell requires
  646. it in order to find the new executables.
  647. VMS
  648. To complete the installation, the executables may be left in place,
  649. or moved (or copied) to a convenient place. While other methods
  650. (like DCL$PATH) exist, most users define symbols to make the UnZip
  651. executables available as foreign commands. These symbol definitions
  652. may be placed in a user's SYS$LOGIN:LOGIN.COM, or in a more central
  653. location, like SYS$MANAGER:SYLOGIN.COM. Typical symbol definitions
  654. might look like these:
  655. UNZIP :== $ dev:[dir]UNZIP.EXE ! UNIX-like command line.
  656. or:
  657. UNZIP :== $ dev:[dir]UNZIP_CLI.EXE ! VMS-like command line.
  658. For convenience, a ZIPINFO symbol could also be defined, so:
  659. ZIPINFO :== $ dev:[dir]UNZIP.EXE """-Z"""
  660. On a non-VAX system, different symbols could be defined for the
  661. small-file and large-file programs. For example:
  662. UNZIPS :== $ dev:[dir.ALPHA]UNZIP.EXE ! UNZIPS = small-file UnZip.
  663. UNZIP*L :== $ dev:[dir.ALPHAL]UNZIP.EXE ! UNZIP[L] = large-file UnZip.
  664. The builders create help text files, UNZIP.HLP and UNZIP_CLI.HLP.
  665. These may be incorporated into an existing help library, or a separate
  666. UnZip help library may be created using commands like these, using
  667. either UNZIP.HLP (as shown) or UNZIP_CLI.HLP:
  668. $ LIBRARY /HELP dev:[dir]existing_library.HLB UNZIP.HLP
  669. $ LIBRARY /CREATE /HELP UNZIP.HLB UNZIP.HLP
  670. UnZip help may then be accessed from a separate UnZip help library
  671. using a command like:
  672. $ HELP /LIBRARY = device:[directory]UNZIP.HLB
  673. For greater ease, the user (or system manager) may define a
  674. HLP$LIBRARY logical name to allow the HELP utility to find the UnZip
  675. help library automatically. See HELP HELP /USERLIBRARY for more
  676. details. The command procedure HLP_LIB_NEXT.COM may be used to
  677. determine the next available HLP$LIBRARY logical name, and could be
  678. adapted to define a HLP$LIBRARY logical name for an UnZip help library.
  679. The kit includes MAKESFX.COM, a command procedure intended to simplify
  680. creating a self-extracting archive. It may be helpful to install this
  681. procedure near the UnZip executables. MAKESFX.COM expects another
  682. symbol definition, like one of these:
  683. UNZIPSFX :== $ dev:[dir]UNZIPSFX.EXE ! UNIX-like command line.
  684. or:
  685. UNZIPSFX :== $ dev:[dir]UNZIPSFX_CLI.EXE ! VMS-like command line.
  686. Again here, on a non-VAX system, either a small-file or a large-file
  687. UNZIPSFX program may be used. (MAKESFX.COM could be modified to allow
  688. a run-time choice to be made.)
  689. OS/2, MS-DOS, NT, Atari, Amiga
  690. Move or copy unzip.exe (or unzip.ttp, or UnZip, or whatever) to a direc-
  691. tory in your path; also possibly copy the UnZip executable to zipinfo.exe
  692. (or ii.exe), or else create an alias or a batch/command file for ZipInfo
  693. ("@unzip -Z %1 %2 %3 %4 %5 %6 %7 %8 %9" under MS-DOS). The latter is only
  694. relevant if NO_ZIPINFO was *not* defined, obviously... Under djgpp 2.x,
  695. zipinfo.exe is a 2K stub symbolically linked to unzip.exe.
  696. Acorn RISC OS
  697. Copy the executables unzip, funzip and zipinfo to somewhere in your
  698. Run$Path. See your Welcome manual if you don't know about Run$Path.
  699. BeOS
  700. The default prefix for the installation location is /boot/usr/local
  701. (things go into the bin and man/man1 subdirectories beneath the prefix),
  702. and the default man-page extension is "1" (corresponding to the man/man1,
  703. above). Of course, these Unix man-pages aren't useful until someone ports
  704. something that can format them... plain text versions are also installed
  705. with an extension of ".txt". To install, do a "make install", or to
  706. change the prefix, do "make prefix=/your/path install". For example, to
  707. install in /boot/bin, do "make prefix=/boot/bin install".
  708. Macintosh
  709. (This port is for Macintosh OS before Mac OS X. See Unix Apple below for
  710. Mac OS X and later.)
  711. MacZip requires at least System 7 and a Macintosh with a minimum of a
  712. Motorola 68020 or PowerPC 601 processor. Other configurations may work
  713. but it is not tested at all.
  714. The application (MacZip) is distributed as a combination of zip and unzip
  715. in one program. The offical release is a fat binary with both regular 68K
  716. and native PowerPC versions included.
  717. Move the executable(s) somewhere--for example, drag it (or them) to your
  718. Applications folder. For easy access, make an alias in the Launcher Control
  719. Panel or directly on your desktop.
  720. This port supports also Apple-event.So you can install it in your
  721. WWW-Browser as a helper-app.
  722. Look into "macos/README.TXT" (or ":macos:README.TXT" on Mac) for further
  723. info.
  724. Macintosh OS X (Unix Apple)
  725. Mac OS X and later are based on BSD Unix and are supported by the Unix
  726. port. See the Unix port for details. Though support is currently
  727. minimal, we plan to support additional Mac OS X features, such as resource
  728. forks, in future releases.
  729. Human68K, TOPS-20, AOS/VS, MVS, VM/CMS, etc.
  730. Dunno, sorry...