Mac installer: fix automatic launching of Manager after installation on OS 10.5

This commit is contained in:
Charlie Fenton 2014-03-10 03:30:26 -07:00
parent b076a947fc
commit a5731f9200
3 changed files with 11 additions and 4 deletions

View File

@ -547,7 +547,8 @@ int DeleteReceipt()
Initialize();
restartNeeded = IsRestartNeeded();
// print_to_log_file("IsRestartNeeded() returned %d\n", (int)restartNeeded);
printf("IsRestartNeeded() returned %d\n", (int)restartNeeded);
fflush(stdout);
brandID = GetBrandID();
@ -568,8 +569,9 @@ int DeleteReceipt()
for (i=0; i<15; i++) { // Wait 15 seconds max for installer to quit
sleep (1);
if (err == noErr)
if (FindProcessPID(NULL, installerPID) == 0)
if (FindProcessPID(NULL, installerPID) == 0) {
break;
}
}
}
@ -594,6 +596,9 @@ Boolean IsRestartNeeded() {
int value;
restartNeededFile = fopen("/tmp/BOINC_restart_flag", "r");
if (!restartNeededFile) {
restartNeededFile = fopen("/private/tmp/BOINC_restart_flag", "r");
}
if (restartNeededFile) {
fscanf(restartNeededFile,"%d", &value);
fclose(restartNeededFile);

View File

@ -4,6 +4,7 @@
# post-Install Script for Macintosh BOINC Manager for OS X revised 12/6/10
##
echo "Starting BOINC postinstall script"
echo "initial directory = $PWD"
echo "argument 1 = $1"
@ -22,7 +23,7 @@ sleep 2
else
"/tmp/PostInstall.app/Contents/MacOS/PostInstall" -part1
sleep 2
"/tmp/PostInstall.app/Contents/MacOS/PostInstall" -part2 >> stdout &
"/tmp/PostInstall.app/Contents/MacOS/PostInstall" -part2 &
fi
exit 0

View File

@ -4,6 +4,7 @@
# post-Upgrade Script for Macintosh BOINC Manager for OS X revised 12/6/10
##
echo "Starting BOINC postupgrade script"
echo "initial directory = $PWD"
echo "argument 1 = $1"
@ -22,7 +23,7 @@ sleep 2
else
"/tmp/PostInstall.app/Contents/MacOS/PostInstall" -part1
sleep 2
"/tmp/PostInstall.app/Contents/MacOS/PostInstall" -part >> stdout &
"/tmp/PostInstall.app/Contents/MacOS/PostInstall" -part2 &
fi
exit 0