home *** CD-ROM | disk | FTP | other *** search
/ Internet File Formats / InternetFileFormatsCD.bin / compress / zip / windows / win95 / unzipsfx.doc < prev    next >
Encoding:
Text File  |  1994-08-25  |  12.4 KB  |  285 lines

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