home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 9 Archive / 09-Archive.zip / unz532.zip / UNZIPSFX.DOC < prev    next >
Text File  |  1997-11-02  |  14KB  |  309 lines

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