home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / UTILITY / ARCHIVE / GEN012.ZIP / GEN.DOC next >
Encoding:
Text File  |  1991-08-24  |  13.2 KB  |  380 lines

  1.  
  2.             GEN - The archive generator
  3.             ---------------------------
  4.             
  5.         (c) Wolfgang Thronicke & Friedrich Wichmann
  6.                          1990-1991
  7.     
  8.     
  9.  
  10.             Manual for Version 0.12
  11.  
  12.  
  13.  
  14. ---------------------------------------------------------------------------
  15. GEN is public domain. No charge has to be paid for it. Copy and distribute
  16. it as you like but keep the files of the distribution intact.
  17. We, the authors, are not liable for any damage resulting from the use of
  18. this program. Enjoy!
  19. ---------------------------------------------------------------------------
  20.  
  21.  
  22. CONTENTS
  23. --------
  24.  
  25.   0. Introduction
  26.   1. Requirements and installation
  27.   2. Usage
  28.   3. Examples
  29.   4. How GEN works
  30.   5. Problems & Solutions
  31.   6. How to contact the authors
  32.   7. References
  33.  
  34. 0. INTRODUCTION
  35. ---------------
  36.  
  37.   What is GEN?
  38.  
  39.   GEN is a small tool to create multiple archives with the most
  40.   common compression tools for PCs. The basic aim of this program
  41.   is to build archives with a given maximum size from a collection
  42.   of files. Suppose you have installed a complex multi-file tool
  43.   (as most compilers are!) and want to make a backup so that you can
  44.   restore the installed tool any time you want. And you want to
  45.   use your favorite compression tool to save space. But most of
  46.   them are not capable of making multiple archives with a specified
  47.   size.
  48.  
  49.   Does this sound somewhat familiar to you? Yes, you're right. There
  50.   has been a tool called ZIPPER that was released in 1990 to the
  51.   public. GEN is an enhanced version of this program. We changed the
  52.   name because GEN is not limited to use only one archiver but
  53.   GENerates archives using the most widespread archivers. Most bugs
  54.   of the old ZIPPER release have been removed and some new features
  55.   have been added.
  56.  
  57.   GENs features:
  58.   ■    create multiple archives with a restricted size
  59.   ■    can use different archiving programs
  60.   ■     the same options for different archivers
  61.   ■     autodetect of availiable archivers
  62.   ■    steps through subdirectories (or not)
  63.   ■     can behave like BACKUP
  64.   ■    shell to DOS capability
  65.   ■    diskmode to speed up archive creation on disks
  66.   ■     requires less memory than ZIPPER
  67.   ■     faster than ZIPPER
  68.   ■    less bugs (hope so)
  69.  
  70.  
  71.  
  72. 1. REQUIREMENTS & INSTALLATION
  73. ------------------------------
  74.  
  75.   This is all you need to use GEN:
  76.   
  77.   ■    an IBM compatible computer (PC/XT/AT)
  78.   ■     PC-DOS or MS-DOS  (preferrable >= Version 3.0)
  79.   ■    at least 512k main memory 
  80.  
  81.   This is all you have to do to use GEN:
  82.   
  83.   ■    copy GEN.EXE to any place you like (except NUL)
  84.   ■    if you want to call GEN without issuing the complete
  85.       path where it resides, adjust your PATH variable
  86.   ■    make sure that the archivers you want to use are located in
  87.       directories that can be found in the PATH environment
  88.     variable
  89.   ■     execute GEN.EXE with appropriate options
  90.  
  91.  
  92. 2. USAGE
  93. --------
  94.  
  95.   Usually GEN starts collecting files for the archives in 
  96.   the directory where it is invoked. This makes it very simple
  97.   to handle a complete structure of subdirectories starting
  98.   from a base directory. However, you can control this by special
  99.   options.
  100.  
  101.   IMPORTANT:
  102.   Please remember to supply enough space for the archives! You must
  103.   at least have twice the space of the archive at the location where
  104.   the archive is created! This is due to the philosophy used in most
  105.   of the archiver programs that create a temporary file before updating
  106.   an archive. Use the option -t<path> or the environment variable TMP
  107.   to select an directory for the temporary archive file if the space
  108.   is too small. For directly archiving to floppy disks please use the
  109.   -d option (see below).
  110.  
  111.  
  112.   General call:
  113.   
  114.   GEN
  115.      
  116.   called without parameters gives a short summary of options
  117.   and supported archivers.
  118.      
  119.   
  120.   GEN  <arcspec> [options]* <arcname>
  121.  
  122.  
  123.   arcspec  : The type of the archive. This is usually the
  124.              suffix of the archives, e.g. "lzh" for using LHARC or LHA.
  125.          This parameter !must! be given to gen.
  126.  
  127.              List of currently supported archivers:
  128.          lzh    ->  LHA 2.11 or LHARC 1.13 
  129.                     ( if both are availiable LHA is used)
  130.          zip    ->  PKZIP 1.10
  131.          zoo    ->  ZOO 2.1 (for 2.01 see ENVIRONMENT VARIABLES ->)
  132.          arj    ->  ARJ 2.00
  133.          arc    ->  ARC 6.02
  134.  
  135.              Other versions of these archivers will work if they have
  136.          the same options as the ones in the list.
  137.  
  138.   IMPORTANT: For ZOO 2.01 set environment variable ZOOLOW, because the
  139.              old zoo version does not recognize the high compression
  140.              option flag for zoo used by GEN by default.
  141.  
  142.  
  143.   arcname  : arcname is a filename specification that denotes the 
  144.              location where the archives will be stored. The filename
  145.          can be an arbitrary MS-DOS file specification with the 
  146.          restriction that the name part of the file is only 5
  147.          characters long and has no suffix
  148.          e.g.:   d:\archiv\demo    stores the archives on drive
  149.                                    D: in the directory ARCHIV
  150.                        with names like
  151.                        DEMO001.<arctype>
  152.                        DEMO002.<arctype>
  153.                        ...
  154.  
  155.   options  : These parameters control the way the archives are build.
  156.              Only -s must be specified. All other options are 
  157.          optional (!?!).
  158.   
  159.   -s<integer>   Size of the target archive. <integer> is the maximum size
  160.                 of the archives in 1000 bytes. This option is mandatory.
  161.         e.g.  -s361 creates archives with 361000 bytes size.
  162.  
  163.         Note ! The number given is NOT a faktor of 1024 (1K).
  164.   
  165.   
  166.   -b        backup mode.
  167.                 GEN only looks at files with the archive
  168.           bit set. This are files that have not been backed up
  169.         before. After this operation the archive flag is reset.
  170.         With this option you can make incremental backups to
  171.         handle only the lately modified files.
  172.         
  173.   -d<driveletter>
  174.           diskmode.
  175.         GEN creates the archives one after the other 
  176.         temporary on drive <driveletter> and copies each to 
  177.         the target directory if it is complete. This can give
  178.         significant speedup because you may specify a ramdisk
  179.         for the temporary location or a harddisk when you want
  180.         to write your archives directly to floppy-disks.
  181.  
  182.   -i<startnr>    increment to next free archive.
  183.                 Usually GEN numbers archives with 1,2,... . With this
  184.         option in effect GEN uses the next free number in
  185.         the target directory if there exist already some archives
  186.         with the specified name. If a number is given after
  187.         -i (e.g. -i5) the archiv numbering will start with it.
  188.   
  189.   -n        no recurse.
  190.           GEN will not(!) look into subdirectories.
  191.  
  192.   -o        overwrite mode.
  193.           GEN will overwrite any existing archives with the
  194.         same name in the target directory.
  195.         
  196.   -p        pause before creating a new archiv.
  197.           GEN waits for a <RETURN> from the user before
  198.         creating a new archive. Useful when directly creating
  199.         archives on floppy disks.
  200.  
  201.   -r[<file>]    read filenames to be archived.
  202.           -r without any filename will take filenames or directories
  203.         from standart input. If a directory is specified and -n is
  204.         not in effect all included subdirectories are also handled.
  205.         When specifing filenames wildcards are allowed according to
  206.         DOS specifications (i.e.  *.pas will take all files ending
  207.         with .pas). The filenames can also be read from a pipe.
  208.         All '/' are converted '\' to handle MS-DOS conventions. This
  209.         allows to use programs like "stuff (a unixish "find") to
  210.         build the filelists.
  211.         If a filename is given all file and directory specifications
  212.         are read from this file.
  213.  
  214.   -t[<path>]    specify temporary path.
  215.           This options lets you specify the location for
  216.         temporary files both for GEN and the used archiver.
  217.         If no path is present GEN will use the environment
  218.         variable TMP if set.
  219.         
  220.   ENVIRONMENT VARIABLES
  221.   ---------------------
  222.   a) GEN
  223.      All Options can be put into the environment variable GEN. This is
  224.      useful if you have one preferred archiver and options you want
  225.      to use every time you call GEN. To set an environment variable
  226.      consult your DOS Manual. The options are handled as if they have
  227.      been given in the commandline.
  228.      
  229.   b) ZOOLOW
  230.      Recently a new version of ZOO has been released that uses an
  231.      alternative high compression method. GEN defaults to this "better"
  232.      method. However, there may be situations which demand the standard
  233.      compression. In these cases set ZOOLOW to a values. If ZOOLOW is not
  234.      set then the high compression method will be used
  235.      
  236.      Example:
  237.      'set ZOOLOW=1' will disable high compression with ZOO.
  238.           
  239.  
  240.  
  241. 3. EXAMPLES
  242. -----------
  243.  
  244.  
  245. Here are some examples of using GEN.
  246.  
  247.    > Create archives from all files in subdirectory \tools and it's subdirs
  248.      with LHA as standard archiver. Restrict size to 361000 bytes.
  249.      Create archives in \tools with name tool***.lzh
  250.  
  251.      Prepare: cd to \tools
  252.      Call   : GEN lzh -s361 tool
  253.      
  254.    > Same as above but don't step through subdirs
  255.  
  256.      Prepare: cd to \tools
  257.      Call   : GEN lzh -n -s361 tool
  258.      
  259.    > Same as above but store archives in another dir.
  260.  
  261.      Prepare: cd to \tools
  262.      Call   : GEN lzh -s361 \someotherdir\tool
  263.  
  264.    > or on another drive (say d:)
  265.  
  266.      Prepare: cd to \tools
  267.      Call   : GEN lzh -s361 d:\tool
  268.  
  269.    > store archives on floppies use hard-disk C: as location for creation.
  270.      direct all temporary files to C:\temp
  271.    
  272.      Prepare: cd to \tools
  273.      Call   : GEN lzh -s361 -dc -tc:\temp a:\tool
  274.    
  275.  
  276.    > store all .txt files starting from the current directory.
  277.      Use STUFF   
  278.  
  279.      Call   : Stuff -name *.txt | GEN lzh -r -s361 d:\tool
  280.  
  281.  
  282. 4. HOW GEN WORKS
  283. ----------------
  284.  
  285. This section gives you some information about the way GEN handles
  286. the archivers. It may help you to understand its behaviour when 
  287. constructing the archives.
  288.  
  289. GEN knows about the used archivers. We tried to smoothen out the differences
  290. between the common archiving programs such as command line options,
  291. handling of temporary files and other peculiarities.
  292.  
  293. here is a short semi-algorithmic description of GEN:
  294.  
  295. - read commandline
  296. - detect availiable archiver
  297. - set options
  298. - read in all files to be archived
  299. - WHILE not all files processed
  300. --  check availiable space on drives
  301. --  begin new archive
  302. --  LOOP until archive has grown to given size
  303. ----  put files into archive assuming no compression
  304. --- ENDLOOP
  305. - ENDWHILE
  306.  
  307. GEN tries to put as many files into the archive as possible using
  308. an iterativ mechanism. It constructs calls to the archivers and
  309. evaluates the returned status code.
  310.  
  311.  
  312. 5. PROBLEMS & SOLUTIONS
  313. -----------------------
  314.  
  315. In some cases GEN will have problems to construct the desired archives.
  316. There may be some situations that we want to point out:
  317.  
  318. a) A file to be archived cannot be compressed to the maximum size of the
  319.    archive.
  320.    -> If there is still enough space to store the oversized archive
  321.       a warning is given and GEN proceeds.
  322.    -> Otherwise GEN aborts. (GEN cannot split files)
  323.    Solution: Split the big file manually (We now this is absolutely 
  324.               ugly, but we have not thought of a portable way of splitting
  325.           files in different archives yet).
  326.  
  327. b) Too many files are specified
  328.    Solution: Try to archive single subdirs alone. Although GEN uses a
  329.              very economic string storage it is limited. We had no
  330.          problems with approx. 2000 files. When gen finishes its work
  331.          the number of bytes uses is printed. The limit is reached
  332.          by approx. 180000 bytes. The number of files that can be
  333.          archived depends on the length of the filenames+subdirpathes.
  334.  
  335. c) GEN finds not enough space on the drives.
  336.    Solution: GEN stores its temporary files in the current directory or
  337.              at the location specified by -t. Also the archivers
  338.          get a working dir specification if they are capable of this.
  339.          Check if you have set any environment variables that
  340.          affect the archivers. GEN wants twice the space of an archiv
  341.          at the location where it is created because some archivers need
  342.          this. With -d you can overcome this problem in case of floppies.
  343.          If you have inserted a floppy with insuffcient space GEN allows
  344.          you to fix the problem via shell-escape if possible.
  345.              
  346.  
  347.  
  348. 6. HOW TO CONTACT THE AUTHORS
  349. -----------------------------
  350.  
  351. No manual is perfect, no program is bugless. If you have any questions or
  352. problems feel free to contact us. We are interested in improving GEN and
  353. fixing further bugs. Any new ideas are welcome, too.
  354.  
  355. Here are our e-mail addresses:
  356.  
  357. Wolfgang Thronicke                  Friedrich Wichmann
  358. UUCP: wolf@cadlab.de
  359.       wolft@uni-paderborn.de        fwich@uni-paderborn.de
  360.           ^ yes this is a different
  361.         address!!
  362.  
  363.  
  364.  
  365. 7. References:
  366. --------------
  367.  
  368. (Please forgive any misspellings and typos)
  369.  
  370. STUFF and ZOO are copyrighted by Rahul Dhasi.
  371. MS-DOS is trademark of Microsoft.
  372. LHA and LHARC are copyrighted by 
  373. PKZIP is copyrighted by PKWARE Inc.
  374. ARC is copyrighted by SEA Inc.
  375. ARJ is copyrighted by Robert K Jung.
  376.  
  377.  
  378. -------------------------------------------------------------------------
  379. This program was written using Borland Turbo Pascal 6.0.
  380.