diff --git a/checkin_notes b/checkin_notes index caf713139b..d07c8e0f87 100755 --- a/checkin_notes +++ b/checkin_notes @@ -11667,3 +11667,24 @@ Rom 27 Oct 2006 sg_ViewTabPage.cpp, .h sg_StaticLine.cpp, .h (Removed) sg_StaticText.cpp, .h (Removed) + +Charlie 28 Oct 2006 + - Mac: Fix bugs in screensaver when launching BOINC Client with branding: + - BOINC Data directory name does not change with branding. + - If screensaver can't locate BOINC Manager bundle using creator and + bundle ID, get branding file from BOINC Data directory. + - Branded (Grid Republic) installer places a copy of Branding file in + BOINC Data directory for use by screensaver. + - PostInstall app removes Branding file from BOINC Data directory if + performing an unbranded intall. + - Update XCode project for added and removed source files. + + clientgui/ + mac/ + mac_saver_module.cpp + mac_build/ + boinc.xcodeproj/ + project.pbxproj + mac_installer/ + PostInstall.cpp + release_GridRepublic.sh diff --git a/clientgui/mac/mac_saver_module.cpp b/clientgui/mac/mac_saver_module.cpp index 06fb6e449b..dd82549220 100755 --- a/clientgui/mac/mac_saver_module.cpp +++ b/clientgui/mac/mac_saver_module.cpp @@ -212,7 +212,7 @@ int initBOINCSaver(Boolean ispreview) { OSStatus initBOINCApp() { - char boincPath[2048], buf[256]; + char boincPath[2048]; pid_t myPid; int status; OSStatus err; @@ -242,15 +242,15 @@ OSStatus initBOINCApp() { return -1; else if (myPid == 0) // child { + // We don't customize BOINC Data directory name for branding #if 0 // Code for separate data in each user's private directory + char buf[256]; strcpy(buf, getenv("HOME")); - strcat(buf, "/Library/Application Support/"); -#else // All users share the same data - strcpy(buf, "/Library/Application Support/"); -#endif - strcat(buf, gBrandText); - strcat(buf, " Data"); + strcat(buf, "/Library/Application Support/BOINC Data"); status = chdir(buf); +#else // All users share the same data + status = chdir("/Library/Application Support/BOINC Data"); +#endif if (status) { perror("chdir"); fflush(NULL); @@ -692,16 +692,12 @@ int GetBrandID() iBrandId = 0; // Default value err = GetpathToBOINCManagerApp(buf, sizeof(buf)); - if (err) { // If we couldn't find our application bundle, try default path - strcpy(buf, "/Applications/"); - if (gBrandId) - strcat(buf, gBrandText); - else - strcat(buf, "BOINCManager"); - strcat(buf, ".app"); - } - - strcat(buf, "/Contents/Resources/Branding"); + if (err) { + // If we couldn't find our application bundle, look in BOINC Data Directory + // (the installer put a copy there for us) + strcpy(buf, "/Library/Application Support/BOINC Data/Branding"); + } else + strcat(buf, "/Contents/Resources/Branding"); FILE *f = fopen(buf, "r"); if (f) { diff --git a/mac_build/English.lproj/InfoPlist.strings b/mac_build/English.lproj/InfoPlist.strings index b12c406ca1..19feef7548 100755 --- a/mac_build/English.lproj/InfoPlist.strings +++ b/mac_build/English.lproj/InfoPlist.strings @@ -1,5 +1,5 @@ /* Localized versions of Info.plist keys */ CFBundleName = "BOINC"; -CFBundleShortVersionString = "BOINC version 5.7.0"; -CFBundleGetInfoString = "BOINC version 5.7.0, Copyright 2006 University of California."; +CFBundleShortVersionString = "BOINC version 5.7.1"; +CFBundleGetInfoString = "BOINC version 5.7.1, Copyright 2006 University of California."; diff --git a/mac_build/Info.plist b/mac_build/Info.plist index abad6dd32e..5a6bddc200 100644 --- a/mac_build/Info.plist +++ b/mac_build/Info.plist @@ -17,6 +17,6 @@ CFBundleSignature BNC! CFBundleVersion - 5.7.0 + 5.7.1 diff --git a/mac_build/Installer-Info.plist b/mac_build/Installer-Info.plist index f8d9e139e9..6f91df2f73 100644 --- a/mac_build/Installer-Info.plist +++ b/mac_build/Installer-Info.plist @@ -15,6 +15,6 @@ CFBundleSignature ???? CFBundleVersion - 5.7.0 + 5.7.1 diff --git a/mac_build/PostInstall-Info.plist b/mac_build/PostInstall-Info.plist index a56550c05d..5ed34a68b5 100644 --- a/mac_build/PostInstall-Info.plist +++ b/mac_build/PostInstall-Info.plist @@ -15,6 +15,6 @@ CFBundleSignature ???? CFBundleVersion - 5.7.0 + 5.7.1 diff --git a/mac_build/ScreenSaver-Info.plist b/mac_build/ScreenSaver-Info.plist index 670ca90f78..f3e53a58dc 100644 --- a/mac_build/ScreenSaver-Info.plist +++ b/mac_build/ScreenSaver-Info.plist @@ -17,7 +17,7 @@ CFBundleSignature ???? CFBundleVersion - 5.7.0 + 5.7.1 NSPrincipalClass BOINC_Saver_ModuleView diff --git a/mac_build/SystemMenu-Info.plist b/mac_build/SystemMenu-Info.plist index 6862e91a38..e591e05bcd 100644 --- a/mac_build/SystemMenu-Info.plist +++ b/mac_build/SystemMenu-Info.plist @@ -15,6 +15,6 @@ CFBundleSignature ???? CFBundleVersion - 5.7.0 + 5.7.1 diff --git a/mac_build/boinc.xcodeproj/project.pbxproj b/mac_build/boinc.xcodeproj/project.pbxproj index cb62a5111c..9c94a6c4fd 100755 --- a/mac_build/boinc.xcodeproj/project.pbxproj +++ b/mac_build/boinc.xcodeproj/project.pbxproj @@ -65,7 +65,6 @@ DD0C595B0816573E00CEC5D7 /* mac_saver_module.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD0C59580816573E00CEC5D7 /* mac_saver_module.cpp */; }; DD0C595D0816573E00CEC5D7 /* Mac_Saver_ModuleView.m in Sources */ = {isa = PBXBuildFile; fileRef = DD0C595A0816573E00CEC5D7 /* Mac_Saver_ModuleView.m */; }; DD0C5A8B0816711400CEC5D7 /* boinc.tiff in Resources */ = {isa = PBXBuildFile; fileRef = DD0C5A8A0816711400CEC5D7 /* boinc.tiff */; }; - DD0FB5C90AF2CCE7000CFFF9 /* sg_StaticText.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD0FB5C70AF2CCE7000CFFF9 /* sg_StaticText.cpp */; }; DD1277C2081F3E73007B5DE1 /* LoginItemAPI.c in Sources */ = {isa = PBXBuildFile; fileRef = DD1277BE081F3E73007B5DE1 /* LoginItemAPI.c */; }; DD1277C4081F3E73007B5DE1 /* PostInstall.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD1277C0081F3E73007B5DE1 /* PostInstall.cpp */; }; DD1277E6081F44C1007B5DE1 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 20286C33FDCF999611CA2CEA /* Carbon.framework */; }; @@ -80,6 +79,7 @@ DD1AFEAF0A512D8700EE5B82 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 20286C33FDCF999611CA2CEA /* Carbon.framework */; }; DD1AFEB00A512D8700EE5B82 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DD1929D80918A2F100C31BCF /* Security.framework */; }; DD1AFEE80A51301C00EE5B82 /* Installer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD1AFEE70A51301C00EE5B82 /* Installer.cpp */; }; + DD1C82310AF372D900F709AC /* sg_CustomControls.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD1C822F0AF372D900F709AC /* sg_CustomControls.cpp */; }; DD247AF90AEA308A0034104A /* SkinManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD247AF70AEA308A0034104A /* SkinManager.cpp */; }; DD247AFB0AEA308A0034104A /* SkinManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD247AF70AEA308A0034104A /* SkinManager.cpp */; }; DD2B9B40099C78D700136663 /* MoreAddrToSym.c in Sources */ = {isa = PBXBuildFile; fileRef = DD2B9B3C099C78D700136663 /* MoreAddrToSym.c */; }; @@ -218,7 +218,6 @@ DD4C561A0AD389A2009E23C6 /* sg_ImageButton.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD4C560E0AD389A2009E23C6 /* sg_ImageButton.cpp */; }; DD4C561C0AD389A2009E23C6 /* sg_ProgressBar.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD4C56100AD389A2009E23C6 /* sg_ProgressBar.cpp */; }; DD4C561E0AD389A2009E23C6 /* sg_SGUIListControl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD4C56120AD389A2009E23C6 /* sg_SGUIListControl.cpp */; }; - DD4C56200AD389A2009E23C6 /* sg_StaticLine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD4C56140AD389A2009E23C6 /* sg_StaticLine.cpp */; }; DD4DD0A207EAA648008A6468 /* BOINCTaskBar.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD81C40307C5D1020098A04D /* BOINCTaskBar.cpp */; }; DD4EC61108A0A083009AA08F /* texture.C in Sources */ = {isa = PBXBuildFile; fileRef = DD4EC60F08A0A083009AA08F /* texture.C */; }; DD4EC65A08A0A7AF009AA08F /* gui_rpc_client_ops.C in Sources */ = {isa = PBXBuildFile; fileRef = DD73E34E08A0694000656EB1 /* gui_rpc_client_ops.C */; }; @@ -912,8 +911,6 @@ DD0C59590816573E00CEC5D7 /* Mac_Saver_ModuleView.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = Mac_Saver_ModuleView.h; path = ../clientgui/mac/Mac_Saver_ModuleView.h; sourceTree = SOURCE_ROOT; }; DD0C595A0816573E00CEC5D7 /* Mac_Saver_ModuleView.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = Mac_Saver_ModuleView.m; path = ../clientgui/mac/Mac_Saver_ModuleView.m; sourceTree = SOURCE_ROOT; }; DD0C5A8A0816711400CEC5D7 /* boinc.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = boinc.tiff; path = ../clientgui/mac/boinc.tiff; sourceTree = SOURCE_ROOT; }; - DD0FB5C70AF2CCE7000CFFF9 /* sg_StaticText.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = sg_StaticText.cpp; path = ../clientgui/sg_StaticText.cpp; sourceTree = SOURCE_ROOT; }; - DD0FB5C80AF2CCE7000CFFF9 /* sg_StaticText.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = sg_StaticText.h; path = ../clientgui/sg_StaticText.h; sourceTree = SOURCE_ROOT; }; DD1277B3081F3D67007B5DE1 /* Postinstall.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Postinstall.app; sourceTree = BUILT_PRODUCTS_DIR; }; DD1277B5081F3D67007B5DE1 /* PostInstall-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = "PostInstall-Info.plist"; sourceTree = ""; }; DD1277BE081F3E73007B5DE1 /* LoginItemAPI.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = LoginItemAPI.c; path = ../mac_installer/LoginItemAPI.c; sourceTree = SOURCE_ROOT; }; @@ -926,6 +923,8 @@ DD1AFE8F0A512D2600EE5B82 /* Installer-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = "Installer-Info.plist"; sourceTree = ""; }; DD1AFEBA0A512D8700EE5B82 /* BOINC Installer.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "BOINC Installer.app"; sourceTree = BUILT_PRODUCTS_DIR; }; DD1AFEE70A51301C00EE5B82 /* Installer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Installer.cpp; path = ../mac_installer/Installer.cpp; sourceTree = SOURCE_ROOT; }; + DD1C822F0AF372D900F709AC /* sg_CustomControls.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = sg_CustomControls.cpp; path = ../clientgui/sg_CustomControls.cpp; sourceTree = SOURCE_ROOT; }; + DD1C82300AF372D900F709AC /* sg_CustomControls.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = sg_CustomControls.h; path = ../clientgui/sg_CustomControls.h; sourceTree = SOURCE_ROOT; }; DD1F0ACD0822069E00AFC5FA /* MacGUI.pch */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = MacGUI.pch; path = ../clientgui/mac/MacGUI.pch; sourceTree = SOURCE_ROOT; }; DD247AF70AEA308A0034104A /* SkinManager.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = SkinManager.cpp; path = ../clientgui/SkinManager.cpp; sourceTree = SOURCE_ROOT; }; DD247AF80AEA308A0034104A /* SkinManager.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = SkinManager.h; path = ../clientgui/SkinManager.h; sourceTree = SOURCE_ROOT; }; @@ -1024,8 +1023,6 @@ DD4C56110AD389A2009E23C6 /* sg_ProgressBar.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = sg_ProgressBar.h; path = ../clientgui/sg_ProgressBar.h; sourceTree = SOURCE_ROOT; }; DD4C56120AD389A2009E23C6 /* sg_SGUIListControl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = sg_SGUIListControl.cpp; path = ../clientgui/sg_SGUIListControl.cpp; sourceTree = SOURCE_ROOT; }; DD4C56130AD389A2009E23C6 /* sg_SGUIListControl.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = sg_SGUIListControl.h; path = ../clientgui/sg_SGUIListControl.h; sourceTree = SOURCE_ROOT; }; - DD4C56140AD389A2009E23C6 /* sg_StaticLine.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = sg_StaticLine.cpp; path = ../clientgui/sg_StaticLine.cpp; sourceTree = SOURCE_ROOT; }; - DD4C56150AD389A2009E23C6 /* sg_StaticLine.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = sg_StaticLine.h; path = ../clientgui/sg_StaticLine.h; sourceTree = SOURCE_ROOT; }; DD4EC60F08A0A083009AA08F /* texture.C */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = texture.C; path = ../api/texture.C; sourceTree = SOURCE_ROOT; }; DD4EC61008A0A083009AA08F /* texture.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = texture.h; path = ../api/texture.h; sourceTree = SOURCE_ROOT; }; DD58C41808F3343F00C1DF66 /* AccountInfoPage.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = AccountInfoPage.cpp; path = ../clientgui/AccountInfoPage.cpp; sourceTree = SOURCE_ROOT; }; @@ -1559,6 +1556,8 @@ DD4C560A0AD389A2009E23C6 /* sg_ClientStateIndicator.cpp */, DD4C560B0AD389A2009E23C6 /* sg_ClientStateIndicator.h */, DD4C560C0AD389A2009E23C6 /* sg_DlgMessages.cpp */, + DD1C822F0AF372D900F709AC /* sg_CustomControls.cpp */, + DD1C82300AF372D900F709AC /* sg_CustomControls.h */, DD4C560D0AD389A2009E23C6 /* sg_DlgMessages.h */, DDCAD7D30A6C603A0086C7EE /* sg_DlgPreferences.cpp */, DDCAD7D40A6C603A0086C7EE /* sg_DlgPreferences.h */, @@ -1572,10 +1571,6 @@ DDCE783F0A70BF72008218B6 /* sg_ProjectsComponent.h */, DD4C56120AD389A2009E23C6 /* sg_SGUIListControl.cpp */, DD4C56130AD389A2009E23C6 /* sg_SGUIListControl.h */, - DD4C56140AD389A2009E23C6 /* sg_StaticLine.cpp */, - DD4C56150AD389A2009E23C6 /* sg_StaticLine.h */, - DD0FB5C70AF2CCE7000CFFF9 /* sg_StaticText.cpp */, - DD0FB5C80AF2CCE7000CFFF9 /* sg_StaticText.h */, DDCAD7D90A6C603A0086C7EE /* sg_StatImageLoader.cpp */, DDCAD7DA0A6C603A0086C7EE /* sg_StatImageLoader.h */, DDCAD7DB0A6C603A0086C7EE /* sg_ViewTabPage.cpp */, @@ -2709,10 +2704,9 @@ DD4C561A0AD389A2009E23C6 /* sg_ImageButton.cpp in Sources */, DD4C561C0AD389A2009E23C6 /* sg_ProgressBar.cpp in Sources */, DD4C561E0AD389A2009E23C6 /* sg_SGUIListControl.cpp in Sources */, - DD4C56200AD389A2009E23C6 /* sg_StaticLine.cpp in Sources */, DD67F8140ADB9DD000B0015E /* wxPieCtrl.cpp in Sources */, DD247AF90AEA308A0034104A /* SkinManager.cpp in Sources */, - DD0FB5C90AF2CCE7000CFFF9 /* sg_StaticText.cpp in Sources */, + DD1C82310AF372D900F709AC /* sg_CustomControls.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/mac_installer/PostInstall.cpp b/mac_installer/PostInstall.cpp index 7daa388c6c..6decd782da 100755 --- a/mac_installer/PostInstall.cpp +++ b/mac_installer/PostInstall.cpp @@ -273,6 +273,7 @@ int main(int argc, char *argv[]) } else { system ("rm -rf /Applications/GridRepublic\\ Desktop.app"); // Installing BOINC over GridRepublic system ("rm -rf /Library/Screen\\ Savers/GridRepublic.saver"); // Installing BOINC over GridRepublic + system ("rm -f /Library/Application\\ Support/BOINC\\ Data/Branding"); // Installing BOINC over GridRepublic err_fsref = FSPathMakeRef((StringPtr)"/Applications/BOINCManager.app", &fileRef, NULL); } diff --git a/mac_installer/release_GridRepublic.sh b/mac_installer/release_GridRepublic.sh index f8c7025924..9fdbb08f9f 100644 --- a/mac_installer/release_GridRepublic.sh +++ b/mac_installer/release_GridRepublic.sh @@ -116,7 +116,9 @@ cp -fpR "$BUILDPATH/switcher" "${PR_PATH}/Library/Application Support/BOINC Data cp -fpR "$BUILDPATH/setprojectgrp" "${PR_PATH}/Library/Application Support/BOINC Data/switcher/" cp -fpR "$BUILDPATH/AppStats" "${PR_PATH}/Library/Application Support/BOINC Data/switcher/" -cp -fpR curl/ca-bundle.crt "${PR_PATH}/Library/Application Support/BOINC Data/" +## Put Branding file into BOINC Data folder to make it available to screensaver +cp -fp "${BRANDING_FILE}" "${PR_PATH}/Library/Application Support/BOINC Data/Branding" +cp -fp curl/ca-bundle.crt "${PR_PATH}/Library/Application Support/BOINC Data/" cp -fpR "$BUILDPATH/BOINCManager.app" "${PR_PATH}/Applications/" @@ -149,7 +151,7 @@ sed -i "" s/BOINC/"${BRAND_NAME}"/g "${PR_PATH}/Applications/${MANAGER_NAME}.app cp -fp "clientgui/res/${ICNS_FILE}" "${PR_PATH}/Applications/${MANAGER_NAME}.app/Contents/Resources/${ICNS_FILE}" rm -f "${PR_PATH}/Applications/${MANAGER_NAME}.app/Contents/Resources/BOINCMgr.icns" -# Copy Branding file into both Application Bundle and Installer Package +# Copy Branding file into both Application Bundle and Installer Package\ cp -fp "${BRANDING_FILE}" "${PR_PATH}/Applications/${MANAGER_NAME}.app/Contents/Resources/Branding" cp -fp "${BRANDING_FILE}" "${IR_PATH}/Branding"