From 3586e4044a7c6f92b90460b0f1ea704071ffd7ad Mon Sep 17 00:00:00 2001 From: Charlie Fenton Date: Thu, 2 Jul 2015 18:09:15 -0700 Subject: [PATCH] Mac installer: make my changes for OS 10.11 El Capitan compatibility work with branded versions of BOINC (GridRepublic, etc.) --- mac_installer/postinstall | 13 +++++++------ mac_installer/postupgrade | 13 +++++++------ 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/mac_installer/postinstall b/mac_installer/postinstall index 92bb5d945e..6a7f247cf4 100755 --- a/mac_installer/postinstall +++ b/mac_installer/postinstall @@ -16,20 +16,21 @@ fi rm -f /tmp/BOINCInstallLog.txt -pipath=`echo $1 | sed -e "s/BOINC.pkg/PostInstall.app/"` -## echo "pi path = $pipath" >> /tmp/BOINCInstallLog.txt +# PostInstall.app is in the same directory as the package (BOINC.pkg or GridRepublic.pkg, etc.) +pipath=`dirname "$1"`/PostInstall.app/Contents/MacOS/PostInstall +echo "PostInstall.app path = $pipath" # Run the Postinstall Application if [ "${COMMAND_LINE_INSTALL}" = "1" ]; then -"$pipath/Contents/MacOS/PostInstall" -part1 >> /tmp/BOINCInstallLog.txt +"$pipath" -part1 >> /tmp/BOINCInstallLog.txt sleep 2 -"$pipath/Contents/MacOS/PostInstall" -part2 >> /tmp/BOINCInstallLog.txt & +"$pipath" -part2 >> /tmp/BOINCInstallLog.txt & else -"$pipath/Contents/MacOS/PostInstall" -part1 +"$pipath" -part1 sleep 2 # part2 continues to run after Installer finishes, # and fails unless we redirect stdout to a file -"$pipath/Contents/MacOS/PostInstall" -part2 >> /tmp/BOINCInstallLog.txt & +"$pipath" -part2 >> /tmp/BOINCInstallLog.txt & fi exit 0 diff --git a/mac_installer/postupgrade b/mac_installer/postupgrade index 403bc9feb3..0d0480da42 100755 --- a/mac_installer/postupgrade +++ b/mac_installer/postupgrade @@ -16,20 +16,21 @@ fi rm -f /tmp/BOINCInstallLog.txt -pipath=`echo $1 | sed -e "s/BOINC.pkg/PostInstall.app/"` -## echo "pi path = $pipath" >> /tmp/BOINCInstallLog.txt +# PostInstall.app is in the same directory as the package (BOINC.pkg or GridRepublic.pkg, etc.) +pipath=`dirname "$1"`/PostInstall.app/Contents/MacOS/PostInstall +echo "PostInstall.app path = $pipath" # Run the Postinstall Application if [ "${COMMAND_LINE_INSTALL}" = "1" ]; then -"$pipath/Contents/MacOS/PostInstall" -part1 >> /tmp/BOINCInstallLog.txt +"$pipath" -part1 >> /tmp/BOINCInstallLog.txt sleep 2 -"$pipath/Contents/MacOS/PostInstall" -part2 >> /tmp/BOINCInstallLog.txt & +"$pipath" -part2 >> /tmp/BOINCInstallLog.txt & else -"$pipath/Contents/MacOS/PostInstall" -part1 +"$pipath" -part1 sleep 2 # part2 continues to run after Installer finishes, # and fails unless we redirect stdout to a file -"$pipath/Contents/MacOS/PostInstall" -part2 >> /tmp/BOINCInstallLog.txt & +"$pipath" -part2 >> /tmp/BOINCInstallLog.txt & fi exit 0