Both BII and SheepShaver for Windows use an ugly and outdated bitmap image for the host computer, and the code for that bitmap is in the file posix_emu.cpp.
I've been trying to replace that code with C code for the Windows 11 "This PC" icon, found in various sizes in this Apple .icns file which I created here (and have been using to experiment with different sizes of the icon)
https://www.dropbox.com/s/nkz9y9p65gndd ... .icns?dl=0
I know that the GIMP app is supposed to be able to produce the appropriate C code, but I haven't been able to do this. Can anyone suggest a method that works?
Windows version: update host PC icon?
Moderators: Cat_7, Ronald P. Regensburg, ClockWise
-
- Forum All-Star
- Posts: 1726
- Joined: Tue Oct 14, 2008 12:12 am
-
- Forum All-Star
- Posts: 1726
- Joined: Tue Oct 14, 2008 12:12 am
Re: Windows version: update host PC icon?
Well, I thought I found the answer, which was to export the new icon from GraphicConverter11 in C-code format, and I did that, and replaced the bitmap code and rebuilt. But BII still displays the old Windows-computer icon, so I seem to have modified the wrong code. Can anyone suggest a way to modify that old Windows-computer icon?
Last edited by emendelson on Fri Jan 21, 2022 1:38 am, edited 1 time in total.
-
- Forum All-Star
- Posts: 1726
- Joined: Tue Oct 14, 2008 12:12 am
Re: Windows version: update host PC icon?
I'm always grateful for suggestions, but I'm talking about the WINDOWS version of BasiliskII, which does not have icons in its resource fork, because it doesn't have a resource fork. Windows programs don't have resource forks. And the icon I'm talking about is not a resource in the Windows executable; it isn't accessible from the third-party Resource Hacker program (which seems to be what you mean by Res Hacker). If Resource Hacker could find the icon, this would be effortless.
I'm talking specifically about the icon that appears on the desktop of the Windows version that represents your Windows host machine. It's the lower of the two icons shown here:
![Image](https://i.imgur.com/XIhbAet.png)
I thought that icon was created from the hex code in posix_emu.cpp but probably I'm wrong. Does anyone know exactly where that icon is in the source code?
I'm talking specifically about the icon that appears on the desktop of the Windows version that represents your Windows host machine. It's the lower of the two icons shown here:
![Image](https://i.imgur.com/XIhbAet.png)
I thought that icon was created from the hex code in posix_emu.cpp but probably I'm wrong. Does anyone know exactly where that icon is in the source code?
Re: Windows version: update host PC icon?
The Windows icon is in src\Windows\posix_emu.cpp
const uint8 my_comp_icon[2670] = {
Best,
Cat_7
const uint8 my_comp_icon[2670] = {
Best,
Cat_7
- adespoton
- Forum All-Star
- Posts: 4286
- Joined: Fri Nov 27, 2009 5:11 am
- Location: Emaculation.com
- Contact:
Re: Windows version: update host PC icon?
OK; I've come full circle.
const uint8 my_comp_icon[2670] = {
from line 133 of BasiliskII/src/Windows/posix_emu.cpp is what's being written to the custom icon field. Instead of being the basic 256+2 field, it's a 2670 field of hex values.
I just ran those values through CyberChef, and you can make out the icon. So this is definitely a color bitmap of the Windows icon.
const uint8 my_comp_icon[2670] = {
from line 133 of BasiliskII/src/Windows/posix_emu.cpp is what's being written to the custom icon field. Instead of being the basic 256+2 field, it's a 2670 field of hex values.
I just ran those values through CyberChef, and you can make out the icon. So this is definitely a color bitmap of the Windows icon.
- adespoton
- Forum All-Star
- Posts: 4286
- Joined: Fri Nov 27, 2009 5:11 am
- Location: Emaculation.com
- Contact:
Re: Windows version: update host PC icon?
And after trying to decode by hand and CyberChef, I think the easiest way to replace the icon is outlined in the comment:
// Set up an icon looking like "My Computer"
// Can be overwritten just like any other folder custom icon.
-- easiest way to replace it seems to be to set a custom icon. It must be using the standard icon format though, so someone who's looked inside Inside Macintosh recently could probably figure out the exact format. I just realized I was assuming the wrong endianness, for example xP
// Set up an icon looking like "My Computer"
// Can be overwritten just like any other folder custom icon.
-- easiest way to replace it seems to be to set a custom icon. It must be using the standard icon format though, so someone who's looked inside Inside Macintosh recently could probably figure out the exact format. I just realized I was assuming the wrong endianness, for example xP
- adespoton
- Forum All-Star
- Posts: 4286
- Joined: Fri Nov 27, 2009 5:11 am
- Location: Emaculation.com
- Contact:
Re: Windows version: update host PC icon?
I think I've found the data format in https://developer.apple.com/library/arc ... oolbox.pdf in 5-17. Time for me to stop.
-
- Forum All-Star
- Posts: 1726
- Joined: Tue Oct 14, 2008 12:12 am
Re: Windows version: update host PC icon?
Again, many thanks for the detailed answer.
I already use the custom-icon method in at least one of the systems that I distribute. What I'm trying to do is replace the code that sets up the icon so that a new user, creating a new system, will not have to see that clumsy default icon. What's baffling to me is that I've replaced the byte array below the lines that you quote, but the clumsy default icon still appears. So I seem to have modified the wrong code. EDIT: though it's also possible that I need to use a different byte array, and your reply may actually point to the solution. Will experiment and report further.
I already use the custom-icon method in at least one of the systems that I distribute. What I'm trying to do is replace the code that sets up the icon so that a new user, creating a new system, will not have to see that clumsy default icon. What's baffling to me is that I've replaced the byte array below the lines that you quote, but the clumsy default icon still appears. So I seem to have modified the wrong code. EDIT: though it's also possible that I need to use a different byte array, and your reply may actually point to the solution. Will experiment and report further.