2005-10-12 12:29:56 +00:00
|
|
|
#!/bin/sh
|
2005-09-30 08:58:22 +00:00
|
|
|
|
|
|
|
##
|
|
|
|
# Script for building Macintosh BOINC Manager, Core Client and libraries
|
2005-10-13 00:20:38 +00:00
|
|
|
# by Charlie Fenton 10/12/05
|
|
|
|
# with thanks to Reinhard Prix for his assistance
|
2005-09-30 08:58:22 +00:00
|
|
|
##
|
|
|
|
|
|
|
|
## Usage:
|
|
|
|
## cd to the mac_build directory of the boinc tree, for example:
|
|
|
|
## cd [path]/boinc/mac_build
|
|
|
|
##
|
|
|
|
## then invoke this script as follows:
|
2005-10-13 00:39:12 +00:00
|
|
|
## source BuildMacBOINC.sh [-dev] [-noclean]
|
|
|
|
## or
|
|
|
|
## chmod +x BuildMacBOINC.sh
|
2005-10-13 00:20:38 +00:00
|
|
|
## ./BuildMacBOINC.sh [-dev] [-noclean]
|
2005-09-30 08:58:22 +00:00
|
|
|
##
|
|
|
|
## optional arguments
|
|
|
|
## -dev build the development (debug) version.
|
|
|
|
## default is deployment (release) version.
|
|
|
|
##
|
|
|
|
## -noclean don't do a "clean all" before building.
|
|
|
|
## default is to clean all first.
|
|
|
|
##
|
|
|
|
|
2005-10-12 12:29:56 +00:00
|
|
|
if [ "$1" = "-dev" ] || [ "$2" = "-dev" ]; then
|
2006-02-02 12:48:36 +00:00
|
|
|
echo "Development (debug) build"
|
|
|
|
style="Development"
|
2005-09-30 08:58:22 +00:00
|
|
|
else
|
2006-02-02 12:48:36 +00:00
|
|
|
echo "Deployment (release) build"
|
|
|
|
style="Deployment"
|
2005-09-30 08:58:22 +00:00
|
|
|
fi
|
|
|
|
|
2005-10-12 12:29:56 +00:00
|
|
|
if [ "$1" = "-noclean" ] || [ "$2" = "-noclean" ]; then
|
2006-02-02 12:48:36 +00:00
|
|
|
doclean=""
|
2005-09-30 08:58:22 +00:00
|
|
|
else
|
2006-02-02 12:48:36 +00:00
|
|
|
echo "Clean all"
|
|
|
|
doclean="clean "
|
2005-09-30 08:58:22 +00:00
|
|
|
fi
|
|
|
|
|
2005-10-13 00:20:38 +00:00
|
|
|
version=`uname -r`;
|
|
|
|
|
|
|
|
major=`echo $version | sed 's/\([0-9]*\)[.].*/\1/' `;
|
|
|
|
minor=`echo $version | sed 's/[0-9]*[.]\([0-9]*\).*/\1/' `;
|
|
|
|
|
|
|
|
# echo "major = $major"
|
|
|
|
# echo "minor = $minor"
|
|
|
|
#
|
|
|
|
# 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 IS 10.2.x
|
|
|
|
|
|
|
|
if [ "$major" = "8" ]; then
|
2005-09-30 08:58:22 +00:00
|
|
|
echo "Building BOINC under System 10.4"
|
2006-02-02 12:48:36 +00:00
|
|
|
if [ ! -d /Developer/SDKs/MacOSX10.3.9.sdk/ ]; then
|
|
|
|
echo "ERROR: System 10.3.9 SDK is missing. For details, see build instructions at "
|
|
|
|
echo "boinc/mac_build/HowToBuildBOINC_XCode.rtf or http://boinc.berkeley.edu/mac_build.html"
|
2005-10-13 00:20:38 +00:00
|
|
|
exit 1
|
|
|
|
fi
|
2005-09-30 08:58:22 +00:00
|
|
|
else
|
2006-02-02 12:48:36 +00:00
|
|
|
echo "ERROR: Building BOINC requires System 10.4 or later. For details, see build instructions at "
|
|
|
|
echo "boinc/mac_build/HowToBuildBOINC_XCode.rtf or http://boinc.berkeley.edu/mac_build.html"
|
2005-09-30 08:58:22 +00:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2006-02-02 12:48:36 +00:00
|
|
|
xcodebuild -project boinc.xcodeproj -target Build_All -configuration $style $doclean build
|