*** empty log message ***

svn path=/trunk/boinc/; revision=6215
This commit is contained in:
Charlie Fenton 2005-05-22 11:12:16 +00:00
parent 6d2b5ffe4e
commit e2a98fe17e
4 changed files with 24 additions and 27 deletions

View File

@ -6883,3 +6883,12 @@ Rom 21 May 2005
api/
windows_opengl.C
Charlie 21 may 2005
Fix problems launching BOINC Manager from installer.
mac_installer/
postinstall
postupgrade
PostInstall.cpp

View File

@ -48,7 +48,7 @@ int main(int argc, char *argv[])
long response;
ProcessSerialNumber ourProcess, installerPSN;
short itemHit;
int NumberOfLoginItems, Counter;
int NumberOfLoginItems, Counter, i;
pid_t installerPID = 0;
FSRef fileRef;
OSStatus err;
@ -74,23 +74,17 @@ int main(int argc, char *argv[])
StandardAlert (kAlertStopAlert, "\pSorry, BOINC requires system 10.3 or higher.",
NULL, NULL, &itemHit);
err = kill(installerPID, SIGKILL);
// Remove everything we've installed
system ("rm -rf /Applications/BOINCManager.app");
system ("rm -rf /Library/Screen\\ Savers/BOINCSaver.saver");
system ("rm -rf /Library/Application\\ Support/BOINC\\ Data");
system ("rm -rf /Library/Receipts/BOINC.pkg");
err = kill(installerPID, SIGKILL);
ExitToShell();
}
err = FSPathMakeRef((StringPtr)"/Applications/BOINCManager.app", &fileRef, NULL);
if (err == noErr)
err = LSOpenFSRef(&fileRef, NULL);
// *****************************************************************************************
// Everything after this REQUIRES us to be setuid to the login user's user ID
// *****************************************************************************************
// Installer is running as root. We must setuid back to the logged in user
// in order to add a startup item to the user's login preferences
@ -117,24 +111,18 @@ int main(int argc, char *argv[])
Success = AddLoginItemWithPropertiesToUser(kCurrentUser,
"/Applications/BOINCManager.app", kDoNotHideOnLaunch);
#if 0
int i;
pid_t myPid = 0;
// Launch BOINC Manager when user closes installer or after 15 seconds
// Fork a process to launch the BOINCManager after the installer quits
if ( (myPid = fork()) < 0) // error
return -1;
else if (myPid == 0) { // child
for (i=0; i<15; i++) { // Wait 15 seconds max for installer to quit
sleep (1);
if (FindProcessPID(installerPID) == 0)
break;
}
system("/Applications/BOINCManager.app/Contents/MacOS/BOINCManager");
}
// We get here if parent (myPID > 0)
#endif
err = FSPathMakeRef((StringPtr)"/Applications/BOINCManager.app", &fileRef, NULL);
if (err == noErr)
err = LSOpenFSRef(&fileRef, NULL);
return 0;
}

View File

@ -8,4 +8,4 @@ chmod -R a+s /Applications/BOINCManager.app
cd "$1"
# Run the Postinstall Application
Contents/Resources/PostInstall.app/Contents/MacOS/PostInstall
Contents/Resources/PostInstall.app/Contents/MacOS/PostInstall &

View File

@ -8,4 +8,4 @@ chmod -R a+s /Applications/BOINCManager.app
cd "$1"
# Run the Postinstall Application
Contents/Resources/PostInstall.app/Contents/MacOS/PostInstall
Contents/Resources/PostInstall.app/Contents/MacOS/PostInstall &