Mac OS 9 Lives
Mac OS 9 Discussion => Development & Programming => Topic started by: Protools5LEGuy on October 23, 2019, 06:13:32 AM
-
https://github.com/autc04/Retro68 (https://github.com/autc04/Retro68)
Retro68
A GCC-based cross-compilation environment for 68K and PowerPC Macs. Why? Because there is no decent C++17 Compiler targeting Apple's System 6. If that's not a sufficient reason for you, I'm sure you will find something more useful elsewhere.
If you are crazy enough to try it out, please say hello at [email protected].
Installing/Building
Prerequisites
Linux, Mac OS X or Windows (via Cygwin)
boost
CMake 3.9 or later
GCC dependencies: GMP 4.2+, MPFR 2.3.1+ and MPC 0.8.0+
bison version 3.0.2 or later
ruby version 2.1 or later
Recommended: Apple Universal Interfaces (version 3.x; version 3.4 is tested)
An ancient Mac and/or an emulator.
For Ubuntu Linux, the following should help a bit:
sudo apt-get install cmake libgmp-dev libmpfr-dev libmpc-dev libboost-all-dev bison texinfo ruby
On a Mac, get the homebrew package manager and:
brew install boost
brew install cmake gmp mpfr libmpc bison
You can also run Retro68 on a PowerMac G4 or G5 running Mac OS 10.4 (Tiger). In that case, get the tigerbrew package manager and
brew install gcc cmake gmp mpfr libmpc bison
brew install boost --c++11
Apple Universal Interfaces vs. Multiversal Interfaces
To compile code for the Mac, you need header files and libraries describing the APIs. There are two choices: Apple's Universal Interfaces, or the brand-new open source reimplementation, the Multiversal Interfaces.
The Multiversal Interfaces are included with Retro68 out of the box, and they are free software. However, they are incomplete and may still contain serious bugs. Missing things include Carbon, MacTCP, OpenTransport, Navigation Services, and basically everything introduced after System 7.0.
The Universal Interfaces used to be a free download from Apple. However, they have taken the site off-line and the license agreement does not allow redistribution, which is why it's not included in this repository. The concept of fair use might cover keeping it available for reasons of historical interest, or it might not. I am not a lawyer.
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.
The Universal Interfaces were also included with Apple's free-to-download Macintosh Programmer's Workshop (MPW; redistribution is not officially allowed, either) and with Metrowerks CodeWarrior.
One of the most easily found downloads is the MPW 3.5 Golden Master release, usually in a file named MPW-GM.img.bin or mpw-gm.img_.bin. At the time of this writing, this can be found at:
http://macintoshgarden.org/apps/macintosh-programmers-workshop
https://www.macintoshrepository.org/1360-macintosh-programmer-s-workshop-mpw-3-0-to-3-5
https://staticky.com/mirrors/ftp.apple.com/developer/Tool_Chest/Core_Mac_OS_Tools/MPW_etc./MPW-GM_Images/MPW-GM.img.bin
You will need a Mac or a Mac emulator (with DiscCopy) to read that file.