23 | | 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. |
24 | | |
25 | | 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 or OS 10.8.x and cross-compile for the various platforms. The remainder of this document describes that process. |
| 23 | Although BOINC supports 64-bit Intel project applications on Mac OS 10.5.0 and above, the only parts of the BOINC client package built as 64-bit executables are the portion of the screensaver coordinator for OS 10.6.x and later, and the BOINC client itself. The BOINC libraries also include a 64-bit build so that they can be linked with 64-bit project applications. |
| 24 | |
| 25 | 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.8.x or later and cross-compile for the various platforms. The remainder of this document describes that process. |
40 | | '''Building BOINC now requires Xcode Tools version 3.2 or later but Xcode 4.3 or later is recommended.''' |
41 | | |
42 | | You can download Xcode 4.3 or Xcode 4.4 from Apple's App Store (it is large: about 2 GB). If you are a member of Apple's Mac Developer Program, you can also download it from Apple's web site: http://developer.apple.com. You can also register for free access to Apple developer tools at: https://developer.apple.com/programs/register/. |
43 | | |
44 | | Source files are now archived within the [SourceCodeGit BOINC repository] ([source:boinc/mac_build mac_build]). |
| 40 | '''Building BOINC now requires Xcode Tools version 4.6 or later.''' Build with Xcode 5.1.1 or earlier to fully support OS X back to OS 10.5. Xcode 6 or later will build a screensaver which requires OS 10.6 or later, but all other built components will work with OS 10.5 or later. Note also that you cannot build wxWidgets 3.0 using Xcode 6 (this has not been fixed as of wxWidgets 3.0.2.) |
| 41 | |
| 42 | You can download Xcode 4.6 or later from Apple's App Store (it is large: about 2 GB). If you are a member of Apple's Mac Developer Program, you can also download it from Apple's web site: http://developer.apple.com. |
| 43 | |
| 44 | Source files are now archived within the [SourceCodeGit BOINC repository]. |
48 | | BOINC depends on six third-party libraries: wxMac-2.8.10, c-ares-1.9.1, curl-7.26.0, openssl-1.0.1e, freetype-2.4.10, ftgl-2.1.3~rc5 and sqlite3.7.14.1. You can obtain the source files from the following URLs: |
49 | | |
50 | | wxMac-2.8.10 (needed only if you are building the BOINC Manager): |
| 48 | Note: building BOINC Manager 7.3.0 and later requires the OS 10.8 SDK or later. |
| 49 | |
| 50 | BOINC depends on six third-party libraries: wxWidgets-3.0, c-ares-1.10.0, curl-7.39.0, openssl-1.0.1j, freetype-2.4.10, ftgl-2.1.3~rc5 and sqlite-3.8.3. You can obtain the source files from the following URLs: |
| 51 | |
| 52 | wxWidgets-3.0 (needed only if you are building the BOINC Manager): |
96 | | XCode will automatically check compatibility back to OS 10.4 if the following are defined during compilation: |
97 | | {{{ |
98 | | MAC_OS_X_VERSION_MAX_ALLOWED=1040 |
99 | | MAC_OS_X_VERSION_MIN_REQUIRED=1040 |
100 | | }}} |
101 | | 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, openssl-1.0.1e, freetype-2.4.10, ftgl-2.1.3~rc5 and sqlite3.7.14.1. So be sure to use our special scripts to build these packages. |
| 96 | XCode will automatically check compatibility back to OS 10.5 if the following are defined during compilation: |
| 97 | {{{ |
| 98 | MAC_OS_X_VERSION_MAX_ALLOWED=1050 |
| 99 | MAC_OS_X_VERSION_MIN_REQUIRED=1050 |
| 100 | }}} |
| 101 | These are not done automatically by either the Xcode projects which come with wxWidgets-3.0, nor the !AutoMake scripts supplied with wxWidgets-3.0, c-ares-1.10.0, curl-7.39.0, openssl-1.0.1j, freetype-2.4.10, ftgl-2.1.3~rc5 and sqlite-3.8.3. So be sure to use our special scripts to build these packages. |
135 | | '''Note 2:''' this script tries to build all six third-party libraries: wxMac-2.8.10, c-ares-1.9.1, curl-7.26.0, openssl-1.0.1e, freetype-2.4.10, ftgl-2.1.3~rc5 and sqlite3.7.14.1. when the script finishes, it will display a warning about any libraries was unable to build (for example, if you have not downloaded them.) |
| 133 | '''Note 2:''' this script tries to build all six third-party libraries: wxWidgets-3.0, c-ares-1.10.0, curl-7.39.0, openssl-1.0.1j, freetype-2.4.10, ftgl-2.1.3~rc5 and sqlite-3.8.3. when the script finishes, it will display a warning about any libraries it was unable to build (for example, if you have not downloaded them.) |
170 | | '''Note:''' You may find two XCode projects in the BOINC_dev/boinc/mac_build/ directory: |
171 | | * '''wxMac-BOINC.xcodeproj''' 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. |
172 | | * '''boinc.xcodeproj''' builds BOINC. It can be used either with the BuildMacBOINC.sh script or as a stand-alone project. The ''Development'' build configuration builds only the native architecture and is used for debugging. The ''Deployment'' 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. |
173 | | |
174 | | '''Note:''' To perform a release build under Xcode 4.3 when not using the BuildMacBOINC.sh script, select "Build for archiving" from Xcode's Product menu. Do '''not''' select "Archive." |
175 | | |
176 | | 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 BOINC libraries and the screensaver are built as universal binaries containing builds for two architectures: i386 and x86_64. |
| 168 | '''Note 1: boinc.xcodeproj''' in the `BOINC_dev/boinc/mac_build/` directory builds BOINC. It can be used either with the BuildMacBOINC.sh script or as a stand-alone project. The Development build configuration builds only the native architecture and is used for debugging. The Deployment 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. |
| 169 | |
| 170 | '''Note 2:''' To perform a release build under Xcode 4.6 when not using the BuildMacBOINC.sh script, select "Build for archiving" or "Build for Profiling" from Xcode's Product menu. Under Xcode 5.0, select "Build for Profiling." To save disk space, do '''not''' select "Archive." |
| 171 | |
| 172 | '''Note 3:'''Using the BuildMacBOINC.sh script is generally easier than building directly in Xcode. The script will place the built products in the directory `BOINC_dev/boinc/mac_build/build/Deployment/` or `BOINC_dev/boinc/mac_build/build/Development/` where they are easy to find. Building directly in Xcode places the built products in a somewhat obscure location; you would normally need to determine this location using Xcode's Organizer window. |
| 173 | |
| 174 | The BOINC Xcode project has built-in scripts which create a text file with the path to the built products at either `BOINC_dev/boinc/mac_build/Build_Deployment_Dir` or `BOINC_dev/boinc/mac_build/Build_Development_Dir`. These files are used by the release_boinc.sh script, but you can also use them to access the built products directly as follows; open the file with !TextEdit and copy the path, then enter command-shift-G in the Finder and paste the path into the Finder's dialog. |
| 175 | |
| 176 | The standard release of BOINC version 7.4.42and later builds only for Macintosh computers with Intel processors. Most of the executables are built only for the i386 architecture, except the BOINC client which is built only for the x86_64 architecture. The BOINC libraries and the screensaver are built as universal binaries containing builds for two architectures: i386 and x86_64. |
190 | | 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.32, the command would be |
191 | | |
192 | | {{{ |
193 | | source {path}/BOINC_dev/boinc/mac_installer/release_boinc.sh 7 0 32 |
194 | | }}} |
195 | | |
196 | | This will create a directory 'BOINC_Installer/New_Release_7_0_32' in the BOINC_dev directory, and the installer will be located in `{path}/BOINC_dev/BOINC_Installer/New_Release_7_0_32/boinc_7.0.32_macOSX_i686`. |
| 190 | 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.4.42, the command would be |
| 191 | |
| 192 | {{{ |
| 193 | source {path}/BOINC_dev/boinc/mac_installer/release_boinc.sh 7 4 42 |
| 194 | }}} |
| 195 | |
| 196 | This will create a directory `BOINC_Installer/New_Release_7_4_42` in the `BOINC_dev` directory, and the installer will be located in `{path}/BOINC_dev/BOINC_Installer/New_Release_7_4_42/boinc_7.4.42_macOSX_x86_64`. |
234 | | |
235 | | Building wxMac-2.8.10 requires the MacOSX10.6.sdk, which is not included in Xcode 4.4 and later. If you are building wxMac-2.8.10 with Xcode 4.4, you must install the OS 10.6 SDK as follows: |
236 | | 1. Download a version of Xcode for OS 10.7 Lion (such as Xcode 4.3.3.) |
237 | | |
238 | | 2. Mount the disk image file by double-clicking on it. Do '''not''' drag-install this older version of Xcode. |
239 | | |
240 | | 3. On the disk image, control-click on the Xcode icon and select `Show Package Contents`. |
241 | | |
242 | | 4. On the older Xcode disk image, browse to the directory: |
243 | | {{{ |
244 | | /Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/ |
245 | | }}} |
246 | | You should see a folder named `MacOSX10.6.sdk`. |
247 | | |
248 | | 5. Control-click on your newer Xcode icon (which you previously installed on your hard drive) and select `Show Package Contents`. |
249 | | |
250 | | 6. In your newer Xcode Browse to the directory: |
251 | | {{{ |
252 | | /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/` |
253 | | }}} |
254 | | (or the equivalent if you installed it somewhere other than your `/Applications/` folder.) |
255 | | |
256 | | 7. Copy the `MacOSX10.6.sdk` folder from the SDKs folder on the older disk image to the SDKs folder in the newer Xcode. |
257 | | |
258 | | 8. Unmount the disk image by dragging it to the trash. |