Update is a resource installer designed to make it easy to update FirstClass applications and settings files with resources such as cicns, FICNs, dialogs and sounds.
With Update, you can distribute the newest versions of your icons without having to replace the full FirstClass user application or setting file.
The Admin/Sysop uses ResEdit to paste appropriate resources into a copy of Update. Since Update is small — less than 5K in total — it is a low-overhead carrier for sets of resources.
As an added convenience, Update can translate ICON resources directly into the FICN resources used by FirstClass.
How It Works
------------
The user launches Update and selects the target file, either a FirstClass application or a FirstClass settings file. Update copies appropriate resources into the target file, replacing any resources of the same type and number. Update will loop through its standard file dialog offering the user a chance to update multiple files until the user hits the Quit button.
Configuring Update
------------------
What are “appropriate resources”? If you examine Update with ResEdit, look at “type” 32000. This indexed resource holds the four-letter resource types of all resources Update will try to move. As it is shipped from the factory, “type” 32000 holds the following:
cicn
FICN
ICON
snd
DLOG
DITL
PICT
Modm
TMPL
STR#
You can alter this list with ResEdit 2.0 or later. To eliminate a type, select the five asterisks (*****) above a type and hit the backspace key. To add a type, select the five asterisks above a type and select “Insert New Field(s)” from the Resource menu, then fill in the text field with a valid four-letter type. To change a type, just select the text in the text field and enter a new four-letter type. You can enter up to 32K types.
Many resources in your factory-fresh copy of Update are named “don’t install” (no quotes, all lower case and the apostrophe in “don’t” is curled — you can make it with a shift-option-], or just copy the name from another resource and paste it). This allows Update to separate its own resources from those it should move. It will not move any resource named “don’t install”. If you find a conflict between the number of an Update resource and one you want to install, please let me know — I’ve tried to make sure there will be no such conflict. Whenever possible, Update resources are numbered 32000 or higher.
As a convenience, Update will automatically change ICON resources into FICN resources (the format used by FirstClass). If you don’t want an ICON resource to be converted, name it “don’t convert” (no quotes, curled apostrophe). If you want to disable this feature, open STR# 32002 and change the first letter of string 1 from Y to N.
Version 1.1 also has the ability to delete resources. As shipped, Update contains one kill resource, set to eliminate a resource called “pete” with an ID of 32000 (there is no such resource in the FirstClass client or settings files, so this will do nothing when you run Update — it’s included for illustration only). Open this resource and you will see a resource window with the words “Deletion List” on the first two lines. There are three fields for each resource: Resource Type, in which you should enter the four-character resource type you want to delete, Begin Range, for the lowest resource ID to delete, and End Range, for the highest resource ID to delete. You can enter any valid integer from -32768 to 32767 for a resource ID. To eliminate a kill entry, select the five asterisks (*****) above a kill entry and hit the backspace key. To add a kill entry, select the five asterisks above a kill entry and select “Insert New Field(s)” from the Resource menu, then fill in the kill record. To change a kill entry, just select the text in the three fields and enter new information. There is no limit to how many types you can enter. Here are some examples of how ranges affect Update, with empty fields indicated as <>:
type begin end
---- ----- -----
cicn 28001 <> <-- delete just the specified cicn
cicn 28010 28020 <-- delete the range of cicns, inclusive
DLOG 128 <> <-- delete just the specified DLOG
Modm <> <> <-- delete the entire Modm resource
STR# 256 <> <-- delete just the specified STR#
STR# 257 260 <-- delete the range of STR#s, inclusive
When Update reads this resource if the first resource is empty or 0, Update will delete all resources of that type regardless of the setting of the second resource. If you wanted to delete only a resource with an ID of 0, you could set the range from -1 to 0, provided you weren’t trying to keep a resource ID of -1 of that type intact.
This should go without saying, but PLEASE USE THE DELETE FEATURE CAREFULLY! Update will only delete resources in the target file selected by the user, but check out any delete settings carefully before loosing them on the world. Remember that some sophisticated users might have hybrid combined settings files with resources unknown to you, so don’t use a “shotgun” approach to deleting resources.
Notes
STR# 32000 contains the four-letter file types of files Update will show in its standard file dialog. You can alter this list, too, though you can use no more than four distinct file types. If you want to show all files, delete all but the first file type, and leave it empty.
STR# 32001 item 3 contains a place to enter your BBS name. This will show in the status dialog as Update is running. Please leave my credit in item 2.
Update is “hard wired” to ignore TMPL resources 32000 and 32001, labeled “kill” and “type”. These TMPLs tell ResEdit how to display “kill” and “type” resources when you edit them.
If you want to add new icons to the FirstClass Client, create a pair of identically-numbered resources for each icon you want to display: cicn and FICN. The cicn is a color icon which has been around since Apple introduced color Macintoshes and is easily created and edited with ResEdit 2.0 or later. FICN is a resource unique to FirstClass.
Since Update will automatically convert ICONs into FICNs, you will probably find it easier to work with them as ICON resources and let Update do the translation. But if you want to roll your own, read on…
To make a FICN, create an ICON and select it, then use ResEdit’s Open Using Hex Editor command from the Resource menu. When the hex display appears, use the Select All command from the Edit menu and Copy the selection. Then use Create New Resource from the Resource menu and type in “FICN” (no quotes). When the FICN window opens, Paste the contents of the Clipboard (the hex code you copied from the ICON resource) into it and close the window. You can renumber and rename the FICN resource by selecting the resource then using ResEdit’s Get Info command.
But wait! There is an easier way. Some clever person (if I knew the name I’d put it here but I’ve forgotten, so I reverse engineered the procedure to figure it out for you and me) figured out how to get ResEdit 2.1 and later to edit FICN resources directly. Here’s how you can do it:
• Make a copy of ResEdit
• Open the copy with ResEdit
• Open the RSSC resources and Duplicate (look in the Edit menu) the RSSC labeled “@ICON”
• Choose “Get Resource Info” from the Resource menu
• Change the name of this to “@FICN”
• Open the PICK resources and Duplicate (look in the Edit menu) the PICK labeled “ICON”
• Choose “Get Resource Info” from the Resource menu
• Change the name of this to “FICN”
• Open the ICON resources and Duplicate (look in the Edit menu) any ICON that you’d like to use to represent FICN resources (what’s shown in ResEdit), or grab a suitable ICON from any other file
• Choose “Get Resource Info” from the Resource menu
• Change the name of this to “FICN”
• Save the copy of ResEdit, launch the modified copy and open a FirstClass settings file — voila! You can now directly edit FICN resources.
SoftArc suggests that you number any icons you create sequentially beginning at 28000.
Update does not check to see that there is enough free disk space to update a file — please make sure you have room before running Update. This lack of error checking is a consequence of my attempt to keep Update small.
Included in this compressed archive is a text file called “About Update/User” — this is provided for your convenience so you can include it in the Update archive you distribute to your users.
Update is a free program, originally written for the Glassell Park BBS in Los Angeles. If you find it useful or have suggestions to enhance it, leave me a message (see below for a list of places to find me).
Version 1.1.0 of Update adds the ability to delete resources. This feature was requested by Steve Hall, who provided helpful suggestions on how to implement the feature (thanks Steve!). This version was completely rewritten in Symantec Think C (previous versions were written in Think Pascal).