2005-09-02 04:16:20 +00:00
|
|
|
#!/bin/csh
|
|
|
|
|
2009-02-21 02:42:50 +00:00
|
|
|
# This file is part of BOINC.
|
|
|
|
# http://boinc.berkeley.edu
|
|
|
|
# Copyright (C) 2008 University of California
|
|
|
|
#
|
|
|
|
# BOINC is free software; you can redistribute it and/or modify it
|
|
|
|
# under the terms of the GNU Lesser General Public License
|
|
|
|
# as published by the Free Software Foundation,
|
|
|
|
# either version 3 of the License, or (at your option) any later version.
|
|
|
|
#
|
|
|
|
# BOINC is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
# See the GNU Lesser General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU Lesser General Public License
|
|
|
|
# along with BOINC. If not, see <http://www.gnu.org/licenses/>.
|
2006-07-06 11:04:46 +00:00
|
|
|
|
2005-09-02 04:16:20 +00:00
|
|
|
##
|
2007-10-31 12:38:32 +00:00
|
|
|
# Release Script for Macintosh BOINC Manager 10/31/07 by Charlie Fenton
|
2009-11-18 10:19:14 +00:00
|
|
|
## updated 11/18/09 by Charlie Fenton for OS 10.6 Snow Leopard
|
2010-09-29 03:39:04 +00:00
|
|
|
## updated 9/28/10 by Charlie Fenton for new BOINC skins
|
2010-12-02 13:55:41 +00:00
|
|
|
## updated 12/2/10 by Charlie Fenton to remove obsolete items
|
2011-01-18 09:08:51 +00:00
|
|
|
## updated 1/18/11 by Charlie Fenton to remove BOINC skins
|
2011-09-09 10:18:12 +00:00
|
|
|
## updated 11/9/11 by Charlie Fenton for XCode 4.1 and OS 10.7
|
2011-10-26 12:12:46 +00:00
|
|
|
## updated 11/26/11 by Charlie Fenton for new Default skin
|
2011-10-27 11:50:31 +00:00
|
|
|
## updated 11/27/11 by Charlie Fenton for new virtualbox directory
|
2011-12-07 11:43:17 +00:00
|
|
|
## updated 12/2/11 by Charlie Fenton to restore wrapper and reboot if needed
|
2012-01-06 10:44:53 +00:00
|
|
|
## updated 1/6/12 by Charlie Fenton to also install VirtualBox
|
2012-06-22 09:46:26 +00:00
|
|
|
## updated 6/22/12 by Charlie Fenton to code sign the installer and uninstaller
|
2012-08-15 07:11:08 +00:00
|
|
|
## updated 7/5/12 by Charlie Fenton to avoid using PackageMaker
|
2013-06-18 11:03:24 +00:00
|
|
|
## updated 7/31/12 by Charlie Fenton for Liberation font in boincscr
|
|
|
|
## updated 6/11/13 by Charlie Fenton for BOINC.mpkg, "BOINC + VirtualBox.mpkg"
|
|
|
|
## updated 6/18/13 by Charlie Fenton for localizable uninstaller
|
2009-06-19 09:31:46 +00:00
|
|
|
##
|
2012-07-05 12:02:16 +00:00
|
|
|
## NOTE: This script requires Mac OS 10.6 or later, and uses XCode developer
|
|
|
|
## tools. So you must have installed XCode Developer Tools on the Mac
|
|
|
|
## before running this script.
|
2005-09-02 04:16:20 +00:00
|
|
|
##
|
|
|
|
|
2011-09-09 10:18:12 +00:00
|
|
|
## NOTE: To build the executables under Lion and XCode 4, select from XCode's
|
|
|
|
## menu: "Product/Buildfor/Build for Archiving", NOT "Product/Archive"
|
|
|
|
|
2005-09-02 04:16:20 +00:00
|
|
|
## Usage:
|
2012-06-22 09:46:26 +00:00
|
|
|
##
|
|
|
|
## If you wish to code sign the installer and uninstaller, create a file
|
|
|
|
## ~/BOINCCodeSignIdentity.txt whose first line is the code signing identity
|
|
|
|
##
|
2005-09-02 04:16:20 +00:00
|
|
|
## cd to the root directory of the boinc tree, for example:
|
|
|
|
## cd [path]/boinc
|
|
|
|
##
|
|
|
|
## Invoke this script with the three parts of version number as arguments.
|
|
|
|
## For example, if the version is 3.2.1:
|
|
|
|
## source [path_to_this_script] 3 2 1
|
|
|
|
##
|
|
|
|
## This will create a director "BOINC_Installer" in the parent directory of
|
|
|
|
## the current directory
|
2006-01-23 13:16:28 +00:00
|
|
|
##
|
|
|
|
## 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
|
2005-09-02 04:16:20 +00:00
|
|
|
|
2005-11-08 01:07:13 +00:00
|
|
|
if [ $# -lt 3 ]; then
|
|
|
|
echo "Usage:"
|
|
|
|
echo " cd [path]/boinc"
|
|
|
|
echo " source [path_to_this_script] major_version minor_version revision_number"
|
2006-04-17 07:58:19 +00:00
|
|
|
return 1
|
2005-11-08 01:07:13 +00:00
|
|
|
fi
|
|
|
|
|
2006-12-01 06:45:59 +00:00
|
|
|
#pushd ./
|
|
|
|
BOINCPath=$PWD
|
2006-01-21 12:42:04 +00:00
|
|
|
|
2011-07-26 12:11:34 +00:00
|
|
|
DarwinVersion=`uname -r`;
|
|
|
|
DarwinMajorVersion=`echo $DarwinVersion | sed 's/\([0-9]*\)[.].*/\1/' `;
|
|
|
|
# DarwinMinorVersion=`echo $version | sed 's/[0-9]*[.]\([0-9]*\).*/\1/' `;
|
|
|
|
#
|
|
|
|
# echo "major = $DarwinMajorVersion"
|
|
|
|
# echo "minor = $DarwinMinorVersion"
|
|
|
|
#
|
|
|
|
# Darwin version 11.x.y corresponds to OS 10.7.x
|
|
|
|
# Darwin version 10.x.y corresponds to OS 10.6.x
|
|
|
|
# Darwin version 8.x.y corresponds to OS 10.4.x
|
|
|
|
# Darwin version 7.x.y corresponds to OS 10.3.x
|
|
|
|
# Darwin version 6.x corresponds to OS 10.2.x
|
|
|
|
|
2011-09-09 10:18:12 +00:00
|
|
|
if [ "$DarwinMajorVersion" -gt 10 ]; then
|
2011-07-26 12:11:34 +00:00
|
|
|
# XCode 4.1 on OS 10.7 builds only Intel binaries
|
|
|
|
arch="i686"
|
2011-09-09 10:18:12 +00:00
|
|
|
|
|
|
|
# XCode 3.x and 4.x use different paths for their build products.
|
|
|
|
# Our scripts in XCode's script build phase write those paths to
|
|
|
|
# files to help this release script find the build products.
|
|
|
|
if [ "$4" = "-dev" ]; then
|
|
|
|
exec 7<"mac_build/Build_Development_Dir"
|
|
|
|
read -u 7 BUILDPATH
|
|
|
|
else
|
|
|
|
exec 7<"mac_build/Build_Deployment_Dir"
|
|
|
|
read -u 7 BUILDPATH
|
|
|
|
fi
|
|
|
|
|
2011-07-26 12:11:34 +00:00
|
|
|
else
|
|
|
|
# XCode 3.2 on OS 10.6 does sbuild Intel and PowerPC Universal binaries
|
|
|
|
arch="universal"
|
2011-09-09 10:18:12 +00:00
|
|
|
|
|
|
|
# XCode 3.x and 4.x use different paths for their build products.
|
|
|
|
if [ "$4" = "-dev" ]; then
|
|
|
|
if [ -d mac_build/build/Development/ ]; then
|
|
|
|
BUILDPATH="mac_build/build/Development"
|
|
|
|
else
|
|
|
|
BUILDPATH="mac_build/build"
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
if [ -d mac_build/build/Deployment/ ]; then
|
|
|
|
BUILDPATH="mac_build/build/Deployment"
|
|
|
|
else
|
|
|
|
BUILDPATH="mac_build/build"
|
|
|
|
fi
|
|
|
|
fi
|
2011-07-26 12:11:34 +00:00
|
|
|
fi
|
|
|
|
|
2005-10-01 21:54:55 +00:00
|
|
|
sudo rm -dfR ../BOINC_Installer/Installer\ Resources/
|
2007-10-31 10:40:19 +00:00
|
|
|
sudo rm -dfR ../BOINC_Installer/Installer\ Scripts/
|
2005-10-01 21:54:55 +00:00
|
|
|
sudo rm -dfR ../BOINC_Installer/Pkg_Root
|
2005-09-02 04:16:20 +00:00
|
|
|
|
|
|
|
mkdir -p ../BOINC_Installer/Installer\ Resources/
|
2007-10-31 10:40:19 +00:00
|
|
|
mkdir -p ../BOINC_Installer/Installer\ Scripts/
|
2005-09-02 04:16:20 +00:00
|
|
|
|
2012-01-06 10:44:53 +00:00
|
|
|
cp -fp mac_installer/License.rtf ../BOINC_Installer/Installer\ Resources/
|
2005-09-02 04:16:20 +00:00
|
|
|
cp -fp mac_installer/ReadMe.rtf ../BOINC_Installer/Installer\ Resources/
|
2007-06-12 10:25:48 +00:00
|
|
|
cp -fp win_build/installerv2/redist/all_projects_list.xml ../BOINC_Installer/Installer\ Resources/
|
|
|
|
|
2006-04-17 23:55:35 +00:00
|
|
|
# Update version number
|
|
|
|
sed -i "" s/"<VER_NUM>"/"$1.$2.$3"/g ../BOINC_Installer/Installer\ Resources/ReadMe.rtf
|
|
|
|
|
2006-04-17 07:58:19 +00:00
|
|
|
#### We don't customize BOINC Data directory name for branding
|
2007-10-31 10:40:19 +00:00
|
|
|
cp -fp mac_installer/preinstall ../BOINC_Installer/Installer\ Scripts/
|
|
|
|
cp -fp mac_installer/preinstall ../BOINC_Installer/Installer\ Scripts/preupgrade
|
|
|
|
cp -fp mac_installer/postinstall ../BOINC_Installer/Installer\ Scripts/
|
|
|
|
cp -fp mac_installer/postupgrade ../BOINC_Installer/Installer\ Scripts/
|
2005-09-02 04:16:20 +00:00
|
|
|
|
2007-04-03 09:48:57 +00:00
|
|
|
cp -fpR $BUILDPATH/PostInstall.app ../BOINC_Installer/Installer\ Resources/
|
2005-09-02 04:16:20 +00:00
|
|
|
|
|
|
|
mkdir -p ../BOINC_Installer/Pkg_Root
|
|
|
|
mkdir -p ../BOINC_Installer/Pkg_Root/Applications
|
|
|
|
mkdir -p ../BOINC_Installer/Pkg_Root/Library
|
|
|
|
mkdir -p ../BOINC_Installer/Pkg_Root/Library/Screen\ Savers
|
|
|
|
mkdir -p ../BOINC_Installer/Pkg_Root/Library/Application\ Support
|
|
|
|
mkdir -p ../BOINC_Installer/Pkg_Root/Library/Application\ Support/BOINC\ Data
|
|
|
|
mkdir -p ../BOINC_Installer/Pkg_Root/Library/Application\ Support/BOINC\ Data/locale
|
2006-06-20 11:25:23 +00:00
|
|
|
mkdir -p ../BOINC_Installer/Pkg_Root/Library/Application\ Support/BOINC\ Data/switcher
|
2007-07-11 09:52:05 +00:00
|
|
|
mkdir -p ../BOINC_Installer/Pkg_Root/Library/Application\ Support/BOINC\ Data/skins
|
2011-10-27 11:50:31 +00:00
|
|
|
# We must create virtualbox directory so installer will set up its
|
|
|
|
# ownership and permissions correctly, because vboxwrapper won't
|
|
|
|
# have permission to set owner to boinc_master.
|
|
|
|
mkdir -p ../BOINC_Installer/Pkg_Root/Library/Application\ Support/BOINC\ Data/projects/virtualbox
|
2006-06-20 11:25:23 +00:00
|
|
|
|
2011-12-02 13:11:21 +00:00
|
|
|
##cp -fpR $BUILDPATH/WaitPermissions.app ../BOINC_Installer/Pkg_Root/Library/Application\ Support/BOINC\ Data/
|
2010-12-02 13:55:41 +00:00
|
|
|
|
2006-06-20 11:25:23 +00:00
|
|
|
cp -fpR $BUILDPATH/switcher ../BOINC_Installer/Pkg_Root/Library/Application\ Support/BOINC\ Data/switcher/
|
2006-07-06 11:04:46 +00:00
|
|
|
cp -fpR $BUILDPATH/setprojectgrp ../BOINC_Installer/Pkg_Root/Library/Application\ Support/BOINC\ Data/switcher/
|
2007-02-20 01:39:26 +00:00
|
|
|
## cp -fpR $BUILDPATH/AppStats ../BOINC_Installer/Pkg_Root/Library/Application\ Support/BOINC\ Data/switcher/
|
2005-09-02 04:16:20 +00:00
|
|
|
|
2011-10-26 12:12:46 +00:00
|
|
|
cd "${BOINCPath}/clientgui/skins"
|
|
|
|
cp -fpR Default ../../../BOINC_Installer/Pkg_Root/Library/Application\ Support/BOINC\ Data/skins/
|
|
|
|
cd "${BOINCPath}"
|
|
|
|
|
2006-12-14 02:58:52 +00:00
|
|
|
## FOR NOW - Don't install WCG Skins. If you reinstate this, also reinstate preinstall & preupgrade above
|
2006-12-01 06:45:59 +00:00
|
|
|
## Copy the World Community Grid skins into the installer tree, minus the CVS files
|
2006-12-14 02:58:52 +00:00
|
|
|
## cd "${BOINCPath}/clientgui/skins"
|
|
|
|
## cp -fpR World\ Community\ Grid ../../../BOINC_Installer/Pkg_Root/Library/Application\ Support/BOINC\ Data/skins/
|
|
|
|
## cd "${BOINCPath}"
|
|
|
|
## 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
|
2006-12-01 06:45:59 +00:00
|
|
|
|
2007-06-12 10:25:48 +00:00
|
|
|
cp -fp curl/ca-bundle.crt ../BOINC_Installer/Pkg_Root/Library/Application\ Support/BOINC\ Data/
|
2006-08-25 12:38:18 +00:00
|
|
|
|
2009-05-20 10:26:45 +00:00
|
|
|
cp -fp doc/logo/boinc_logo_black.jpg ../BOINC_Installer/Pkg_Root/Library/Application\ Support/BOINC\ Data/
|
2012-08-02 06:53:11 +00:00
|
|
|
cp -fp api/ttf/liberation-fonts-ttf-2.00.0/LiberationSans-Regular.ttf ../BOINC_Installer/Pkg_Root/Library/Application\ Support/BOINC\ Data/LiberationSans-Regular.ttf
|
2009-05-20 10:26:45 +00:00
|
|
|
cp -fp clientscr/ss_config.xml ../BOINC_Installer/Pkg_Root/Library/Application\ Support/BOINC\ Data/
|
|
|
|
cp -fpR $BUILDPATH/boincscr ../BOINC_Installer/Pkg_Root/Library/Application\ Support/BOINC\ Data/
|
|
|
|
|
2005-11-08 01:07:13 +00:00
|
|
|
cp -fpR $BUILDPATH/BOINCManager.app ../BOINC_Installer/Pkg_Root/Applications/
|
2005-09-02 04:16:20 +00:00
|
|
|
|
2005-11-08 01:07:13 +00:00
|
|
|
cp -fpR $BUILDPATH/BOINCSaver.saver ../BOINC_Installer/Pkg_Root/Library/Screen\ Savers/
|
2005-09-02 04:16:20 +00:00
|
|
|
|
2005-10-20 10:06:07 +00:00
|
|
|
## Copy the localization files into the installer tree
|
|
|
|
## Old way copies CVS and *.po files which are not needed
|
2009-01-10 09:59:33 +00:00
|
|
|
## cp -fpR locale/ ../BOINC_Installer/Pkg_Root/Library/Application\ Support/BOINC\ Data/locale
|
2005-10-20 09:56:22 +00:00
|
|
|
## sudo rm -dfR ../BOINC_Installer/Pkg_Root/Library/Application\ Support/BOINC\ Data/locale/CVS
|
2005-10-20 10:07:00 +00:00
|
|
|
## New way copies only *.mo files (adapted from boinc/sea/make-tar.sh)
|
2009-01-10 09:59:33 +00:00
|
|
|
find locale -name '*.mo' | cut -d '/' -f 2 | awk '{print "\"../BOINC_Installer/Pkg_Root/Library/Application Support/BOINC Data/locale/"$0"\""}' | xargs mkdir -p
|
|
|
|
find locale -name '*.mo' | cut -d '/' -f 2,3 | awk '{print "cp \"locale/"$0"\" \"../BOINC_Installer/Pkg_Root/Library/Application Support/BOINC Data/locale/"$0"\""}' | bash
|
2005-09-02 04:16:20 +00:00
|
|
|
|
2006-01-21 12:42:04 +00:00
|
|
|
## Fix up ownership and permissions
|
2005-09-02 04:16:20 +00:00
|
|
|
sudo chown -R root:admin ../BOINC_Installer/Pkg_Root/*
|
2006-06-20 11:25:23 +00:00
|
|
|
sudo chmod -R u+rw,g+rw,o+r-w ../BOINC_Installer/Pkg_Root/*
|
2006-01-21 12:42:04 +00:00
|
|
|
sudo chmod 1775 ../BOINC_Installer/Pkg_Root/Library
|
2005-09-02 04:16:20 +00:00
|
|
|
|
2006-01-21 12:42:04 +00:00
|
|
|
sudo chown -R 501:admin ../BOINC_Installer/Pkg_Root/Library/Application\ Support/*
|
2006-06-20 11:25:23 +00:00
|
|
|
sudo chmod -R u+rw,g+r-w,o+r-w ../BOINC_Installer/Pkg_Root/Library/Application\ Support/*
|
2005-09-02 04:16:20 +00:00
|
|
|
|
2005-09-02 07:15:22 +00:00
|
|
|
sudo chown -R root:admin ../BOINC_Installer/Installer\ Resources/*
|
2007-10-31 10:40:19 +00:00
|
|
|
sudo chown -R root:admin ../BOINC_Installer/Installer\ Scripts/*
|
2006-06-20 11:25:23 +00:00
|
|
|
sudo chmod -R u+rw,g+r-w,o+r-w ../BOINC_Installer/Installer\ Resources/*
|
2007-10-31 10:40:19 +00:00
|
|
|
sudo chmod -R u+rw,g+r-w,o+r-w ../BOINC_Installer/Installer\ Scripts/*
|
2005-09-02 07:15:22 +00:00
|
|
|
|
2005-10-01 21:54:55 +00:00
|
|
|
sudo rm -dfR ../BOINC_Installer/New_Release_$1_$2_$3/
|
|
|
|
|
2005-09-02 04:16:20 +00:00
|
|
|
mkdir -p ../BOINC_Installer/New_Release_$1_$2_$3/
|
2011-07-26 12:11:34 +00:00
|
|
|
mkdir -p ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch
|
|
|
|
mkdir -p ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/extras
|
|
|
|
mkdir -p ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_$arch-apple-darwin
|
2005-09-21 04:51:20 +00:00
|
|
|
mkdir -p ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_SymbolTables
|
2005-09-02 04:16:20 +00:00
|
|
|
|
2011-07-26 12:11:34 +00:00
|
|
|
cp -fp ../BOINC_Installer/Installer\ Resources/ReadMe.rtf ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch
|
|
|
|
sudo chown -R 501:admin ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/ReadMe.rtf
|
|
|
|
sudo chmod -R 644 ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/ReadMe.rtf
|
2008-09-04 00:26:23 +00:00
|
|
|
|
2011-07-26 12:11:34 +00:00
|
|
|
cp -fp COPYING ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/extras/COPYING.txt
|
|
|
|
sudo chown -R 501:admin ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/extras/COPYING.txt
|
|
|
|
sudo chmod -R 644 ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/extras/COPYING.txt
|
2008-09-04 00:26:23 +00:00
|
|
|
|
2011-07-26 12:11:34 +00:00
|
|
|
cp -fp COPYING.LESSER ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/extras/COPYING.LESSER.txt
|
|
|
|
sudo chown -R 501:admin ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/extras/COPYING.LESSER.txt
|
|
|
|
sudo chmod -R 644 ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/extras/COPYING.LESSER.txt
|
2007-06-09 11:42:26 +00:00
|
|
|
|
2011-07-26 12:11:34 +00:00
|
|
|
cp -fp COPYRIGHT ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/extras/COPYRIGHT.txt
|
|
|
|
sudo chown -R 501:admin ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/extras/COPYRIGHT.txt
|
|
|
|
sudo chmod -R 644 ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/extras/COPYRIGHT.txt
|
2007-06-06 11:42:51 +00:00
|
|
|
|
2011-07-26 12:11:34 +00:00
|
|
|
cp -fpR $BUILDPATH/Uninstall\ BOINC.app ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/extras
|
2013-06-18 11:03:24 +00:00
|
|
|
# Copy the localization files for the uninstaller into its bundle
|
|
|
|
find locale -name 'BOINC-Setup.mo' | cut -d '/' -f 2 | awk '{print "\"../BOINC_Installer/locale/"$0"\""}' | xargs mkdir -p
|
|
|
|
|
|
|
|
find locale -name 'BOINC-Setup.mo' | cut -d '/' -f 2,3 | awk '{print "cp \"locale/"$0"\" \"../BOINC_Installer/locale/"$0"\""}' | bash
|
|
|
|
|
|
|
|
sudo cp -fpR ../BOINC_Installer/locale "../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/extras/Uninstall BOINC.app/Contents/Resources"
|
|
|
|
|
2011-07-26 12:11:34 +00:00
|
|
|
sudo chown -R root:admin ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/extras/Uninstall\ BOINC.app
|
2013-06-18 11:03:24 +00:00
|
|
|
sudo chmod -R u+r-w,g+r-w,o+r-w ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/extras/Uninstall\ BOINC.app
|
2007-10-31 10:40:19 +00:00
|
|
|
|
2011-12-02 13:11:21 +00:00
|
|
|
# Copy the installer wrapper application "BOINC Installer.app"
|
|
|
|
cp -fpR $BUILDPATH/BOINC\ Installer.app ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/
|
|
|
|
|
2006-06-27 12:56:11 +00:00
|
|
|
# Build the installer package inside the wrapper application's bundle
|
2012-07-05 12:02:16 +00:00
|
|
|
# Because PackageMaker is now distributed separately from Xcode, we
|
|
|
|
# emulate the following PackageMaker command:
|
|
|
|
###/Developer/usr/bin/packagemaker -r ../BOINC_Installer/Pkg_Root -e ../BOINC_Installer/Installer\ Resources/ -s ../BOINC_Installer/Installer\ Scripts/ -f mac_build/Pkg-Info.plist -t "BOINC Manager" -n "$1.$2.$3" -b -o ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/BOINC\ Installer.app/Contents/Resources/BOINC.pkg
|
|
|
|
|
|
|
|
# Our PackageMaker emulation starts here
|
|
|
|
mkdir -p ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/BOINC\ Installer.app/Contents/Resources/BOINC.pkg/Contents/Resources
|
|
|
|
|
|
|
|
cd ../BOINC_Installer/Pkg_Root
|
|
|
|
|
|
|
|
mkbom ./ ../New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/BOINC\ Installer.app/Contents/Resources/BOINC.pkg/Contents/Archive.bom
|
|
|
|
|
|
|
|
pax -wz -x cpio -f ../New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/BOINC\ Installer.app/Contents/Resources/BOINC.pkg/Contents/Archive.pax.gz ./
|
|
|
|
|
|
|
|
cd "${BOINCPath}"
|
|
|
|
|
|
|
|
echo "pmkrpkg1" >> ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/BOINC\ Installer.app/Contents/Resources/BOINC.pkg/Contents/PkgInfo
|
|
|
|
|
|
|
|
cat >> ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/BOINC\ Installer.app/Contents/Resources/BOINC.pkg/Contents/Resources/package_version << ENDOFFILE
|
|
|
|
major: $1
|
|
|
|
minor: $2
|
|
|
|
ENDOFFILE
|
|
|
|
|
|
|
|
cp -fp mac_build/Pkg-Info.plist ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/BOINC\ Installer.app/Contents/Resources/BOINC.pkg/Contents/Info.plist
|
|
|
|
|
|
|
|
cp -fpR ../BOINC_Installer/Installer\ Resources/ ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/BOINC\ Installer.app/Contents/Resources/BOINC.pkg/Contents/Resources
|
|
|
|
|
|
|
|
sudo chmod a+x ../BOINC_Installer/Installer\ Scripts/*
|
|
|
|
cp -fpR ../BOINC_Installer/Installer\ Scripts/ ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/BOINC\ Installer.app/Contents/Resources/BOINC.pkg/Contents/Resources
|
|
|
|
|
|
|
|
# End of our PackageMaker emulation
|
2011-12-02 13:11:21 +00:00
|
|
|
|
2012-01-06 10:44:53 +00:00
|
|
|
# add a more complete Description.plist file to display in Installer's Customize pane
|
2012-07-05 12:02:16 +00:00
|
|
|
if [ ! -d ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/BOINC\ Installer.app/Contents/Resources/BOINC.pkg/Contents/Resources/en.lproj/ ]; then
|
|
|
|
mkdir -p ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/BOINC\ Installer.app/Contents/Resources/BOINC.pkg/Contents/Resources/en.lproj
|
2012-01-06 10:44:53 +00:00
|
|
|
fi
|
2012-07-05 12:02:16 +00:00
|
|
|
cp -fp mac_installer/Description.plist ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/BOINC\ Installer.app/Contents/Resources/BOINC.pkg/Contents/Resources/en.lproj/
|
2012-01-06 10:44:53 +00:00
|
|
|
|
2013-06-11 12:22:12 +00:00
|
|
|
# Build the "BOINC.mpkg" metapackage (used if installer.app determines
|
|
|
|
# that we need user to restart OS X after installation)
|
|
|
|
mkdir -p "../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/BOINC Installer.app/Contents/Resources/BOINC.mpkg/Contents/Resources"
|
|
|
|
cp -fp mac_build/Pkg_Restart-Info.plist ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/BOINC\ Installer.app/Contents/Resources/BOINC.mpkg/Contents/Info.plist
|
|
|
|
cp -fp mac_installer/License.rtf ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/BOINC\ Installer.app/Contents/Resources/BOINC.mpkg/Contents/Resources/
|
|
|
|
cp -fp ../BOINC_Installer/Installer\ Resources/ReadMe.rtf ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/BOINC\ Installer.app/Contents/Resources/BOINC.mpkg/Contents/Resources/
|
|
|
|
cat >> ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/BOINC\ Installer.app/Contents/Resources/BOINC.mpkg/Contents/Resources/package_version << ENDOFFILE
|
|
|
|
major: $1
|
|
|
|
minor: $2
|
|
|
|
ENDOFFILE
|
|
|
|
echo "pmkrpkg1" > ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/BOINC\ Installer.app/Contents/Resources/BOINC.mpkg/Contents/PkgInfo
|
|
|
|
|
|
|
|
|
2012-01-06 10:44:53 +00:00
|
|
|
# Build the BOINC+VirtualBox.mpkg metapackage if VirtualBox.pkg exists
|
|
|
|
|
|
|
|
VirtualBoxPackageName="VirtualBox.pkg"
|
|
|
|
if [ -d mac_installer/${VirtualBoxPackageName}/ ]; then
|
|
|
|
mkdir -p "../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/BOINC Installer.app/Contents/Resources/BOINC+VirtualBox.mpkg/Contents/Resources"
|
|
|
|
cp -fp mac_build/Mpkg-Info.plist ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/BOINC\ Installer.app/Contents/Resources/BOINC+VirtualBox.mpkg/Contents/Info.plist
|
|
|
|
cp -fp mac_installer/License.rtf ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/BOINC\ Installer.app/Contents/Resources/BOINC+VirtualBox.mpkg/Contents/Resources/
|
|
|
|
cp -fp ../BOINC_Installer/Installer\ Resources/ReadMe.rtf ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/BOINC\ Installer.app/Contents/Resources/BOINC+VirtualBox.mpkg/Contents/Resources/
|
|
|
|
cat >> ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/BOINC\ Installer.app/Contents/Resources/BOINC+VirtualBox.mpkg/Contents/Resources/package_version << ENDOFFILE
|
|
|
|
major: $1
|
|
|
|
minor: $2
|
|
|
|
ENDOFFILE
|
|
|
|
echo "pmkrpkg1" > ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/BOINC\ Installer.app/Contents/Resources/BOINC+VirtualBox.mpkg/Contents/PkgInfo
|
|
|
|
|
|
|
|
cp -fpR mac_installer/${VirtualBoxPackageName} ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/BOINC\ Installer.app/Contents/Resources/
|
2013-06-11 12:22:12 +00:00
|
|
|
|
2013-06-11 12:40:44 +00:00
|
|
|
# Now create the "BOINC + VirtualBox.mpkg" metapackage (used if installer.app
|
2013-06-11 12:22:12 +00:00
|
|
|
# determines that we need user to restart OS X after installation)
|
2013-06-11 12:40:44 +00:00
|
|
|
# Note the name of this version has spaces around the "+"
|
|
|
|
cp -fpR "../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/BOINC Installer.app/Contents/Resources/BOINC+VirtualBox.mpkg" "../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/BOINC Installer.app/Contents/Resources/BOINC + VirtualBox.mpkg"
|
|
|
|
# Change "NoRestart" to "RequiredRestart" in BOINC + VirtualBox.mpkg
|
|
|
|
sed -i "" s/"NoRestart"/"RequiredRestart"/g "../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/BOINC Installer.app/Contents/Resources/BOINC + VirtualBox.mpkg/Contents/Info.plist"
|
2012-01-06 10:44:53 +00:00
|
|
|
fi
|
|
|
|
|
2006-09-22 02:54:27 +00:00
|
|
|
# Build the stand-alone client distribution
|
2011-07-26 12:11:34 +00:00
|
|
|
cp -fpR mac_build/Mac_SA_Insecure.sh ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_$arch-apple-darwin/
|
|
|
|
cp -fpR mac_build/Mac_SA_Secure.sh ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_$arch-apple-darwin/
|
|
|
|
cp -fpR COPYING ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_$arch-apple-darwin/COPYING.txt
|
|
|
|
cp -fpR COPYING.LESSER ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_$arch-apple-darwin/COPYING.LESSER.txt
|
|
|
|
cp -fpR COPYRIGHT ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_$arch-apple-darwin/COPYRIGHT.txt
|
2012-01-06 10:44:53 +00:00
|
|
|
cp -fp mac_installer/License.rtf ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_$arch-apple-darwin/
|
2011-07-26 12:11:34 +00:00
|
|
|
sudo chown -R 501:admin ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_$arch-apple-darwin/*
|
|
|
|
sudo chmod -R 644 ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_$arch-apple-darwin/*
|
|
|
|
|
|
|
|
mkdir -p ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_$arch-apple-darwin/move_to_boinc_dir
|
|
|
|
cp -fpR $BUILDPATH/boinc ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_$arch-apple-darwin/move_to_boinc_dir/
|
|
|
|
cp -fpR $BUILDPATH/boinccmd ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_$arch-apple-darwin/move_to_boinc_dir/
|
|
|
|
cp -fpR curl/ca-bundle.crt ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_$arch-apple-darwin/move_to_boinc_dir/
|
|
|
|
|
|
|
|
mkdir -p ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_$arch-apple-darwin/move_to_boinc_dir/switcher
|
|
|
|
cp -fpR $BUILDPATH/switcher ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_$arch-apple-darwin/move_to_boinc_dir/switcher/
|
|
|
|
cp -fpR $BUILDPATH/setprojectgrp ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_$arch-apple-darwin/move_to_boinc_dir/switcher/
|
|
|
|
## cp -fpR $BUILDPATH/AppStats ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_$arch-apple-darwin/move_to_boinc_dir/switcher/
|
|
|
|
|
|
|
|
sudo chown -R root:admin ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_$arch-apple-darwin/move_to_boinc_dir/*
|
|
|
|
sudo chmod -R u+rw-s,g+r-ws,o+r-w ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_$arch-apple-darwin/move_to_boinc_dir/*
|
2006-09-22 02:54:27 +00:00
|
|
|
|
2008-03-19 11:33:19 +00:00
|
|
|
cp -fpR $BUILDPATH/SymbolTables/ ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_SymbolTables/
|
2006-09-22 02:54:27 +00:00
|
|
|
|
2012-06-22 09:46:26 +00:00
|
|
|
## If you wish to code sign the installer and uninstaller, create a file
|
|
|
|
## ~/BOINCCodeSignIdentity.txt whose first line is the code signing identity
|
|
|
|
##
|
|
|
|
## Code signing using a registered Apple Developer ID is necessary for GateKeeper
|
|
|
|
## with default settings to allow running downloaded applications under OS 10.8
|
|
|
|
if [ -e "${HOME}/BOINCCodeSignIdentity.txt" ]; then
|
|
|
|
exec 8<"${HOME}/BOINCCodeSignIdentity.txt"
|
|
|
|
read -u 8 SIGNINGIDENTITY
|
|
|
|
|
|
|
|
# Code Sign the BOINC installer if we have a signing identity
|
|
|
|
sudo codesign -f -s "${SIGNINGIDENTITY}" "../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/BOINC Installer.app"
|
|
|
|
|
|
|
|
# Code Sign the BOINC uninstaller if we have a signing identity
|
|
|
|
sudo codesign -f -s "${SIGNINGIDENTITY}" "../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/extras/Uninstall BOINC.app"
|
|
|
|
fi
|
|
|
|
|
2005-09-02 04:16:20 +00:00
|
|
|
cd ../BOINC_Installer/New_Release_$1_$2_$3
|
2010-11-23 09:27:14 +00:00
|
|
|
## Use ditto instead of zip utility to preserve resource forks and Finder attributes (custom icon, hide extension)
|
2011-07-26 12:11:34 +00:00
|
|
|
ditto -ck --sequesterRsrc --keepParent boinc_$1.$2.$3_macOSX_$arch boinc_$1.$2.$3_macOSX_$arch.zip
|
|
|
|
ditto -ck --sequesterRsrc --keepParent boinc_$1.$2.$3_$arch-apple-darwin boinc_$1.$2.$3_$arch-apple-darwin.zip
|
2010-12-02 13:55:41 +00:00
|
|
|
ditto -ck --sequesterRsrc --keepParent boinc_$1.$2.$3_macOSX_SymbolTables boinc_$1.$2.$3_macOSX_SymbolTables.zip
|
2005-09-02 04:16:20 +00:00
|
|
|
|
2006-12-01 06:45:59 +00:00
|
|
|
#popd
|
|
|
|
cd "${BOINCPath}"
|
|
|
|
|
2006-01-21 12:42:04 +00:00
|
|
|
return 0
|