Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!cs.utexas.edu!mailrus!ncar!midway!ellis.uchicago.edu!dwal From: dwal@ellis.uchicago.edu (David Walton) Newsgroups: comp.sys.mac.system Subject: Re: How to add startup icon to one that doesn't? Message-ID: <1990Aug4.214719.24490@midway.uchicago.edu> Date: 4 Aug 90 21:47:19 GMT References: <29956.26a4beb0@vaxb.acs.unt.edu> <1990Jul20.001136.6842@midway.uchicago.edu> <1841@petsd.UUCP> Sender: news@midway.uchicago.edu (News Administrator) Organization: U. Chicago Computing Organizations, Academic and Public Comp. Lines: 50 In article <1841@petsd.UUCP> hill@petsd.UUCP (John S. Hill) writes: >In article <1990Jul20.001136.6842@midway.uchicago.edu> dwal@midway.UUCP writes >> >>If an INIT doesn't show an icon at startup, it's not really possible >>to hack it up so it does. This sort of thing isn't managed by the >>system, but by a procedure which Apple distributes (to anybody who >>asks for it) for anybody who wants to include in in his her INIT. For >>that reason, if the routine wasn't included when the program was >>linked, you wouldn't be able to just twiddle some bits and make the >>call. As it is, the icon that is displayed is generally based upon >>runtime conditions (i.e., whether a certain installation procedure >>succeeds), and hacking that in bit-wise would be a pain in the **s. >> > >It is possible and in fact very easy to add icons to most inits/cdevs that >don't have start up icons. First, find an init/cdev that does show >its icon, then with ResEdit open that file. Look in the INIT resource, >where you may find a resource called ShowINIT. Copy this resource and paste >it into the target init/cdev, changing it's resource id to match the resource >id of the ICN# that you want to display. That's all there's to it. You may >of course have to add an ICN# if it doesn't have one, but that's also no big >deal if you're the least bit artistically inclined. First, You can't show an INIT's ICN# just by cutting and pasting resources: you have to do it in code. Second, ShowINIT isn't a resource, it's a procedure written in assembly language which is called by the INIT resource to show its ICN#. In fact, it's the procedure which I mentioned in my original reply. You can't just cut and paste this portion of the INIT code with ResEdit; you have to put in a call to ShowINIT in the INIT code itself, with the resource ID of the ICN# you want to display as one of the parameters. This is what I meant when I said that it's not really possible to modify an existing INIT to display an ICN#. Now, a point of clarification: what I should have said in my original post is that it's not really _worth the effort_ to try to modify an existing INIT _resource_ to display an ICN#. As many folks later pointed out, it's quite possible to add a second INIT resource to an INIT file which will grab the file's ICN# (or one you create) and display that ICN#. The drawback to this workaround is that many INITs display a different ICN# depending on run-time conditions, such as whether or not the INIT loaded successfully. The workaround can't do that, because it can't determine the run-time conditions of the previous INIT resources. -- David Walton Internet: dwal@midway.uchicago.edu University of Chicago { Any opinions found herein are mine, not } Computing Organizations { those of my employers (or anybody else). }