DefIcons v44 © 1999 by Stephan Rupprecht All rights reserved. COPYRIGHT AND DISCLAIMER DefIcons v44 is copyrighted 1999 by Stephan Rupprecht. All rights reserved. This program is freeware, so no financial donations required. Redistribution allowed if the package is left unchanged. The author is not responsible for any damage caused by the use or misuse of this documentation and/or the program(s) it describes. Original idea and program © by Team NewIcons. Included brainfile was created in 1997 by 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® (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 (make sure you have installed the deficons.prefs brainfile before). 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. 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. If you select 'Skip spaces:', only spaces and tabs are allowed to precede the given string. 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. 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 stick to the 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 to change them. 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 :) 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, 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. 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" 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". HISTORY 44.0 first public release 44.1 filetype recognition didn't always work because of two minor bugs. misc internal changes. again updated deficons.prefs. added a slightly changed version of ProcessFile.rexx which views html documents by using OpenURL(.library). 44.2 added FAQ to the doc. included DefIconsPrefs. case insensitive ACT_SEARCH and ACT_MATCH didn't work correctly because of a buggy TOLOWER macro. 44.2a updated DefIconsPrefs (44.1): added some missing error requesters, no longer requires a deficons.prefs file in env: to start, new menu item to load iconedit. AUTHOR Please send bug reports and ideas to: Stephan Rupprecht Apfeldweg 1 D44359 Dortmund Germany Send emails to stephan.rupprecht@gmx.de