*** empty log message ***

svn path=/trunk/boinc/; revision=9917
This commit is contained in:
Charlie Fenton 2006-04-17 07:58:19 +00:00
parent 5fbed0a769
commit acfa699da5
8 changed files with 191 additions and 150 deletions

View File

@ -3898,3 +3898,20 @@ Rom 16 Apr 2006
lib/
stackwalker_win.cpp
Charlie 17 Apr 2006
- Mac bug fix: If window was never opened, window dimensions were never
read from preferences, so SaveState wrote bad values in preferences.
- Mac: Don't customize name of BOINC Data directory for branding; change
"GridRepublic Manager" to "GridRepublic Desktop; make branding script
more robust if there is a space in any file or directory name or path.
clientgui/
BOINCGUIApp.cpp
MainFrame.cpp
mac_installer/
GR-ReadMe.rtf
PostInstall.cpp
preinstall
release_boinc.sh
release_GridRepublic.sh

View File

@ -310,10 +310,12 @@ bool CBOINCGUIApp::OnInit() {
success = ::wxSetWorkingDirectory(strDirectory);
if (success) {
// If SetWD failed, don't create a directory in wrong place
strDirectory += m_pBranding->GetProjectName();
strDirectory += wxT(" Data");
// strDirectory += m_pBranding->GetProjectName();
// strDirectory += wxT(" Data");
strDirectory += wxT("BOINC Data"); // We don't customize BOINC Data directory name for branding
if (! wxDirExists(strDirectory))
success = wxMkdir(m_pBranding->GetProjectName() + wxT(" Data"), 0777); // Does nothing if dir exists
// success = wxMkdir(m_pBranding->GetProjectName() + wxT(" Data"), 0777); // Does nothing if dir exists
success = wxMkdir(m_pBranding->GetProjectName() + wxT("BOINC Data"), 0777); // Does nothing if dir exists
success = ::wxSetWorkingDirectory(strDirectory);
// wxChar *wd = wxGetWorkingDirectory(buf, 1000); // For debugging
}

View File

@ -837,6 +837,33 @@ bool CMainFrame::RestoreState() {
m_pNotebook->SetSelection(iCurrentPage);
}
#ifdef __WXMAC__
// Read window dimensions now, so SaveState can write them even if we never open the window
pConfig->Read(wxT("Width"), &m_Width, 800);
pConfig->Read(wxT("Height"), &m_Height, 600);
pConfig->Read(wxT("YPos"), &m_Top, 30);
pConfig->Read(wxT("XPos"), &m_Left, 30);
// If the user has changed the arrangement of multiple
// displays, make sure the window title bar is still on-screen.
Rect titleRect = {m_Top, m_Left, m_Top+22, m_Left+m_Width };
InsetRect(&titleRect, 5, 5); // Make sure at least a 5X5 piece visible
RgnHandle displayRgn = NewRgn();
CopyRgn(GetGrayRgn(), displayRgn); // Region encompassing all displays
Rect menuRect = ((**GetMainDevice())).gdRect;
menuRect.bottom = GetMBarHeight() + menuRect.top;
RgnHandle menuRgn = NewRgn();
RectRgn(menuRgn, &menuRect); // Region hidden by menu bar
DiffRgn(displayRgn, menuRgn, displayRgn); // Subtract menu bar retion
if (!RectInRgn(&titleRect, displayRgn))
m_Top = m_Left = 30;
DisposeRgn(menuRgn);
DisposeRgn(displayRgn);
SetSize(m_Left, m_Top, m_Width, m_Height);
#endif
//
// Restore Page(s) State
//
@ -1530,6 +1557,7 @@ void CMainFrame::GetWindowDimensions() {
void CMainFrame::SetWindowDimensions() {
#ifndef __WXMAC__
static bool bFirstTime = true;
if (bFirstTime) {
@ -1538,16 +1566,9 @@ void CMainFrame::SetWindowDimensions() {
wxString strBaseConfigLocation = wxString(wxT("/"));
wxConfigBase* pConfig = wxConfigBase::Get(FALSE);
bool bWindowIconized = false;
#if defined(__WXMSW__) || defined(__WXMAC__)
#ifdef __WXMSW__
bool bWindowMaximized = false;
#endif
#ifdef __WXMAC__
long iTop = 0;
long iLeft = 0;
#endif
long iHeight = 0;
long iWidth = 0;
#endif
wxASSERT(pConfig);
@ -1555,45 +1576,19 @@ void CMainFrame::SetWindowDimensions() {
// Restore Frame State
//
pConfig->SetPath(strBaseConfigLocation);
pConfig->Read(wxT("WindowIconized"), &bWindowIconized, false);
#if defined(__WXMSW__) || defined(__WXMAC__)
pConfig->Read(wxT("WindowMaximized"), &bWindowMaximized, false);
#endif
pConfig->Read(wxT("Width"), &iWidth, 800);
pConfig->Read(wxT("Height"), &iHeight, 600);
#ifdef __WXMAC__
pConfig->Read(wxT("YPos"), &iTop, 30);
pConfig->Read(wxT("XPos"), &iLeft, 30);
// If the user has changed the arrangement of multiple
// displays, make sure the window title bar is still on-screen.
Rect titleRect = {iTop, iLeft, iTop+22, iLeft+iWidth };
InsetRect(&titleRect, 5, 5); // Make sure at least a 5X5 piece visible
RgnHandle displayRgn = NewRgn();
CopyRgn(GetGrayRgn(), displayRgn); // Region encompassing all displays
Rect menuRect = ((**GetMainDevice())).gdRect;
menuRect.bottom = GetMBarHeight() + menuRect.top;
RgnHandle menuRgn = NewRgn();
RectRgn(menuRgn, &menuRect); // Region hidden by menu bar
DiffRgn(displayRgn, menuRgn, displayRgn); // Subtract menu bar retion
if (!RectInRgn(&titleRect, displayRgn))
iTop = iLeft = 30;
DisposeRgn(menuRgn);
DisposeRgn(displayRgn);
SetSize(iLeft, iTop, iWidth, iHeight);
#else // ! __WXMAC__
SetSize(-1, -1, iWidth, iHeight);
#endif
pConfig->Read(wxT("Width"), &m_Width, 800);
pConfig->Read(wxT("Height"), &m_Height, 600);
SetSize(-1, -1, m_Width, m_Height);
#ifdef __WXMSW__
pConfig->Read(wxT("WindowMaximized"), &bWindowMaximized, false);
Maximize(bWindowMaximized);
#endif
}
#endif // ! __WXMAC__
}
@ -2175,7 +2170,6 @@ bool CMainFrame::Show(bool show) {
GetCurrentProcess(&psn);
if (show) {
SetFrontProcess(&psn); // Shows process if hidden
SetWindowDimensions();
} else {
GetWindowDimensions();
if (IsProcessVisible(&psn))

View File

@ -7,7 +7,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 Manager Version 5.3.28 Release Notes\
\f0\b\fs28 \cf0 Macintosh GridRepublic Desktop Version 5.5.0 Release Notes\
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural
\f1\b0\fs24 \cf0 \
@ -22,11 +22,11 @@
\
This is a
\f0\b universal binary
\f1\b0 which will run natively on both Intel and PowerPC Macs. GridRepublic Manager requires Macintosh OS X version 10.3 or greater. \
\f1\b0 which will run natively on both Intel and PowerPC Macs. GridRepublic Desktop requires Macintosh OS X version 10.3 or greater. \
\
\f0\b Upgrade warning: You may lose unreported results
\f1\b0 if you are upgrading from a version of GridRepublic earlier than 5.3.21, or if you are transferring GridRepublic Data from a PowerPC Mac to an Intel Mac, or from an Intel Mac to a PowerPC Mac. To prevent this, open GridRepublic Manager's window, select the
\f1\b0 if you are upgrading from a version of GridRepublic earlier than 5.3.21, or if you are transferring GridRepublic Data from a PowerPC Mac to an Intel Mac, or from an Intel Mac to a PowerPC Mac. To prevent this, open GridRepublic Desktop's window, select the
\f2\i Projects
\f1\i0 tab, select each project and press the
\f2\i Update
@ -46,51 +46,51 @@ Note: on some versions of the Mac OS, you may not be able to exit the GridRepubl
\f0\b Other useful information:
\f1\b0 \
\
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. \
The installer places two items onto your hard drive: GridRepublic Desktop.app in your /Applications folder and GridRepublic.saver in your /Library/Screen Savers folder. \
\
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.)\
It also sets GridRepublic Desktop 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 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.\
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 Desktop as a Startup item only for the user who ran the installer. To have GridRepublic Desktop start automatically when other users log in, add it to each user's Startup Items as described above.\
\
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.\
You can move GridRepublic Desktop 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 Desktop back to the Applications folder.\
\
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.\
The installer sets the "setuid" permission flag for the GridRepublic Desktop, which allows it to write to the shared GridRepublic Data regardless of which user is logged in. If you copy GridRepublic Desktop 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 Manager.app (from your
\ls1\ilvl1\cf0 {\listtext \'a5 }\'a5 GridRepublic Desktop.app (from your
\f0\b /Applications/
\f1\b0 folder)\
\'a5 GridRepublic.saver (from your
{\listtext \'a5 }\'a5 GridRepublic.saver (from your
\f0\b /Library/Screen Savers/
\f1\b0 folder)\
\'a5 the
{\listtext \'a5 }\'a5 the
\f0\b GridRepublic Data/
\f1\b0 folder (from your
\f0\b /Library/Applications Support/
\f1\b0 folder.)\
\'a5 GridRepublic.pkg (from your
{\listtext \'a5 }\'a5 GridRepublic.pkg (from your
\f0\b /Library/Receipts/
\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 Manager from your list of
\f1\b0 (accessible from the Apple menu), and remove GridRepublic Desktop 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

View File

@ -85,19 +85,23 @@ 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\\ Manager.app");
system ("rm -rf /Applications/GridRepublic\\ Desktop.app");
system ("rm -rf /Library/Screen\\ Savers/GridRepublic.saver");
system ("rm -rf /Library/Application\\ Support/GridRepublic\\ Data");
// We don't customize BOINC Data directory name for branding
// system ("rm -rf /Library/Application\\ Support/GridRepublic\\ Data");
system ("rm -rf /Library/Receipts/GridRepublic.pkg");
StandardAlert (kAlertStopAlert, "\pSorry, BOINC requires system 10.3 or higher.",
NULL, NULL, &itemHit);
} else {
system ("rm -rf /Applications/BOINCManager.app");
system ("rm -rf /Library/Screen\\ Savers/BOINCSaver.saver");
system ("rm -rf /Library/Application\\ Support/BOINC\\ Data");
// We don't customize BOINC Data directory name for branding
// system ("rm -rf /Library/Application\\ Support/BOINC\\ Data");
system ("rm -rf /Library/Receipts/BOINC.pkg");
}
system ("rm -rf /Library/Application\\ Support/BOINC\\ Data");
err = kill(installerPID, SIGKILL);
ExitToShell();
@ -135,41 +139,48 @@ 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\\ Manager.app", p);
sprintf(s, "chown -Rf %s /Applications/GridRepublic\\ Desktop.app", p);
system (s);
// Set owner of BOINC Screen Saver
sprintf(s, "chown -Rf %s /Library/Screen\\ Savers/GridRepublic.saver", p);
system (s);
// Set owner of BOINC Data
sprintf(s, "chown -Rf %s /Library/Application\\ Support/GridRepublic\\ Data", p);
system (s);
// We don't customize BOINC Data directory name for branding
// Set owner of GridRepublic Data
// sprintf(s, "chown -Rf %s /Library/Application\\ Support/GridRepublic\\ Data", p);
// system (s);
system ("rm -rf /Applications/BOINCManager.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
system ("chmod -R a+s /Applications/GridRepublic\\ Desktop.app"); // Installing GridRepublic over BOINC
err_fsref = FSPathMakeRef((StringPtr)"/Applications/GridRepublic Manager.app", &fileRef, NULL);
err_fsref = FSPathMakeRef((StringPtr)"/Applications/GridRepublic Desktop.app", &fileRef, NULL);
} else {
sprintf(s, "chown -Rf %s /Applications/BOINCManager.app", p);
system (s);
// We don't customize BOINC Data directory name for branding
// Set owner of BOINC Screen Saver
sprintf(s, "chown -Rf %s /Library/Screen\\ Savers/BOINCSaver.saver", p);
system (s);
// sprintf(s, "chown -Rf %s /Library/Screen\\ Savers/BOINCSaver.saver", p);
// system (s);
// Set owner of BOINC Data
sprintf(s, "chown -Rf %s /Library/Application\\ Support/BOINC\\ Data", p);
system (s);
system ("rm -rf /Applications/GridRepublic\\ Manager.app"); // Installing BOINC over GridRepublic
system ("rm -rf /Applications/GridRepublic\\ Desktop.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);
}
// We don't customize BOINC Data directory name for branding
// Set owner of BOINC Data
sprintf(s, "chown -Rf %s /Library/Application\\ Support/BOINC\\ Data", p);
system (s);
if (err_fsref == noErr)
err = LSRegisterFSRef(&fileRef, true);
@ -196,13 +207,13 @@ int main(int argc, char *argv[])
if (strcmp(p, "BOINCMANAGER.APP") == 0)
Success = RemoveLoginItemAtIndex(kCurrentUser, Counter-1);
if (strcmp(p, "GRIDREPUBLIC MANAGER.APP") == 0)
if (strcmp(p, "GRIDREPUBLIC DESKTOP.APP") == 0)
Success = RemoveLoginItemAtIndex(kCurrentUser, Counter-1);
}
if (brandID == 1)
Success = AddLoginItemWithPropertiesToUser(kCurrentUser,
"/Applications/GridRepublic Manager.app", kDoNotHideOnLaunch);
"/Applications/GridRepublic Desktop.app", kDoNotHideOnLaunch);
else
Success = AddLoginItemWithPropertiesToUser(kCurrentUser,
"/Applications/BOINCManager.app", kDoNotHideOnLaunch);

View File

@ -4,8 +4,8 @@
# Pre-Install / Pre-Upgrade Script for Macintosh BOINC Manager for OS X revised 1/23/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"
## We don't customize BOINC Data directory name for branding
## mv -n "/Library/Application Support/GridRepublic Data" "/Library/Application Support/BOINC Data"
exit 0

View File

@ -1,7 +1,7 @@
#!/bin/csh
##
# Release Script for Macintosh BOINC Manager 2/16/06 by Charlie Fenton
# Release Script for Macintosh GridRepublic Desktop 4/17/06 by Charlie Fenton
##
## Usage:
@ -28,14 +28,14 @@ BRANDING_FILE="mac_installer/GR-Branding"
ICNS_FILE="GridRepublic.icns"
SAVER_SYSPREF_ICON_PATH="clientgui/mac/GridRepublic.tiff"
BRAND_NAME="GridRepublic"
MANAGER_NAME="GridRepublic Desktop"
LC_BRAND_NAME="gridrepublic"
if [ $# -lt 3 ]; then
echo "Usage:"
echo " cd [path]/boinc"
echo " source [path_to_this_script] major_version minor_version revision_number"
exit 0
return 1
fi
pushd ./
@ -55,112 +55,126 @@ else
fi
fi
sudo rm -dfR ${IR_PATH}
sudo rm -dfR ${PR_PATH}
sudo rm -dfR "${IR_PATH}"
sudo rm -dfR "${PR_PATH}"
mkdir -p ${IR_PATH}
mkdir -p "${IR_PATH}"
cp -fp mac_Installer/License.rtf ${IR_PATH}/
cp -fp "${README_FILE}" ${IR_PATH}/ReadMe.rtf
cp -fp mac_Installer/License.rtf "${IR_PATH}/"
cp -fp "${README_FILE}" "${IR_PATH}/ReadMe.rtf"
# 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
##### We've decided not to customize BOINC Data directory name for branding
#### cp -fp mac_installer/preinstall "${IR_PATH}/"
cp -fp mac_installer/postinstall ${IR_PATH}/
cp -fp mac_installer/postupgrade ${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 -fpR $BUILDPATH/Postinstall.app ${IR_PATH}/
#### cp -fp "${IR_PATH}/preinstall" "${IR_PATH}/preupgrade"
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 -fp mac_installer/postinstall "${IR_PATH}/"
cp -fp mac_installer/postupgrade "${IR_PATH}/"
cp -fpR $BUILDPATH/BOINCManager.app ${PR_PATH}/Applications/
cp -fpR $BUILDPATH/Postinstall.app "${IR_PATH}/"
cp -fpR $BUILDPATH/BOINCSaver.saver ${PR_PATH}/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"
##### We've decided not to customize BOINC Data directory name for branding
#### mkdir -p "${PR_PATH}/Library/Application Support/${BRAND_NAME} Data"
#### mkdir -p "${PR_PATH}/Library/Application Support/${BRAND_NAME} Data/locale"
mkdir -p "${PR_PATH}/Library/Application Support/BOINC Data"
mkdir -p "${PR_PATH}/Library/Application Support/ BOINC 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/ ${PR_PATH}/Library/Application\ Support/BOINC\ Data/locale
## sudo rm -dfR ${PR_PATH}/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 -v PRPATH=${PR_PATH} -v BRANDNAME=${BRAND_NAME} '{print "\"" PRPATH "/Library/Application Support/" BRANDNAME " Data/locale/"$0"\""}' | xargs mkdir -p
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
##### We've decided not to customize BOINC Data directory name for branding
#### find locale/client -name '*.mo' | cut -d '/' -f 3 | awk -v PRPATH=${PR_PATH} -v BRANDNAME=${BRAND_NAME} '{print "\"" PRPATH "/Library/Application Support/" BRANDNAME " Data/locale/"$0"\""}' | xargs mkdir -p
#### 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
find locale/client -name '*.mo' | cut -d '/' -f 3 | awk -v PRPATH=${PR_PATH} '{print "\"" PRPATH "/Library/Application Support/BOINC Data/locale/"$0"\""}' | xargs mkdir -p
find locale/client -name '*.mo' | cut -d '/' -f 3,4 | awk -v PRPATH=${PR_PATH} '{print "cp \"locale/client/"$0"\" \"" PRPATH "/Library/Application Support/BOINC Data/locale/"$0"\""}' | bash
## Modify for Grid Republic
# Rename the Manager's bundle and its executable inside the bundle
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
mv -f "${PR_PATH}/Applications/BOINCManager.app/" "${PR_PATH}/Applications/${MANAGER_NAME}.app/"
mv -f "${PR_PATH}/Applications/${MANAGER_NAME}.app/Contents/MacOS/BOINCManager" "${PR_PATH}/Applications/${MANAGER_NAME}.app/Contents/MacOS/${MANAGER_NAME}"
# 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
sed -i "" s/BOINCManager/"${MANAGER_NAME}"/g "${PR_PATH}/Applications/${MANAGER_NAME}.app/Contents/Info.plist"
sed -i "" s/BOINCMgr.icns/"${ICNS_FILE}"/g "${PR_PATH}/Applications/${MANAGER_NAME}.app/Contents/Info.plist"
sed -i "" s/BOINC/"${BRAND_NAME}"/g "${PR_PATH}/Applications/${MANAGER_NAME}.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
cp -fp "client/mac/${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
cp -fp "${BRANDING_FILE}" ${PR_PATH}/Applications/${BRAND_NAME}\ Manager.app/Contents/Resources/Branding
cp -fp "${BRANDING_FILE}" ${IR_PATH}/Branding
cp -fp "${BRANDING_FILE}" "${PR_PATH}/Applications/${MANAGER_NAME}.app/Contents/Resources/Branding"
cp -fp "${BRANDING_FILE}" "${IR_PATH}/Branding"
# Rename the screensaver bundle and its executable inside the bundle
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}
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}"
# 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
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
# Replace screensaver's boinc.tiff 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 ${PR_PATH}/*
sudo chmod -R 775 ${PR_PATH}/*
sudo chmod 1775 ${PR_PATH}/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 ${PR_PATH}/Library/Application\ Support/*
sudo chmod -R 755 ${PR_PATH}/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 ${IR_PATH}/*
sudo chmod -R 755 ${IR_PATH}/*
sudo chown -R root:admin "${IR_PATH}"/*
sudo chmod -R 755 "${IR_PATH}"/*
sudo rm -dfR ${NEW_DIR_PATH}/
sudo rm -dfR "${NEW_DIR_PATH}/"
mkdir -p ${NEW_DIR_PATH}/
mkdir -p ${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal
mkdir -p ${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_universal-apple-darwin
mkdir -p ${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_SymbolTables
mkdir -p "${NEW_DIR_PATH}/"
mkdir -p "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal"
cp -fp "${README_FILE}" ${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/ReadMe.rtf
sudo chown -R 501:admin ${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/ReadMe.rtf
sudo chmod -R 755 ${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/ReadMe.rtf
cp -fp "${README_FILE}" "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/ReadMe.rtf"
sudo chown -R 501:admin "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/ReadMe.rtf"
sudo chmod -R 755 "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/ReadMe.rtf"
cp -fpR $BUILDPATH/boinc ${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_universal-apple-darwin/
cp -fpR $BUILDPATH/boinc_cmd ${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_universal-apple-darwin/
sudo chown -R root:admin ${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_universal-apple-darwin/*
sudo chmod -R 755 ${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_universal-apple-darwin/*
##### We've decided not to create branded command-line executables; they are identical to standard ones
#### mkdir -p "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_universal-apple-darwin"
#### cp -fpR $BUILDPATH/boinc "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_universal-apple-darwin/"
#### cp -fpR $BUILDPATH/boinc_cmd "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_universal-apple-darwin/"
#### sudo chown -R root:admin "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_universal-apple-darwin"/*
#### sudo chmod -R 755 "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_universal-apple-darwin"/*
cp -fpR $BUILDPATH/SymbolTables ${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_SymbolTables/
##### We've decided not to create branded symbol table file; it is identical to standard one
#### mkdir -p "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_SymbolTables"
#### cp -fpR $BUILDPATH/SymbolTables ${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_SymbolTables/
# 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
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"
# Build the installer package
/Developer/Tools/packagemaker -build -p ${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/${BRAND_NAME}.pkg -f ${PR_PATH} -r ${IR_PATH} -i ${NEW_DIR_PATH}/Pkg-Info.plist -d ${NEW_DIR_PATH}/Description.plist -ds
/Developer/Tools/packagemaker -build -p "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/${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
@ -169,8 +183,10 @@ rm ${NEW_DIR_PATH}/Description.plist
# Compress the products
cd ${NEW_DIR_PATH}
zip -rqy ${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal.zip ${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal
zip -rqy ${LC_BRAND_NAME}_$1.$2.$3_universal-apple-darwin.zip ${LC_BRAND_NAME}_$1.$2.$3_universal-apple-darwin
zip -rqy ${LC_BRAND_NAME}_$1.$2.$3_macOSX_SymbolTables.zip ${LC_BRAND_NAME}_$1.$2.$3_macOSX_SymbolTables
##### We've decided not to create branded command-line executables; they are identical to standard ones
#### zip -rqy ${LC_BRAND_NAME}_$1.$2.$3_universal-apple-darwin.zip ${LC_BRAND_NAME}_$1.$2.$3_universal-apple-darwin
##### We've decided not to create branded symbol table file; it is identical to standard one
#### zip -rqy ${LC_BRAND_NAME}_$1.$2.$3_macOSX_SymbolTables.zip ${LC_BRAND_NAME}_$1.$2.$3_macOSX_SymbolTables
popd
return 0

View File

@ -23,7 +23,7 @@ if [ $# -lt 3 ]; then
echo "Usage:"
echo " cd [path]/boinc"
echo " source [path_to_this_script] major_version minor_version revision_number"
exit 0
return 1
fi
pushd ./
@ -50,8 +50,9 @@ 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/preinstall ../BOINC_Installer/Installer\ Resources/preupgrade
#### We don't customize BOINC Data directory name for branding
#### cp -fp mac_installer/preinstall ../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/