(1) Archive Folder (AF) installation instructions: ========================================= Table of contents ================= Installation instructions...............................2 Deinstallation instructions.............................3 Archiver Registry - The Archiver program database.......4 Format of ARCHIVER.BB2..................................5 How archive listing works...............................6 Notes on modifying/updating ARCHIVER.BB2................7 (2) Installation instructions ========================= 1. If you have version 0.20 installed or if you allready have AF installed and want to install the new version in another directory you must first delete the archive template folder in the installation directory. 2. Extract the distribution archive AF0_XXB.ZIP to a temporary directory OR to the directory where you want to keep the files 3. Make the selected directory the current directory. 4. Type INSTALL on the command line and press the ENTER or RETURN button. You will be prompted for the language to use (currently danish or english) and for the full path to the directory where you want to install AF. If you want to keep AF in the current directory simply press ENTER when prompted for installation directory. Besides (optionally) copying the files, the installation script will create the program object, templates, associations and filetypes used by AF. 5. Optionally copy the ARCHIVER.BB2 file to a directory in the PATH or DPATH. When Archive Folder and Archiver Registry looks for ARCHIVER.BB2 they first look in the current directory then in the PATH and if not found in the DPATH. 6. Optionally copy the AF.HLP file to a directory in the HELP path. 7. Your archiver programs (ZIP.EXE, UNZIP.EXE, LH.EXE etc.) has to be in your path else AF wont find them. (3) Archive Folder deinstallation: ============================== 1. Make the installation directory the current directory. 2. Type AFDEINST at the commandline and press the ENTER or RETURN button. This will remove all program objects, templates, associations and file types used by AF. (4) Archiver Registry - The Archiver program database ================================================= When you select "Edit Archivers" from the Options menu or doubble click on the "Archiver Registry" object the Archiver Registry will open. Archiver Registry (AR) is an editor to the ARCHIVER.BB2 file which is a database with all the command lines etc. used by AF. ARCHIVER.BB2 is a simple text file and can be edited by hand but it is much more intuitive to use the Archiver Registry. The archivers is shown in a tree view to the left. When you click on the '+' sign next to an archiver name the tree expands and you can select the options for the archiver. When an option is selected the right window of AR changes. If it is a text entry there will be an entry box where you can fill in the needed information, if it is a value entry there will be a spinbutton which you can use to select the correct value. When you right click on an archiver definition (The parent) you will have to menu option: "New archiver" which lets you create a new archiver definition, and "Delete" which deletes the selected archiver definition. When you right click on an archiver option (a child record) the menu option will be "New Archiver" and "Save entry". The latter saves the currently selected archiver option. This is the same as the "Save Entry" button to the right. This doesn't save the option to disk only to the internal structure of AR. When you want to save to disk you will have to select "Save all" from the "Archivers" menu. (5) Format of ARCHIVER.BB2 ====================== I will shortly explain the format of the ARCHIVER.BB2. The explanition is a rewrite of an original text by Mark Kimes. The first line is a number which should always be 21. It shows the number of lines in each archiver definition and allows future modifications to the file format. The following 21 lines of each record contains the command lines and the format of the archiver output. Format for this archiver.bb2 file (each entry has 21 lines): 1st line: ID of archiver (like ARC, LHARC, PKZIP, etc.; human consumption) This line is edited from the "Name of archiver" entry in AR. 2nd line: Normal extension for archives (like ZIP, ARC, LZH; note no period) This line is edited from the "Extension of archiver" entry. 3rd line: Offset into file to signature. This line is edited from the "Offset of signature" entry. 4th line: List command. This command is used to make the archiver list the files in the archive. You should usually use some kind of verbose switch if the archiver supports it. This line is edited from the "LIST command" entry. 5th line: Extract command. Extract file(s) from archive junking any imbedded paths. This line is edited from the "EXTRACT command" entry. 6th line: Extract w/ directories command. Extract file(s) from archive including imbedded paths. This line is edited from the "EXTRACT w/dirs command" entry. 7th line: Test archive command. Test archive integrity. This line is edited from the "TEST command" entry. 8th line: Add/create command. Add to, update or create archive. This line is edited from the "ADD/CREATE command" entry. 9th line: Add/create w/ paths command. Add to, update or create archive including full paths to file. This line is edited from the "CREATE w/dirs command" entry. 10th line: Add/create & recurse command. Add to, update or create archive. Recurse thru subdirectories. This line is edited from the "CREATE recursively command" entry. 11th line: Move command. Move into archive (delete original). This line is edited from the "MOVE command" entry. 12th line: Move w/ paths command. Move into archive (delete original). Include full paths to files. This line is edited from the "MOVE command" entry. 13th line: Delete command. Delete file(s) from archive. This line is edited from the "DELETE command" entry. 14th line: Signature (case sensitive, leading spaces count!) See explanation of the signature below. This line is edited from the "Signature of archive type" entry. (6) 15th line: Startlist string. Start of the archive listing. See below for details. This line is edited from the "Start of list" entry. 16th line: Endlist string. Start of the archive listing. See below for details. This line is edited from the "End of list" entry. 17th line: Old size position (all positions 0-based, -1 = not available) This line is edited from the "Position of old size" spinbutton entry. 18th line: New size position This line is edited from the "Position of new size" spinbutton entry. 19th line: File date position. Position of files date in archiver listing. This line is edited from the "Position of file date" spinbutton entry. 20th line: Number of positions in dates (for "03 June 92" would be 3). This line is edited from the "Fields in date" spinbutton entry. 21st line: File name position (absolutely required, of course; -1 = last pos) This line is edited from the "Position of file name" spinbutton entry. A semicolon demarks a comment. they may appear at any point *except* within the 21 lines of an archiver entry. comments are ignored by AF. Note that all archiver strings should include the archiver's parameter to prevent it from stopping for input! Also note that archive types are checked in order of their listing in this file. finally, this file is set up for the archivers I had lying around; if yours are different versions, you may have to modify this file. How archive listing works: ========================== AF first tries to find a signature match. Failing that, the user is asked to select an archiver. AF then issues a LIST command with archive name as argument. AF then parses the resultant output using the start and end list lines and offsets in file lines listed in this file for the given archiver. If AF doesn't find one or both of the lines the archive is either of a wrong format or the archiver definition in archiver.bb2 is invalid. (7) Notes on modifying/updating ARCHIVER.BB2: ========================================= You can add as many archivers as you like to this file. Here are some suggestions on how to go about it: When you want to make a new archiver definition the easiest way is to redirect the output of the archiver to a file and the use the file to cut and paste the start and end of list lines to the appropriate entries in AR. List an archive with the archiver, redirecting to a disk file (ex. "ARC l AFILE.ARC > TEMP."). Load the resultant file into a text editor. Clip out the startlist and endlist strings and paste directly into this file on the appropriate lines or into AR. Count the positions of filename, date, etc. and place on the appropriate line. Now run the archiver redirected to a file to get its help screen (ex. "ARC > TEMP." or "ZOO h > TEMP."). Look for the various command options (extract, list, etc.) and put them into the file on the appropriate lines -- remember to add the modifiers to prevent the archiver from stopping to ask questions! You could be in deep doo-doo if it's a detached process. While it may seem a pain in the arse to have to edit this file when an archiver changes its command structure or list format, at least it's something within your control, you don't have to wait for an update to AF. That means if I die tomorrow you'll still be able to use AV for years to come. Here's an example of an ARC listing (5.12mpl, command "ARC l"): ----------------cut here---------------------- Name Length Date ============ ======== ========= <--this line is start-of-list MAKEFILE 374 28 Nov 89 QSORT.C 14279 29 Nov 89 QSORT.EXE 24629 29 Nov 89 STUFF.H 371 29 Nov 89 ==== ======== <--this line is end-of-list Total 4 39653 ----------------cut here---------------------- Note the filename is in position 0, old length in position 1, and the date starts in position 2, with 3 parts, and there's no new length field (so it'd be -1). Compare that to the archiver entry for ARC 5.12mpl above and you should get a feel for what all those fields mean. Here's a diagram of how a file line breaks down: STUFF.H 371 29 Nov 89 ^ ^ ^ | | | | | +--Date starts in field 2, 3 parts (29, Nov, and 89) | | | +--Old file length, field 1 | +--Filename, field 0 (count from 0, not 1) If you're adding an entirely new archive format, note that you can use 'C'-style \x on the signature line in this file. For example, the \x1a in ARC 5.12mpl's signature line means AF will look for an ASCII 26 (text EOF marker) in position 0 (first byte, as indicated by ARC's line 3, the offset into a file for the signature) of a file to determine if it's an archive. If line 3's offset is negative, AF looks from the end of the file instead of the beginning. You can usually figure out what an archiver's signature is by looking at a few archives with a file viewing program like Vernon Buerg's LIST. By all means send me anything new you figure out for inclusion in future releases. You can have several entries for one type of archive in this file. AV tries entries sequentially to list the file until it finds one that works. It lets you create archives with more than one archiver that produces the same sort of archive (or with different switches, like one with LHArc producing -lh5- compression and one with it producing old, compatible -lh1- compression). Note that when adding archivers you have to define at least the LIST command and it has to point to an executable file either in the current directory or in your PATH. If AR cannot find the executable the archiver definition will be ignored. Always end file with blank line or comment