The INIT Mechanism
The concept of extensions was not present in the original Macintosh system software, but the system nevertheless had a private patching mechanism that developers soon learned to take advantage of - the INIT loader. This code would search for system resources of type 'INIT', and load and run them at boot time. The code resources had to be stored directly in the Mac System file's resource fork, meaning it was only really available to "power users" who would be comfortable using ResEdit or other resource editor.
Since taking advantage of this mechanism was an unsupported hack, and only 32 INITs could be loaded in this manner, Apple responded by providing a more managed solution. Initially this itself was in the form of an 'INIT' resource placed in the System file, 'INIT 31' that would search for further files of type 'INIT' in the System Folder, and load and run INIT resources inside them. (This is why some veteran Mac programmers still refer to the extensions loading mechanism as the "INIT 31 trick" ). INITs could now be installed simply by placing a file in the System Folder, well within the abilities of the average Mac user. Starting with System 7, extensions were relocated to the Extensions folder within the System Folder for convenience, and an auto-routing mechanism was implemented so that placing an extension into the System Folder through drag and drop would actually place the file in the appropriate subfolder.
Extensions retained the resource type of 'INIT' throughout their lifetime, and the loader was gradually enhanced to search for these resources in numerous places, including in the resource forks of control panels in a variety of formats and the Chooser.
Read more about this topic: Extension (Mac OS)
Famous quotes containing the word mechanism:
“Ive never known a Philadelphian who wasnt a downright character; possibly a defense mechanism resulting from the dullness of their native habitat.”
—Anita Loos (18881981)