/infinite-mac

A Mac with everything you'd want in 1995.

Primary LanguageTypeScriptApache License 2.0Apache-2.0

Infinite Mac

A Mac with everything you'd want in 1995. Available in System 7, Mac OS 8 and KanjiTalk (Japanese) flavors. For a high-level overview and the backstory, see this blog post.

Development

This project uses submodules, use git clone --recursive https://github.com/mihaip/infinite-mac.git to clone it (or run git submodule update --init --recursive if you have an existing checkout).

Common development tasks, all done via npm run:

  • start: Run local dev server (will be running at http://localhost:3127).
  • import-basilisk-ii: Copy generated WebAssembly from the https://github.com/mihaip/macemu submodule.
  • import-disks: Build disk images for serving. Copies base OS images from the above, and imports other software (found in Library/) into an "Infinite HD" disk image. Chunks disk images and generates a manifest for serving.

Common deployment tasks (also done via npm run)

  • build: Rebuild for either local use (in the build/ directory) or for Cloudflare Worker use
  • worker-preview: Preview built assets in a Cloudflare Worker (requires a separate build invocation)
  • worker-deploy: Deploy built assets to the live version of the Cloudflare Worker (requires a separate build invocation)

Dependencies

Dependencies can be installed with:

npm install
pip3 install -r requirements.txt
npm run build-xadmaster

Building Basilisk II

Ensure that you have a Docker image built with the Emscripten toolchain and supporting library:

docker build -t macemu_emsdk .

Open a shell into the Docker container:

docker run --rm -it -v `realpath macemu`:/macemu --entrypoint bash macemu_emsdk

Once in that container, you can use this cheat sheet to build (based on the original instructions):

cd /macemu/BasiliskII/src/Unix
# Bootstrap Basilisk II, to generate the CPU emulator code
macemujs_conf_cpu=1 macemujs_conf_native=1 ./_embuild.sh && make clean && make -j4
# Switch into building for WASM
macemujs_conf_cpu=1 macemujs_conf_wasm=1 ./_embuild.sh && make mostlyclean
# Actually compile Basilisk II targetting WASM
make -j6

Once you have it build, use npm run import-basilisk-ii from the host to update the files in src/BasiliskII.