adespoton wrote: ↑Sun May 28, 2023 4:41 am
Sounds like yours are getting closer to mine
I just add a script to the MacOS folder and point Info.plist at it. The script checks for the presence of the files in the ~/Application Support/<OS Version> folder and copies them there if they're missing, then runs the MachO binary via command line arguments.
That's exactly what mine does. Mine also tests for the presence of "second.sparsebundle", "third.sparsebundle", "fourth.sparsebundle", "second.dsk", "third.dsk", and "fourth.dsk" and adds or removes them from the prefs depending on whether they're present. It also tests for an image named "basiliskii.dsk" and puts it at the top of the prefs if found so that it can boot from that instead of from the default sparsebundle. Finally, it tests for an image named "install.dsk" (for a bootable OS or other installer) and puts that at the top of the prefs, above "basiliskii.dsk" if present.
My SheepShaver app does essentially the same things.
But your message shows me that I should add a variable at the top of the script that would specify the version number, and use that variable when creating the folder in ~/LibraryApplication Support. That would make this a lot more flexible, and make it easy to have multiple versions. Also, I suppose it should be possible to test the filename of the app for numbers like 753 and use those automatically, so that you wouldn't have to break the notarization by editing the script itself.
Also, it occurs to me that my script could test whether the locale is US or CA and, if it isn't either of those, change "keycodes false" to "keycodes true" in the prefs. I'll add that to the list of changes.
EDIT: I've now uploaded a version that looks at its own filename to see if it ends in numbers like 701, 753, etc., and, if it does, creates a folder in Application Support that includes that number, so you can have multiple versions of the app running different System 7 versions. I've also implemented the fix that changes keycodes false to keycodes true if the system locale is NOT US or CA, during the initial installation, so you can modify this if needed by editing the prefs file in Application Support. Thank you for prompting these fixes!