From 5c2ef2002d31eaa64a13689b89e8251e24c7321a Mon Sep 17 00:00:00 2001 From: Charlie Fenton Date: Mon, 23 Jan 2006 13:16:28 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=9287 --- checkin_notes | 35 +++- clientgui/BOINCGUIApp.cpp | 15 +- clientgui/mac/SetVersion.C | 8 - mac_build/GR-InfoPlist.strings | 5 - mac_build/GR-ScreenSaver-Info.plist | 24 --- .../{GR_Info.plist => Installer-Info.plist} | 10 +- mac_build/boinc.xcodeproj/project.pbxproj | 8 - mac_installer/GR-Description.plist | 10 -- mac_installer/GR-ReadMe.rtf | 26 +-- mac_installer/GR-preinstall | 11 -- mac_installer/GR-preupgrade | 11 -- mac_installer/PostInstall.cpp | 24 +-- mac_installer/preinstall | 2 +- mac_installer/preupgrade | 11 -- mac_installer/release_GridRepublic.sh | 167 +++++++++++------- mac_installer/release_boinc.sh | 8 +- 16 files changed, 179 insertions(+), 196 deletions(-) delete mode 100644 mac_build/GR-InfoPlist.strings delete mode 100644 mac_build/GR-ScreenSaver-Info.plist rename mac_build/{GR_Info.plist => Installer-Info.plist} (72%) delete mode 100644 mac_installer/GR-Description.plist delete mode 100644 mac_installer/GR-preinstall delete mode 100644 mac_installer/GR-preupgrade delete mode 100644 mac_installer/preupgrade diff --git a/checkin_notes b/checkin_notes index 76cb587c10..b76ca875ab 100755 --- a/checkin_notes +++ b/checkin_notes @@ -719,7 +719,7 @@ David 20 Jan 2006 ViewStatistics.C,h Charlie 21 Jan 2006 - -Mac: Changes for Grid Republic: manager determinea branding before + -Mac: Changes for Grid Republic: manager determines branding before launching client; create new release script for GR; GR screen saver displays GR icon in system preferences dialog; data directory is "GridRepublic Data" if a GR install; installing BOINC over an @@ -818,3 +818,36 @@ Rom 23 Jan 2006 Makefile.am ViewProjects.cpp ViewWork.cpp + +Charlie 23 Jan 2006 + -Mac: Improve GridRepublic release script so it uses sed commands + to convert standard BOINC plist, preinstall and preupgrade files + for Grid Republic; standard BOINC release script creates preupgrade + script by copying preinstall script; these changes eliminate the + need for seven files I checked in earlier. + Also generalize Grid Republic release script so it can easily be + modified for other brands by changing a few variable definitions. + Changed name of GR Manager to "GridRepublic Manager" from just + "GridRepublic." + + + mac/ + SetVersion.C + + mac_build/ + GR_Info.plist (Remove) + GR-InfoPlist.strings (Remove) + GR-ScreenSaver-Info.plist (Remove) + boinc.xcodeproj/ + project.pbxproj + + mac_installer/ + GR-ReadMe.rtf + PostInstall.cpp + preinstall + release_boinc.sh + release_GridRepublic.sh + preupgrade (Remove) + GR-Description.plist (Remove) + GR-preinstall (Remove) + GR-preupgrade (Remove) diff --git a/clientgui/BOINCGUIApp.cpp b/clientgui/BOINCGUIApp.cpp index 80c27560e4..3709c44e42 100644 --- a/clientgui/BOINCGUIApp.cpp +++ b/clientgui/BOINCGUIApp.cpp @@ -220,6 +220,13 @@ bool CBOINCGUIApp::OnInit() { } #endif + + // Setup the branding scheme + m_pBranding = new CBrandingScheme; + wxASSERT(m_pBranding); + + m_pBranding->OnInit(m_pConfig); + #ifdef __WXMAC__ wxString strDirectory = wxEmptyString; @@ -264,14 +271,6 @@ bool CBOINCGUIApp::OnInit() { m_pConfig->SetPath(wxT("/")); - - // Setup the branding scheme - m_pBranding = new CBrandingScheme; - wxASSERT(m_pBranding); - - m_pBranding->OnInit(m_pConfig); - - // Initialize the BOINC Diagnostics Framework int dwDiagnosticsFlags = BOINC_DIAG_DUMPCALLSTACKENABLED | diff --git a/clientgui/mac/SetVersion.C b/clientgui/mac/SetVersion.C index 5958bc3e36..aedc74f472 100644 --- a/clientgui/mac/SetVersion.C +++ b/clientgui/mac/SetVersion.C @@ -38,23 +38,15 @@ int main(int argc, char** argv) { err = FixInfoPlist_Strings("./English.lproj/InfoPlist.strings", "BOINC"); if (err) retval = err; - err = FixInfoPlist_Strings("./GR-InfoPlist.strings", "GridRepublic"); - if (err) retval = err; err = FixInfoPlistFile("./Info.plist"); if (err) retval = err; - err = FixInfoPlistFile("./GR_Info.plist"); - if (err) retval = err; err = FixInfoPlistFile("./Installer-Info.plist"); if (err) retval = err; err = FixInfoPlistFile("./ScreenSaver-Info.plist"); if (err) retval = err; - err = FixInfoPlistFile("./GR-ScreenSaver-Info.plist"); - if (err) retval = err; err = FixInfoPlistFile("./SystemMenu-Info.plist"); if (err) retval = err; err = MakeInstallerInfoPlistFile("./Pkg-Info.plist", "BOINC Manager"); - if (err) retval = err; - err = MakeInstallerInfoPlistFile("./GR-Pkg-Info.plist", "GridRepublic"); return retval; } diff --git a/mac_build/GR-InfoPlist.strings b/mac_build/GR-InfoPlist.strings deleted file mode 100644 index 3ef7f33b8b..0000000000 --- a/mac_build/GR-InfoPlist.strings +++ /dev/null @@ -1,5 +0,0 @@ -/* Localized versions of Info.plist keys */ - -CFBundleName = "GridRepublic"; -CFBundleShortVersionString = "GridRepublic version 5.3.13"; -CFBundleGetInfoString = "GridRepublic version 5.3.13, Copyright 2005 University of California."; diff --git a/mac_build/GR-ScreenSaver-Info.plist b/mac_build/GR-ScreenSaver-Info.plist deleted file mode 100644 index b2ab7528d1..0000000000 --- a/mac_build/GR-ScreenSaver-Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - GridRepublic - CFBundleIdentifier - edu.berkeley.boincsaver - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - GridRepublic - CFBundlePackageType - BNDL - CFBundleSignature - ???? - CFBundleVersion - 5.3.13 - NSPrincipalClass - BOINC_Saver_ModuleView - - diff --git a/mac_build/GR_Info.plist b/mac_build/Installer-Info.plist similarity index 72% rename from mac_build/GR_Info.plist rename to mac_build/Installer-Info.plist index 28b13fd44d..cc2e758f32 100644 --- a/mac_build/GR_Info.plist +++ b/mac_build/Installer-Info.plist @@ -5,20 +5,16 @@ CFBundleDevelopmentRegion English CFBundleExecutable - GridRepublic - CFBundleIconFile - GridRepublic.icns + PostInstall CFBundleIdentifier - edu.berkeley.boinc + edu.berkeley.boinc.Installer CFBundleInfoDictionaryVersion 6.0 CFBundlePackageType APPL CFBundleSignature - BNC! + ???? CFBundleVersion 5.3.13 - NSUIElement - 1 diff --git a/mac_build/boinc.xcodeproj/project.pbxproj b/mac_build/boinc.xcodeproj/project.pbxproj index e226d5760a..eeadc93db7 100755 --- a/mac_build/boinc.xcodeproj/project.pbxproj +++ b/mac_build/boinc.xcodeproj/project.pbxproj @@ -872,11 +872,7 @@ DDF166A908DF898A00C8C4A5 /* mac_backtrace.C */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = mac_backtrace.C; path = ../lib/mac_backtrace.C; sourceTree = SOURCE_ROOT; }; DDF166AA08DF898A00C8C4A5 /* mac_backtrace.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = mac_backtrace.h; path = ../lib/mac_backtrace.h; sourceTree = SOURCE_ROOT; }; DDF1F47A09822C3400482C89 /* preinstall */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.csh; name = preinstall; path = ../mac_installer/preinstall; sourceTree = SOURCE_ROOT; }; - DDF1F47B09822C3400482C89 /* preupgrade */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.csh; name = preupgrade; path = ../mac_installer/preupgrade; sourceTree = SOURCE_ROOT; }; DDF1F4A409822F8A00482C89 /* GR-Branding */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; name = "GR-Branding"; path = "../mac_installer/GR-Branding"; sourceTree = SOURCE_ROOT; }; - DDF1F4BC0982307300482C89 /* GR-preinstall */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.csh; name = "GR-preinstall"; path = "../mac_installer/GR-preinstall"; sourceTree = SOURCE_ROOT; }; - DDF1F4BD0982307300482C89 /* GR-preupgrade */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.csh; name = "GR-preupgrade"; path = "../mac_installer/GR-preupgrade"; sourceTree = SOURCE_ROOT; }; - DDF1F5550982531600482C89 /* GR-ScreenSaver-Info.plist */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.xml; path = "GR-ScreenSaver-Info.plist"; sourceTree = SOURCE_ROOT; }; DDF3028907CCCE2C00701169 /* BOINCMgr.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = BOINCMgr.icns; path = ../client/mac/BOINCMgr.icns; sourceTree = SOURCE_ROOT; }; DDF9385407E28906004DC076 /* checkin_notes */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; name = checkin_notes; path = ../checkin_notes; sourceTree = SOURCE_ROOT; }; F5159562029EB02001F5651B /* md5.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = md5.c; path = ../lib/md5.c; sourceTree = SOURCE_ROOT; }; @@ -1048,7 +1044,6 @@ DD40CDFA07F0386B0096C645 /* SystemMenu-Info.plist */, DD96AFFA0811075100A06F22 /* ScreenSaver-Info.plist */, DD1277B5081F3D67007B5DE1 /* Installer-Info.plist */, - DDF1F5550982531600482C89 /* GR-ScreenSaver-Info.plist */, ); name = "«PROJECTNAME»"; sourceTree = ""; @@ -1087,11 +1082,8 @@ DD1277BF081F3E73007B5DE1 /* LoginItemAPI.h */, DD1277C0081F3E73007B5DE1 /* PostInstall.cpp */, DDF1F47A09822C3400482C89 /* preinstall */, - DDF1F47B09822C3400482C89 /* preupgrade */, DDB8D5A5081FC8C700A5A1E8 /* postinstall */, DD127880081F464E007B5DE1 /* postupgrade */, - DDF1F4BC0982307300482C89 /* GR-preinstall */, - DDF1F4BD0982307300482C89 /* GR-preupgrade */, ); name = mac_installer; sourceTree = SOURCE_ROOT; diff --git a/mac_installer/GR-Description.plist b/mac_installer/GR-Description.plist deleted file mode 100644 index aeb3dbff00..0000000000 --- a/mac_installer/GR-Description.plist +++ /dev/null @@ -1,10 +0,0 @@ - - - - - IFPkgDescriptionDescription - - IFPkgDescriptionTitle - GridRepublic - - diff --git a/mac_installer/GR-ReadMe.rtf b/mac_installer/GR-ReadMe.rtf index 6a2b303d99..3a3594e821 100644 --- a/mac_installer/GR-ReadMe.rtf +++ b/mac_installer/GR-ReadMe.rtf @@ -6,7 +6,7 @@ \margl1440\margr1440\vieww9000\viewh9000\viewkind0 \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\qc -\f0\b\fs28 \cf0 Macintosh GridRepublic Version 5.2.14 Release Notes\ +\f0\b\fs28 \cf0 Macintosh GridRepublic Manager Version 5.2.14 Release Notes\ \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural \f1\b0\fs24 \cf0 \ @@ -19,7 +19,7 @@ \f0\b \cf0 Troubleshooting tip: \f1\b0 The installer writes a file /Library/Receipts/GridRepublic.pkg. If the installer refuses to let you install, trash this file and try again.\ \ -GridRepublic requires Macintosh OS X version 10.3 or greater.\ +GridRepublic Manager requires Macintosh OS X version 10.3 or greater.\ \ Although this installer adds the GridRepublic screen saver to your system, it does not change your screen saver settings. To select GridRepublic as your screen saver, use the Screen Saver or Screen Effects panel in the System Preferences (accessible from the Apple menu). \ \ @@ -27,29 +27,29 @@ It may take a minute after the screen saver starts before the science applicatio \ Note: on some versions of the Mac OS, you may not be able to exit the GridRepublic screen saver by moving the mouse; you may need to press the mouse button or press any key on the keyboard to exit. \ \ -The installer places two items onto your hard drive: GridRepublic.app in your /Applications folder and GridRepublicSaver.saver in your /Library/Screen Savers folder. \ +The installer places two items onto your hard drive: GridRepublic Manager.app in your /Applications folder and GridRepublic.saver in your /Library/Screen Savers folder. \ \ -It also sets GridRepublic as one of the items to automatically start whenever the user is logged in. You can add or remove Login Items by using the Accounts Pane in the System Preferences (accessible from the Apple menu). (These items are called "Login Items" in OS 10.4 or "Startup Items" in OS 10.3.)\ +It also sets GridRepublic Manager as one of the items to automatically start whenever the user is logged in. You can add or remove Login Items by using the Accounts Pane in the System Preferences (accessible from the Apple menu). (These items are called "Login Items" in OS 10.4 or "Startup Items" in OS 10.3.)\ \ The installer creates the GridRepublic Data folder in your /Library/Application Support folder. If you have previously been running GridRepublic in a different folder, copy your data into this folder. \ \ -All users who log in on the same Macintosh will share one set of GridRepublic data, ensuring that work units are processed in the most timely manner. However, the installer sets GridRepublic as a Startup item only for the user who ran the installer. To have GridRepublic start automatically when other users log in, add it to each user's Startup Items as described above.\ +All users who log in on the same Macintosh will share one set of GridRepublic data, ensuring that work units are processed in the most timely manner. However, the installer sets GridRepublic Manager as a Startup item only for the user who ran the installer. To have GridRepublic Manager start automatically when other users log in, add it to each user's Startup Items as described above.\ \ -You can move GridRepublic to any folder you wish. If you do so, you will need to update the information in each user's Startup Items. In most cases, the GridRepublic screen saver should still work properly. If it does not, move GridRepublic back to the Applications folder.\ +You can move GridRepublic Manager to any folder you wish. If you do so, you will need to update the information in each user's Startup Items. In most cases, the GridRepublic screen saver should still work properly. If it does not, move GridRepublic Manager back to the Applications folder.\ \ -The installer sets the "setuid" permission flag for the GridRepublic, which allows it to write to the shared GridRepublic Data regardless of which user is logged in. If you copy GridRepublic or the GridRepublic core client to your computer without using the installer, some users may not be able to run it properly.\ +The installer sets the "setuid" permission flag for the GridRepublic Manager, which allows it to write to the shared GridRepublic Data regardless of which user is logged in. If you copy GridRepublic Manager or the GridRepublic core client to your computer without using the installer, some users may not be able to run it properly.\ \ \pard\pardeftab720\ql\qnatural \cf0 To completely remove ( \f0\b uninstall \f1\b0 ) GridRepublic from your Macintosh:\ \pard\tx220\tx720\pardeftab720\li720\fi-720\ql\qnatural -\ls1\ilvl0\cf0 \'a5 Move the following files to the trash:\ +\ls1\ilvl0\cf0 {\listtext \'a5 }\'a5 Move the following files to the trash:\ \pard\tx940\tx1440\pardeftab720\li1200\fi-1200\ql\qnatural -\ls1\ilvl1\cf0 \'a5 GridRepublic.app (from your +\ls1\ilvl1\cf0 \'a5 GridRepublic Manager.app (from your \f0\b /Applications/ \f1\b0 folder)\ - \'a5 GridRepublicSaver.saver (from your + \'a5 GridRepublic.saver (from your \f0\b /Library/Screen Savers/ \f1\b0 folder)\ \'a5 the @@ -58,17 +58,17 @@ The installer sets the "setuid" permission flag for the GridRepublic, which allo \f0\b /Library/Applications Support/ \f1\b0 folder.)\ \pard\tx220\tx720\pardeftab720\li400\fi-400\ql\qnatural -\ls1\ilvl0\cf0 \'a5 Open the +\ls1\ilvl0\cf0 {\listtext \'a5 }\'a5 Open the \f0\b Accounts \f1\b0 pane in the \f0\b System Preferences -\f1\b0 (accessible from the Apple menu), and remove GridRepublic from your list of +\f1\b0 (accessible from the Apple menu), and remove GridRepublic Manager from your list of \f0\b Login Items \f1\b0 (or \f0\b Startup Items \f1\b0 under OS 10.3.)\ \pard\tx220\tx720\pardeftab720\li360\fi-360\ql\qnatural -\ls1\ilvl0\cf0 \'a5 Open +\ls1\ilvl0\cf0 {\listtext \'a5 }\'a5 Open \f0\b System Preferences \f1\b0 from the Apple menu. Select \f0\b Desktop & Screen Saver diff --git a/mac_installer/GR-preinstall b/mac_installer/GR-preinstall deleted file mode 100644 index d4bbb28016..0000000000 --- a/mac_installer/GR-preinstall +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/csh - -## -# Pre-Install Script for Macintosh GridRepublic for OS X revised 1/21/06 -## - - -# If we are replacing an earlier BOINC installation, fix the data directory name before installing -mv -n "/Library/Application Support/BOINC Data" "/Library/Application Support/GridRepublic Data" - -exit 0 diff --git a/mac_installer/GR-preupgrade b/mac_installer/GR-preupgrade deleted file mode 100644 index ae8e2a81d2..0000000000 --- a/mac_installer/GR-preupgrade +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/csh - -## -# Pre-Upgrade Script for Macintosh GridRepublic for OS X revised 1/21/06 -## - - -# If we are replacing an earlier BOINC installation, fix the data directory name before installing -mv -n "/Library/Application Support/BOINC Data" "/Library/Application Support/GridRepublic Data" - -exit 0 diff --git a/mac_installer/PostInstall.cpp b/mac_installer/PostInstall.cpp index ff2bec12a8..2153164e4b 100755 --- a/mac_installer/PostInstall.cpp +++ b/mac_installer/PostInstall.cpp @@ -85,7 +85,7 @@ int main(int argc, char *argv[]) if (brandID == 1) { StandardAlert (kAlertStopAlert, "\pSorry, GridRepublic requires system 10.3 or higher.", NULL, NULL, &itemHit); - system ("rm -rf /Applications/GridRepublic.app"); + system ("rm -rf /Applications/GridRepublic\\ Manager.app"); system ("rm -rf /Library/Screen\\ Savers/GridRepublic.saver"); system ("rm -rf /Library/Application\\ Support/GridRepublic\\ Data"); system ("rm -rf /Library/Receipts/GridRepublic.pkg"); @@ -135,7 +135,7 @@ int main(int argc, char *argv[]) // Set owner of BOINCManager and contents, including core client if (brandID == 1) { - sprintf(s, "chown -Rf %s /Applications/GridRepublic.app", p); + sprintf(s, "chown -Rf %s /Applications/GridRepublic\\ Manager.app", p); system (s); // Set owner of BOINC Screen Saver @@ -147,10 +147,10 @@ int main(int argc, char *argv[]) system (s); system ("rm -rf /Applications/BOINCManager.app"); - system ("rm -rf /Library/Screen\\ Savers/BOINCSaver.saver"); - system ("chmod -R a+s /Applications/GridRepublic.app"); + system ("rm -rf /Library/Screen\\ Savers/BOINCSaver.saver"); // Installing GridRepublic over BOINC + system ("chmod -R a+s /Applications/GridRepublic\\ Manager.app"); // Installing GridRepublic over BOINC - err_fsref = FSPathMakeRef((StringPtr)"/Applications/GridRepublic.app", &fileRef, NULL); + err_fsref = FSPathMakeRef((StringPtr)"/Applications/GridRepublic Manager.app", &fileRef, NULL); } else { sprintf(s, "chown -Rf %s /Applications/BOINCManager.app", p); system (s); @@ -163,18 +163,15 @@ int main(int argc, char *argv[]) sprintf(s, "chown -Rf %s /Library/Application\\ Support/BOINC\\ Data", p); system (s); - system ("rm -rf /Applications/GridRepublic.app"); // Installing BOINC over GridRepublic + system ("rm -rf /Applications/GridRepublic\\ Manager.app"); // Installing BOINC over GridRepublic system ("rm -rf /Library/Screen\\ Savers/GridRepublic.saver"); // Installing BOINC over GridRepublic system ("chmod -R a+s /Applications/BOINCManager.app"); err_fsref = FSPathMakeRef((StringPtr)"/Applications/BOINCManager.app", &fileRef, NULL); } - if (err_fsref == noErr) { - err = LSRegisterFSRef(&fileRef, true); if (err_fsref == noErr) - err = LSOpenFSRef(&fileRef, NULL); - } + err = LSRegisterFSRef(&fileRef, true); // 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 @@ -199,13 +196,13 @@ int main(int argc, char *argv[]) if (strcmp(p, "BOINCMANAGER.APP") == 0) Success = RemoveLoginItemAtIndex(kCurrentUser, Counter-1); - if (strcmp(p, "GRIDREPUBLIC.APP") == 0) + if (strcmp(p, "GRIDREPUBLIC MANAGER.APP") == 0) Success = RemoveLoginItemAtIndex(kCurrentUser, Counter-1); } if (brandID == 1) Success = AddLoginItemWithPropertiesToUser(kCurrentUser, - "/Applications/GridRepublic.app", kDoNotHideOnLaunch); + "/Applications/GridRepublic Manager.app", kDoNotHideOnLaunch); else Success = AddLoginItemWithPropertiesToUser(kCurrentUser, "/Applications/BOINCManager.app", kDoNotHideOnLaunch); @@ -218,6 +215,9 @@ int main(int argc, char *argv[]) break; } + if (err_fsref == noErr) + err = LSOpenFSRef(&fileRef, NULL); + return 0; } diff --git a/mac_installer/preinstall b/mac_installer/preinstall index 83fc5c3304..53169546a8 100644 --- a/mac_installer/preinstall +++ b/mac_installer/preinstall @@ -1,7 +1,7 @@ #!/bin/csh ## -# Pre-Install Script for Macintosh BOINC Manager for OS X revised 1/21/06 +# Pre-Install / Pre-Upgrade Script for Macintosh BOINC Manager for OS X revised 1/23/06 ## diff --git a/mac_installer/preupgrade b/mac_installer/preupgrade deleted file mode 100644 index 48a2845710..0000000000 --- a/mac_installer/preupgrade +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/csh - -## -# Pre-Upgrade Script for Macintosh BOINC Manager for OS X revised 1/21/06 -## - - -# If we are replacing an earlier GridRepublic installation, fix the data directory name before installing -mv -n "/Library/Application Support/GridRepublic Data" "/Library/Application Support/BOINC Data" - -exit 0 diff --git a/mac_installer/release_GridRepublic.sh b/mac_installer/release_GridRepublic.sh index eb56d0c491..fa3a69ddb4 100644 --- a/mac_installer/release_GridRepublic.sh +++ b/mac_installer/release_GridRepublic.sh @@ -1,7 +1,7 @@ #!/bin/csh ## -# Release Script for Macintosh BOINC Manager 1/21/06 by Charlie Fenton +# Release Script for Macintosh BOINC Manager 1/23/06 by Charlie Fenton ## ## Usage: @@ -14,6 +14,22 @@ ## ## This will create a director "BOINC_Installer" in the parent directory of ## the current directory +## +## For testing only, you can use the development build by adding a fourth argument -dev +## For example, if the version is 3.2.1: +## source [path_to_this_script] 3 2 1 -dev + +## For different branding, modify the following 9 variables: +PR_PATH="../BOINC_Installer/GR_Pkg_Root" +IR_PATH="../BOINC_Installer/GR_Installer_Resources" +NEW_DIR_PATH="../BOINC_Installer/New_Release_GR_$1_$2_$3" +README_FILE="mac_installer/GR-ReadMe.rtf" +BRANDING_FILE="mac_installer/GR-Branding" +ICNS_FILE="GridRepublic.icns" +SAVER_SYSPREF_ICON_PATH="clientgui/mac/GridRepublic.tiff" +BRAND_NAME="GridRepublic" +LC_BRAND_NAME="gridrepublic" + if [ $# -lt 3 ]; then echo "Usage:" @@ -39,99 +55,122 @@ else fi fi -sudo rm -dfR ../BOINC_Installer/GR_Installer\ Resources/ -sudo rm -dfR ../BOINC_Installer/GR_Pkg_Root +sudo rm -dfR ${IR_PATH} +sudo rm -dfR ${PR_PATH} -mkdir -p ../BOINC_Installer/GR_Installer\ Resources/ +mkdir -p ${IR_PATH} -cp -fp mac_Installer/License.rtf ../BOINC_Installer/GR_Installer\ Resources/ -cp -fp mac_installer/GR-ReadMe.rtf ../BOINC_Installer/GR_Installer\ Resources/ReadMe.rtf -cp -fp mac_installer/GR-preinstall ../BOINC_Installer/GR_Installer\ Resources/preinstall -cp -fp mac_installer/GR-preupgrade ../BOINC_Installer/GR_Installer\ Resources/preupgrade -cp -fp mac_installer/postinstall ../BOINC_Installer/GR_Installer\ Resources/ -cp -fp mac_installer/postupgrade ../BOINC_Installer/GR_Installer\ Resources/ +cp -fp mac_Installer/License.rtf ${IR_PATH}/ +cp -fp "${README_FILE}" ${IR_PATH}/ReadMe.rtf -cp -fpR $BUILDPATH/Postinstall.app ../BOINC_Installer/GR_Installer\ Resources/ +# Create the installer's preinstall and preupgrade scripts from the standard preinstall script +cp -fp mac_installer/preinstall ${IR_PATH}/ +sed -i "" s/BOINC/temp/g ${IR_PATH}/preinstall +sed -i "" s/${BRAND_NAME}/BOINC/g ${IR_PATH}/preinstall +sed -i "" s/temp/${BRAND_NAME}/g ${IR_PATH}/preinstall +cp -fp ${IR_PATH}/preinstall ${IR_PATH}/preupgrade -mkdir -p ../BOINC_Installer/GR_Pkg_Root -mkdir -p ../BOINC_Installer/GR_Pkg_Root/Applications -mkdir -p ../BOINC_Installer/GR_Pkg_Root/Library -mkdir -p ../BOINC_Installer/GR_Pkg_Root/Library/Screen\ Savers -mkdir -p ../BOINC_Installer/GR_Pkg_Root/Library/Application\ Support -mkdir -p ../BOINC_Installer/GR_Pkg_Root/Library/Application\ Support/GridRepublic\ Data -mkdir -p ../BOINC_Installer/GR_Pkg_Root/Library/Application\ Support/GridRepublic\ Data/locale +cp -fp mac_installer/postinstall ${IR_PATH}/ +cp -fp mac_installer/postupgrade ${IR_PATH}/ -cp -fpR $BUILDPATH/BOINCManager.app ../BOINC_Installer/GR_Pkg_Root/Applications/ +cp -fpR $BUILDPATH/Postinstall.app ${IR_PATH}/ -cp -fpR $BUILDPATH/BOINCSaver.saver ../BOINC_Installer/GR_Pkg_Root/Library/Screen\ Savers/ +mkdir -p ${PR_PATH} +mkdir -p ${PR_PATH}/Applications +mkdir -p ${PR_PATH}/Library +mkdir -p ${PR_PATH}/Library/Screen\ Savers +mkdir -p ${PR_PATH}/Library/Application\ Support +mkdir -p ${PR_PATH}/Library/Application\ Support/${BRAND_NAME}\ Data +mkdir -p ${PR_PATH}/Library/Application\ Support/${BRAND_NAME}\ Data/locale + +cp -fpR $BUILDPATH/BOINCManager.app ${PR_PATH}/Applications/ + +cp -fpR $BUILDPATH/BOINCSaver.saver ${PR_PATH}/Library/Screen\ Savers/ ## Copy the localization files into the installer tree ## Old way copies CVS and *.po files which are not needed -## cp -fpR locale/client/ ../BOINC_Installer/GR_Pkg_Root/Library/Application\ Support/BOINC\ Data/locale -## sudo rm -dfR ../BOINC_Installer/GR_Pkg_Root/Library/Application\ Support/BOINC\ Data/locale/CVS +## cp -fpR locale/client/ ${PR_PATH}/Library/Application\ Support/BOINC\ Data/locale +## sudo rm -dfR ${PR_PATH}/Library/Application\ Support/BOINC\ Data/locale/CVS ## New way copies only *.mo files (adapted from boinc/sea/make-tar.sh) -find locale/client -name '*.mo' | cut -d '/' -f 3 | awk '{print "-p \"../BOINC_Installer/GR_Pkg_Root/Library/Application Support/GridRepublic\ Data/locale/"$0"\""}' | xargs mkdir -find locale/client -name '*.mo' | cut -d '/' -f 3,4 | awk '{print "cp \"locale/client/"$0"\" \"../BOINC_Installer/GR_Pkg_Root/Library/Application Support/GridRepublic\ Data/locale/"$0"\""}' | bash +find locale/client -name '*.mo' | cut -d '/' -f 3 | awk -v PRPATH=${PR_PATH} -v BRANDNAME=${BRAND_NAME} '{print "-p \"" PRPATH "/Library/Application Support/" BRANDNAME " Data/locale/"$0"\""}' | xargs mkdir +find locale/client -name '*.mo' | cut -d '/' -f 3,4 | awk -v PRPATH=${PR_PATH} -v BRANDNAME=${BRAND_NAME} '{print "cp \"locale/client/"$0"\" \"" PRPATH "/Library/Application Support/" BRANDNAME " Data/locale/"$0"\""}' | bash ## Modify for Grid Republic # Rename the Manager's bundle and its executable inside the bundle -mv -f ../BOINC_Installer/GR_Pkg_Root/Applications/BOINCManager.app/ ../BOINC_Installer/GR_Pkg_Root/Applications/GridRepublic.app/ -mv -f ../BOINC_Installer/GR_Pkg_Root/Applications/GridRepublic.app/Contents/MacOS/BOINCManager ../BOINC_Installer/GR_Pkg_Root/Applications/GridRepublic.app/Contents/MacOS/GridRepublic +mv -f ${PR_PATH}/Applications/BOINCManager.app/ ${PR_PATH}/Applications/${BRAND_NAME}\ Manager.app/ +mv -f ${PR_PATH}/Applications/${BRAND_NAME}\ Manager.app/Contents/MacOS/BOINCManager ${PR_PATH}/Applications/${BRAND_NAME}\ Manager.app/Contents/MacOS/${BRAND_NAME}\ Manager -# Replace the Manager's info.plist, InfoPlist.strings, BOINCMgr.icns -cp -fp mac_build/GR_Info.plist ../BOINC_Installer/GR_Pkg_Root/Applications/GridRepublic.app/Contents/Info.plist -cp -fp mac_build/GR-InfoPlist.strings ../BOINC_Installer/GR_Pkg_Root/Applications/GridRepublic.app/Contents/Resources/English.lproj/InfoPlist.strings -cp -fp client/mac/GridRepublic.icns ../BOINC_Installer/GR_Pkg_Root/Applications/GridRepublic.app/Contents/Resources/GridRepublic.icns -rm -f ../BOINC_Installer/GR_Pkg_Root/Applications/GridRepublic.app/Contents/Resources/BOINCMgr.icns +# Update the Manager's info.plist, InfoPlist.strings files +sed -i "" s/BOINCManager/${BRAND_NAME}\ Manager/g ${PR_PATH}/Applications/${BRAND_NAME}\ Manager.app/Contents/Info.plist +sed -i "" s/BOINCMgr.icns/"${ICNS_FILE}"/g ${PR_PATH}/Applications/${BRAND_NAME}\ Manager.app/Contents/Info.plist +sed -i "" s/BOINC/${BRAND_NAME}/g ${PR_PATH}/Applications/${BRAND_NAME}\ Manager.app/Contents/Resources/English.lproj/InfoPlist.strings + +# Replace the Manager's BOINCMgr.icns file +cp -fp "client/mac/${ICNS_FILE}" "${PR_PATH}/Applications/${BRAND_NAME} Manager.app/Contents/Resources/${ICNS_FILE}" +rm -f ${PR_PATH}/Applications/${BRAND_NAME}\ Manager.app/Contents/Resources/BOINCMgr.icns # Copy Branding file into both Application Bundle and Installer Package -cp -fp mac_installer/GR-Branding ../BOINC_Installer/GR_Pkg_Root/Applications/GridRepublic.app/Contents/Resources/Branding -cp -fp mac_installer/GR-Branding ../BOINC_Installer/GR_Installer\ Resources/Branding +cp -fp "${BRANDING_FILE}" ${PR_PATH}/Applications/${BRAND_NAME}\ Manager.app/Contents/Resources/Branding +cp -fp "${BRANDING_FILE}" ${IR_PATH}/Branding # Rename the screensaver bundle and its executable inside the bundle -mv -f ../BOINC_Installer/GR_Pkg_Root/Library/Screen\ Savers/BOINCSaver.saver ../BOINC_Installer/GR_Pkg_Root/Library/Screen\ Savers/GridRepublic.saver -mv -f ../BOINC_Installer/GR_Pkg_Root/Library/Screen\ Savers/GridRepublic.saver/Contents/MacOS/BOINCSaver ../BOINC_Installer/GR_Pkg_Root/Library/Screen\ Savers/GridRepublic.saver/Contents/MacOS/GridRepublic +mv -f ${PR_PATH}/Library/Screen\ Savers/BOINCSaver.saver ${PR_PATH}/Library/Screen\ Savers/${BRAND_NAME}.saver +mv -f ${PR_PATH}/Library/Screen\ Savers/${BRAND_NAME}.saver/Contents/MacOS/BOINCSaver ${PR_PATH}/Library/Screen\ Savers/${BRAND_NAME}.saver/Contents/MacOS/${BRAND_NAME} -# Replace screensaver's info.plist, InfoPlist.strings, boinc.tif -cp -fp mac_build/GR-ScreenSaver-Info.plist ../BOINC_Installer/GR_Pkg_Root/Library/Screen\ Savers/GridRepublic.saver/Contents/Info.plist -cp -fp mac_build/GR-InfoPlist.strings ../BOINC_Installer/GR_Pkg_Root/Library/Screen\ Savers/GridRepublic.saver/Contents/Resources/English.lproj/InfoPlist.strings -cp -fp clientgui/mac/gridrepublic.tiff ../BOINC_Installer/GR_Pkg_Root/Library/Screen\ Savers/GridRepublic.saver/Contents/Resources/boinc.tiff +# Update screensaver's info.plist, InfoPlist.strings files +sed -i "" s/BOINCSaver/${BRAND_NAME}/g ${PR_PATH}/Library/Screen\ Savers/${BRAND_NAME}.saver/Contents/Info.plist +sed -i "" s/BOINC/${BRAND_NAME}/g ${PR_PATH}/Library/Screen\ Savers/${BRAND_NAME}.saver/Contents/Resources/English.lproj/InfoPlist.strings + +# Replace screensaver's boinc.tif file +cp -fp "${SAVER_SYSPREF_ICON_PATH}" ${PR_PATH}/Library/Screen\ Savers/${BRAND_NAME}.saver/Contents/Resources/boinc.tiff ## Fix up ownership and permissions -sudo chown -R root:admin ../BOINC_Installer/GR_Pkg_Root/* -sudo chmod -R 775 ../BOINC_Installer/GR_Pkg_Root/* -sudo chmod 1775 ../BOINC_Installer/GR_Pkg_Root/Library +sudo chown -R root:admin ${PR_PATH}/* +sudo chmod -R 775 ${PR_PATH}/* +sudo chmod 1775 ${PR_PATH}/Library -sudo chown -R 501:admin ../BOINC_Installer/GR_Pkg_Root/Library/Application\ Support/* -sudo chmod -R 755 ../BOINC_Installer/GR_Pkg_Root/Library/Application\ Support/* +sudo chown -R 501:admin ${PR_PATH}/Library/Application\ Support/* +sudo chmod -R 755 ${PR_PATH}/Library/Application\ Support/* -sudo chown -R root:admin ../BOINC_Installer/GR_Installer\ Resources/* -sudo chmod -R 755 ../BOINC_Installer/GR_Installer\ Resources/* +sudo chown -R root:admin ${IR_PATH}/* +sudo chmod -R 755 ${IR_PATH}/* -sudo rm -dfR ../BOINC_Installer/New_Release_GR_$1_$2_$3/ +sudo rm -dfR ${NEW_DIR_PATH}/ -mkdir -p ../BOINC_Installer/New_Release_GR_$1_$2_$3/ -mkdir -p ../BOINC_Installer/New_Release_GR_$1_$2_$3/gridrepublic_$1.$2.$3_macOSX_powerpc -mkdir -p ../BOINC_Installer/New_Release_GR_$1_$2_$3/gridrepublic_$1.$2.$3_powerpc-apple-darwin -mkdir -p ../BOINC_Installer/New_Release_GR_$1_$2_$3/gridrepublic_$1.$2.$3_macOSX_SymbolTables +mkdir -p ${NEW_DIR_PATH}/ +mkdir -p ${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_powerpc +mkdir -p ${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_powerpc-apple-darwin +mkdir -p ${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_SymbolTables -cp -fp mac_installer/GR-ReadMe.rtf ../BOINC_Installer/New_Release_GR_$1_$2_$3/gridrepublic_$1.$2.$3_macOSX_powerpc/ReadMe.rtf -sudo chown -R 501:admin ../BOINC_Installer/New_Release_GR_$1_$2_$3/gridrepublic_$1.$2.$3_macOSX_powerpc/ReadMe.rtf -sudo chmod -R 755 ../BOINC_Installer/New_Release_GR_$1_$2_$3/gridrepublic_$1.$2.$3_macOSX_powerpc/ReadMe.rtf +cp -fp "${README_FILE}" ${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_powerpc/ReadMe.rtf +sudo chown -R 501:admin ${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_powerpc/ReadMe.rtf +sudo chmod -R 755 ${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_powerpc/ReadMe.rtf -cp -fpR $BUILDPATH/boinc ../BOINC_Installer/New_Release_GR_$1_$2_$3/gridrepublic_$1.$2.$3_powerpc-apple-darwin/ -cp -fpR $BUILDPATH/boinc_cmd ../BOINC_Installer/New_Release_GR_$1_$2_$3/gridrepublic_$1.$2.$3_powerpc-apple-darwin/ -sudo chown -R root:admin ../BOINC_Installer/New_Release_GR_$1_$2_$3/gridrepublic_$1.$2.$3_powerpc-apple-darwin/* -sudo chmod -R 755 ../BOINC_Installer/New_Release_GR_$1_$2_$3/gridrepublic_$1.$2.$3_powerpc-apple-darwin/* +cp -fpR $BUILDPATH/boinc ${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_powerpc-apple-darwin/ +cp -fpR $BUILDPATH/boinc_cmd ${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_powerpc-apple-darwin/ +sudo chown -R root:admin ${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_powerpc-apple-darwin/* +sudo chmod -R 755 ${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_powerpc-apple-darwin/* -cp -fpR $BUILDPATH/SymbolTables ../BOINC_Installer/New_Release_GR_$1_$2_$3/gridrepublic_$1.$2.$3_macOSX_SymbolTables/ +cp -fpR $BUILDPATH/SymbolTables ${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_SymbolTables/ -/Developer/Tools/packagemaker -build -p ../BOINC_Installer/New_Release_GR_$1_$2_$3/gridrepublic_$1.$2.$3_macOSX_powerpc/GridRepublic.pkg -f ../BOINC_Installer/GR_Pkg_Root -r ../BOINC_Installer/GR_Installer\ Resources/ -i mac_build/GR-Pkg-Info.plist -d mac_Installer/GR-Description.plist -ds +# Make temporary copies of Pkg-Info.plist and Description.plist for PackageMaker and update for this branding +cp -fp mac_build/Pkg-Info.plist ${NEW_DIR_PATH} +cp -fp mac_Installer/Description.plist ${NEW_DIR_PATH} +sed -i "" s/BOINC/${BRAND_NAME}/g ${NEW_DIR_PATH}/Pkg-Info.plist +sed -i "" s/BOINC/${BRAND_NAME}/g ${NEW_DIR_PATH}/Description.plist -cd ../BOINC_Installer/New_Release_GR_$1_$2_$3 -zip -rq gridrepublic_$1.$2.$3_macOSX_powerpc.zip gridrepublic_$1.$2.$3_macOSX_powerpc -zip -rq gridrepublic_$1.$2.$3_powerpc-apple-darwin.zip gridrepublic_$1.$2.$3_powerpc-apple-darwin -zip -rq gridrepublic_$1.$2.$3_macOSX_SymbolTables.zip gridrepublic_$1.$2.$3_macOSX_SymbolTables +# Build the installer package +/Developer/Tools/packagemaker -build -p ${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_powerpc/${BRAND_NAME}.pkg -f ${PR_PATH} -r ${IR_PATH} -i ${NEW_DIR_PATH}/Pkg-Info.plist -d ${NEW_DIR_PATH}/Description.plist -ds + +# Remove temporary copies of Pkg-Info.plist and Description.plist +rm ${NEW_DIR_PATH}/Pkg-Info.plist +rm ${NEW_DIR_PATH}/Description.plist + +# Compress the products +cd ${NEW_DIR_PATH} +zip -rq ${LC_BRAND_NAME}_$1.$2.$3_macOSX_powerpc.zip ${LC_BRAND_NAME}_$1.$2.$3_macOSX_powerpc +zip -rq ${LC_BRAND_NAME}_$1.$2.$3_powerpc-apple-darwin.zip ${LC_BRAND_NAME}_$1.$2.$3_powerpc-apple-darwin +zip -rq ${LC_BRAND_NAME}_$1.$2.$3_macOSX_SymbolTables.zip ${LC_BRAND_NAME}_$1.$2.$3_macOSX_SymbolTables popd return 0 diff --git a/mac_installer/release_boinc.sh b/mac_installer/release_boinc.sh index 24baa9551b..5cb0b20b7a 100644 --- a/mac_installer/release_boinc.sh +++ b/mac_installer/release_boinc.sh @@ -1,7 +1,7 @@ #!/bin/csh ## -# Release Script for Macintosh BOINC Manager 11/7/05 by Charlie Fenton +# Release Script for Macintosh BOINC Manager 1/23/06 by Charlie Fenton ## ## Usage: @@ -14,6 +14,10 @@ ## ## This will create a director "BOINC_Installer" in the parent directory of ## the current directory +## +## For testing only, you can use the development build by adding a fourth argument -dev +## For example, if the version is 3.2.1: +## source [path_to_this_script] 3 2 1 -dev if [ $# -lt 3 ]; then echo "Usage:" @@ -47,7 +51,7 @@ mkdir -p ../BOINC_Installer/Installer\ Resources/ cp -fp mac_Installer/License.rtf ../BOINC_Installer/Installer\ Resources/ cp -fp mac_installer/ReadMe.rtf ../BOINC_Installer/Installer\ Resources/ cp -fp mac_installer/preinstall ../BOINC_Installer/Installer\ Resources/ -cp -fp mac_installer/preupgrade ../BOINC_Installer/Installer\ Resources/ +cp -fp mac_installer/preinstall ../BOINC_Installer/Installer\ Resources/preupgrade cp -fp mac_installer/postinstall ../BOINC_Installer/Installer\ Resources/ cp -fp mac_installer/postupgrade ../BOINC_Installer/Installer\ Resources/