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
2020-03-04 11:00:44 +00:00
# Copyright (C) 2020 University of California
2009-02-21 02:42:50 +00:00
#
# 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
2013-08-15 11:24:20 +00:00
## updated 8/15/13 by Charlie Fenton to fix bug in localizable uninstaller
2013-10-30 12:19:29 +00:00
## updated 10/30/13 by Charlie Fenton to build a flat package
2013-11-18 13:41:28 +00:00
## updated 11/1/13 by Charlie Fenton to build installers both with and without VBox
## updated 11/18/13 by Charlie Fenton for Xcode 5.0.2
2014-01-22 11:04:16 +00:00
## updated 1/22/14 by Charlie Fenton: embed VBox uninstaller in BOINC uninstaller
2014-09-30 12:18:10 +00:00
## updated 9/30/14 by Charlie Fenton to code sign the BOINC client and Manager
2014-12-16 14:50:45 +00:00
## updated 12/16/14 by Charlie Fenton to name folders "x86_64" not "i686"
## updated 12/16/14 by Charlie Fenton to also code sign the installer package
2014-12-17 15:01:03 +00:00
## updated 12/17/14 by Charlie Fenton to fix typo in build of BOINC+VBox installer
2015-04-08 02:41:48 +00:00
## updated 4/7/15 by Charlie Fenton to comment on problem with BOINC+VBox installer
2015-07-01 11:21:08 +00:00
## updated 7/1/15 by Charlie Fenton for compatibility with OS 10.11
2017-06-05 09:16:06 +00:00
## updated 6/4/17 by Charlie Fenton for compatibility with Xcode versions > 5.0.2
2017-10-19 13:40:01 +00:00
## updated 10/19/17 by Charlie Fenton for different path to boinc_logo_black.jpg
2017-11-11 13:37:15 +00:00
## updated 11/11/17 by Charlie Fenton make all user-writable to help auto-attach
2018-11-06 13:31:12 +00:00
## updated 11/6/18 by Charlie Fenton to code sign for Apple "notarization"
2019-11-08 11:40:22 +00:00
## updated 11/4/19 by Charlie Fenton to code sign for new gfx_cleanup helper app
2020-03-04 11:00:44 +00:00
## updated 3/4/20 by Charlie Fenton to copy symbol tables directly from build
2020-11-23 12:43:14 +00:00
## Updated 7/29/20 by Charlie Fenton to build arm64 and x86_64 Universal2 Binary
## Updated 11/22/20 by Charlie Fenton to build DMG bare-core (apple-darwin) release
2020-12-01 10:53:07 +00:00
## Updated 11/26/20 by Charlie Fenton to let installer show message if MacOS too old
2009-06-19 09:31:46 +00:00
##
2020-08-02 06:41:58 +00:00
## NOTE: This script requires Mac OS 10.7 or later, and uses XCode developer
2012-07-05 12:02:16 +00:00
## tools. So you must have installed XCode Developer Tools on the Mac
2020-08-02 06:41:58 +00:00
## before running this script. You must code sign using OS 10.9 or later
2014-09-30 12:18:10 +00:00
## for compatibility with Gatekeeper on OS 10.10 or later.
##
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"
2017-06-05 09:16:06 +00:00
## Under Mavericks and Xcode 5, select "Product/Build For/Profiling"
2011-09-09 10:18:12 +00:00
2013-11-01 09:41:10 +00:00
## To have this script build the combined BOINC+VirtualBox installer:
## * Create a directory named "VirtualBox Installer" in the same
## directory which contains he root directory of the boinc tree.
## * Copy VirtualBox.pkg from the VirtualBox installer disk image (.dmg)
## into this "VirtualBox Installer" directory.
## * Copy VirtualBox_Uninstall.tool from the VirtualBox installer disk
## image (.dmg) into this "VirtualBox Installer" directory.
##
2015-04-08 02:41:48 +00:00
## NOTE: As of 5/7/15, I recommend against releasing the combined Macintosh
## BOINC+VirtualBox installer because each version of VirtualBox comes with
## its own uninsall script included as a separate command-line utility.
## Using the uninstall script from a previous version of VirtualBox may not
## work correctly, so we can't just add the current script to our "Uninstall
## BOINC" utility because the user may later upgrade to a newer version of
## VirtualBox. We should not install VirtualBox as part of the BOINC install
## unless our BOINC uninstaller will uninstall it. We can't expect BOINC users
## to be comfortable finding and running a command-line utility.
##
## We have asked Oracle to include their uninstall script inside the VirtualBox
## bundle, or some other standard place where our BOINC uninstaller can find
## the current version, but they have not yet done so.
2013-11-01 09:41:10 +00:00
2005-09-02 04:16:20 +00:00
## Usage:
2012-06-22 09:46:26 +00:00
##
2014-09-30 12:18:10 +00:00
## If you wish to code sign the client, manager, installer and uninstaller,
2014-12-16 14:50:45 +00:00
## create a file ~/BOINCCodeSignIdentities.txt whose first line is the code
## signing identity.
## If you wish to also code sign the installer package, add a second line
## to ~/BOINCCodeSignIdentities.txt with the installer code signing identity.
2012-06-22 09:46:26 +00:00
##
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
2018-10-30 10:29:09 +00:00
## As of OS 10.14 Mojave, Apple has introduced a new level of security which
## Apple calls "notarization". Under OS 10.14, the only difference is that
## Gatekeeper adds the sentence "Apple checked it for malicious software and
## found none." However, Apple has warned: "In an upcoming release of macOS,
## Gatekeeper will require Developer ID– signed software to be notarized by
## Apple."
##
## To notarize the installer and uninstaller:
2019-11-08 11:40:22 +00:00
## NOTE: Do not use your normal Apple ID password. You must create an
## app-specific password at https://appleid.apple.com/account/manage.
##
2018-10-30 10:29:09 +00:00
## - Use the command line tools in Xcode 10 or later
## - Provide valid application & installer code signing identities as above
2020-11-23 12:43:14 +00:00
## - In the instructions below, substitute the appropriate architcture for $arch
## (either x86_64, arm64 or universal)
## - In Terminal:
## $ xcrun altool --notarize-app -t osx -f {path to ...macOSX_$arch.zip} --primary-bundle-id edu.berkeley.boinc.Installer -u {userID} -p {password}
2018-11-06 13:31:12 +00:00
## - After a few minutes, check whether the notarize-app request succeeded:
## $ xcrun altool --notarization-info {UUID from last step} -u {userID} -p {password}
## - If the notarize-app request succeeded, attach tickets to top level applications:
2020-11-23 12:43:14 +00:00
## $ xcrun stapler staple {path to "...macOSX_$arch.zip/BOINC Installer.app"}
## $ xcrun stapler staple {path to "...macOSX_$arch.zip/extras/Uninstall BOINC.app"}
## - delete or rename the original "...macOSX_$arch.zip" file
## - Run this ditto command again to create a new "...macOSX_$arch.zip" containing
2018-10-30 10:29:09 +00:00
## the updated (notarized) BOINC Installer.app and Uninstall BOINC.app:
2020-11-23 12:43:14 +00:00
## $ ditto -ck --sequesterRsrc --keepParent {path to "boinc_$1.$2.$3_macOSX_$arch"} {path to "boinc_$1.$2.$3_macOSX_$arch.zip"}
##
## Then notarize the bare-core (apple-darwin) release as follows:
## $ xcrun altool --notarize-app -t osx -f {path to ..._$arch-apple-darwin.dmg} --primary-bundle-id edu.berkeley.boinccmd -u {userID} -p {password}
## - After a few minutes, check whether the notarize-app request succeeded:
## $ xcrun altool --notarization-info {UUID from last step} -u {userID} -p {password}
## - If the notarize-app request succeeded, attach tickets to top level applications:
## $ xcrun stapler staple {path to ..._$arch-apple-darwin.dmg}
##
2018-11-06 13:31:12 +00:00
## - Note: if you are running stapler under OS 10.13 and get an error 68, the local CRL
## cache may have become corrupted. You can resolve this by either running stapler
## under MacOS 10.14 Mojave or by running this command under OS 10.13:
## $ sudo killall -9 trustd; sudo rm /Library/Keychains/crls/valid.sqlite3
## - for more information:
## $ xcrun altool --help
## $ man stapler
2018-10-30 10:29:09 +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
2020-08-02 06:41:58 +00:00
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
##DarwinVersion=`uname -r`;
##DarwinMajorVersion=`echo $DarwinVersion | sed 's/\([0-9]*\)[.].*/\1/' `;
2011-07-26 12:11:34 +00:00
# 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
2020-08-02 06:41:58 +00:00
arch = "x86_64"
2011-09-09 10:18:12 +00:00
2020-08-02 06:41:58 +00:00
Products_Have_x86_64 = "no"
Products_Have_arm64 = "no"
cd " ${ BUILDPATH } "
lipo "BOINCManager.app/Contents/MacOS/BOINCManager" -verify_arch x86_64
if [ $? -eq 0 ] ; then Products_Have_x86_64 = "yes" ; fi
lipo "BOINCManager.app/Contents/MacOS/BOINCManager" -verify_arch arm64
if [ $? -eq 0 ] ; then Products_Have_arm64 = "yes" ; fi
if [ $Products_Have_x86_64 = = "no" ] && [ $Products_Have_arm64 = = "no" ] ; then
echo "ERROR: could not determine architecture of BOINC Manager"
fi
if [ $Products_Have_arm64 = = "yes" ] ; then
if [ $Products_Have_x86_64 = = "yes" ] ; then
arch = "universal"
2011-09-09 10:18:12 +00:00
else
2020-08-02 06:41:58 +00:00
arch = "arm64"
2011-09-09 10:18:12 +00:00
fi
2020-08-02 06:41:58 +00:00
fi
2011-09-09 10:18:12 +00:00
2020-08-02 06:41:58 +00:00
for Executable in "boinc" "boinccmd" "switcher" "setprojectgrp" "boincscr" "BOINCSaver.saver/Contents/MacOS/BOINCSaver" "Uninstall BOINC.app/Contents/MacOS/Uninstall BOINC" "BOINC Installer.app/Contents/MacOS/BOINC Installer" "PostInstall.app/Contents/MacOS/PostInstall"
do
Have_x86_64 = "no"
Have_arm64 = "no"
lipo " ${ Executable } " -verify_arch x86_64
if [ $? -eq 0 ] ; then Have_x86_64 = "yes" ; fi
lipo " ${ Executable } " -verify_arch arm64
if [ $? -eq 0 ] ; then Have_arm64 = "yes" ; fi
if [ $Have_x86_64 != $Products_Have_x86_64 ] || [ $Have_arm64 != $Products_Have_arm64 ] ; then
echo "ERROR: Architecture mismatch: BOINC Manager and " " ${ Executable } "
return 1
2011-09-09 10:18:12 +00:00
fi
2020-08-02 06:41:58 +00:00
done
cd " ${ BOINCPath } "
2011-07-26 12:11:34 +00:00
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
2013-08-15 11:24:20 +00:00
sudo rm -dfR ../BOINC_Installer/locale
2013-10-30 12:19:29 +00:00
sudo rm -dfR ../BOINC_Installer/Installer\ templates
2013-11-01 09:41:10 +00:00
sudo rm -dfR ../BOINC_Installer/expandedVBox
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/
2013-10-30 12:19:29 +00:00
mkdir -p ../BOINC_Installer/Installer\ templates
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/
2013-10-30 12:19:29 +00:00
cp -fp mac_installer/complist.plist ../BOINC_Installer/Installer\ templates
cp -fp mac_installer/myDistribution ../BOINC_Installer/Installer\ templates
2007-06-12 10:25:48 +00:00
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
2013-10-30 12:19:29 +00:00
sed -i "" s/"x.y.z" /" $1 . $2 . $3 " /g ../BOINC_Installer/Installer\ templates/myDistribution
2006-04-17 23:55:35 +00:00
2020-12-01 10:53:07 +00:00
## Add a statement in the ReadMe telling Minimum required MacOS version, if known
OSVersion = ` /usr/libexec/PlistBuddy -c "Print :LSMinimumSystemVersion" " ${ BUILDPATH } /BOINCManager.app/Contents/Info.plist " `
if [ $? -eq 0 ] ; then
sed -i "" s/"<MINOSVERS>" /"^#NOTE: This version of BOINC requires MacOS <OSVERS> or later.^#" /g ../BOINC_Installer/Installer\ Resources/ReadMe.rtf
tr "^#" "\\\\\n" < ../BOINC_Installer/Installer\ Resources/ReadMe.rtf > /tmp/ReadMe.rtf
cp -f /tmp/ReadMe.rtf ../BOINC_Installer/Installer\ Resources/ReadMe.rtf
sed -i "" s/"<OSVERS>" /" $OSVersion " /g ../BOINC_Installer/Installer\ Resources/ReadMe.rtf
else
sed -i "" s/"<MINOSVERS>" /"" /g ../BOINC_Installer/Installer\ Resources/ReadMe.rtf
fi
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
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
2013-10-30 12:19:29 +00:00
# We must create virtualbox directory so installer will set up its
2011-10-27 11:50:31 +00:00
# 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
2017-10-27 10:45:14 +00:00
##cp -fpR "${BUILDPATH}/WaitPermissions.app" ../BOINC_Installer/Pkg_Root/Library/Application\ Support/BOINC\ Data/
2010-12-02 13:55:41 +00:00
2017-10-27 10:45:14 +00:00
cp -fpRL " ${ BUILDPATH } /switcher " ../BOINC_Installer/Pkg_Root/Library/Application\ Support/BOINC\ Data/switcher/
cp -fpRL " ${ BUILDPATH } /setprojectgrp " ../BOINC_Installer/Pkg_Root/Library/Application\ Support/BOINC\ Data/switcher/
## cp -fpRL "${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 "
2013-11-18 13:41:28 +00:00
cp -fpRL Default ../../../BOINC_Installer/Pkg_Root/Library/Application\ Support/BOINC\ Data/skins/
2011-10-26 12:12:46 +00:00
cd " ${ BOINCPath } "
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
2013-10-30 12:19:29 +00:00
cp -fp win_build/installerv2/redist/all_projects_list.xml ../BOINC_Installer/Pkg_Root/Library/Application\ Support/BOINC\ Data/installer_projects_list.xml
2017-10-19 13:40:01 +00:00
cp -fp clientscr/res/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/
2017-10-27 10:45:14 +00:00
cp -fpRL " ${ BUILDPATH } /boincscr " ../BOINC_Installer/Pkg_Root/Library/Application\ Support/BOINC\ Data/
2009-05-20 10:26:45 +00:00
2017-10-27 10:45:14 +00:00
cp -fpRL " ${ BUILDPATH } /BOINCManager.app " ../BOINC_Installer/Pkg_Root/Applications/
2005-09-02 04:16:20 +00:00
2017-06-05 09:16:06 +00:00
## OS 10.6 and OS10.7 require screensavers built with Garbage Collection, but Xcode 5.0.2
## was the last version of Xcode which supported building with Garbage Collection, so we
## have saved the screensaver executable with GC as a binary. Add it to the screen saver
## passed to the BOINC installer. At install time, he BOINC installer will select the
2018-10-30 10:29:09 +00:00
## correct binary for the version of OS X and delete the other one. This script assumes
2017-06-05 09:16:06 +00:00
## that $BUILDPATH/BOINCSaver.saver was built to use Automatic Reference Counting (ARC)
## and not built to use GC.
2017-10-27 10:45:14 +00:00
cp -fpRL " ${ BUILDPATH } /BOINCSaver.saver " ../BOINC_Installer/Pkg_Root/Library/Screen\ Savers/
2017-06-05 09:16:06 +00:00
ditto -xk ./clientscr/BOINCSaver_MacOS10_6_7.zip ../BOINC_Installer/Pkg_Root/Library/Screen\ Savers/BOINCSaver.saver/Contents/MacOS
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
2013-11-18 13:41:28 +00:00
## cp -fpRL 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
2017-10-27 10:45:14 +00:00
cp -fpRL " ${ 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
2013-11-18 13:41:28 +00:00
sudo cp -fpRL ../BOINC_Installer/locale " ../BOINC_Installer/New_Release_ $1 _ $2 _ $3 /boinc_ $1 . $2 . $3 _macOSX_ $arch /extras/Uninstall BOINC.app/Contents/Resources "
2013-06-18 11:03:24 +00:00
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"
2017-10-27 10:45:14 +00:00
cp -fpRL " ${ BUILDPATH } /BOINC Installer.app " ../BOINC_Installer/New_Release_$1 _$2 _$3 /boinc_$1 .$2 .$3 _macOSX_$arch /
2011-12-02 13:11:21 +00:00
2020-12-01 10:53:07 +00:00
## Allow the installer wrapper application to run on older versions of MacOS
## so it can display an appropriate error message.
/usr/libexec/PlistBuddy -c "Set :LSMinimumSystemVersion 10.0" " ../BOINC_Installer/New_Release_ $1 _ $2 _ $3 /boinc_ $1 . $2 . $3 _macOSX_ $arch /BOINC Installer.app/Contents/Info.plist "
2017-10-27 10:45:14 +00:00
cp -fpR " ${ BUILDPATH } /PostInstall.app " " ../BOINC_Installer/New_Release_ $1 _ $2 _ $3 /boinc_ $1 . $2 . $3 _macOSX_ $arch /BOINC Installer.app/Contents/Resources "
2015-07-01 11:21:08 +00:00
2018-10-30 10:29:09 +00:00
## If you wish to code sign the client, manager, installer and uninstaller,
## create a file ~/BOINCCodeSignIdentities.txt whose first line is the
## application code signing identity and whose second line is the installer
## code signing identity.
## If you wish to also code sign the installer package, add a second line
## to ~/BOINCCodeSignIdentities.txt with the installer 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
## Although code signing the installer application is sufficient to satisfy
## GateKeeper, OS X's software firewall can interfere with RPCs between the
## client and manager. Signing them may make this less likely to be a problem.
if [ -e " ${ HOME } /BOINCCodeSignIdentities.txt " ] ; then
exec 8<" ${ HOME } /BOINCCodeSignIdentities.txt "
read APPSIGNINGIDENTITY <& 8
read INSTALLERSIGNINGIDENTITY <& 8
# Code Sign the switcher utility if we have a signing identity
sudo codesign -f -o runtime -s " ${ APPSIGNINGIDENTITY } " "../BOINC_Installer/Pkg_Root/Library/Application Support/BOINC Data/switcher/switcher"
# Code Sign the setprojectgrp utility if we have a signing identity
sudo codesign -f -o runtime -s " ${ APPSIGNINGIDENTITY } " "../BOINC_Installer/Pkg_Root/Library/Application Support/BOINC Data/switcher/setprojectgrp"
# Code Sign the boincscr graphics app if we have a signing identity
sudo codesign -f -o runtime -s " ${ APPSIGNINGIDENTITY } " "../BOINC_Installer/Pkg_Root/Library/Application Support/BOINC Data/boincscr"
# Code Sign the BOINC screensaver code for OS 10.6 and OS 10.7 if we have a signing identity
sudo codesign -f -o runtime -s " ${ APPSIGNINGIDENTITY } " "../BOINC_Installer/Pkg_Root/Library/Screen Savers/BOINCSaver.saver/Contents/MacOS/BOINCSaver_MacOS10_6_7"
# Code Sign the gfx_switcher utility embedded in BOINC screensaver if we have a signing identity
sudo codesign -f -o runtime -s " ${ APPSIGNINGIDENTITY } " "../BOINC_Installer/Pkg_Root/Library/Screen Savers/BOINCSaver.saver/Contents/Resources/gfx_switcher"
2019-11-08 11:40:22 +00:00
# Code Sign the gfx_cleanup utility embedded in BOINC screensaver if we have a signing identity
sudo codesign -f -o runtime -s " ${ APPSIGNINGIDENTITY } " "../BOINC_Installer/Pkg_Root/Library/Screen Savers/BOINCSaver.saver/Contents/Resources/gfx_cleanup"
2018-10-30 10:29:09 +00:00
# Code Sign the BOINC screensaver code for OS 10.8 and later if we have a signing identity
sudo codesign -f -o runtime -s " ${ APPSIGNINGIDENTITY } " "../BOINC_Installer/Pkg_Root/Library/Screen Savers/BOINCSaver.saver"
# Code Sign the BOINC client embedded in the Manager if we have a signing identity
sudo codesign -f -o runtime -s " ${ APPSIGNINGIDENTITY } " "../BOINC_Installer/Pkg_Root/Applications/BOINCManager.app/Contents/Resources/boinc"
# Code Sign the BOINC Manager if we have a signing identity
sudo codesign -f -o runtime -s " ${ APPSIGNINGIDENTITY } " "../BOINC_Installer/Pkg_Root/Applications/BOINCManager.app"
2018-11-06 13:31:12 +00:00
# Code Sign boinc_finish_install app embedded in the PostInstall app if we have a signing identity
2018-10-30 10:29:09 +00:00
sudo codesign -f -o runtime -s " ${ APPSIGNINGIDENTITY } " " ../BOINC_Installer/New_Release_ $1 _ $2 _ $3 /boinc_ $1 . $2 . $3 _macOSX_ $arch /BOINC Installer.app/Contents/Resources/PostInstall.app/Contents/Resources/boinc_finish_install "
# Code Sign the PostInstall app embedded in the BOINC installer app if we have a signing identity
sudo codesign -f -o runtime -s " ${ APPSIGNINGIDENTITY } " " ../BOINC_Installer/New_Release_ $1 _ $2 _ $3 /boinc_ $1 . $2 . $3 _macOSX_ $arch /BOINC Installer.app/Contents/Resources/PostInstall.app "
2018-11-06 13:31:12 +00:00
# Code Sign boinc_finish_install app embedded in BOINC uninstaller app if we have a signing identity
2018-10-30 10:29:09 +00:00
sudo codesign -f -o runtime -s " ${ APPSIGNINGIDENTITY } " " ../BOINC_Installer/New_Release_ $1 _ $2 _ $3 /boinc_ $1 . $2 . $3 _macOSX_ $arch /extras/Uninstall BOINC.app/Contents/Resources/boinc_finish_install "
# Code Sign the BOINC uninstaller app if we have a signing identity
sudo codesign -f -o runtime -s " ${ APPSIGNINGIDENTITY } " " ../BOINC_Installer/New_Release_ $1 _ $2 _ $3 /boinc_ $1 . $2 . $3 _macOSX_ $arch /extras/Uninstall BOINC.app "
fi
2013-11-01 09:41:10 +00:00
# Prepare to build the BOINC+VirtualBox installer if VirtualBox.pkg exists
VirtualBoxPackageName = "VirtualBox.pkg"
if [ -f " ../VirtualBox Installer/ ${ VirtualBoxPackageName } " ] ; then
# Make a copy of the BOINC installer app without the installer package
2013-11-18 13:41:28 +00:00
sudo cp -fpRL " ../BOINC_Installer/New_Release_ $1 _ $2 _ $3 /boinc_ $1 . $2 . $3 _macOSX_ $arch " " ../BOINC_Installer/New_Release_ $1 _ $2 _ $3 /boinc_ $1 . $2 . $3 _macOSX_ ${ arch } _vbox "
2013-11-01 09:41:10 +00:00
# Copy the VirtualBox uninstall tool into the extras directory
2013-11-18 13:41:28 +00:00
sudo cp -fpRL "../VirtualBox Installer/VirtualBox_Uninstall.tool" " ../BOINC_Installer/New_Release_ $1 _ $2 _ $3 /boinc_ $1 . $2 . $3 _macOSX_ ${ arch } _vbox/extras/ "
2013-11-01 09:41:10 +00:00
sudo chown -R root:admin " ../BOINC_Installer/New_Release_ $1 _ $2 _ $3 /boinc_ $1 . $2 . $3 _macOSX_ ${ arch } _vbox/extras/VirtualBox_Uninstall.tool "
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 } _vbox/extras/VirtualBox_Uninstall.tool "
2014-01-22 11:04:16 +00:00
# Copy the VirtualBox uninstall tool into the BOINC uninstaller
sudo cp -fpRL "../VirtualBox Installer/VirtualBox_Uninstall.tool" " ../BOINC_Installer/New_Release_ $1 _ $2 _ $3 /boinc_ $1 . $2 . $3 _macOSX_ ${ arch } _vbox/extras/Uninstall BOINC.app/Contents/Resources "
sudo chown -R root:admin "../VirtualBox Installer/VirtualBox_Uninstall.tool" " ../BOINC_Installer/New_Release_ $1 _ $2 _ $3 /boinc_ $1 . $2 . $3 _macOSX_ ${ arch } _vbox/extras/Uninstall BOINC.app/Contents/Resources/VirtualBox_Uninstall.tool "
sudo chmod -R u+r-w,g+r-w,o+r-w "../VirtualBox Installer/VirtualBox_Uninstall.tool" " ../BOINC_Installer/New_Release_ $1 _ $2 _ $3 /boinc_ $1 . $2 . $3 _macOSX_ ${ arch } _vbox/extras/Uninstall BOINC.app/Contents/Resources/VirtualBox_Uninstall.tool "
2013-11-01 09:41:10 +00:00
fi
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
2013-10-30 12:19:29 +00:00
cd "../BOINC_Installer/Installer templates"
2012-07-05 12:02:16 +00:00
2013-10-30 12:19:29 +00:00
pkgbuild --quiet --scripts "../Installer Scripts" --ownership recommended --identifier edu.berkeley.boinc --root "../Pkg_Root" --component-plist "./complist.plist" "./BOINC.pkg"
2012-07-05 12:02:16 +00:00
2014-12-16 14:50:45 +00:00
if [ -n " ${ INSTALLERSIGNINGIDENTITY } " ] ; then
productbuild --sign " ${ INSTALLERSIGNINGIDENTITY } " --quiet --resources "../Installer Resources/" --version " BOINC Manager $1 . $2 . $3 " --distribution "./myDistribution" " ../New_Release_ $1 _ $2 _ $3 /boinc_ $1 . $2 . $3 _macOSX_ $arch /BOINC Installer.app/Contents/Resources/BOINC.pkg "
else
productbuild --quiet --resources "../Installer Resources/" --version " BOINC Manager $1 . $2 . $3 " --distribution "./myDistribution" " ../New_Release_ $1 _ $2 _ $3 /boinc_ $1 . $2 . $3 _macOSX_ $arch /BOINC Installer.app/Contents/Resources/BOINC.pkg "
fi
2012-07-05 12:02:16 +00:00
cd " ${ BOINCPath } "
2013-11-01 09:41:10 +00:00
# Build the BOINC+VirtualBox installer if VirtualBox.pkg exists
if [ -f " ../VirtualBox Installer/ ${ VirtualBoxPackageName } " ] ; then
2013-11-18 13:41:28 +00:00
cp -fpRL "mac_installer/V+BDistribution" "../BOINC_Installer/Installer templates/V+BDistribution"
2012-01-06 10:44:53 +00:00
2013-11-01 09:41:10 +00:00
mkdir -p "../BOINC_Installer/expandedVBox/"
pkgutil --expand " ../VirtualBox Installer/ ${ VirtualBoxPackageName } " "../BOINC_Installer/expandedVBox/VBox.pkg"
pkgutil --flatten "../BOINC_Installer/expandedVBox/VBox.pkg/VBoxKEXTs.pkg" "../BOINC_Installer/Installer templates/VBoxKEXTs.pkg"
pkgutil --flatten "../BOINC_Installer/expandedVBox/VBox.pkg/VBoxStartupItems.pkg" "../BOINC_Installer/Installer templates/VBoxStartupItems.pkg"
pkgutil --flatten "../BOINC_Installer/expandedVBox/VBox.pkg/VirtualBox.pkg" "../BOINC_Installer/Installer templates/VirtualBox.pkg"
pkgutil --flatten "../BOINC_Installer/expandedVBox/VBox.pkg/VirtualBoxCLI.pkg" "../BOINC_Installer/Installer templates/VirtualBoxCLI.pkg"
2013-11-18 13:41:28 +00:00
cp -fpRL "../BOINC_Installer/expandedVBox/VBox.pkg/Resources/en.lproj" "../BOINC_Installer/Installer Resources"
2013-11-01 09:41:10 +00:00
sudo rm -dfR "../BOINC_Installer/expandedVBox"
cp -fp mac_installer/V+BDistribution "../BOINC_Installer/Installer templates"
# Update version number
sed -i "" s/"x.y.z" /" $1 . $2 . $3 " /g "../BOINC_Installer/Installer templates/V+BDistribution"
cd "../BOINC_Installer/Installer templates"
2014-12-17 15:01:03 +00:00
## TODO: Find a way to automatically set the VirtualBox version
2014-12-16 14:50:45 +00:00
if [ -n " ${ INSTALLERSIGNINGIDENTITY } " ] ; then
2014-12-17 15:01:03 +00:00
productbuild --sign " ${ INSTALLERSIGNINGIDENTITY } " --quiet --resources "../Installer Resources" --version " BOINC Manager $1 . $2 . $3 + VirtualBox 4.3.12 " --distribution "./V+BDistribution" " ../New_Release_ $1 _ $2 _ $3 /boinc_ $1 . $2 . $3 _macOSX_ ${ arch } _vbox/BOINC Installer.app/Contents/Resources/BOINC.pkg "
2014-12-16 14:50:45 +00:00
else
2014-12-17 15:01:03 +00:00
productbuild --quiet --resources "../Installer Resources" --version " BOINC Manager $1 . $2 . $3 + VirtualBox 4.3.12 " --distribution "./V+BDistribution" " ../New_Release_ $1 _ $2 _ $3 /boinc_ $1 . $2 . $3 _macOSX_ ${ arch } _vbox/BOINC Installer.app/Contents/Resources/BOINC.pkg "
2014-12-16 14:50:45 +00:00
fi
2013-11-01 09:41:10 +00:00
cd " ${ BOINCPath } "
fi
2012-01-06 10:44:53 +00:00
2006-09-22 02:54:27 +00:00
# Build the stand-alone client distribution
2013-11-18 13:41:28 +00:00
cp -fpRL mac_build/Mac_SA_Insecure.sh ../BOINC_Installer/New_Release_$1 _$2 _$3 /boinc_$1 .$2 .$3 _$arch -apple-darwin/
cp -fpRL mac_build/Mac_SA_Secure.sh ../BOINC_Installer/New_Release_$1 _$2 _$3 /boinc_$1 .$2 .$3 _$arch -apple-darwin/
cp -fpRL COPYING ../BOINC_Installer/New_Release_$1 _$2 _$3 /boinc_$1 .$2 .$3 _$arch -apple-darwin/COPYING.txt
cp -fpRL COPYING.LESSER ../BOINC_Installer/New_Release_$1 _$2 _$3 /boinc_$1 .$2 .$3 _$arch -apple-darwin/COPYING.LESSER.txt
cp -fpRL 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
2017-10-27 10:45:14 +00:00
cp -fpRL " ${ BUILDPATH } /boinc " ../BOINC_Installer/New_Release_$1 _$2 _$3 /boinc_$1 .$2 .$3 _$arch -apple-darwin/move_to_boinc_dir/
cp -fpRL " ${ BUILDPATH } /boinccmd " ../BOINC_Installer/New_Release_$1 _$2 _$3 /boinc_$1 .$2 .$3 _$arch -apple-darwin/move_to_boinc_dir/
2013-11-18 13:41:28 +00:00
cp -fpRL curl/ca-bundle.crt ../BOINC_Installer/New_Release_$1 _$2 _$3 /boinc_$1 .$2 .$3 _$arch -apple-darwin/move_to_boinc_dir/
2011-07-26 12:11:34 +00:00
mkdir -p ../BOINC_Installer/New_Release_$1 _$2 _$3 /boinc_$1 .$2 .$3 _$arch -apple-darwin/move_to_boinc_dir/switcher
2017-10-27 10:45:14 +00:00
cp -fpRL " ${ BUILDPATH } /switcher " ../BOINC_Installer/New_Release_$1 _$2 _$3 /boinc_$1 .$2 .$3 _$arch -apple-darwin/move_to_boinc_dir/switcher/
cp -fpRL " ${ BUILDPATH } /setprojectgrp " ../BOINC_Installer/New_Release_$1 _$2 _$3 /boinc_$1 .$2 .$3 _$arch -apple-darwin/move_to_boinc_dir/switcher/
2011-07-26 12:11:34 +00:00
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
2020-03-04 11:00:44 +00:00
cp -fpRL " ${ BUILDPATH } /boinc.dSYM " ../BOINC_Installer/New_Release_$1 _$2 _$3 /boinc_$1 .$2 .$3 _macOSX_SymbolTables/
cp -fpRL " ${ BUILDPATH } /BOINCManager.app.dSYM " ../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
2014-12-16 14:50:45 +00:00
## ~/BOINCCodeSignIdentities.txt whose first line is the code signing identity
2012-06-22 09:46:26 +00:00
##
## Code signing using a registered Apple Developer ID is necessary for GateKeeper
## with default settings to allow running downloaded applications under OS 10.8
2014-12-16 14:50:45 +00:00
if [ -n " ${ APPSIGNINGIDENTITY } " ] ; then
# Code Sign the BOINC installer application if we have a signing identity
2018-10-30 10:29:09 +00:00
sudo codesign -f -o runtime -s " ${ APPSIGNINGIDENTITY } " " ../BOINC_Installer/New_Release_ $1 _ $2 _ $3 /boinc_ $1 . $2 . $3 _macOSX_ $arch /BOINC Installer.app "
2020-11-23 12:43:14 +00:00
# Code Sign the stand-alone bare core boinc client if we have a signing identity
sudo codesign -f -o runtime -s " ${ APPSIGNINGIDENTITY } " " ../BOINC_Installer/New_Release_ $1 _ $2 _ $3 /boinc_ $1 . $2 . $3 _ $arch -apple-darwin/move_to_boinc_dir/boinc "
# Code Sign setprojectgrp for the stand-alone boinc client if we have a signing identity
sudo codesign -f -o runtime -s " ${ APPSIGNINGIDENTITY } " " ../BOINC_Installer/New_Release_ $1 _ $2 _ $3 /boinc_ $1 . $2 . $3 _ $arch -apple-darwin/move_to_boinc_dir/switcher/setprojectgrp "
# Code Sign switcher for the stand-alone boinc client if we have a signing identity
sudo codesign -f -o runtime -s " ${ APPSIGNINGIDENTITY } " " ../BOINC_Installer/New_Release_ $1 _ $2 _ $3 /boinc_ $1 . $2 . $3 _ $arch -apple-darwin/move_to_boinc_dir/switcher/switcher "
if [ $arch = = "universal" ] ; then
# Workaround for code signing problem under Xcode 12.2:
# Code sign each architecture separately then combine into a uiversal binary
lipo " ../BOINC_Installer/New_Release_ $1 _ $2 _ $3 /boinc_ $1 . $2 . $3 _ $arch -apple-darwin/move_to_boinc_dir/boinccmd " -thin x86_64 -output " ../BOINC_Installer/New_Release_ $1 _ $2 _ $3 /boinc_ $1 . $2 . $3 _ $arch -apple-darwin/move_to_boinc_dir/boinccmd-x86_64 "
lipo " ../BOINC_Installer/New_Release_ $1 _ $2 _ $3 /boinc_ $1 . $2 . $3 _ $arch -apple-darwin/move_to_boinc_dir/boinccmd " -thin arm64 -output " ../BOINC_Installer/New_Release_ $1 _ $2 _ $3 /boinc_ $1 . $2 . $3 _ $arch -apple-darwin/move_to_boinc_dir/boinccmd-arm64 "
sudo codesign -f -o runtime -s " ${ APPSIGNINGIDENTITY } " " ../BOINC_Installer/New_Release_ $1 _ $2 _ $3 /boinc_ $1 . $2 . $3 _ $arch -apple-darwin/move_to_boinc_dir/boinccmd-x86_64 "
sudo codesign -f -o runtime -s " ${ APPSIGNINGIDENTITY } " " ../BOINC_Installer/New_Release_ $1 _ $2 _ $3 /boinc_ $1 . $2 . $3 _ $arch -apple-darwin/move_to_boinc_dir/boinccmd-arm64 "
rm -f " ../BOINC_Installer/New_Release_ $1 _ $2 _ $3 /boinc_ $1 . $2 . $3 _ $arch -apple-darwin/move_to_boinc_dir/boinccmd "
lipo " ../BOINC_Installer/New_Release_ $1 _ $2 _ $3 /boinc_ $1 . $2 . $3 _ $arch -apple-darwin/move_to_boinc_dir/boinccmd-x86_64 " " ../BOINC_Installer/New_Release_ $1 _ $2 _ $3 /boinc_ $1 . $2 . $3 _ $arch -apple-darwin/move_to_boinc_dir/boinccmd-arm64 " -create -output " ../BOINC_Installer/New_Release_ $1 _ $2 _ $3 /boinc_ $1 . $2 . $3 _ $arch -apple-darwin/move_to_boinc_dir/boinccmd "
rm -f " ../BOINC_Installer/New_Release_ $1 _ $2 _ $3 /boinc_ $1 . $2 . $3 _ $arch -apple-darwin/move_to_boinc_dir/boinccmd-x86_64 "
rm -f " ../BOINC_Installer/New_Release_ $1 _ $2 _ $3 /boinc_ $1 . $2 . $3 _ $arch -apple-darwin/move_to_boinc_dir/boinccmd-arm64 "
else
# Code Sign boinccmd for the stand-alone boinc client if we have a signing identity
sudo codesign -f -o runtime -s " ${ APPSIGNINGIDENTITY } " " ../BOINC_Installer/New_Release_ $1 _ $2 _ $3 /boinc_ $1 . $2 . $3 _ $arch -apple-darwin/move_to_boinc_dir/boinccmd "
fi
2012-06-22 09:46:26 +00:00
fi
2005-09-02 04:16:20 +00:00
cd ../BOINC_Installer/New_Release_$1 _$2 _$3
2017-11-11 13:37:15 +00:00
## Make everything in directory user-writable so project web code using auto-attach
## can delete it after inflating, modifying installer name and recompressing it.
sudo chmod -R u+w ./boinc_$1 .$2 .$3 _macOSX_$arch
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
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
2013-11-01 09:41:10 +00:00
if [ -d boinc_$1 .$2 .$3 _macOSX_${ arch } _vbox ] ; then
ditto -ck --sequesterRsrc --keepParent boinc_$1 .$2 .$3 _macOSX_${ arch } _vbox boinc_$1 .$2 .$3 _macOSX_${ arch } _vbox.zip
fi
2020-11-23 12:43:14 +00:00
hdiutil create -srcfolder boinc_$1 .$2 .$3 _$arch -apple-darwin -ov -format UDZO boinc_$1 .$2 .$3 _$arch -apple-darwin.dmg
2005-09-02 04:16:20 +00:00
2006-12-01 06:45:59 +00:00
#popd
cd " ${ BOINCPath } "
2013-11-01 09:41:10 +00:00
sudo rm -dfR ../BOINC_Installer/Installer\ Resources/
sudo rm -dfR ../BOINC_Installer/Installer\ Scripts/
sudo rm -dfR ../BOINC_Installer/Pkg_Root
sudo rm -dfR ../BOINC_Installer/locale
sudo rm -dfR ../BOINC_Installer/Installer\ templates
sudo rm -dfR ../BOINC_Installer/expandedVBox
2013-11-01 09:57:39 +00:00
2006-01-21 12:42:04 +00:00
return 0