Mac: Installer writes all_projects_list.xml file to BOINC Data directory unless it already contains one.

svn path=/trunk/boinc/; revision=12904
This commit is contained in:
Charlie Fenton 2007-06-12 10:25:48 +00:00
parent 45d69751f1
commit cf34759dd6
3 changed files with 27 additions and 3 deletions

View File

@ -69,6 +69,15 @@ enum { launchWhenDone,
restartRequired
};
/******************************************************************
*** ***
*** NOTE: ***
*** ***
*** On entry, the postinstall or postupgrade script has set the ***
*** current directory to the top level of our installer package ***
*** ***
******************************************************************/
int main(int argc, char *argv[])
{
Boolean Success;
@ -81,6 +90,7 @@ int main(int argc, char *argv[])
FSRef fileRef;
OSStatus err, err_fsref;
char *p;
FILE *f;
#ifdef SANDBOX
uid_t savedeuid, b_m_uid;
passwd *pw;
@ -147,6 +157,16 @@ int main(int argc, char *argv[])
}
sleep (2);
// Install all_projects_list.xml file, but only if one doesn't
// already exist, since a pre-existing one is probably newer.
f = fopen("/Library/Application Support/BOINC Data/all_projects_list.xml", "r");
if (f) {
fclose(f); // Already exists
} else {
system ("cp -fp Contents/Resources/all_projects_list.xml /Library/Application\\ Support/BOINC\\ Data/");
system ("chmod a-x /Library/Application\\ Support/BOINC\\ Data/all_projects_list.xml");
}
Success = false;

View File

@ -20,7 +20,7 @@
## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##
# Release Script for Macintosh GridRepublic Desktop 6/8/07 by Charlie Fenton
# Release Script for Macintosh GridRepublic Desktop 6/12/07 by Charlie Fenton
##
## Usage:
@ -83,6 +83,8 @@ mkdir -p "${IR_PATH}"
cp -fp mac_Installer/License.rtf "${IR_PATH}/"
cp -fp "${README_FILE}" "${IR_PATH}/ReadMe.rtf"
cp -fp win_build/installerv2/redist/all_projects_list.xml "${IR_PATH}/"
# Update version number
sed -i "" s/"<VER_NUM>"/"$1.$2.$3"/g "${IR_PATH}/ReadMe.rtf"

View File

@ -20,7 +20,7 @@
## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##
# Release Script for Macintosh BOINC Manager 6/6/07 by Charlie Fenton
# Release Script for Macintosh BOINC Manager 6/12/07 by Charlie Fenton
##
## Usage:
@ -70,6 +70,8 @@ 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 win_build/installerv2/redist/all_projects_list.xml ../BOINC_Installer/Installer\ Resources/
# Update version number
sed -i "" s/"<VER_NUM>"/"$1.$2.$3"/g ../BOINC_Installer/Installer\ Resources/ReadMe.rtf
@ -103,7 +105,7 @@ cp -fpR $BUILDPATH/setprojectgrp ../BOINC_Installer/Pkg_Root/Library/Application
## sudo rm -dfR ../BOINC_Installer/Pkg_Root/Library/Application\ Support/BOINC\ Data/skins/World\ Community\ Grid/CVS
## sudo rm -dfR ../BOINC_Installer/Pkg_Root/Library/Application\ Support/BOINC\ Data/skins/World\ Community\ Grid/graphic/CVS
cp -fpR curl/ca-bundle.crt ../BOINC_Installer/Pkg_Root/Library/Application\ Support/BOINC\ Data/
cp -fp curl/ca-bundle.crt ../BOINC_Installer/Pkg_Root/Library/Application\ Support/BOINC\ Data/
cp -fpR $BUILDPATH/BOINCManager.app ../BOINC_Installer/Pkg_Root/Applications/