Login  •  Register


The time is now: Wed Sep 19, 2018 9:16 pm

Emaculation wiki  •  Delete all board cookies



Post new topic  Reply to topic Page 1 of 3 [ 54 posts ]    Go to page 1, 2, 3  Next
Print view Previous topic  |  Next topic
Author Message
PostPosted: Tue May 14, 2013 11:49 am 
Offline
Mac Mechanic
User avatar

Joined: Tue Mar 29, 2011 8:57 pm
Posts: 184
Location: London, UK
Hello, i am making a few tests here and I came with a nice thingy to play with in Mac OS X, give it a try!

1. Get a Basilisk II Unix executable.

If you don't have one, do this:
- Get yourself a nice working version of Basilisk II, right-click it > show package contents.
- Go for Contents > MacOS
- Copy the file inside to another place. Usually the name is BasiliskII, I think. This is your executable.

My executable is named BasiliskIIIntel (I have several).

2. Get a small bootable disk image for test purposes. I got myself a bootable Mac OS 8.1 disk with the name macos81.img.
3. Get a working ROM file. Mine is called Performa 630.rom.
4. Find a very nice icon with the extension "icns". It can be done in "Icon composer" from the XCode package. I called it Icon.icns.

5. Put all these files in a new folder called Resources.
6. Create another folder called MacOS.
7. Inside MacOS, create an empty file with any name, extension ".sh". Mine is MacOS81.sh.

Write this to the file:

Code:
#!/usr/bin/env bash
DIR="$( cd "$( dirname "$0" )" && pwd )"
PAR="$( dirname "${DIR}" )"
RES_PATH="${PAR}/Resources"
RES=$( echo ${RES_PATH} | sed -e 's/ /\\ /g' )
eval "echo \"modelid 14\" > ${RES}/b2prefs"
eval "echo \"disk ${RES_PATH}/macos81.img\" >> ${RES}/b2prefs"
eval "echo \"screen win/800/500/32\" >> ${RES}/b2prefs"
eval "echo \"rom ${RES_PATH}/Performa 630.rom\" >> ${RES}/b2prefs"
eval "echo \"ramsize 33554432\" >> ${RES}/b2prefs"
eval "${RES}/BasiliskIIIntel --config ${RES}/b2prefs"
eval "rm ${RES}/b2prefs"


Remember to change the name of the files accordingly. The last line has the address of the executable Basilisk file, so it must match the name.

8. Put both folders (MacOS and Resources) inside a new folder called Contents.
9. With these folders, create a new file called Info.plist with the following content:

Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>CFBundlePackageType</key>
    <string>APPL</string>
    <key>CFBundleExecutable</key>
    <string>MacOS81.sh</string>
    <key>CFBundleIconFile</key>
    <string>Icon.icns</string>
    <key>LSUIElement</key>
    <string>1</string>
</dict>
</plist>


Again, the name of the shell script must match here.

10. Now move the folder Contents inside another folder with any name.
11. Rename this parent-most folder to something like MacOS81.app. If asked to add extension, do it.

This is a basic structure to a basic OSX application. This particular structure basically contains all files necessary for the emulator to run. The preferences file is generated on the fly every time you open the bundle and is never stored in a system folder. It is also deleted after Basilisk is down. It makes the bundle virtually executable in any OSX machine even without the emulator installed.

12. Execute your new self-contained virtual machine and have fun!

Cheers!


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Fri May 24, 2013 7:09 pm 
Offline
Forum All-Star

Joined: Tue Oct 14, 2008 12:12 am
Posts: 899
This is really brilliant. Thank you!

I've adapted your method so that the b2prefs file points to a keyboard codes file in the same Resources folder with the rest.

Because I want to use the ~/Documents folder as the "Unix" folder, I've also added this line to the bash script:

eval "echo \"extfs /Users/$USER/Documents\" >> ${RES}/b2prefs"

This is something I've been hoping to find for years. Thank you again!


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Sat Aug 03, 2013 3:44 am 
Offline
Student Driver

Joined: Thu Oct 16, 2008 12:46 pm
Posts: 19
Huh. Followed this to the letter, on Mac OS X 10.8.4, but when I try to launch I get an error;

"You can't open 'MacOS81' because it may be damaged or incomplete."

Major bummer.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Sat Aug 03, 2013 10:47 am 
Offline
Forum All-Star

Joined: Tue Oct 14, 2008 12:12 am
Posts: 899
Control-click on it; choose Open from the contextual menu.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Sat Aug 03, 2013 10:06 pm 
Offline
Student Driver

Joined: Thu Oct 16, 2008 12:46 pm
Posts: 19
Just tried it. Same result, same error.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Sat Aug 03, 2013 10:43 pm 
Offline
Forum All-Star

Joined: Tue Oct 14, 2008 12:12 am
Posts: 899
System Preferences -> Security and Privacy -> General

Click the lock; enter your password. Select Allow Applications downloaded from Anywhere.

Run Basilisk II once.

Return to System Preferences, etc., and set the Allow Applications setting to whatever you want.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Sun Aug 04, 2013 4:50 am 
Offline
Forum All-Star
User avatar

Joined: Fri Nov 27, 2009 5:11 am
Posts: 2194
Location: Emaculation.com
He could also be having binary execution errors; with how your bundle is laid out though, I didn't want to get into troubleshooting that myself ;)


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Sun Aug 04, 2013 6:52 am 
Offline
Expert User
User avatar

Joined: Thu Feb 09, 2006 10:24 pm
Posts: 5107
Location: Amsterdam, Netherlands
emendelson wrote:
System Preferences -> Security and Privacy -> General

Click the lock; enter your password. Select Allow Applications downloaded from Anywhere.

Run Basilisk II once.

Return to System Preferences, etc., and set the Allow Applications setting to whatever you want.

The reported error is not the error one gets with an application that is not accepted by the Gatekeeper feature. I agree with "adespoton" that there could be, I think probably is, an issue with the constructed bundle laid out incorrectly.

Apparently it works for you, so the instructions are correct. Then I suppose "Gryffin" made a mistake somewhere while building the bundle.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Sun Aug 04, 2013 10:57 am 
Offline
Forum All-Star

Joined: Tue Oct 14, 2008 12:12 am
Posts: 899
adespoton wrote:
He could also be having binary execution errors; with how your bundle is laid out though, I didn't want to get into troubleshooting that myself ;)


Not my bundle, sentient06's bundle - but his instructions worked perfectly the first time, and I've got a separate version of my own working perfectly.

Very easy test: ctrl-click; View Package Contents; double-click the BasiliskII executable; if it runs, then the problem is in the rest of the instructions.

One important part of the instructions is that the executable should be the executable inside a Basilisk II application, not the application itself. In the finder, it should look like a black rectangle, not an icon.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Mon Nov 10, 2014 6:15 pm 
Offline
Student Driver

Joined: Sun Nov 09, 2014 2:20 pm
Posts: 19
[EDIT]
Never mind; I figured it out, darn double directors ">>" instead of ">"
Here is the corrected CODE...

Code:
#!/usr/bin/env bash
DIR="$( cd "$( dirname "$0" )" && pwd )"
PAR="$( dirname "${DIR}" )"
RES_PATH="${PAR}/Resources"
RES=$( echo ${RES_PATH} | sed -e 's/ /\\ /g' )
eval "echo \"disk ${RES_PATH}/MacOS81.img\" >> ${RES}/b2prefs"
eval "echo \"extfs ${RES_PATH}/Shared\" >> ${RES}/b2prefs"
eval "echo \"screen win/1024/768\" >> ${RES}/b2prefs"
eval "echo \"seriala\" >> ${RES}/b2prefs"
eval "echo \"serialb\" >> ${RES}/b2prefs"
eval "echo \"ether slirp\" >> ${RES}/b2prefs"
eval "echo \"udptunnel false\" >> ${RES}/b2prefs"
eval "echo \"udpport 6066\" >> ${RES}/b2prefs"
eval "echo \"rom ${RES_PATH}/QUADRA 650.ROM\" >> ${RES}/b2prefs"
eval "echo \"bootdrive 0\" >> ${RES}/b2prefs"
eval "echo \"bootdriver 0\" >> ${RES}/b2prefs"
eval "echo \"ramsize 268435456\" >> ${RES}/b2prefs"
eval "echo \"frameskip 0\" >> ${RES}/b2prefs"
eval "echo \"modelid 14\" >> ${RES}/b2prefs"
eval "echo \"cpu 4\" >> ${RES}/b2prefs"
eval "echo \"fpu true\" >> ${RES}/b2prefs"
eval "echo \"nocdrom false\" >> ${RES}/b2prefs"
eval "echo \"nosound false\" >> ${RES}/b2prefs"
eval "echo \"noclipconversion false\" >> ${RES}/b2prefs"
eval "echo \"nogui false\" >> ${RES}/b2prefs"
eval "echo \"jit true\" >> ${RES}/b2prefs"
eval "echo \"jitfpu true\" >> ${RES}/b2prefs"
eval "echo \"jitdebug false\" >> ${RES}/b2prefs"
eval "echo \"jitcachesize 2048\" >> ${RES}/b2prefs"
eval "echo \"jitlazyflush true\" >> ${RES}/b2prefs"
eval "echo \"jitinline true\" >> ${RES}/b2prefs"
eval "echo \"keyboardtype 5\" >> ${RES}/b2prefs"
eval "echo \"keycodes false\" >> ${RES}/b2prefs"
eval "echo \"keycodefile ${RES_PATH}/BasiliskII_keycodes\" >> ${RES}/b2prefs"
eval "echo \"mousewheelmode 1\" >> ${RES}/b2prefs"
eval "echo \"mousewheellines 3\" >> ${RES}/b2prefs"
eval "echo \"dsp /dev/dsp\" >> ${RES}/b2prefs"
eval "echo \"mixer /dev/mixer\" >> ${RES}/b2prefs"
eval "echo \"ignoresegv true\" >> ${RES}/b2prefs"
eval "echo \"idlewait true\" >> ${RES}/b2prefs"
eval "${RES}/BasiliskIIIntel --config ${RES}/b2prefs"
eval "rm ${RES}/b2prefs"
[/EDIT]

Well after sorting out some execution privileges I got this to work. And so I thought I'll tweak and customize this to suit my needs; WRONG! I don't get it! Now, I keep getting the following:
Code:
Last login: Mon Nov 10 11:59:52 on ttys000
Ryans-MacBook-Air:~ ryan$ /Users/ryan/Desktop/Mac\ OS\ 8.1.app/Contents/MacOS/MacOS81.sh ; exit;
Basilisk II V1.0 by Christian Bauer et al.
ERROR: Cannot open ROM file.
logout

[Process completed]

The file names are correct. AFAIK the permissions are correct. If I run the BasiliskIIIntel executable everything goes fine, but if I try to run the MacOS81.sh script I get the above error.
What am I doing wrong? Here is the code I have so far...
Code:
#!/usr/bin/env bash
DIR="$( cd "$( dirname "$0" )" && pwd )"
PAR="$( dirname "${DIR}" )"
RES_PATH="${PAR}/Resources"
RES=$( echo ${RES_PATH} | sed -e 's/ /\\ /g' )
eval "echo \"disk ${RES_PATH}/MacOS81.img\" >> ${RES}/b2prefs"
eval "echo \"extfs ${RES_PATH}/Shared\" >> ${RES}/b2prefs"
eval "echo \"screen win/1024/768\" >> ${RES}/b2prefs"
eval "echo \"seriala\" >> ${RES}/b2prefs"
eval "echo \"serialb\" >> ${RES}/b2prefs"
eval "echo \"ether slirp\" >> ${RES}/b2prefs"
eval "echo \"udptunnel false\" > ${RES}/b2prefs"
eval "echo \"udpport 6066\" > ${RES}/b2prefs"
eval "echo \"rom ${RES_PATH}/QUADRA 650.ROM\" >> ${RES}/b2prefs"
eval "echo \"bootdrive 0\" > ${RES}/b2prefs"
eval "echo \"bootdriver 0\" > ${RES}/b2prefs"
eval "echo \"ramsize 268435456\" >> ${RES}/b2prefs"
eval "echo \"frameskip 0\" > ${RES}/b2prefs"
eval "echo \"modelid 14\" > ${RES}/b2prefs"
eval "echo \"cpu 4\" > ${RES}/b2prefs"
eval "echo \"fpu true\" > ${RES}/b2prefs"
eval "echo \"nocdrom false\" > ${RES}/b2prefs"
eval "echo \"nosound false\" > ${RES}/b2prefs"
eval "echo \"noclipconversion false\" > ${RES}/b2prefs"
eval "echo \"nogui false\" > ${RES}/b2prefs"
eval "echo \"jit true\" > ${RES}/b2prefs"
eval "echo \"jitfpu true\" > ${RES}/b2prefs"
eval "echo \"jitdebug false\" > ${RES}/b2prefs"
eval "echo \"jitcachesize 2048\" > ${RES}/b2prefs"
eval "echo \"jitlazyflush true\" > ${RES}/b2prefs"
eval "echo \"jitinline true\" > ${RES}/b2prefs"
eval "echo \"keyboardtype 5\" > ${RES}/b2prefs"
eval "echo \"keycodes false\" > ${RES}/b2prefs"
eval "echo \"keycodefile ${RES_PATH}/BasiliskII_keycodes\" >> ${RES}/b2prefs"
eval "echo \"mousewheelmode 1\" > ${RES}/b2prefs"
eval "echo \"mousewheellines 3\" > ${RES}/b2prefs"
eval "echo \"dsp /dev/dsp\" > ${RES}/b2prefs"
eval "echo \"mixer /dev/mixer\" > ${RES}/b2prefs"
eval "echo \"ignoresegv true\" > ${RES}/b2prefs"
eval "echo \"idlewait true\" > ${RES}/b2prefs"
eval "${RES}/BasiliskIIIntel --config ${RES}/b2prefs"
eval "rm ${RES}/b2prefs"

and here is a snapshot of my Folder Contents in my Workspace
Image
Any ideas?


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Mon Nov 10, 2014 11:01 pm 
Offline
Student Driver

Joined: Sun Nov 09, 2014 2:20 pm
Posts: 19
Can someone help me clean up my code a bit; especially the last line? As it is, it works, albeit not the most pragmatic or neatly way.
Code:
#!/usr/bin/env bash
DIR="$( cd "$( dirname "$0" )" && pwd )"
PAR="$( dirname "${DIR}" )"
RES_PATH="${PAR}/Resources"
RES=$( echo ${RES_PATH} | sed -e 's/ /\\ /g' )
eval "ln -fs \"${RES_PATH}/Pass-Through Drive\" ~/Desktop"
eval "echo \"disk ${RES_PATH}/MacOS81.img\" >> ${RES}/b2prefs"
eval "echo \"extfs ${RES_PATH}/Pass-Through Drive\" >> ${RES}/b2prefs"
eval "echo \"screen win/1024/768\" >> ${RES}/b2prefs"
eval "echo \"seriala\" >> ${RES}/b2prefs"
eval "echo \"serialb\" >> ${RES}/b2prefs"
eval "echo \"ether slirp\" >> ${RES}/b2prefs"
eval "echo \"udptunnel false\" >> ${RES}/b2prefs"
eval "echo \"udpport 6066\" >> ${RES}/b2prefs"
eval "echo \"rom ${RES_PATH}/QUADRA 650.ROM\" >> ${RES}/b2prefs"
eval "echo \"bootdrive 0\" >> ${RES}/b2prefs"
eval "echo \"bootdriver 0\" >> ${RES}/b2prefs"
eval "echo \"ramsize 268435456\" >> ${RES}/b2prefs"
eval "echo \"frameskip 0\" >> ${RES}/b2prefs"
eval "echo \"modelid 14\" >> ${RES}/b2prefs"
eval "echo \"cpu 4\" >> ${RES}/b2prefs"
eval "echo \"fpu true\" >> ${RES}/b2prefs"
eval "echo \"nocdrom false\" >> ${RES}/b2prefs"
eval "echo \"nosound false\" >> ${RES}/b2prefs"
eval "echo \"noclipconversion false\" >> ${RES}/b2prefs"
eval "echo \"nogui false\" >> ${RES}/b2prefs"
eval "echo \"jit true\" >> ${RES}/b2prefs"
eval "echo \"jitfpu true\" >> ${RES}/b2prefs"
eval "echo \"jitdebug false\" >> ${RES}/b2prefs"
eval "echo \"jitcachesize 2048\" >> ${RES}/b2prefs"
eval "echo \"jitlazyflush true\" >> ${RES}/b2prefs"
eval "echo \"jitinline true\" >> ${RES}/b2prefs"
eval "echo \"keyboardtype 5\" >> ${RES}/b2prefs"
eval "echo \"keycodes false\" >> ${RES}/b2prefs"
eval "echo \"keycodefile ${RES_PATH}/BasiliskII_keycodes\" >> ${RES}/b2prefs"
eval "echo \"mousewheelmode 1\" >> ${RES}/b2prefs"
eval "echo \"mousewheellines 3\" >> ${RES}/b2prefs"
eval "echo \"dsp /dev/dsp\" >> ${RES}/b2prefs"
eval "echo \"mixer /dev/mixer\" >> ${RES}/b2prefs"
eval "echo \"ignoresegv true\" >> ${RES}/b2prefs"
eval "echo \"idlewait true\" >> ${RES}/b2prefs"
eval "${RES}/BasiliskIIIntel --config ${RES}/b2prefs"
eval "rm ${RES}/b2prefs"
rm "$HOME/Desktop/Pass-Through Drive"


Here is my file contents...
Image


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Mon Nov 10, 2014 11:37 pm 
Offline
Forum All-Star
User avatar

Joined: Fri Nov 27, 2009 5:11 am
Posts: 2194
Location: Emaculation.com
Mac8a wrote:
The file names are correct. AFAIK the permissions are correct. If I run the BasiliskIIIntel executable everything goes fine, but if I try to run the MacOS81.sh script I get the above error.
What am I doing wrong? Here is the code I have so far...
Code:
#!/usr/bin/env bash
DIR="$( cd "$( dirname "$0" )" && pwd )"
PAR="$( dirname "${DIR}" )"
RES_PATH="${PAR}/Resources"
RES=$( echo ${RES_PATH} | sed -e 's/ /\\ /g' )
eval "echo \"disk ${RES_PATH}/MacOS81.img\" >> ${RES}/b2prefs"
eval "echo \"extfs ${RES_PATH}/Shared\" >> ${RES}/b2prefs"
eval "echo \"screen win/1024/768\" >> ${RES}/b2prefs"
eval "echo \"seriala\" >> ${RES}/b2prefs"
eval "echo \"serialb\" >> ${RES}/b2prefs"
eval "echo \"ether slirp\" >> ${RES}/b2prefs"
eval "echo \"udptunnel false\" > ${RES}/b2prefs"
eval "echo \"udpport 6066\" > ${RES}/b2prefs"
eval "echo \"rom ${RES_PATH}/QUADRA 650.ROM\" >> ${RES}/b2prefs"
eval "echo \"bootdrive 0\" > ${RES}/b2prefs"
eval "echo \"bootdriver 0\" > ${RES}/b2prefs"
eval "echo \"ramsize 268435456\" >> ${RES}/b2prefs"
eval "echo \"frameskip 0\" > ${RES}/b2prefs"
eval "echo \"modelid 14\" > ${RES}/b2prefs"
eval "echo \"cpu 4\" > ${RES}/b2prefs"
eval "echo \"fpu true\" > ${RES}/b2prefs"
eval "echo \"nocdrom false\" > ${RES}/b2prefs"
eval "echo \"nosound false\" > ${RES}/b2prefs"
eval "echo \"noclipconversion false\" > ${RES}/b2prefs"
eval "echo \"nogui false\" > ${RES}/b2prefs"
eval "echo \"jit true\" > ${RES}/b2prefs"
eval "echo \"jitfpu true\" > ${RES}/b2prefs"
eval "echo \"jitdebug false\" > ${RES}/b2prefs"
eval "echo \"jitcachesize 2048\" > ${RES}/b2prefs"
eval "echo \"jitlazyflush true\" > ${RES}/b2prefs"
eval "echo \"jitinline true\" > ${RES}/b2prefs"
eval "echo \"keyboardtype 5\" > ${RES}/b2prefs"
eval "echo \"keycodes false\" > ${RES}/b2prefs"
eval "echo \"keycodefile ${RES_PATH}/BasiliskII_keycodes\" >> ${RES}/b2prefs"
eval "echo \"mousewheelmode 1\" > ${RES}/b2prefs"
eval "echo \"mousewheellines 3\" > ${RES}/b2prefs"
eval "echo \"dsp /dev/dsp\" > ${RES}/b2prefs"
eval "echo \"mixer /dev/mixer\" > ${RES}/b2prefs"
eval "echo \"ignoresegv true\" > ${RES}/b2prefs"
eval "echo \"idlewait true\" > ${RES}/b2prefs"
eval "${RES}/BasiliskIIIntel --config ${RES}/b2prefs"
eval "rm ${RES}/b2prefs"

and here is a snapshot of my Folder Contents in my Workspace
Image
Any ideas?



Yeah; it's still sitting in the wrong folder when looking for the ROM file.

When I wrote my self-contained VM, I did it this way:

Code:
#!/bin/sh
mypath=`dirname "$0"`
cd "$mypath"
./BasiliskII --config "../Resources/Config"


That way, all your config is in an editable file, and you're referencing it from the location that plays nice with BII. I have that as a launchb2 executable script file in my /Contents/MacOS folder. My Info.plist is tweaked to run that instead of BasiliskII.

Then in my Resources folder, I keep the rest of the stuff, including the Config file, which has this line:
Code:
rom ../Resources/ROM

to point to the correct ROM location from where the executable/script sit.
All your eval lines would then sit in an easily readable Config file.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Tue Nov 11, 2014 12:34 am 
Offline
Student Driver

Joined: Sun Nov 09, 2014 2:20 pm
Posts: 19
Thanks but I narrowed that problem down already it was me using ">" instead of ">>"

Any ideas how to clean up my new working code?


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Tue Nov 11, 2014 2:44 am 
Offline
Student Driver

Joined: Sun Nov 09, 2014 2:20 pm
Posts: 19
I kind of overlooked this... can you elaborate on this; especially the part about the eval being in another script or what not? What does your script look like in whole and what does your configuration file look like? How is it implemented? I would like some form of a proper solution to a self contained Basilisk II VM. I keep hearing eval is bad? I don't really know what I was doing, I just followed the OPs guide and expanded. But from talking to some other people it's not a very efficient solution. If you look at my code I did devise a way to place a temp link to a portable share so that while running the emulator the drive is easily accessible from the desktop and when not in use it's still stored in the self contained app for future use. Could your solution implement this feature?


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Tue Nov 11, 2014 10:30 pm 
Offline
Student Driver

Joined: Sun Nov 09, 2014 2:20 pm
Posts: 19
Can this trick also be implemented with SheepShaver? I don't know how the configuration file is followed on SheepShaver.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Wed Nov 12, 2014 10:48 am 
Offline
Expert User
User avatar

Joined: Thu Feb 09, 2006 10:24 pm
Posts: 5107
Location: Amsterdam, Netherlands
Self-contained VMs is an existing feature of SheepShaver OSX itself. See this section in our setup manual: http://www.emaculation.com/doku.php/she ... l_machines


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Wed Nov 12, 2014 3:13 pm 
Offline
Student Driver

Joined: Sun Nov 09, 2014 2:20 pm
Posts: 19
Ronald P. Regensburg wrote:
Self-contained VMs is an existing feature of SheepShaver OSX itself. See this section in our setup manual: http://www.emaculation.com/doku.php/she ... l_machines

Thanks, but that method doesn't work for me. When I use .sheepvm extension, Mac OS X still looks at it like a folder of sorts, I can't place self contained .sheepvm files on the dock like I can apps; and I'd rather not have the config files hidden in my home folder but rather self-contained in an app file{I'm currently working on a solution of this} although the launch of sheepshaver does work with the .sheepvm extension.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Wed Nov 12, 2014 3:27 pm 
Offline
Mac Mechanic
User avatar

Joined: Tue Mar 29, 2011 8:57 pm
Posts: 184
Location: London, UK
You could try nesting a sheepvm file within the bundle.

I am doing this with my editor Medusa. It saves the prefs file in a sheepvm file and executes SheepShaver using the path as an argument.

So while in basilisk you execute this line:

Code:
./BasiliskII --config "../Resources/Config"

In SheepShaver you can do like this:
Code:
./SheepShaver "../Resources/Config.sheepvm"

I did not test it, but in theory should work.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Wed Nov 12, 2014 3:35 pm 
Offline
Student Driver

Joined: Sun Nov 09, 2014 2:20 pm
Posts: 19
sentient06 wrote:
You could try nesting a sheepvm file within the bundle.

I am doing this with my editor Medusa. It saves the prefs file in a sheepvm file and executes SheepShaver using the path as an argument.

So while in basilisk you execute this line:

Code:
./BasiliskII --config "../Resources/Config"

In SheepShaver you can do like this:
Code:
./SheepShaver "../Resources/Config.sheepvm"

I did not test it, but in theory should work.

I've mentioned in another post that Medusa isn't working for me; it won't read ROM files on OS X 10.10 Yosemite.
I'm currently writing AppleScripts to accomplish this, but I can't seem to figure out the proper syntax and arguments for "do script" command...
Code:

set myRes to (path to me as text) & "Contents:Resources:"

tell application "Finder"
   make new alias to folder (myRes & "Pass-Through Drive") at desktop
end tell

tell application "Terminal"
   activate
   do script myRes & "BasilliskII --config " & myRes & "basilisk_ii_prefs"
end tell

tell application "Finder"
   delete file "Pass-Through Drive" of desktop
end tell


the shortcut on the desktop sections appear to work. But I'm getting trapped in POSIX format and Unix space hell when it comes to paths. If anyone has suggestions for a fix of this code; I'm all ears.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Wed Nov 12, 2014 7:04 pm 
Offline
Expert User
User avatar

Joined: Thu Feb 09, 2006 10:24 pm
Posts: 5107
Location: Amsterdam, Netherlands
Mac8a wrote:
Ronald P. Regensburg wrote:
Self-contained VMs is an existing feature of SheepShaver OSX itself. See this section in our setup manual: http://www.emaculation.com/doku.php/she ... l_machines

Thanks, but that method doesn't work for me. When I use .sheepvm extension, Mac OS X still looks at it like a folder of sorts, I can't place self contained .sheepvm files on the dock like I can apps; and I'd rather not have the config files hidden in my home folder but rather self-contained in an app file{I'm currently working on a solution of this} although the launch of sheepshaver does work with the .sheepvm extension.

Being about SheepShaver rather than BasiliskII, this is off-topic. But what you write needs answers.

- Yes, the .sheepvm is a bundle and is in fact a folder/directory just like all OSX bundles/packages, but in the Finder it behaves as a file.

- The .sheepvm VMs are not applications, so they cannot be added to the Dock in the left section. But they can be added in the section on the right. Clicking a VM icon in the Dock launches SheepShaver and starts the VM.

- The config files of the .sheepvm VMs are not hidden and not in your home folder. They are self-contained inside the VM. Each VM has its own "prefs" file which is readily visible inside the VM and can easily be viewed in any text editor.


Last edited by Ronald P. Regensburg on Wed Nov 12, 2014 7:05 pm, edited 1 time in total.
 


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Wed Nov 12, 2014 7:19 pm 
Offline
Student Driver

Joined: Sun Nov 09, 2014 2:20 pm
Posts: 19
Ronald P. Regensburg wrote:
Mac8a wrote:
Ronald P. Regensburg wrote:
Self-contained VMs is an existing feature of SheepShaver OSX itself. See this section in our setup manual: http://www.emaculation.com/doku.php/she ... l_machines

Thanks, but that method doesn't work for me. When I use .sheepvm extension, Mac OS X still looks at it like a folder of sorts, I can't place self contained .sheepvm files on the dock like I can apps; and I'd rather not have the config files hidden in my home folder but rather self-contained in an app file{I'm currently working on a solution of this} although the launch of sheepshaver does work with the .sheepvm extension.

Being about SheepShaver rather than BasiliskII, this is off-topic. But what you write needs answers.

- Yes, the .sheepvm is a bundle and is in fact a folder/directory just like all OSX bundles/packages, but in the Finder it behaves as a file.

- The .sheepvm VMs are not applications, so they cannot be added to the Dock in the left section. But they can be added in the section on the right. Clicking a VM icon in the Dock launches SheepShaver and starts the VM.

- The config files of the .sheepvm VMs are not hidden and not in your home folder. They are self-contained inside the VM. Each VM has its own "prefs" file which is readily visible inside the VM and can easily be viewed in any text editor.


Thanks for clearing that up; however, I would still like to be able to put a self contained SheepShaver VM on the "Left Side" of the Dock.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Wed Nov 12, 2014 9:10 pm 
Offline
Forum All-Star

Joined: Tue Oct 14, 2008 12:12 am
Posts: 899
Mac8a wrote:
I would still like to be able to put a self contained SheepShaver VM on the "Left Side" of the Dock.


You will have to ask Apple to make that possible. There are forums at apple.com where you can request added features.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Wed Nov 12, 2014 9:14 pm 
Offline
Student Driver

Joined: Sun Nov 09, 2014 2:20 pm
Posts: 19
emendelson wrote:
Mac8a wrote:
I would still like to be able to put a self contained SheepShaver VM on the "Left Side" of the Dock.


You will have to ask Apple to make that possible. There are forums at apple.com where you can request added features.


Or I can simply make an App with Automator, AppleScript, or Self-Contained Bash Script.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Thu Nov 13, 2014 1:17 pm 
Offline
Forum All-Star

Joined: Tue Oct 14, 2008 12:12 am
Posts: 899
Mac8a wrote:
emendelson wrote:
You will have to ask Apple to make that possible. There are forums at apple.com where you can request added features.

Or I can simply make an App with Automator, AppleScript, or Self-Contained Bash Script.

Yes, of course: the SheepShaver Wrapper in a different part of the forum will do exactly what you are asking for, and it's already set up. The .sheepvm package alone can't go in the left part of the dock.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Fri Nov 21, 2014 7:16 am 
Offline
Student Driver

Joined: Sun Nov 09, 2014 2:20 pm
Posts: 19
I've tried to convert this to an AppleScript, but I get errors, could someone help me fix this please?
Code:
set myRes to (path to me as text) & "Contents:Resources:"

set lnkRes to alias (path to me as text) & "Contents:Resources:"

tell application "Finder"
   make new alias to folder (myRes & "Pass-Through Drive") at desktop
end tell

set posixRes to (POSIX path of lnkRes)

do shell script quoted form of posixRes & "BasilliskII --config " & quoted form of posixRes & "basilisk_ii_prefs"

tell application "Finder"
   delete file "Pass-Through Drive" of desktop
end tell


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


Who is online

Users browsing this forum: Bing [Bot] and 8 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