From 5f69373155aa884cfa9bd273fd663e91bb85d687 Mon Sep 17 00:00:00 2001 From: Elliot Nunn Date: Mon, 14 Jan 2019 16:36:57 +0800 Subject: [PATCH] Patch Finder to be quittable This lets you escape from the emulator with a cmd-q, which is cool. --- Build | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Build b/Build index 0ac0b1c..1cd813b 100755 --- a/Build +++ b/Build @@ -288,6 +288,17 @@ for resource in sys: resource.data = bytes(data) vol['System Folder']['System'].rsrc = make_file(sys) +# Patch the Finder to give it a Quit menu item +finder = list(parse_file(vol['System Folder']['Finder'].rsrc)) +for resource in finder: + if resource.type == b'fmnu' and b'Put Away' in resource.data: + data = bytearray(resource.data) + data[3] += 2 + data.extend(b'xxx0\0\0\0\0\x01\x2D') + data.extend(b'quit\x81\x00\x51\x00\x04Quit\0') + resource.data = bytes(data) +vol['System Folder']['Finder'].rsrc = make_file(finder) + ######################################################################## log('Writing out disk image')