Add Unix shell script to wrap EasyBuild

This commit is contained in:
Elliot Nunn 2018-05-21 13:57:53 +08:00
parent 0d277dc2e3
commit b1bb36c551
3 changed files with 42 additions and 0 deletions

View File

@ -3,3 +3,8 @@ SetDirectory "{Parent}" # too easy
Make -w > :BuildResults:BuildOut
:BuildResults:BuildOut
# So that PowerROM is definitely the newest thing in the tree!
SetDirectory :BuildResults:
Catenate PowerROM > PowerROM_
Rename -y PowerROM_ PowerROM

29
EasyBuild.sh Executable file
View File

@ -0,0 +1,29 @@
#!/bin/sh
# Uncomment this block to use https://github.com/elliotnunn/mac-rom
# echo "> Diving into mac-rom repo"
# cd ../mac-rom
# ./EasyBuild.sh
# cmp -s BuildResults/RISC/Image/RomMondo "$OLDPWD/RomMondo.bin" || cp BuildResults/RISC/Image/RomMondo "$OLDPWD/RomMondo.bin"
# cd "$OLDPWD"
# echo "< Done with mac-rom repo"
# Avoid the uber-slow step of running the emulator when nothing has changed
if [ ! -f BuildResults/PowerROM ]
then
echo "PowerROM not yet built"
echo "> Starting emulator to build PowerROM"
empw -b EasyBuild
echo "< Emulator done"
exit
fi
echo "Checking for files updated since PowerROM"
find **/*.s *.s *.x *.bin -newer BuildResults/PowerROM | grep . || exit 0
echo "> Starting emulator to build PowerROM"
empw -b EasyBuild
echo "< Emulator done"

View File

@ -52,8 +52,16 @@ Using EMPW, that's:
empw -b EasyBuild
Even nicer is this Unix shell script, which avoids unnecessary launches of the emulator:
./EasyBuild.sh
The 4 MB image will be at `BuildResults/PowerROM`.
Using a different 68k ROM image
-------------------------------
Clone https://github.com/elliotnunn/mac-rom next door to this repo, and uncomment the "Diving into mac-rom repo" lines in `EasyBuild.sh`
What's next?
------------
On NewWorld Macs, this image is extracted into RAM from a "Mac OS ROM" file at boot. Use https://github.com/elliotnunn/newworld-rom to build such a file.