Login  •  Register


The time is now: Mon Nov 18, 2019 6:39 pm

Emaculation wiki  •  Delete all board cookies



Post new topic  Reply to topic Page 2 of 2 [ 48 posts ]    Go to page Previous  1, 2
Print view Previous topic  |  Next topic
Author Message
PostPosted: Mon Jul 15, 2019 4:31 am 
Offline
Forum All-Star
User avatar

Joined: Fri Nov 27, 2009 5:11 am
Posts: 2719
Location: Emaculation.com
I'll try to create something when I've got some time... unfortunately, that's rather thin right now. I probably need to install Catalina somewhere too so I can ensure it all works.

Would people prefer a command line thing where you can type a command and 2g and it creates a formatted HFS+ 2GB disk, a "run this applescript and it will create a 2G formatted disk and add it to SheepShaver Prefs", a GUI thing where you can edit the prefs file and add/remove/create disks, or something else? That'll let me know how much time I (or someone else) needs to block off to get it working :)


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Mon Jul 15, 2019 7:24 am 
Offline
Expert User
User avatar

Joined: Thu Feb 09, 2006 10:24 pm
Posts: 5617
Location: Amsterdam, Netherlands
A script that will create the disk image and add it to the prefs file would be fine for now, I think.

Do we have any reports that indeed everything else works in a SheepShaver that is newly installed in Catalina?


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Mon Jul 15, 2019 1:31 pm 
Offline
Forum All-Star

Joined: Tue Oct 14, 2008 12:12 am
Posts: 1092
Here is a script that creates a disk image; I had already done most of the work on this for my MacOS9 application:

https://www.dropbox.com/s/3ollkajhpa0ze ... k.zip?dl=1

Could you modify it as needed and send it back to me for code signing?

EDIT: Someone more expert than I am should be able to write code that adds it either as the first disk in the prefs file or as a later disk. It should be as easy as adding the line either to the top of the prefs file or the foot of it. I have code that works with my own systems, but it's very complicated, and builds the whole prefs file each time the system is run. I'm not sure it's worth the effort to adapt it for the normal prefs file. Someone may fix the SheepShaver code and all this won't be necessary at all.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Mon Jul 15, 2019 6:58 pm 
Offline
Expert User
User avatar

Joined: Thu Feb 09, 2006 10:24 pm
Posts: 5617
Location: Amsterdam, Netherlands
The order of volumes in the list is not really important as long as there is only one startup volume. SheepShaver starts at the top of the list looking for a bootable volume and will use the first one it encounters.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Mon Jul 15, 2019 7:33 pm 
Offline
Forum All-Star

Joined: Tue Oct 14, 2008 12:12 am
Posts: 1092
That sounds right. Anyone who wants to can modify my code something like this:

If no disk is listed in the prefs file, add this one.
If an existing disk is listed, offer the option to make the new one the boot disk or an additional disk.

But it would clearly be better to use the Preferences pane for this if someone expert can update the SheepShaver code.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Tue Jul 16, 2019 8:24 am 
Offline
Expert User
User avatar

Joined: Thu Feb 09, 2006 10:24 pm
Posts: 5617
Location: Amsterdam, Netherlands
emendelson wrote:
If an existing disk is listed, offer the option to make the new one the boot disk or an additional disk.

As I explained above, it is not really relevant whether the added disk is the intended boot disk or an additional disk. If there will be more than one bootable disks in the list, you can remove the ones that are above the intended boot disk later. If the disk is added at the top, it is always right, boot disk or additional disk. The intended boot disk does not need to be at the top of the volumes list, it must be the first bootable disk in the list.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Tue Jul 16, 2019 11:37 am 
Offline
Forum All-Star

Joined: Tue Oct 14, 2008 12:12 am
Posts: 1092
Ah - I understand. But the script would still need to give the option to make the disk the first bootable disk, wouldn't it? If a bootable disk is already in the list, the script would need to give the option to place the new disk above or below the existing one. Or am I misunderstanding something?


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Tue Jul 16, 2019 11:52 am 
Offline
Expert User
User avatar

Joined: Thu Feb 09, 2006 10:24 pm
Posts: 5617
Location: Amsterdam, Netherlands
If the added image is added at the top, it will always be the first bootable disk if it is a bootable disk. Would you also want to be able to add a bootable disk that is not to be the boot disk? In that case you need indeed need a choice to put the image below an existing bootable disk. I am not sure, though, when one would want to do that.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Tue Jul 16, 2019 12:13 pm 
Offline
Forum All-Star

Joined: Tue Oct 14, 2008 12:12 am
Posts: 1092
Ronald P. Regensburg wrote:
If the added image is added at the top, it will always be the first bootable disk if it is a bootable disk. Would you also want to be able to add a bootable disk that is not to be the boot disk? In that case you need indeed need a choice to put the image below an existing bootable disk. I am not sure, though, when one would want to do that.


You would want to do that if you're copying files from one disk to another, surely?


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Tue Jul 16, 2019 1:34 pm 
Offline
Expert User
User avatar

Joined: Thu Feb 09, 2006 10:24 pm
Posts: 5617
Location: Amsterdam, Netherlands
OK. I suppose the script cannot discern between bootable and non-bootable images. You could then make the script to give the choice to put a new image file at the top of the prefs file or at the end of the "disk" entries.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Tue Jul 16, 2019 3:43 pm 
Offline
Space Cadet

Joined: Mon Jul 08, 2019 6:05 pm
Posts: 3
Somehow I got this working on my Mac running Catalina. I am in no way a developer, so I don't know if this is just a fluke, or bug that was fixed in Catalina, or what. But I downloaded the source and built it on Catalina using the Xcode Beta and simply added the Bundle Identifier for the application. (Screenshot) (Code)

Here's a video of it working:
https://youtu.be/sv1KzVysaeM

Again, I have no idea why that works, but it seems to work as intended. Or does adding a Bundle Identifier screw something else up that I don't know about? Can somebody independently validate this?


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Tue Jul 16, 2019 5:39 pm 
Offline
Tinkerer

Joined: Wed Mar 21, 2012 12:35 am
Posts: 54
That's excellent, guiltydoggy! Here I was looking through source code that loaded prefs and other files, dreading all the changes for sandboxing... :lol:

It does look like a bundle ID is sufficient for Open & Save to attach. I'm not sure if this is the intended requirement for non-sandboxed processes, or if it's a gray area in the current implementation that may change. Apple doesn't provide a lot of details about this sort of thing unfortunately. Either way, it's a really good solution to the problem, and it will allow SheepShaver to continue to run like normal under Mac OS for now.

You could put up a pull request to kanjitalk. This change shouldn't break anything, but it will help future builds maintain compatibility with Catalina.

Edit: emendelson, it also makes me wonder if bundle ID was part of the problem with notarizing your builds as well? Everything seems to work under hardened runtime, so it should be possible to notarize it. I was thinking it tied back to permissions and sandboxing under Catalina, but maybe not.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Tue Jul 16, 2019 6:00 pm 
Offline
Forum All-Star
User avatar

Joined: Fri Nov 27, 2009 5:11 am
Posts: 2719
Location: Emaculation.com
This makes perfect sense in retrospect, because GateKeeper and XProtect maintain their security model based on the bundle ID. So the modern APIs are likely checking for the bundle ID of the application making the request, and not finding one, are bailing.

I believe you also need a bundle ID in order to interact with system events, which could be messing up some of my older scripts, and possibly some of emendelson's too.

I'm still in the middle of an inability to test things out with my dev box, and likely won't have time to do anything until mid-August at the earliest. But it sounds like nothing's needed from me on this front anymore anyway :)


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Tue Jul 16, 2019 6:05 pm 
Offline
Forum All-Star

Joined: Tue Oct 14, 2008 12:12 am
Posts: 1092
Elyus wrote:
Edit: emendelson, it also makes me wonder if bundle ID was part of the problem with notarizing your builds as well? Everything seems to work under hardened runtime, so it should be possible to notarize it. I was thinking it tied back to permissions and sandboxing under Catalina, but maybe not.


I'm fairly sure I used a bundle ID in my code - but I'll check it again later on. I've been using bundle IDs for all my builds, ever since I first got a developer account.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Tue Jul 16, 2019 9:36 pm 
Offline
Apple Corer
User avatar

Joined: Wed Apr 10, 2013 9:32 am
Posts: 272
guiltydoggy wrote:
[…] But I downloaded the source and built it on Catalina using the Xcode Beta and simply added the Bundle Identifier for the application. […]

I wonder whether the fact that you have built SheepShaver locally also plays a role in it working fine. I don't have Catalina, but maybe someone else who does could test your build?


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Tue Jul 16, 2019 9:54 pm 
Offline
Forum All-Star

Joined: Tue Oct 14, 2008 12:12 am
Posts: 1092
Elyus, Could you post your build? I'll test it on Catalina here, but I'm afraid that if I build it myself, it will run on my own system simply because I built it.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Tue Jul 16, 2019 10:31 pm 
Offline
Tinkerer

Joined: Wed Mar 21, 2012 12:35 am
Posts: 54
Here's a build with a bundle ID. I actually did have a little trouble getting it to work without signing, but it seems like it is now. We may be encountering some buggy behavior simply because Catalina is still early beta. Hopefully others can confirm if it works for them.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Wed Jul 17, 2019 12:10 am 
Offline
Forum All-Star

Joined: Tue Oct 14, 2008 12:12 am
Posts: 1092
That worked! I've taken the liberty of codesigning your code (a version number was required, so I added that), and posted it here:

https://github.com/emendelson/macemu/re ... talina.zip


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Wed Jul 17, 2019 6:53 am 
Offline
Tinkerer

Joined: Thu Nov 09, 2017 12:06 pm
Posts: 94
I merged guiltydoggy's PR.
And I also set Bundle Identifier for BasiliskII just in case.

https://github.com/kanjitalk755/macemu


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Wed Jul 17, 2019 10:15 am 
Offline
Expert User
User avatar

Joined: Thu Feb 09, 2006 10:24 pm
Posts: 5617
Location: Amsterdam, Netherlands
Wonderful!

I suppose it will also work in Catalina when built in Xcode 10.2.1 in Mojave with the bundle identifier and code signed.

Does this build still work in Mac OS X 10.7 (and all later OSX/macOS), can someone check that?


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Thu Jul 18, 2019 12:16 am 
Offline
Forum All-Star

Joined: Tue Oct 14, 2008 12:12 am
Posts: 1092
I see part of the problem in notarizing SheepShaver, but I have no idea of the solution.

When I build SheepShaver and use the resulting file in the "derived data" folder it works perfectly, and the unix executable is 1.9MB.

But if I archive the same code from the Xcode menu, I end up with a 1.2MB executable, and a separate 1.1MB libkpx_cpu.a file in another folder. It seems that these aren't combined when you archive the app. I do not understand any of this. Is there a way to fix this? That might make it possible to notarize SheepShaver.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Thu Jul 18, 2019 6:04 am 
Offline
Tinkerer

Joined: Thu Nov 09, 2017 12:06 pm
Posts: 94
The difference of binary size is whether it is stripped or not.
When I stripped the binary of DerivedData as a trial, it crashed as well.
As a result of investigation, it turned out that catch_exception_raise() used in SheepShaver needs symbols.

http://vikashdubey.blogspot.com/2010/06/structured-exception-handling-mach.html

In other words, the archived binary doesn't work.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Thu Jul 18, 2019 11:59 am 
Offline
Forum All-Star

Joined: Tue Oct 14, 2008 12:12 am
Posts: 1092
Thank you for explaining that! It sounds as if it would take a lot of work to rewrite the code so that it could be stripped, and we can live with what we have already.


Top
 Profile  
Reply with quote Post a reply  
Display posts from previous:  Sort by  
Post new topic  Reply to topic Page 2 of 2 [ 48 posts ]    Go to page Previous  1, 2


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
 

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group