DefIcons v44
 
 
 Original idea and program (c) by Team NewIcons.
 Included brainfile was created in 1997 by <R.MacLean@hw.ac.uk>
 it was updated and bugfixed by Stephan Rupprecht in 1999 :)
 ProcessFile.rexx was written/modified by various authors.
 I hope that no one bothers that I included them into the archive
 without asking for permission ;)


REQUIREMENTS
 Any Amiga(r) (compatible) computer with at least OS3.5,
 a deficons.prefs file (included) and some def_xxxx.info files
 (both can be found in the NewIcons package. There're
 also some nice default icons available from other artists).


DESCRIPTION
 DefIcons turns any faked icon (displayed when you pick the menu
 item Window/Show/All Files) into a more meaningful one. Depending
 on its prefs file, the program can identify different filetypes
 and supply an appropiate icon for each of them. For a complete
 documentation, please take a look at the original DefIcons
 documentation which is a part of NewIcons.
 
 
INSTALLATION
 To install the program and the preferences editor, simply start
 the provided Installer script.
 If you don't have any default icons installed yet, you must copy
 them manually from the NewIcons package to your envarc:sys drawer.

 
USAGE
 The program does not take any arguments or tooltypes. It can be
 started either from wb or shell. You can terminate the program
 at any time by pressing/sending ctrl-c (see cli command break) to
 it, or by starting it a second time.
 
 --- Using the preferences editor "DefIconsPrefs" ---
 DefIconsPrefs allows you to change the deficons brainfile in an
 easy and comfortable way. To start the program simply doubleclick
 its icon (The DEFPATH=<path> option needs to be specified, if you 
 don't have the default icons placed in ENVARC:Sys).
 Now you can start editing the brainfile, to add a new filetype
 to the "Filetypes" list, press the "Add" button and enter the name
 of the filetype into the string gadget below the list. DefIcons/
 icon.library will later use this name to find the icon which
 belongs to the filetype. Choose "Information ..." from the "Icon"
 menu or doubleclick the filetype to get information on the icon. 
 To remove an entry press "Remove" (please note: removing a class
 [=filetype] will also remove its children!). The arrow buttons can
 be used to the change the position of the selected filetype(s)/
 class(es) in the list. In order to identify a filetype, DefIcons
 also needs to know how this can be done. Therefore the window
 contains another list which shows all actions (they are the 
 description of the filetype) that have been defined for the 
 selected filetype. To add a new action to the filetype, press the
 "Add" button, hold down the mouse button and select one of the 
 following actions from the popup menu (then release the button:)
 
 MATCH: the file must contain the given string at the given offset
  (relative to the current position). Hexvalues must be entered 
  using the following style, eg. \x0a for 10 or \xff for 255 ...
   
 SEARCH: the file must contain the given string somewhere starting at
  the current position. If you select 'Skip spaces:', only spaces and
  tabs are allowed to precede the given string.
  
  "current position" means that each matching action (SEARCH/MATCH)
  increases the current position within the file. When a description
  doesn't match the next action will start at the beginning of the
  file.
 
 PATTERN: the filename must match the given pattern.
 
 FILESIZE: the file must have the given size.
 
 PROTECTION: the file must have the given protection bits (un)set.
 
 ISASCII: check whether the file is a text file or not (only used by
  'ascii' type).
 
 OR: alternative description follows.
 
 MACROCLASS: this filetype will never become valid. Only its icon
  will be used, if one of the children, which does not have an 
  icon, becomes valid.
  
 New for DefIconsPrefs 44.8: DefIconsPrefs is able to "learn" a
  file format: this is done by pressing the "Learn..." button
  (you need to select/create a filetype first) and selecting at
  least two files of the same format in the filerequester that
  comes up (the more files, the better the result). Please note,
  that this function is very simply and will create only a list
  of MATCHes.


FREQUENTLY ASKED QUESTIONS (FAQ)
 Q: I have some nice icons for my ram: and pc0: disks installed
    but unlike the original DefIcons, I just get this ugly black
    and white disk icon (or the def_disk.info one). Why ?
 A: wb3.5 and DefIcons44 don't add a "disk" to the icon name. So,
    for an example, your default icon for the Ram Disk should be
    named def_RAM.info and not def_RAMdisk.info. BTW: Please 
    don't ask me to change it, I just use the same naming convention
    wb uses ;)
    
 Q: I made the changes, you mentioned before. But I still get this
    ugly b/w icon :(
 A: Make sure that your default icons for disks are really disk icons.
    If not, please use IconEdit or RAWBInfo to change them.
 
 Q: For MSD0 (crossdos) disks I always get this ugly default icon. Is
    there any way to fix this problem?
 A: Load l:crossdosfilesystem into a hexeditor, look for disk.info
    and replace it with dusk.info.
    
 Q: Made the changes, but I still get the wrong icon. I have MFS
    (MultiFileSystem by N.Salmoria) installed.
 A: The current workbench release (BB#1) uses an own routine to
    get icons for disks. This routine isn't as clever as DefIcons :(
    
 Q: DefIcons doesn't load the right icons for disks. Why?
 A: See previous answer.
 
 Q: For CDDA disks I just get this ugly default icon. Why?
 A: CacheCDFS loads the default icon for CDDA disks from ENV:.
    Type "makelink envarc:cdda.info envarc:sys/def_CDDA.info"
    into a shell to workaround the problem.
    
 Q: When I double-click a "faked" icon which has as default tool
    "c:version" (or any other c: command). I get an "Unexpected
    dos-packet" guru (0x07000004). What's wrong?
 A: The default tool is a shell command and doesn't support to be
    started as a wb application. Your def_whateveritwas.info
    file needs to be updated: Enter your ENVARC:Sys drawer, click
    on the icon in question and select "Information ..." from the
    wb menu. Now click on the "Start from:" cycle gadget 'til it
    shows "Shell". Save the changes :) NOTE: This can be done via
    DefIconsPrefs, too.
    
 Q: My def_lharc icon has "lha x" as default tool. Now when I try
    to unpack a lha file, I get an error message from wb telling
    me that it couldn't find the command. Again, what's wrong?
 A: Workbench treats the "Default tool" field as a path, which
    means that workbench adds quotation marks to it whenever it
    contains spaces (which is the case for "lha x"). This makes
    DOS think that "lha x" is the name of the command to start but
    since this command doesn't exist, DOS will fail to find it.
    That's why you get the error message:) I suggest to use the
    ProcessFile.rexx script to fix this problem: Copy the script to
    your REXX: drawer (this is done by the Installer script), make
    sure it has the S(cript) protection bit set and change the 
    "Default tool:" field of the def_lharc icon to 
    "REXX:ProcessFile.rexx". Next select "Start from: Shell" and
    uncheck the "Wait for input" checkbox (also see previous and
    next Q&A). That's all. NOTE: This can be done via DefIconsPrefs,
    too.
  
 Q: Is there any way to get rid-off this "Execute command" window
    when starting a shell command or (arexx) script?
 A: Yes, of course. Your default icon must have the NOPROMPT tool-
    type set ("Wait for input" checkbox unchecked).
     
 Q: Any way to get rid-off the quotation marks wb adds to the 
    "default tool" field?
 A: No, there isn't. Which means that I don't want to write a patch
    for it ;)
     
 Q: DefIcons seems not to work. I also have TweakWB installed.
 A: Make sure you have the "DefIcons" (datatypes hook) function of 
    TweakWB deactivated. The order you start the program is also 
    important: Please start DefIcons AFTER TweakWB.
    
 Q: I copied DefIcons44 to my C: drawer and added the line C:DefIcons44
    to my s:user-startup. Now when my computer boots, it suddenly stopps
    booting when it reaches the mentioned line. Why?
 A: Unlike the original DefIcons, this program needs to be "Run". 
  
 Q: I added a new filetype to my deficons.prefs file but for any
    reasons DefIcons seems to ignore the change.
 A: Go through the filetypes list and look for a similiar filetype. If
    you find one then move the newly added filetype above it.

 Q: The "Information..." and "Edit..." items from the "Edit" menu 
    (DefIconsPrefs) don't work.
 A: You probably have your default icons placed in a different drawer
    than ENVARC:Sys. The DEFPATH=<path> options needs to be specified
    in this case.


AUTHOR
	Stephan Rupprecht

