Option request - window title

About SheepShaver, a PPC Mac emulator for Windows, MacOS X, and Linux that can run System 7.5.3 to MacOS 9.0.4.

Moderators: Cat_7, Ronald P. Regensburg, ClockWise

Post Reply
User avatar
adespoton
Forum All-Star
Posts: 4227
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Option request - window title

Post by adespoton »

Quick request - could we have a window title flag for BII and SS? Just something to put in the prefs file or command line flag that would set the window title, at least on macOS.

Reason for the request is that I used to hack the binary to replace SheepShaver with the OS version being run, so I could easily tell between two different instances running at the same time in Mission Control. But now that we're notarizing on macOS, if I change the binary, it fails the checksum check and refuses to run. Inside Mission Control, all the windows just say "SheepShaver".

Same goes for BII of course.
emendelson
Forum All-Star
Posts: 1706
Joined: Tue Oct 14, 2008 12:12 am

Re: Option request - window title

Post by emendelson »

I tried adding this option to kanjitalk755's code, but I'm not competent enough to do it. I too would be grateful to have this option.
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Option request - window title

Post by Ronald P. Regensburg »

If only for your own use, you can build yourself. No need to notarize and the app will then still run when you make simple changes.
emendelson
Forum All-Star
Posts: 1706
Joined: Tue Oct 14, 2008 12:12 am

Re: Option request - window title

Post by emendelson »

Yes, but adespoton's suggestion would let you use the same build for multiple configurations, but each configuration could have a different string in the title bar.
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Option request - window title

Post by Ronald P. Regensburg »

Maybe I am missing something. I suppose you want to be able to discern between different VMs running at the same time. As far as I am aware in macOS only one instance of the same application can run at the same time. So what is the need then to have different setups show different window titles? With multiple copies of the app running, each showing a different title, you can discern between them.
emendelson
Forum All-Star
Posts: 1706
Joined: Tue Oct 14, 2008 12:12 am

Re: Option request - window title

Post by emendelson »

I would use this simply as a reminder that I'm running System 7.5.3 or 7.6.1. Again, I think the point is that you need to have only one build of the application, and multiple VMs, each with a different title bar. They don't need to be running at the same time.

With some DOS emulators, the title bar shows you the name of the currently running program in addition to the name of the emulator. What I think adespoton is asking for an option to make the SS or BII title bar say something like "Basilisk II - System 7.6.1".
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Option request - window title

Post by Ronald P. Regensburg »

This is from the original request by adespoton (bold accentuation by me):
Reason for the request is that I used to hack the binary to replace SheepShaver with the OS version being run, so I could easily tell between two different instances running at the same time in Mission Control.
But now that we're notarizing on macOS, if I change the binary, it fails the checksum check and refuses to run. Inside Mission Control, all the windows just say "SheepShaver".
As I noted above, if you build for your own use, no notarizing is needed and hacking the binary will not prevent the app to run. Simply create your own build, make copies as needed, and hack the different copies as you did before.

Building with Xcode is easy: https://www.emaculation.com/doku.php/co ... r_basilisk
User avatar
adespoton
Forum All-Star
Posts: 4227
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Option request - window title

Post by adespoton »

Yes... this is why I've held off for years in asking for this addition.

What I'm looking for is to be able to put a "title 8.6" on a line in the prefs file in my .sheepvm file, and when I run my MacOS8.6.sheepvm, the window shows "SheepShaver 8.6" but when I run my MacOS9.sheepvm, the window shows "SheepShaver 9".

I don't really want to make a custom build for each OS version every time a new build of SS and BII is available, when I could be able to just use the same runtime for each version, like I do with QEMU-PPC and with Mini vMac.

If nobody else has the time/inclination/ability to add this, I'll try to make some time to do it myself, but I figured if others were actively updating the code, a request for a title update might be easier than making and pushing the change.
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Option request - window title

Post by Ronald P. Regensburg »

Then it would be nice if the VMs name would be used for the window title, without the need to edit the prefs file. But I doubt that is possible.
User avatar
adespoton
Forum All-Star
Posts: 4227
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Option request - window title

Post by adespoton »

That should be possible, but would be very convoluted and prone to breaking I'd think. A simple option in the prefs file would be easier, and could be applied even outside sheepvm files (which would be easier for BII) if someone wanted to do so.
PeterHolbrook
Apple Corer
Posts: 273
Joined: Fri Oct 26, 2007 7:56 am

Re: Option request - window title

Post by PeterHolbrook »

Ronald P. Regensburg wrote: Tue Feb 16, 2021 7:55 pm Then it would be nice if the VMs name would be used for the window title, without the need to edit the prefs file. But I doubt that is possible.
That would probably be the best possible solution, IMHO. Let the virtual disk's name determine the name of the SheepShaver window running the relevant version of Mac OS.
User avatar
adespoton
Forum All-Star
Posts: 4227
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Option request - window title

Post by adespoton »

PeterHolbrook wrote: Mon Feb 22, 2021 7:32 pm
Ronald P. Regensburg wrote: Tue Feb 16, 2021 7:55 pm Then it would be nice if the VMs name would be used for the window title, without the need to edit the prefs file. But I doubt that is possible.
That would probably be the best possible solution, IMHO. Let the virtual disk's name determine the name of the SheepShaver window running the relevant version of Mac OS.
It can't be the virtual disk though, as there can be more than one disk loaded. It can be the name of the .sheepvm file, but that only works if there's a .sheepvm file loaded, and won't work at all for BII.

I guess it could be the internal name of the boot disk? But that wouldn't be known until after the emulator has booted. The file name of the boot disk likewise wouldn't be known.

I guess one thing that would work is the file name of the first disk in the list, irrespective of bootability. This would also make it pretty obvious if you needed to tweak your prefs file (if the window title didn't match what you were expecting).
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Option request - window title

Post by Ronald P. Regensburg »

PeterHolbrook wrote: Mon Feb 22, 2021 7:32 pm
Ronald P. Regensburg wrote: Tue Feb 16, 2021 7:55 pm Then it would be nice if the VMs name would be used for the window title, without the need to edit the prefs file. But I doubt that is possible.
That would probably be the best possible solution, IMHO. Let the virtual disk's name determine the name of the SheepShaver window running the relevant version of Mac OS.
That is not what I suggested. I suggested the VMs name (.sheepvm VMs name) not the virtual disk name.
But see also the comments by adespoton. An option in prefs would work for all setups in both SheepShaver and BasiliskII.
PeterHolbrook
Apple Corer
Posts: 273
Joined: Fri Oct 26, 2007 7:56 am

Re: Option request - window title

Post by PeterHolbrook »

OK. I stand corrected.
kanjitalk755
Apple Corer
Posts: 239
Joined: Thu Nov 09, 2017 12:06 pm

Re: Option request - window title

Post by kanjitalk755 »

Implemented prefs item "title".
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Option request - window title

Post by Ronald P. Regensburg »

I will create new builds shortly, I hope this weekend.
emendelson
Forum All-Star
Posts: 1706
Joined: Tue Oct 14, 2008 12:12 am

Re: Option request - window title

Post by emendelson »

Thank you, kanjitalk755!
User avatar
adespoton
Forum All-Star
Posts: 4227
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Option request - window title

Post by adespoton »

Thanks all of you!

I guess the lesson here is that I should have raised this/patched this years ago when I still had spare time :)
Post Reply