diff --git a/checkin_notes b/checkin_notes index 67a91ab496..5aa5b9136b 100755 --- a/checkin_notes +++ b/checkin_notes @@ -6848,7 +6848,13 @@ Charlie 21 may 2005 Mac: If core client exits screensaver mode but Mac screensaver engine doesn't (as in the case of a mouse button click with no mouse movement) then show message "BOINC is no longer in screensaver mode." + Update installer to work around problems launching BOINC Manager. clientgui/ mac/ mac_saver_module.cpp + mac_installer/ + postinstall + postupgrade + PostInstall.cpp + diff --git a/mac_installer/PostInstall.cpp b/mac_installer/PostInstall.cpp index 825d451882..adfe38606d 100755 --- a/mac_installer/PostInstall.cpp +++ b/mac_installer/PostInstall.cpp @@ -48,8 +48,9 @@ int main(int argc, char *argv[]) long response; ProcessSerialNumber ourProcess, installerPSN; short itemHit; - int NumberOfLoginItems, Counter, i; - pid_t myPid = 0, installerPID = 0; + int NumberOfLoginItems, Counter; + pid_t installerPID = 0; + FSRef fileRef; OSStatus err; Initialize(); @@ -82,6 +83,10 @@ int main(int argc, char *argv[]) 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 @@ -111,7 +116,10 @@ int main(int argc, char *argv[]) Success = AddLoginItemWithPropertiesToUser(kCurrentUser, "/Applications/BOINCManager.app", kDoNotHideOnLaunch); - + +#if 0 + int i; + pid_t myPid = 0; // Fork a process to launch the BOINCManager after the installer quits if ( (myPid = fork()) < 0) // error @@ -126,6 +134,7 @@ int main(int argc, char *argv[]) system("/Applications/BOINCManager.app/Contents/MacOS/BOINCManager"); } // We get here if parent (myPID > 0) +#endif return 0; } diff --git a/mac_installer/postinstall b/mac_installer/postinstall index 9b94facb38..4c5f9a10f5 100644 --- a/mac_installer/postinstall +++ b/mac_installer/postinstall @@ -1,11 +1,11 @@ #!/bin/csh ## -# post-Install Script for Macintosh BOINC Manager for OS X revised 4/26/05 +# post-Install Script for Macintosh BOINC Manager for OS X revised 5/21/05 ## -cd "$1" -/ Run the Postinstall Application -Contents/Resources/PostInstall.app/Contents/MacOS/PostInstall - chmod -R a+s /Applications/BOINCManager.app + +cd "$1" +# Run the Postinstall Application +Contents/Resources/PostInstall.app/Contents/MacOS/PostInstall diff --git a/mac_installer/postupgrade b/mac_installer/postupgrade index f99e866f8e..d5d80c966f 100755 --- a/mac_installer/postupgrade +++ b/mac_installer/postupgrade @@ -1,11 +1,11 @@ #!/bin/csh ## -# post-Upgrade Script for Macintosh BOINC Manager for OS X revised 4/26/05 +# post-Upgrade Script for Macintosh BOINC Manager for OS X revised 5/21/05 ## -cd "$1" -/ Run the Postinstall Application -Contents/Resources/PostInstall.app/Contents/MacOS/PostInstall - chmod -R a+s /Applications/BOINCManager.app + +cd "$1" +# Run the Postinstall Application +Contents/Resources/PostInstall.app/Contents/MacOS/PostInstall