home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 9 Archive / 09-Archive.zip / unzip520.exe / unzipsfx.doc < prev    next >
Text File  |  1996-04-29  |  13KB  |  299 lines

  1.  
  2. UNZIPSFX(1L)      MISC. REFERENCE MANUAL PAGES       UNZIPSFX(1L)
  3.  
  4. NAME
  5.      unzipsfx  -  self-extracting  stub  for  prepending  to  ZIP
  6.      archives
  7.  
  8. SYNOPSIS
  9.      <name  of  unzipsfx+archive   combo>   [-cfptuz[ajnoqsCLV$]]
  10.      [file(s) ... [-x xfile(s) ...]]
  11.  
  12. DESCRIPTION
  13.      unzipsfx is a modified version of unzip(1L) designed  to  be
  14.      prepended  to  existing  ZIP archives in order to form self-
  15.      extracting archives.  Instead of taking its  first  non-flag
  16.      argument  to  be  the  zipfile(s)  to be extracted, unzipsfx
  17.      seeks itself under the name by  which  it  was  invoked  and
  18.      tests  or  extracts  the  contents  of the appended archive.
  19.      Because the executable stub adds bulk to  the  archive  (the
  20.      whole  purpose  of  which  is to be as small as possible), a
  21.      number of the regular version's less-vital capabilities have
  22.      been  removed.   Among these are the usage (or help) screen,
  23.      the listing and diagnostic functions (-l and -v), the  abil-
  24.      ity to decompress older compression formats (the ``reduce,''
  25.      ``shrink'' and ``implode''  methods),  and  the  ability  to
  26.      extract  to a directory other than the current one.  Decryp-
  27.      tion is supported as a compile-time  option  but  should  be
  28.      avoided  unless  the  attached  archive  contains  encrypted
  29.      files.
  30.  
  31.      Note that self-extracting archives made with unzipsfx are no
  32.      more  (or  less) portable across different operating systems
  33.      than is the unzip executable itself.   In  general  a  self-
  34.      extracting  archive  made  on  a particular Unix system, for
  35.      example, will only self-extract under  the  same  flavor  of
  36.      Unix.  Regular unzip may still be used to extract the embed-
  37.      ded archive as with any normal  zipfile,  although  it  will
  38.      generate  a harmless warning about extra bytes at the begin-
  39.      ning of the  zipfile.   Despite  this,  however,  the  self-
  40.      extracting  archive  is technically not a valid ZIP archive,
  41.      and PKUNZIP may be unable to test or extract it.  This limi-
  42.      tation  is due to the simplistic manner in which the archive
  43.      is created; the internal directory structure is not  updated
  44.      to  reflect  the  extra bytes prepended to the original zip-
  45.      file.
  46.  
  47. ARGUMENTS
  48.      [file(s)]
  49.           An optional list of archive members  to  be  processed.
  50.           Regular  expressions  (wildcards)  similar  to those in
  51.           Unix egrep(1) may be used to  match  multiple  members.
  52.           These wildcards may contain:
  53.  
  54.           *    matches a sequence of 0 or more characters
  55.  
  56. Info-ZIP          Last change: 30 Apr 96 (v5.2)                 1
  57.  
  58. UNZIPSFX(1L)      MISC. REFERENCE MANUAL PAGES       UNZIPSFX(1L)
  59.  
  60.           ?    matches exactly 1 character
  61.  
  62.           [...]
  63.                matches any  single  character  found  inside  the
  64.                brackets;  ranges  are  specified  by  a beginning
  65.                character, a hyphen, and an ending character.   If
  66.                an  exclamation point or a caret (`!' or `^') fol-
  67.                lows the left bracket, then the range  of  charac-
  68.                ters within the brackets is complemented (that is,
  69.                anything except the characters inside the brackets
  70.                is considered a match).
  71.  
  72.           (Be sure to quote any character that might otherwise be
  73.           interpreted  or  modified by the operating system, par-
  74.           ticularly under Unix and VMS.)
  75.  
  76.      [-x xfile(s)]
  77.           An optional list of archive members to be excluded from
  78.           processing.   Since wildcard characters match directory
  79.           separators (`/'), this option may be  used  to  exclude
  80.           any  files  that  are  in subdirectories.  For example,
  81.           ``foosfx *.[ch] -x */*'' would  extract  all  C  source
  82.           files  in the main directory, but none in any subdirec-
  83.           tories.  Without the -x option, all C source  files  in
  84.           all directories within the zipfile would be extracted.
  85.  
  86.      If unzipsfx is compiled with SFX_EXDIR defined, the  follow-
  87.      ing option is also enabled:
  88.  
  89.      [-d exdir]
  90.           An optional directory to which to  extract  files.   By
  91.           default,  all files and subdirectories are recreated in
  92.           the current directory; the -d option allows  extraction
  93.           in an arbitrary directory (always assuming one has per-
  94.           mission to write to the  directory).   The  option  and
  95.           directory  may  be concatenated without any white space
  96.           between them, but note that this may cause normal shell
  97.           behavior  to  be  suppressed.   In particular, ``-d ~''
  98.           (tilde) is expanded by Unix C shells into the  name  of
  99.           the  user's home directory, but ``-d~'' is treated as a
  100.           literal subdirectory ``~'' of the current directory.
  101.  
  102. OPTIONS
  103.      unzipsfx supports the following unzip(1L) options:   -c  and
  104.      -p  (extract  to standard output/screen), -f and -u (freshen
  105.      and  update  existing  files  upon  extraction),  -t   (test
  106.      archive) and -z (print archive comment).  All normal listing
  107.      options (-l, -v and -Z) have been removed, but  the  testing
  108.      option (-t) may be used as a ``poor man's'' listing.  Alter-
  109.      natively, those creating self-extracting archives  may  wish
  110.      to include a short listing in the zipfile comment.
  111.  
  112. Info-ZIP          Last change: 30 Apr 96 (v5.2)                 2
  113.  
  114. UNZIPSFX(1L)      MISC. REFERENCE MANUAL PAGES       UNZIPSFX(1L)
  115.  
  116.      See unzip(1L) for  a  more  complete  description  of  these
  117.      options.
  118.  
  119. MODIFIERS
  120.      unzipsfx currently supports  all  unzip(1L)  modifiers:   -a
  121.      (convert  text  files),  -n (never overwrite), -o (overwrite
  122.      without prompting), -q (operate quietly),  -C  (match  names
  123.      case-insenstively), -L (convert uppercase-OS names to lower-
  124.      case), -j (junk paths) and -V (retain version numbers); plus
  125.      the   following   operating-system   specific  options:   -X
  126.      (restore VMS owner/protection info), -s (convert  spaces  in
  127.      filenames  to  underscores  [DOS, OS/2, NT]) and -$ (restore
  128.      volume label [DOS, OS/2, NT, Amiga]).
  129.  
  130.      (Support for regular ASCII text-conversion may be removed in
  131.      future versions, since it is simple enough for the archive's
  132.      creator to ensure that text files have the appropriate  for-
  133.      mat for the local OS.  EBCDIC conversion will of course con-
  134.      tinue to be supported since the zipfile format implies ASCII
  135.      storage of text files.)
  136.  
  137.      See unzip(1L) for  a  more  complete  description  of  these
  138.      modifiers.
  139.  
  140. ENVIRONMENT OPTIONS
  141.      unzipsfx uses the same environment  variables  as  unzip(1L)
  142.      does,  although  this  is likely to be an issue only for the
  143.      person creating and  testing  the  self-extracting  archive.
  144.      See unzip(1L) for details.
  145.  
  146. DECRYPTION
  147.      Decryption is supported exactly as in  unzip(1L);  that  is,
  148.      interactively with a non-echoing prompt for the password(s).
  149.      See unzip(1L) for details.  Once again,  note  that  if  the
  150.      archive  has  no encrypted files there is no reason to use a
  151.      version of unzipsfx with decryption support; that only  adds
  152.      to the size of the archive.
  153.  
  154. EXAMPLES
  155.      To create a self-extracting archive letters from  a  regular
  156.      zipfile letters.zip and change the new archive's permissions
  157.      to be world-executable under Unix:
  158.  
  159.          cat unzipsfx letters.zip > letters
  160.          chmod 755 letters
  161.          zip -A letters
  162.  
  163.      To create the same archive under MS-DOS, OS/2  or  NT  (note
  164.      the use of the /b [binary] option to the copy command):
  165.  
  166.          copy /b unzipsfx.exe+letters.zip letters.exe
  167.          zip -A letters.exe
  168.  
  169. Info-ZIP          Last change: 30 Apr 96 (v5.2)                 3
  170.  
  171. UNZIPSFX(1L)      MISC. REFERENCE MANUAL PAGES       UNZIPSFX(1L)
  172.  
  173.      Under VMS:
  174.  
  175.          copy unzipsfx.exe,letters.zip letters.exe
  176.          letters == "$currentdisk:[currentdir]letters.exe"
  177.          zip -A letters.exe
  178.  
  179.      (The VMS append command may also be used.  The  second  com-
  180.      mand installs the new program as a ``foreign command'' capa-
  181.      ble of taking arguments.  The third line assumes that Zip is
  182.      already installed as a foreign command.) Under AmigaDOS:
  183.  
  184.          MakeSFX letters letters.zip UnZipSFX
  185.  
  186.      (MakeSFX is included with the UnZip source distribution  and
  187.      with Amiga binary distributions.  ``zip -A'' doesn't work on
  188.      Amiga self-extracting archives.) To test (or list) the newly
  189.      created self-extracting archive:
  190.  
  191.          letters -t
  192.  
  193.      To test letters quietly, printing  only  a  summary  message
  194.      indicating whether the archive is OK or not:
  195.  
  196.          letters -tqq
  197.  
  198.      To extract the complete contents into the current directory,
  199.      recreating all files and subdirectories as necessary:
  200.  
  201.          letters
  202.  
  203.      To extract all *.txt files (in Unix quote the `*'):
  204.  
  205.          letters *.txt
  206.  
  207.      To extract everything except the *.txt files:
  208.  
  209.          letters -x *.txt
  210.  
  211.      To extract only the README  file  to  standard  output  (the
  212.      screen):
  213.  
  214.          letters -c README
  215.  
  216.      To print only the zipfile comment:
  217.  
  218.          letters -z
  219.  
  220. LIMITATIONS
  221.      The principle and fundamental limitation of unzipsfx is that
  222.      it  is  not  portable across architectures or operating sys-
  223.      tems, and therefore neither are the resulting archives.  For
  224.      some  architectures  there  is  limited portability, however
  225.  
  226. Info-ZIP          Last change: 30 Apr 96 (v5.2)                 4
  227.  
  228. UNZIPSFX(1L)      MISC. REFERENCE MANUAL PAGES       UNZIPSFX(1L)
  229.  
  230.      (e.g., between some flavors of Intel-based Unix).
  231.  
  232.      Another problem with the current implementation is that  any
  233.      archive with ``junk'' prepended to the beginning technically
  234.      is no longer a zipfile (unless zip(1) is used to adjust  the
  235.      zipfile  offsets  appropriately,  as noted above).  unzip(1)
  236.      takes note of the prepended bytes  and  ignores  them  since
  237.      some  file-transfer  protocols,  notably MacBinary, are also
  238.      known to prepend junk.  But PKWARE's archiver suite may  not
  239.      be able to deal with the modified archive unless its offsets
  240.      have been adjusted.
  241.  
  242.      unzipsfx has no knowledge of the user's PATH, so in  general
  243.      an  archive  must either be in the current directory when it
  244.      is invoked, or else a full or relative path must  be  given.
  245.      If  a  user attempts to extract the archive from a directory
  246.      in the PATH other than the current one, unzipsfx will  print
  247.      a  warning  to  the  effect, ``can't find myself.''  This is
  248.      always true under Unix and may be true in some  cases  under
  249.      MS-DOS,  depending  on  the compiler used (Microsoft C fully
  250.      qualifies the program name, but other  compilers  may  not).
  251.      Under OS/2 and NT there are operating-system calls available
  252.      that provide the full path  name,  so  the  archive  may  be
  253.      invoked  from anywhere in the user's path.  The situation is
  254.      not known for AmigaDOS, Atari TOS, MacOS, etc.
  255.  
  256.      As noted above, a number of the normal  unzip(1L)  functions
  257.      have  been removed in order to make unzipsfx smaller:  usage
  258.      and diagnostic info, listing  functions  and  extraction  to
  259.      other directories.  Also, only stored and deflated files are
  260.      supported.  The latter  limitation  is  mainly  relevant  to
  261.      those who create SFX archives, however.
  262.  
  263.      VMS users must know how to set up  self-extracting  archives
  264.      as  foreign  commands  in  order  to  use  any of unzipsfx's
  265.      options.  This is not necessary for simple  extraction,  but
  266.      the command to do so then becomes, e.g., ``run letters'' (to
  267.      continue the examples given above).
  268.  
  269.      unzipsfx on the Amiga requires the use of a special program,
  270.      MakeSFX,   in   order   to  create  working  self-extracting
  271.      archives; simple concatenation does not work.  (For  techni-
  272.      cally  oriented  users, the attached archive is defined as a
  273.      ``debug  hunk.'')   There  may  be  compatibility   problems
  274.      between the ROM levels of older Amigas and newer ones.
  275.  
  276.      All current bugs in unzip(1L) exist in unzipsfx as well.
  277.  
  278. DIAGNOSTICS
  279.      unzipsfx's exit status (error level) is identical to that of
  280.      unzip(1L); see the corresponding man page.
  281.  
  282. Info-ZIP          Last change: 30 Apr 96 (v5.2)                 5
  283.  
  284. UNZIPSFX(1L)      MISC. REFERENCE MANUAL PAGES       UNZIPSFX(1L)
  285.  
  286. SEE ALSO
  287.      funzip(1L), unzip(1L), zip(1L),  zipcloak(1L),  zipgrep(1L),
  288.      zipinfo(1L), zipnote(1L), zipsplit(1L)
  289.  
  290. AUTHORS
  291.      Greg Roelofs was responsible for the basic modifications  to
  292.      UnZip  necessary  to create UnZipSFX.  See unzip(1L) for the
  293.      current list of zip-bugs authors, or the  file  CONTRIBS  in
  294.      the  UnZip source distribution for the full list of Info-ZIP
  295.      contributors.
  296.  
  297. Info-ZIP          Last change: 30 Apr 96 (v5.2)                 6
  298.  
  299.