autc04 / Retro68

a gcc-based cross-compiler for classic 68K and PPC Macintoshes
GNU General Public License v3.0
537 stars 51 forks source link

Using MPW/Universal Interfaces with (Nix) Retro68 #245

Open leap0x7b opened 2 months ago

leap0x7b commented 2 months ago

Hi, I recently moved to NixOS as my main operating system and I wanted to use Retro68 to make classic Mac OS apps. Since Multiversal is very incomplete, I want to use Universal Interfaces from MPW instead. Unfortunately, the readme or any other documentation lacks instructions on how to use Universal Interfaces on both the Nix and the non-Nix version. I do notice a file in root called install-universal-interfaces.sh though I don't know how its supposed to be used.

autc04 commented 2 months ago

When using the traditional build script:

If you find a copy of Apple's Universal Interfaces, you can put it inside the InterfacesAndLibraries directory in the source tree, and Version 3.4 has received the most testing, but any 3.x version could theoretically work. The exact directory layout inside the InterfacesAndLibraries directory does not matter. It will be picked up automatically when Retro68 is built.

When using Nix, check out the sample at https://github.com/autc04/Retro68NixSample. There's a useUniversalInterfaces = false; that you can just change to true there to use stdenvUniversal instead of stdenv.

autc04 commented 2 months ago

The install-universal-interfaces.sh script was written to support the Docker setup, and I haven't really tried it outside of that.

mcayland commented 2 months ago

The install-universal-interfaces.sh script was written to support the Docker setup, and I haven't really tried it outside of that.

Yeah that file was from me :) It basically takes a path or URL to MPW-GM.img.bin (the Macbinary release containing the Interfaces&Libraries directory) and extracts its contents into a format usable by the existing interfaces-and-libraries.sh script.

See https://github.com/autc04/Retro68/blob/master/docker-entrypoint.sh for how it is used when starting up the Docker container.