Login  •  Register


The time is now: Thu Apr 24, 2014 7:52 pm

Emaculation wiki  •  Delete all board cookies



Post new topic  Reply to topic Page 1 of 1 [ 11 posts ]
Print view Previous topic  |  Next topic
Author Message
PostPosted: Fri Nov 27, 2009 5:29 am 
Offline
Master Emulator

Joined: Tue Oct 14, 2008 12:12 am
Posts: 477
Maybe someone has figured out this out already and I'm just wasting everyone's time, but here is the way to build a complete standalone SheepShaver application for OS X, plus a link to a sample application. (Admins: don't worry; the sample does NOT contain a ROM file or OS.)

I've written an Applescript application that you can find here:

http://dl.dropbox.com/u/271144/SheepShaverSample.zip

Before you use it, you need to create a working SheepShaver .sheepvm file as explained in this thread:

http://www.emaculation.com/forum/viewtopic.php?t=5754

Read on to the place where you download the SheepShaverLauncher application. This makes it easy to build the .sheepvm file. The crucial details are these

Download the SheepShaver launcher here:

http://projectmagma.net/~myrd/SheepShav ... her_b5.zip

Run it and create a New virtual machine, preferably on your desktop. Name it MacOS. Close the launcher.

Cntrl-click on the new MacOS.sheepvm file, choose Show Package Contents, and drag into it a working SheepShaver disk image (you must already KNOW that the disk image works in SheepShaver) and your Mac OS ROM file.

Open the launcher again, edit the MacOS virtual machine so that the disk image INSIDE the file is listed as the hard disk (do not use a full path - just the filename) and the Mac OS ROM file is listed as the ROM (again, do not use the full path, just the filename). Set other settings however you want them. Set the Unix root as /Users/yourusername (the standalone application that I wrote will automatically change this to whoever the current user is when the standalone application starts up). Make sure that the .sheepvm file actually RUNS with SheepShaver. Don't neglect this step!

Next, ctrl-click on the SheepShaverSample application you downloaded in the first step. Choose Show Package Contents; navigate to Contents:Resources:Files. Drag the MacOS.sheepvm file that you created earlier, and drop it into the Files folder. Close the window.

Double-click the SheepShaverSample application, and it should start up with the Unix folder set as your home folder. Please open the application in the AppleScript Editor to see how this works.

The sample includes the build of 23 August 2009 created by Mschmitt and described in this post:

http://www.emaculation.com/forum/viewto ... ght=#30713

It's a Universal Binary. I can't use Ronald's more recent builds because they crash on my system in the same way that some other visitors report crashes. It's easy to replace this build with any other that supports sheepvm bundles.

Tested ONLY on 10.6.2 and therefore on Intel, as 10.6 runs only on Intel. Please let me know if this is useful.


Top
 Profile  
Post a reply  
 Post subject:
PostPosted: Fri Nov 27, 2009 1:29 pm 
Offline
Expert User
User avatar

Joined: Thu Feb 09, 2006 10:24 pm
Posts: 3931
Location: Amsterdam, Netherlands
Even easier and no Launcher or additional AppleScript application needed:

1. Start with a folder such as the SheepShaver folder in the latest build download, containing SheepShaver and (for non-US keyboards) the Keycodes file.
(The SheepShaver application must be a build that supports sheepvm virtual machines. Most builds since this summer do.)

2. Add a compatible rom file to the folder and make sure it is named "Mac OS ROM".

3. Add an empty file "prefs" to the folder. (Can be created with a text editor but make sure the file name does not have a invisible extension.)

4. Add the extension .sheepvm to the folder name.
The folder is now a SheepShaver virtual machine and will appear as a file with SheepShaver icon.

5. Double click the virtual machine to launch SheepShaver and continue setting up SheepShaver as described in the setup manual.
http://www.emaculation.com/doku.php/she ... os_x_setup

That's it

This is possible because the Save dialog that is associated with preferences in SheepShaver, allows navigating into the sheepvm bundle.


BTW: I always advise against using an important folder like your Home folder as shared folder (Unix Root).


Last edited by Ronald P. Regensburg on Fri Nov 27, 2009 2:28 pm, edited 1 time in total.


Top
 Profile  
Post a reply  
 Post subject:
PostPosted: Fri Nov 27, 2009 2:02 pm 
Offline
Expert User
User avatar

Joined: Thu Feb 09, 2006 10:24 pm
Posts: 3931
Location: Amsterdam, Netherlands
It would indeed be very easy to put together and distribute a complete and pre-configured virtual machine, if distributing rom files and pre-installed systems would not be illegal.

In July I showed something similar in this post:
http://www.emaculation.com/forum/viewto ... 0454#30454


Top
 Profile  
Post a reply  
 Post subject:
PostPosted: Fri Nov 27, 2009 2:27 pm 
Offline
Master Emulator

Joined: Tue Oct 14, 2008 12:12 am
Posts: 477
You are of course right about "no launcher needed." I remembered that only after I had already written this AppleScript!

This distribution method would I think be legal in an organization that already owns (but is not using) old Macs that had a ROM file and that already had licenses for the Mac OS.

One possible advantage of an AppleScript is that it can set up other features in OS X - for example, it could install a Folder Action Script that would allow printing to non-Postscript printers by saving a .PS file to a specified folder. But your method is certainly much easier!


Top
 Profile  
Post a reply  
 Post subject:
PostPosted: Fri Nov 27, 2009 3:08 pm 
Offline
Expert User
User avatar

Joined: Thu Feb 09, 2006 10:24 pm
Posts: 3931
Location: Amsterdam, Netherlands
Some time ago I considered posting an AppleScript that would create a pre-configured ~/.sheepshaver_prefs file, a one-click basic set-up. I didn't think of other uses for such a script, like installing a Folder Action Script as you suggest.

A folder with a pre-configured prefs file would make a basic setup even easier. In the post I linked to above, I also mentioned a disk image that would expand when initialized in SheepShaver. It appears that SheepShaver will recognize an empty sparse disk image that can be very small in a compressed archive.

With a folder or .sheepvm bundle with SheepShaver, the keycodes file, a pre-configured prefs file and an empty sparse disk image, the basic setup instructions for a new user would be very simple and it would still be legal. I would love to add an old-world rom to such a distribution. A user would only need a proper install disk to install a system on the pre-configured virtual machine and any system from 7.5.3 through 9.0.4 would work.

BTW: You may have noticed that with more VMs, only one copy of SheepShaver.app is needed, regardless whether it is separate or inside one of the VM bundles. But with only one copy of SheepShaver, you can run only one VM at a time.


Top
 Profile  
Post a reply  
 Post subject:
PostPosted: Sun Nov 29, 2009 2:13 am 
Offline
Master Emulator

Joined: Tue Oct 14, 2008 12:12 am
Posts: 477
One problem with having self-contained sheepvms that contain the Sheepshaver.app is this: OS X tries to open each sheepvm with the copy of Sheepshaver that you used to open first sheepvm that you ran. If I create two self-contained .sheepvm files, each with a copy of SheepShaver.app inside it, the second one that I run tries to use the SheepShaver.app that was in the first one.

Possibly the solution is to use a shell script to launch the copy of SheepShaver.app in the bundle, with the name of the .sheepvm file as a parameter, but I'm not a hundred percent certain that this will work.

Has anyone else encountered this problem?


Top
 Profile  
Post a reply  
 Post subject:
PostPosted: Sun Nov 29, 2009 2:48 am 
Offline
Master Emulator

Joined: Tue Oct 14, 2008 12:12 am
Posts: 477
Update:

Even if you use a shell script to launch the copy of SheepShaver.app in the bundle, with the name of the .sheepvm file as a parameter, a different copy of SheepShaver is likely to be launched - instead of the one specified on the command-line! How this be prevented? You can't use Get Info to specify that a file should be launched by an application inside a package.

Is there a solution to tihs?


Top
 Profile  
Post a reply  
 Post subject:
PostPosted: Sun Nov 29, 2009 11:03 am 
Offline
Expert User
User avatar

Joined: Thu Feb 09, 2006 10:24 pm
Posts: 3931
Location: Amsterdam, Netherlands
It is a problem only when you want to run multiple VMs at the same time.

The normal intended setup for self-contained VMs is not to have the SheepShaver.app included. You can have the SheepShaver.app for instance in /Applications/ and the VMs (without SheepShaver) somewhere in your Home folder.


Top
 Profile  
Post a reply  
 Post subject:
PostPosted: Sun Nov 29, 2009 1:51 pm 
Offline
Master Emulator

Joined: Tue Oct 14, 2008 12:12 am
Posts: 477
One reason it would be nice to be able to specify the copy of SheepShaver.app that runs a sheepvm is that you then only get one icon in the dock. If you can specify the specific SheepShaver, then you can identify it with a custom icon. If OS X runs a different SheepShaver from the one specified, then you get two different icons in the dock.


Top
 Profile  
Post a reply  
 Post subject:
PostPosted: Mon Nov 30, 2009 12:10 am 
Offline
Expert User
User avatar

Joined: Thu Feb 09, 2006 10:24 pm
Posts: 3931
Location: Amsterdam, Netherlands
You should not launch the app in the shell script, but instead open the VM specifying the application.

From the man page for "open" command:
-a application
Specifies the application to use for opening the file

Example:
"open -a /Applications/TextEdit.app '/Volumes/Macintosh HD/foo.txt'"
opens the document (foo.txt) in the application specified (in this case, TextEdit).

I tried it, it works.


Top
 Profile  
Post a reply  
 Post subject:
PostPosted: Mon Nov 30, 2009 1:26 am 
Offline
Master Emulator

Joined: Tue Oct 14, 2008 12:12 am
Posts: 477
"open -a" does EXACTLY what I was looking for. Thank you! I should have found that out for myself, but I didn't think to look for it.

Again, thank you!


Top
 Profile  
Post a reply  
Display posts from previous:  Sort by  
Post new topic  Reply to topic Page 1 of 1 [ 11 posts ]


Who is online

Users browsing this forum: No registered users and 1 guest


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