diff --git a/make/createDiskImage b/make/createDiskImage index 6583071..d83e6a8 100755 --- a/make/createDiskImage +++ b/make/createDiskImage @@ -89,8 +89,20 @@ do cd "$OLDDIR" done -umount "$MOUNTDIR" -if [ $? != 0 ] +RETRIES=0 +while [ $RETRIES -lt 5 ] +do + umount "$MOUNTDIR" + if [ $? -eq 0 ] + then + break + fi + + RETRIES=`expr $RETRIES + 1` + sleep 1 +done + +if [ $RETRIES -ge 5 ] then echo Unable to unmount the disk image. cleanupAndExit diff --git a/pkg/Templates/Apple IIgs/ORCAC New Desk Accessory.xctemplate/main.c b/pkg/Templates/Apple IIgs/ORCAC New Desk Accessory.xctemplate/main.c index ddeb85d..2ea7ea7 100644 --- a/pkg/Templates/Apple IIgs/ORCAC New Desk Accessory.xctemplate/main.c +++ b/pkg/Templates/Apple IIgs/ORCAC New Desk Accessory.xctemplate/main.c @@ -32,19 +32,6 @@ static unsigned int resourceId; static Str255 gStrBuf; -BOOLEAN OpenResourceFork(void) -{ - GSString255Ptr fPtr; - unsigned id; - - id = SetHandleID(0, FindHandle((Pointer) OpenResourceFork)); - fPtr = (GSString255Ptr) LGetPathname2(id, 1); - if (toolerror() == 0) - resourceId = OpenResourceFile(1, NULL, (Pointer) fPtr); - return toolerror() == 0; -} - - void NDAClose(void) { if (ndaActive) { @@ -98,6 +85,7 @@ GrafPortPtr NDAOpen(void) oldResourceApp = GetCurResourceApp(); ResourceStartUp(userId); + pathToSelf = LGetPathname2(userId, 1); levelDCB.pCount = 2; @@ -119,7 +107,6 @@ GrafPortPtr NDAOpen(void) SetSysWindow(winPtr); ShowWindow(winPtr); SelectWindow(winPtr); - SetPort(winPtr); ndaActive = TRUE; @@ -135,7 +122,7 @@ GrafPortPtr NDAOpen(void) } -void HandleAction(void) +void HandleRun(void) { } @@ -150,6 +137,11 @@ void HandleKey(EventRecord *event) } +void HandleCursor(void) +{ +} + + void HandleMenu(int menuItem) { } @@ -157,14 +149,13 @@ void HandleMenu(int menuItem) BOOLEAN NDAAction(EventRecord *sysEvent, int code) { - int event; static EventRecord localEvent; unsigned int eventCode; BOOLEAN result = FALSE; switch (code) { case runAction: - HandleAction(); + HandleRun(); break; case eventAction: @@ -189,6 +180,10 @@ BOOLEAN NDAAction(EventRecord *sysEvent, int code) } break; + case cursorAction: + HandleCursor(); + break; + case cutAction: case copyAction: case pasteAction: