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: Select all
#!/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"
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: Select all
<?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>
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!