home *** CD-ROM | disk | FTP | other *** search
-
- DefaultIcon V2.3 (28-Feb-91)
- -----------------------------
-
- An object-oriented tool for assigning icon images to file classes
-
- by
-
- Christian A. Weber, AMIcom Research, Zⁿrich / Switzerland
-
-
-
- Please mail bug reports or enhancement requests to:
- cbmehq!cbmswi!mighty!chris@cbmvax.commodore.com
-
-
- First some legal stuff..
-
- THIS PROGRAM IS IN THE PUBLIC DOMAIN. IT MAY BE FREELY DISTRUBUTED
- FOR NON-COMMERCIAL PURPOSES ONLY.
-
- THIS SOFTWARE IS PROVIDED "AS IS". NO REPRESENTATIONS OR WARRANTIES ARE
- MADE WITH RESPECT TO THE ACCURACY, RELIABILITY, OR OPERATION OF THIS
- SOFTWARE, AND ALL USE IS AT YOUR OWN RISK. THE AUTHOR ASSUMES NO
- RESPONSIBILITY OR LIABILITY WHATSOEVER WITH RESPECT TO YOUR USE OR
- INABILITY TO USE OF THIS SOFTWARE.
-
-
- WARNING
- -------
-
- DefaultIcon works only with Kickstart 2.0 and above. If you run it under
- Kickstart 1.3, it will return immediately.
-
-
- ABOUT DefaultIcon
- -----------------
-
- One of the new features of Workbench 2.0 is the "Show All Files" mode,
- which shows all files as icons, even if they don't have associated
- ".info"-files. Workbench has two default types of icons, one for the
- executable files (files which have the 'e' bit set, you can do this in
- the "Information" window), and another image for all other files.
-
- But there are of course more different file types than just "executables"
- and "data files"; there are pictures, sound files, animations, source
- codes and many more, and you want to have different icons for them.
-
- DefaultIcon lets you choose a default icon for every file class it knows,
- and you can add new file classes (will be explained later in detail).
- For every file class there must exist a corresponding "xxx.info" file which
- must be located in one of the directories ENVARC:Icons, or ENVARC:Sys.
-
-
- INSTALLATION
- ------------
-
- 1) Place the DefaultIcon program into the "WbStartup" drawer of your boot
- partition (or Workbench disk if you have a floppy based system).
-
- 2) Copy the whole "Icons" drawer into the "Prefs/Env-Archive" drawer of
- your boot partition. If the Env-Archive drawer is not visible in the
- Prefs window, you have to select "Show all files" from the Workbench
- menu to make it visible.
-
- 3) DefaultIcon needs the default icon images for disks, drawers, projects
- and tools you have saved as "Default icons" with your IconEdit tool.
- If you have not done this, use IconEdit to create these files by doing
- the following:
-
- a) Load IconEdit. It is located in the "Tools" drawer of your Workbench.
- b) Set the icon type to "Disk".
- c) Select "New" from the "Project" menu, and click "Continue" on the
- requester which shows up.
- d) Select "Save As Default Icon".
- e) Repeat steps b to d with the icon types "Drawer", "Tool" and "Project".
- f) Quit IconEdit.
-
- 4) Reboot your Amiga. After startup, an icon named "Materializer"
- will appear on the Workbench screen. Double-click on this icon for more
- information or to quit the DefaultIcon program.
-
-
- USAGE OF THE PROGRAM
- --------------------
-
- Place one or more icons on "DefaultIcon"'s icon.
-
- If the icons are "fake icons", they are converted to real icons. This means
- that you can snapshot them, and that they appear also on Workbench 1.3.
-
- The icon's images will be set to the default image of their class (disk,
- drawer, tool, or user-defined classes).
-
- Tips: - You can use this feature to convert the 1.3-look drawer icons to
- the new 2.0 look.
-
- - If you want to delete a "Trashcan" from Workbench, drag it on
- DefaultIcon. It will then be converted into a drawer, which you
- can delete like any other drawers.
-
- - You should set the default tool of your xxx_def.info files to the
- appropriate program. For text files you can use "More", for IFF
- pictures you can use "ShowIFF".
-
-
- ADDING NEW FILE CLASSES
- -----------------------
-
- When freshly installed, DefaultIcon knows about the following file types:
-
- Class Default Tool Type
- ----- ------------ ----
-
- IFFANIM MoviePRO IFF animations
- IFFILBM ShowIFF IFF pictures
- IFF8SVX Play8SVX IFF sampled sounds
- ARCHIVE none Files archived with Arc, Zoo, Zip or LHArc
- DISKARCHIVE none Disks archived with DMS, Warp or Zoom
- GIF none GIF-87 pictures
- SOUNDFXSONG SoundFX:SoundFX Songs generated with the "SoundFX" program
- C More C language source files
- H More C language header files
- BASIC More Basic programs
- TEXT More Text files
-
- Example:
- To add the new file class 'IFF ANIM' (actually, this type is already known,
- but it should do for an example) do the following:
-
- 1) Draw an icon for this file class using IconEdit. Save the icon as
- "ENVARC:Icons/def_IFFANIM.info". ╣)
- Save the icon again, now as "ENV:Icons/def_IFFANIM.info".
- (Saving the icons twice is necessary because if you only saved it to
- ENVARC, you would have to reboot your Amiga before the icon is
- recognized by DefaultIcon. If you only saved it to ENV:, it would be
- lost after the next reboot, since ENV: is assigned to RAM)
-
- 2) Let DefaultTool know about the new file class:
- - Open your WbStartup drawer.
- - Select DefaultIcon's icon in that drawer, and bring up the Information
- window by pressing the right AMIGA key and the 'i' keys simultanously.
- - Klick on the button labeled "New" to add a new tool type.
- - Enter the following text (case is important!):
-
- CLASS ANIM = 0:'FORM' && 8:'ANIM'
-
- - Klick on the "Save" button
- - Double-click "DefaultIcon"'s icon. The "Materializer" icon disappears.
- - Double-click "DefaultIcon" again. The "Materializer" icon appears
- again, and now it knows about IFF animations.
-
- 3) Test it by dragging some animation files on the "Materializer" icon. The
- icons of the files should be converted to your previously drawn icon.
-
- ---
- ╣) You could also save it into the "ENVARC:Sys" drawer, but I don't know
- whether user software is allowed to put files there, so I decided to
- create the Icons drawer. However, the default system icons for tools,
- drawers and projects are stored in the sys drawer.
-
-
- THE CLASS DEFINITION
- --------------------
-
- You can define a file class in two different ways:
-
- 1) Define some magic values which appear in all files of this class.
- To find out these values, examine some files of the same class (you can
- use 'Type file OPT H') and find some values which are the same in all
- files. The format of such a definition can have two formats.
-
- Format 1: All specified values must match
-
- CLASS <name> = <offset> : <value> { && <offset> : <value> }
-
- Format 2: One or more of the specified values must match
-
- CLASS <name> = <offset> : <value> { || <offset> : <value> }
-
- In both cases, the fields in curly braces can be repeated zero or more
- times.
-
- Example:
-
- 1> Type f-15.anim opt h
- 0000: 464F524D 000391B4 414E494D 464F524D FORM...┤ANIMFORM
- 0010: 000006F8 494C424D 424D4844 00000014 ...°ILBMBMHD....
- 0020: 016000DC 00000000 01020100 00000607 .`.▄............
- ...
- 1> Type Gymnast.anim opt h
- 0000: 464F524D 00098AB6 414E494D 464F524D FORM...╢ANIMFORM
- 0010: 00006634 494C424D 424D4844 00000014 ..f4ILBMBMHD....
- 0020: 014000C8 00000000 06000100 00000A0B .@.╚............
- ...
-
- As you can see, some common values are 'FORM' at offset 0, and 'ANIM'
- at offset 8. A class entry for this file type would be:
-
- CLASS IFFANIM = 0:'FORM' && 8:'ANIM'
-
-
- 2) Define a pattern which the filename must match. All AmigaDOS patterns
- are valid here, but you MUST specify everything in UPPERCASE because
- the AmigaDOS pattern matching routines are case sensitive.
- If you want to use something like *.C, you must have a tool which
- enables the '*' pattern matching, such as StarBurst or Star. So it is
- wise to use #?.C instead of *.C for portability.
-
-
- Some examples for valid class definitions:
-
- CLASS IFFANIM = 0:'FORM' && 8:'ANIM'
- CLASS IFFILBM = 0:'FORM' && 8:'ILBM'
- CLASS IFF8SVX = 0:'FORM' && 8:'8SVX'
- CLASS DISKARCHIVE = 0:'DMS!' || 0:'Warp' || 0:'ZOOM'
- CLASS ARCHIVE = 0:1A08 || 0:'ZOO ' || 0:504B0304
- CLASS ARCHIVE = 2:'-lh' && 6:'-'
- CLASS BASIC = #?.BAS
- CLASS CSOURCE = #?.C || 0:'#include' || 0:'/*'
- CLASS TEXT = #?.TXT || README || #?.DOC
-
- NOTE: Due to my laziness it is not possible to mix || and && in one
- class definition. If you wish to define such a class, you must
- do it with two definitions:
-
- WRONG: CLASS ARCHIVE = 0:'ZOO' || 2:'-lh' && 6:'-'
-
- RIGHT: CLASS ARCHIVE = 0:'ZOO'
- CLASS ARCHIVE = 2:'-lh' && 6:'-'
-
-
- TOOL TYPES
- ----------
-
- DefaultIcon understands several tool types. You can edit them using the
- "Show Information" command from the Workbench menu. Here's a list of the
- recognized tool types:
-
- ICONXPOS Specifies the x coordinate of DefaultIcon's AppIcon.
- Example: ICONXPOS=550
-
- ICONYPOS Specifies the y coordinate of DefaultIcon's AppIcon.
- Example: ICONYPOS=160
-
- ICONNAME Specifies the name which appears under DefaultIcon's AppIcon.
- Example: ICONNAME=Materializer
-
- CLONESTACKSIZE If this is set to Yes, every file which already has an icon
- keeps the old stack size for the new icon, instead of
- getting the stack size defined in the xxx_def.info files.
- Example: CLONESTACKSIZE=No
-
- CLONETOOLTYPES If this is set to Yes, every file which already has an icon
- keeps the old tool types for the new icon, instead of
- getting the tool types defined in the xxx_def.info files.
- Example: CLONETOOLTYPES=Yes
-
- CLONEICONPOS If this is set to Yes, every file which already has an icon
- keeps the old position for the new icon, instead of getting
- the position defined in the xxx_def.info files.
- Example: CLONEICONPOS=Yes
-
-
- BUGS
- ----
-
- If you convert a drawer icon, the size of the drawer window will be set
- to the defaults, so you must open the drawer and snapshot it's window.
-
-