Author Topic: Binge compiling Mac software  (Read 464 times)

Offline Jubadub

  • Gold Member
  • *****
  • Posts: 359
  • New Member
Binge compiling Mac software
« on: February 16, 2024, 12:56:22 PM »
No idea if anyone would care for any of this, but I'm currently on a phase of just randomnly grabbing various Mac projects and trying to compile them until I pull it off, in particular for software that has source code available, but no distributed binaries.

Think of it as "binge watching" something, but instead you just compile, compile, compile.

First one was SDL 1.2.15. The latest officially-distributed binaries were for 1.2.13 instead of .15, but Mac OS is still listed as supported etc., and changes between those versions were apparently also minimal. Nonetheless, I wanted the final version of SDL 1.2 (and 1.x overall) to be easily available as a binary for any Mac user / developer.

SDL 2.0 drops support for the vast majority of previously-supported platforms, even PPC OS X (although they say, for early 2.x versions, PPC OS X could probably be viably patched back in), so I decided not to even bother with it for now. SDL 1.2.15 should be sufficient for anything one could want to be done when compared against SDL 2.0, so I find little incentive in even considering that for porting/compilation.

Following official build instructions (you can find a link to them from the Garden page for SDL 1.2.13), it turns out they were insufficient and out-of-date. It needed 3 extra steps to complete a build via MPW: 1. Copying some OpenGL SDK headers and putting them next to other SDL source files, 2. copying some OpenGL SDK binary into some Interfaces folder of the used MPW installation and 3. changing the creator/type code of one particular file that had lost its resource forks to "TEXT" type. I plan to put the detailed, exact build instructions in the SDL 1.2.13 Garden page (and rename that page to SDL 1.2.x).

Next, I compiled Mini vMac 3.5.8 for non-Carbon PPC Mac, as well as even 68k. Both run on OS 9. Trying to type in ":minivmac" as the name of my build target on MPW, at first, did NOT work for compiling things (no idea why), which sent me on a looooong ride in trying to figure out why that wasn't working, and made me dig up the entire Gryphel website for whatever nuanced I might have missed from the docs (spoiler: none). Eventually, though, I realized I just needed to stick with the ":minivmac" name without changing anything else, and that's it. Next, I will try building with more compiler flags, then trying compiling the latest 2 versions of Mini vMac (36 and 37). Then upload it to everyone else interested, since the Gryphel website LONG stopped providing the "build service" for generating Mac-OS-9-compatible versions for NO reason, and even did away with older binaries and with documentation useful for previous versions (thank goodness archive.org came to the rescue for the docs at least, although not for many of the binaries). Geez.

I also revisited Bochs, the legendary PC virtual machine program, but after much poking around, it was clear to me that the path forward with it is to craft our own CW project files from scratch (or makefiles for MPW), and only use the extremely-outdated included CW project file as a partial guiding reference. Otherwise, compiling Bochs won't work. (The accompanying disk image creation tool, bxImage, compiles as a separate project just fine, though.)
I decided to look into Bochs only after I'm done compiling everything else I want to see compiled, for the time being.

Finally, there's MacZip. In MacZip's case, I'd like to compile it myself so that I can tinker with its source code, and see if I can use it to further develop it. Ambitious plan for my knowledge set, but hopefully I can get somewhere with this, very slowly.

I will share the SDL and Mini vMac binaries here later on in this thread. Running out of time right now.

Everyone else please feel free to hijack this thread with your own compiling, porting or even hacking attempts over any kind of Mac software (preferably real Mac OS, not OS X), and share your results away. Maybe someone else gets also in the mood of "binge compiling", or "binge porting". That could be fun.

Offline Jubadub

  • Gold Member
  • *****
  • Posts: 359
  • New Member
Re: Binge compiling Mac software
« Reply #1 on: February 16, 2024, 01:04:56 PM »
SDL 1.2.15 attached here.

Note that the file's "Version" property is still set with a value of "1.2.13", instead of the actual version number (1.2.15). It would seem the SDL team simply did not bother to bump up, or overlooked bumping up, the version number string.

You can still tell it's a different binary from file size alone: when I compiled 1.2.13, I got about (or exactly?) the same size as the official binary, but for 1.2.15 it's a bit bigger.

By the way, checksums don't seem to always match each time I build, so it doesn't seem they can be relied upon here. Perhaps building it is including some timestamp of when the build took place, thus changing the checksum sometimes?

I doubt anyone will actually use this, but of course, I cannot guarantee my build is actually good, and it is not tested, so use it at your own risk blah blah blah