Closed MatthiasWM closed 2 years ago
Am I insane to think about automating the MPW part of the build by using qemu to boot OS 9.2? Something like:
guestmount/libguestfs
qemu-powerpc
at a known resolution and with VNC display output to boot OS 9.2 with the NewtonDev drive attachedruby-vnc
script
guestmount/libguestfs
againOK, so automating using VNC is a bit far-fetched. A console-based solution would be much nicer.
It may be easier to use "mosrun", https://github.com/MatthiasWM/dynee5/tree/master/Alienate/mosrun , mosrun (MacOS-run) emulates the MPW environment and wraps all the tools needed to generate the REx. mosrun uses mosmake to integrate a Classic MacOS binary into a new binary which runs natively on MacOS X. This has been proven to work.
I suggest that the build process depends on the "Native Developer Kit" archive in a specific location (for example .../_Data_/NewtonDev.sit
, as found on Unna), which is then unpacked and the binaries are wrapped into mosrun. The next build step then builds the actual REx using the tools and includes form NewtonDev.sit
.
It may be easiets to include mosrun into the Einstein source tree, just like the K library.
Ah. I get it now. Neat. I'm working on pulling all of the necessary bits together.
Also should note that https://github.com/ksherlock/mpw is another option. I liked this one because it keeps the library/includes in a central location.
I haven't tried mpw-shell, but it might also be interesting: https://github.com/ksherlock/mpw-shell
@jake-b those are neat tools, but it they only run on OS X, which doesn't help me :(
So I did this:
https://gist.github.com/chuma/754038fb0da921782aad9825faf18346
I banged together an ugly-as-sin bash script that can download the NewtonDev disk image, unZIPs it, and uses various tools to extract the Newton C++ tools and headers into the correct formats. This works with readily available packages on my Fedora machine: hfsutils
, dos2unix
, and perl-Convert-BinHex
. I did this in the _Build_/MPW_Drivers/
sub-directory, for some reason.
mosrun
built and installed it into my PATH.
Then it was just a matter of hacking Drivers/Makefile
to use only POSIX paths, point it to where the tools are, and comment out all of the SetFile
commands so my build didn't blow up.
That's all it took (!) to build Einstein.rex
on my Fedora Linux 28 workstation. I tried it and the emulator does not explode; in fact it runs just fine.
That is amazing! I assumed that mosrun would compile just fine on pretty much any platform, but getting the rest built too is really great!
I would like to ask what the status is on this build chain. Are modifications checked into the repo? Could you, @chuma , add a chapter to BUILDING.md
, or is the process documented elsewhere? Thanks!
Fixed in 152a55f2e9ef580de81191d4d3d2110631c904e7
Reinstate the build process for the ROM Extension (REx) that contains the drivers that link NewtonOS to Einstein. Recompiling the REx would allow us to integrate the network drivers and possibly another NewtonScript app that allows setting Einstein preferences from within NewtonOS (so mobile versions don't need to provide a native UI).