mirror of
https://github.com/jeremysrand/Apple2GSBuildPipeline.git
synced 2024-11-29 16:49:24 +00:00
Clean up the ORCA/C NDA template. Add retries to the unmount step in creating the disk image because sometimes the disk is still busy.
This commit is contained in:
parent
0aeb8ac646
commit
684f1efb71
@ -89,8 +89,20 @@ do
|
|||||||
cd "$OLDDIR"
|
cd "$OLDDIR"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
RETRIES=0
|
||||||
|
while [ $RETRIES -lt 5 ]
|
||||||
|
do
|
||||||
umount "$MOUNTDIR"
|
umount "$MOUNTDIR"
|
||||||
if [ $? != 0 ]
|
if [ $? -eq 0 ]
|
||||||
|
then
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
|
||||||
|
RETRIES=`expr $RETRIES + 1`
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ $RETRIES -ge 5 ]
|
||||||
then
|
then
|
||||||
echo Unable to unmount the disk image.
|
echo Unable to unmount the disk image.
|
||||||
cleanupAndExit
|
cleanupAndExit
|
||||||
|
@ -32,19 +32,6 @@ static unsigned int resourceId;
|
|||||||
static Str255 gStrBuf;
|
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)
|
void NDAClose(void)
|
||||||
{
|
{
|
||||||
if (ndaActive) {
|
if (ndaActive) {
|
||||||
@ -98,6 +85,7 @@ GrafPortPtr NDAOpen(void)
|
|||||||
|
|
||||||
oldResourceApp = GetCurResourceApp();
|
oldResourceApp = GetCurResourceApp();
|
||||||
ResourceStartUp(userId);
|
ResourceStartUp(userId);
|
||||||
|
|
||||||
pathToSelf = LGetPathname2(userId, 1);
|
pathToSelf = LGetPathname2(userId, 1);
|
||||||
|
|
||||||
levelDCB.pCount = 2;
|
levelDCB.pCount = 2;
|
||||||
@ -119,7 +107,6 @@ GrafPortPtr NDAOpen(void)
|
|||||||
SetSysWindow(winPtr);
|
SetSysWindow(winPtr);
|
||||||
ShowWindow(winPtr);
|
ShowWindow(winPtr);
|
||||||
SelectWindow(winPtr);
|
SelectWindow(winPtr);
|
||||||
SetPort(winPtr);
|
|
||||||
|
|
||||||
ndaActive = TRUE;
|
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)
|
void HandleMenu(int menuItem)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -157,14 +149,13 @@ void HandleMenu(int menuItem)
|
|||||||
|
|
||||||
BOOLEAN NDAAction(EventRecord *sysEvent, int code)
|
BOOLEAN NDAAction(EventRecord *sysEvent, int code)
|
||||||
{
|
{
|
||||||
int event;
|
|
||||||
static EventRecord localEvent;
|
static EventRecord localEvent;
|
||||||
unsigned int eventCode;
|
unsigned int eventCode;
|
||||||
BOOLEAN result = FALSE;
|
BOOLEAN result = FALSE;
|
||||||
|
|
||||||
switch (code) {
|
switch (code) {
|
||||||
case runAction:
|
case runAction:
|
||||||
HandleAction();
|
HandleRun();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case eventAction:
|
case eventAction:
|
||||||
@ -189,6 +180,10 @@ BOOLEAN NDAAction(EventRecord *sysEvent, int code)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case cursorAction:
|
||||||
|
HandleCursor();
|
||||||
|
break;
|
||||||
|
|
||||||
case cutAction:
|
case cutAction:
|
||||||
case copyAction:
|
case copyAction:
|
||||||
case pasteAction:
|
case pasteAction:
|
||||||
|
Loading…
Reference in New Issue
Block a user