mirror of https://github.com/BOINC/boinc.git
Mac installer: fix automatic launching of Manager after installation on OS 10.5
This commit is contained in:
parent
b076a947fc
commit
a5731f9200
|
@ -547,7 +547,8 @@ int DeleteReceipt()
|
||||||
Initialize();
|
Initialize();
|
||||||
|
|
||||||
restartNeeded = IsRestartNeeded();
|
restartNeeded = IsRestartNeeded();
|
||||||
// print_to_log_file("IsRestartNeeded() returned %d\n", (int)restartNeeded);
|
printf("IsRestartNeeded() returned %d\n", (int)restartNeeded);
|
||||||
|
fflush(stdout);
|
||||||
|
|
||||||
brandID = GetBrandID();
|
brandID = GetBrandID();
|
||||||
|
|
||||||
|
@ -568,8 +569,9 @@ int DeleteReceipt()
|
||||||
for (i=0; i<15; i++) { // Wait 15 seconds max for installer to quit
|
for (i=0; i<15; i++) { // Wait 15 seconds max for installer to quit
|
||||||
sleep (1);
|
sleep (1);
|
||||||
if (err == noErr)
|
if (err == noErr)
|
||||||
if (FindProcessPID(NULL, installerPID) == 0)
|
if (FindProcessPID(NULL, installerPID) == 0) {
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -594,6 +596,9 @@ Boolean IsRestartNeeded() {
|
||||||
int value;
|
int value;
|
||||||
|
|
||||||
restartNeededFile = fopen("/tmp/BOINC_restart_flag", "r");
|
restartNeededFile = fopen("/tmp/BOINC_restart_flag", "r");
|
||||||
|
if (!restartNeededFile) {
|
||||||
|
restartNeededFile = fopen("/private/tmp/BOINC_restart_flag", "r");
|
||||||
|
}
|
||||||
if (restartNeededFile) {
|
if (restartNeededFile) {
|
||||||
fscanf(restartNeededFile,"%d", &value);
|
fscanf(restartNeededFile,"%d", &value);
|
||||||
fclose(restartNeededFile);
|
fclose(restartNeededFile);
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
# post-Install Script for Macintosh BOINC Manager for OS X revised 12/6/10
|
# post-Install Script for Macintosh BOINC Manager for OS X revised 12/6/10
|
||||||
##
|
##
|
||||||
|
|
||||||
|
echo "Starting BOINC postinstall script"
|
||||||
echo "initial directory = $PWD"
|
echo "initial directory = $PWD"
|
||||||
echo "argument 1 = $1"
|
echo "argument 1 = $1"
|
||||||
|
|
||||||
|
@ -22,7 +23,7 @@ sleep 2
|
||||||
else
|
else
|
||||||
"/tmp/PostInstall.app/Contents/MacOS/PostInstall" -part1
|
"/tmp/PostInstall.app/Contents/MacOS/PostInstall" -part1
|
||||||
sleep 2
|
sleep 2
|
||||||
"/tmp/PostInstall.app/Contents/MacOS/PostInstall" -part2 >> stdout &
|
"/tmp/PostInstall.app/Contents/MacOS/PostInstall" -part2 &
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
# post-Upgrade Script for Macintosh BOINC Manager for OS X revised 12/6/10
|
# post-Upgrade Script for Macintosh BOINC Manager for OS X revised 12/6/10
|
||||||
##
|
##
|
||||||
|
|
||||||
|
echo "Starting BOINC postupgrade script"
|
||||||
echo "initial directory = $PWD"
|
echo "initial directory = $PWD"
|
||||||
echo "argument 1 = $1"
|
echo "argument 1 = $1"
|
||||||
|
|
||||||
|
@ -22,7 +23,7 @@ sleep 2
|
||||||
else
|
else
|
||||||
"/tmp/PostInstall.app/Contents/MacOS/PostInstall" -part1
|
"/tmp/PostInstall.app/Contents/MacOS/PostInstall" -part1
|
||||||
sleep 2
|
sleep 2
|
||||||
"/tmp/PostInstall.app/Contents/MacOS/PostInstall" -part >> stdout &
|
"/tmp/PostInstall.app/Contents/MacOS/PostInstall" -part2 &
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
Loading…
Reference in New Issue