This guide will help you set up your development environment to cross-compile Macintosh System 7.1 on Linux.
Before you begin, ensure you have the following installed on your Linux machine (e.g., Ubuntu/Debian):
- Bash: The shell used for build scripts.
- Git: Version control.
- Wget & Unrar: For downloading and extracting reference binaries.
- HFSUtils: For manipulating HFS disk images.
- Build Essentials:
make,gcc(standard Linux build tools).
sudo apt-get update
sudo apt-get install git wget unrar hfsutils build-essentialgit clone <repository-url> system7-source
cd system7-sourceThe build system relies on empw (Emulated MPW) to run the original Macintosh Programmer's Workshop tools.
- Download or build
empwfrom ksherlock/mpw. - Ensure the
empwbinary is in your system$PATH.
empw --version
# Should output version informationYou need to populate the MPW/ directory in the root of this repository with the MPW Shell and Tools. These are proprietary files and are not included in this repository.
- Create a directory named
MPWin the repo root. - Copy your MPW environment (Shell, Tools, Libraries) into it.
The cross_compile.sh script automates the remaining setup:
- Checks for MPW tools.
- Downloads and extracts reference binaries (System, Finder).
- Creates the build wrapper
build_system7.sh. - Patches the Makefiles to include necessary stubs.
./cross_compile.shNote: If you are missing the MPW/ directory, the script will warn you.
Once setup is complete, use the generated wrapper script to start the build:
./build_system7.shThis will:
- Launch
empw. - Execute the build instructions in
Make/Universal.make(orMake/MainCode.Make). - Output artifacts to the
Build/directory.
To verify your environment, you can look at the Internal/C/MiniFinder.c. This is a minimal application that replaces the Finder.
If the build succeeds, you should see an object file or binary corresponding to this stub in the build output.
ls -l Build/