This document applies to BOINC version 7.1.0 and later. It has instructions for building the BOINC Client and Manager for Macintosh OSX. Information for building science project applications to run under BOINC on Macintosh OSX can be found {\field{\*\fldinst{HYPERLINK "http://boinc.berkeley.edu/trac/wiki/BuildMacApp"}}{\fldrslt here}}. \
Note: the information in this document changes from time to time for different versions of BOINC. For any version of BOINC source files, the corresponding version of this document can be found in the source tree at:\
\cf0 As of version 6.13.0, BOINC does not support Macintosh PowerPC processors.\
Although BOINC supports 64-bit Intel project applications on Mac OS 10.5.0 and above, the only part of the BOINC client package built as a 64-bit executable is the screensaver coordinator for OS 10.6.x and later. The BOINC libraries also include a 64-bit build so that they can be linked with 64-bit project applications.\
You need to take certain steps to ensure that you use only APIs that are available in all the OS versions BOINC supports for each architecture. The best way to accomplish this is to use a single development system running OS 10.7.x and cross-compile for the various platforms. The remainder of this document describes that process.\
\b \cf0 The above requirements apply not only to BOINC itself, but also to the WxWidgets, c-ares, cURL and openSSL libraries, as well as all project applications
\cf0 Starting with version 6.1.0, the BOINC Client supports only Mac OS X 10.3.9 and later; support for OS 10.3.0 through 10.3.8 has been discontinued. This allows us to build the BOINC Client and Manager using only GCC 4.0, which offers a number of advantages.\
Starting with version 6.10.58, the BOINC Client supports only Mac OS X 10.4.0 and later. This allows it to be built with XCode 3.2 under OS 10.6.x, which does not support the Mac OS 10.3.9 SDK.\
\cf0 If you have the OS 10.6 installation DVD for your system, you can install Xcode Tools 3.2 at the time you install the OS, or you can install it later by opening the file
You can download Xcode 3.2 or 4.2 from Apple's web site: {\field{\*\fldinst{HYPERLINK "http://developer.apple.com"}}{\fldrslt http://developer.apple.com}} (it is large: 1.1 GB). You must be a member of the Apple Developer Connection to download the software, but you can join for free at: {\field{\*\fldinst{HYPERLINK "http://connect.apple.com/"}}{\fldrslt \cf2 http://connect.apple.com}}\cf2 .\cf0 \
\cf0 BOINC depends on four third-party libraries: wxMac-2.8.10, c-ares-1.9.1, curl-7.26.0 and openssl-1.0.1c. You can obtain the source files from the following URLs:\
\cf0 These are not done automatically by either the Xcode projects which come with wxMac-2.8.10, nor the AutoMake scripts supplied with wxMac-2.8.10, c-ares-1.9.1, curl-7.26.0 and openssl-1.0.1c. So be sure to use our special scripts to build these packages.\
Important: do not change the names of any of these 4 directories.\
\
Note: Building wxMac-2.8.10 requires the MacOSX10.6.sdk, which is not included in Xcode 4.5. If you are building wxMac-2.8.10 with Xcode 4.5, see the section
The command above retrieves the source code from the HEAD (TRUNK) or development branch of the CVS repository. For more information on getting the BOINC source code, see:\
Note: this script builds c-ares and curl first, followed by openssl and finally wxMac. If you haven't downloaded wxMac because you aren't building the BOINC Manager, the script will build c-ares, curl and openssl before quitting. \
\b0 was needed for building older versions of the wxMac library in conjunction with the older versions of the setupForBoinc.sh or buildWxMac.sh scripts. It is not used for BOINC 5.9.2 or later. \
\i0 build configuration builds a universal binary and is suitable for release builds. If there are any other build configurations, they should not be used as they are obsolete. \
The standard release of BOINC version 6.13.0 and later builds only for Macintosh computers with Intel processors. Most of the executables are built only for the i386 architecture. The libraries and the screensaver are built as universal binaries containing builds for two architectures: i386 and x86_64.\
In order to execute BOINC Manager, you have to install it using BOINC Manager Installer. Otherwise, you will encounter an error prompting for proper installation.\
To build the Installer for the BOINC Manager, you must be logged in as an administrator. If you are building BOINC version number x.y.z, type the following in Terminal, then enter your administrator password when prompted by the script:\
\cf0 Substitute the 3 parts of the BOINC version number for x y and z in the above. For example, to build the installer for BOINC version 7.0.31, the command would be\
Mac OS 10.8 introduces a security feature called Gatekeeper, whose default settings won't allow a user to run applications or installers downloaded from the Internet unless they are signed by a registered Apple Developer. The
\f1\fs26 release_boinc.sh
\f0\fs24 script looks for a file
\f1\fs26 ~/BOINCCodeSignIdentity.txt
\f0\fs24 containing the name of a valid code signing identity stored in the user's Keychain. If this is found, the script will automatically sign the BOINC installer and BOINC uninstaller using that identity. For example, if your user name is John Smith, the first line of
\f1\fs26 ~/BOINCCodeSignIdentity.txt
\f0\fs24 would be something like the following:
\f1\fs26 \
Developer ID Application: John Smith\
\
\f0\fs24 If there is no
\f1\fs26 ~/BOINCCodeSignIdentity.txt
\f0\fs24 file, then the script will not sign the installer or uninstaller. For more information on code signing identities see the documentation for the
\cf0 Version 5.5.4 of BOINC Manager for the Macintosh introduced new, stricter security measures. For details, please see the file
\f1\fs26 boinc/mac_installer/Readme.rtf
\f0\fs24 and {\field{\*\fldinst{HYPERLINK "http://boinc.berkeley.edu/sandbox.php"}}{\fldrslt http://boinc.berkeley.edu/sandbox.php}} and {\field{\*\fldinst{HYPERLINK "http://boinc.berkeley.edu/trac/wiki/SandboxUser"}}{\fldrslt
\cf0 \CocoaLigature0 The GDB debugger can't attach to applications which are running as a different user or group so it ignores the S_ISUID and S_ISGID permission bits when launching an application. To work around this, the BOINC
\i0 of the BOINC Manager allows you to change the ownership and permission settings of the BOINC Data and executables by entering an administrator user name and password. This also streamlines the development cycle by avoiding the need to run the installer for every change. (To generate the development build under Xcode 4.2, choose "Build" from the product menu, or enter command-B on the keyboard.)\
\cf0 \cb3 \CocoaLigature1 For information on interpreting crash dumps and backtraces, see {\field{\*\fldinst{HYPERLINK "http://boinc.berkeley.edu/trac/wiki/MacBacktrace"}}{\fldrslt \cf2 Mac Backtrace}}.\cb1 \CocoaLigature0 \
\cf0 \CocoaLigature0 The BOINC Xcode project normally links the BOINC Manager with the non-debugging (Deployment) build of wxWidgets, even for the Development build configuration of the Manager. However, there may be times when you wish to link the Development build of the Manager to the Development build of wxWidgets for debugging, as when you want to step into internal wxWidgets code or put breakpoints in wxWidgets.\
Versions of Xcode prior to Xcode 4.3 have an installer package. After downloading Xcode, mount the disk image file by double-clicking on it, then double-click the installer package. \
\
Starting with Xcode 4.3, the disk image contains a copy of Xcode itself. After mounting the disk image, drag the Xcode icon to the folder where you wish it to reside. In most cases, this will be the
\f1\fs26 /Applications
\f0\fs24 folder. Unmount the disk image by dragging it to the trash. Finally, double-click on the installed Xcode icon to run Xcode. Xcode will display a dialog allowing you to finish the installation; you must do this before running BOINC's build scripts.\
\
Building wxMac-2.8.10 requires the MacOSX10.6.sdk, which is not included in Xcode 4.5. If you are building wxMac-2.8.10 with Xcode 4.5, you must install the OS 10.6 SDK as follows:\
[1] Download a version of Xcode for OS 10.7 Lion (such as Xcode 4.3.3 for Lion.)\
[2] Mount the disk image file by double-clicking on it. Do
\b not
\b0 drag-install this older version of Xcode.\
[3] On the disk image, control-click on the Xcode icon and select
\f1\fs26 Show Package Contents
\f0\fs24 .\
[4] On the older Xcode disk image, browse to the directory:\