Difference between revisions of "Building On Mac"
(Guide for setting up a build environment on OS X Snow Leopard, Lion, or Mountain Lion) |
|||
Line 16: | Line 16: | ||
Enter “Xcode 3.2.6” in the search box on the left, press enter, and download the “Xcode 3.2.6 and iOS SDK 4.3” dmg: | Enter “Xcode 3.2.6” in the search box on the left, press enter, and download the “Xcode 3.2.6 and iOS SDK 4.3” dmg: | ||
− | :[[File: | + | :[[File:Bom xcode 326 download.png]] |
== Download Xcode 4.5.2 == | == Download Xcode 4.5.2 == | ||
Line 26: | Line 26: | ||
Enter “Xcode 4.5.2” in the search box on the left, press enter, and download the “Xcode 4.5.2” dmg: | Enter “Xcode 4.5.2” in the search box on the left, press enter, and download the “Xcode 4.5.2” dmg: | ||
− | :[[File: | + | :[[File:Bom xcode 452 download.png]] |
Enter “Command Line Tools” in the search box on the left, press enter and download the “Command Line Tools” dmg that corresponds to your version of OS X: | Enter “Command Line Tools” in the search box on the left, press enter and download the “Command Line Tools” dmg that corresponds to your version of OS X: | ||
− | :[[File: | + | :[[File:Bom tools 452 download.png]] |
== Download MacPorts == | == Download MacPorts == | ||
Line 38: | Line 38: | ||
:http://www.macports.org/install.php | :http://www.macports.org/install.php | ||
+ | |||
+ | :[[File:Bom macports download.png]] | ||
== Download wxWidgets == | == Download wxWidgets == | ||
Line 44: | Line 46: | ||
:http://www.wxwidgets.org/downloads/ | :http://www.wxwidgets.org/downloads/ | ||
+ | |||
+ | [[File:Bom wxwidgets 2812 download.png]] | ||
Download the [[File:build_wxwidgets]] script that will be used to build wxWidgets for use with Audacity. | Download the [[File:build_wxwidgets]] script that will be used to build wxWidgets for use with Audacity. | ||
Line 51: | Line 55: | ||
Locate the Xcode 3.2.6 dmg, xcode_3.2.6_and_ios_sdk_4.3.dmg, on your system and double click it to have Finder verify and mount it: | Locate the Xcode 3.2.6 dmg, xcode_3.2.6_and_ios_sdk_4.3.dmg, on your system and double click it to have Finder verify and mount it: | ||
− | [[File: | + | [[File:Bom xcode 326 mount.png]] |
The “Xcode and iOS SDK” installer checks the version of OS X that is currently running and it will not work on any version above Snow Leopard. However, this version check can be bypassed by starting the installation from the command line. | The “Xcode and iOS SDK” installer checks the version of OS X that is currently running and it will not work on any version above Snow Leopard. However, this version check can be bypassed by starting the installation from the command line. | ||
Line 62: | Line 66: | ||
open "/Volumes/Xcode and iOS SDK/Xcode and iOS SDK.mpkg" | open "/Volumes/Xcode and iOS SDK/Xcode and iOS SDK.mpkg" | ||
− | [[File: | + | [[File:Bom xcode 326 install.png]] |
This will start the installation while bypassing the version check: | This will start the installation while bypassing the version check: | ||
− | [[File: | + | [[File:Bom xcode 326 installer.png]] |
Proceed through the various installation pages until you get to the “Custom Install” page: | Proceed through the various installation pages until you get to the “Custom Install” page: | ||
− | [[File: | + | [[File:Bom xcode 326 custom install.png]] |
Open the Essentials item by clicking the arrow: | Open the Essentials item by clicking the arrow: | ||
− | [[File: | + | [[File:Bom xcode 326 options.png]] |
The minimum required options are “Unix Development” and “Mac OS X 10.4 SDK”, but if you're running Snow Leopard, you may elect to install everything. On Lion or above, you will not be able to use “System Tools” and may choose to use the “iOS SDK” and “Documentation” from Xcode 4.5.2: | The minimum required options are “Unix Development” and “Mac OS X 10.4 SDK”, but if you're running Snow Leopard, you may elect to install everything. On Lion or above, you will not be able to use “System Tools” and may choose to use the “iOS SDK” and “Documentation” from Xcode 4.5.2: | ||
− | [[File: | + | [[File:Bom xcode 326 selected options.png]] |
Continue through the installation dialogs to start the installation and close the installer when complete: | Continue through the installation dialogs to start the installation and close the installer when complete: | ||
− | [[File: | + | [[File:Bom xcode 326 complete.png]] |
This completes the Xcode 3.2.6 installation. | This completes the Xcode 3.2.6 installation. | ||
Line 92: | Line 96: | ||
Locate the Xcode 4.5.2 dmg, xcode4520418508a.dmg, on your system and double click it to have Finder verify and mount it: | Locate the Xcode 4.5.2 dmg, xcode4520418508a.dmg, on your system and double click it to have Finder verify and mount it: | ||
− | [[File: | + | [[File:Bom xcode 452 mount.png]] |
The Xcode folder will open when it's mounted: | The Xcode folder will open when it's mounted: | ||
− | [[File: | + | [[File:Bom xcode 452 folder.png]] |
You may choose to drag the Xcode app to wherever you like, but this guide expects it to be located in the Applications folder: | You may choose to drag the Xcode app to wherever you like, but this guide expects it to be located in the Applications folder: | ||
− | [[File: | + | [[File:Bom xcode 452 copy.png]] |
Locate the Command Line Tools dmg, xcode452cltools10_76938212a.dmg, on your system and double click it to have Finder verify and mount it: | Locate the Command Line Tools dmg, xcode452cltools10_76938212a.dmg, on your system and double click it to have Finder verify and mount it: | ||
− | [[File: | + | [[File:Bom tools 452 mount.png]] |
The Command Line Tools folder will open: | The Command Line Tools folder will open: | ||
− | [[File: | + | [[File:Bom tools 452 folder.png]] |
Start the installation by double clicking the installer, “Command Line Tools (Lion).mpkg” in this case: | Start the installation by double clicking the installer, “Command Line Tools (Lion).mpkg” in this case: | ||
− | [[File: | + | [[File:File:Bom tools 452 installer.png]] |
Once the installation completes, close the installer: | Once the installation completes, close the installer: | ||
Line 122: | Line 126: | ||
:sudo xcode-select -switch "/Applications/Xcode.app/Contents/Developer" | :sudo xcode-select -switch "/Applications/Xcode.app/Contents/Developer" | ||
− | [[File: | + | [[File:Bom xcode 452 switch.png]] |
+ | |||
+ | You will be asked to enter your password: | ||
+ | |||
+ | [[File:Bom xcode 452 switched.png]] | ||
This completes the Xcode 4.5.2 installation. | This completes the Xcode 4.5.2 installation. | ||
Line 130: | Line 138: | ||
Locate the MacPorts installer and double click to start the installation: | Locate the MacPorts installer and double click to start the installation: | ||
− | [[File: | + | [[File:Bom macports installer.png]] |
Click through the installation pages and close the installer when installation completes: | Click through the installation pages and close the installer when installation completes: | ||
− | [[File: | + | [[File:Bom macports installer complete.png]] |
Open a Terminal window and install the cmake and pkgconfig packages: | Open a Terminal window and install the cmake and pkgconfig packages: | ||
− | [[File: | + | [[File:Bom macports packages install.png]] |
+ | |||
+ | You will be prompted to enter your password: | ||
+ | |||
+ | [[File:Bom macports packages password.png]] | ||
+ | |||
+ | The packages will be downloaded and installed: | ||
+ | |||
+ | [[File:Bom macports packages complete.png]] | ||
This completes the MacPorts installation. | This completes the MacPorts installation. | ||
Line 148: | Line 164: | ||
:tar xf ~/Downloads/wxMac-2.8.12.tar | :tar xf ~/Downloads/wxMac-2.8.12.tar | ||
− | [[File: | + | [[File:Bom wxwidgets 2812 extract.png]] |
Change to the newly created directory: | Change to the newly created directory: | ||
Line 154: | Line 170: | ||
:cd wxMac-2.8.12 | :cd wxMac-2.8.12 | ||
− | [[File: | + | [[File:Bom wxwidgets 2812 cd.png]] |
Start the build. This assumes you downloaded the build_wxwidgets script to your Downloads directory: | Start the build. This assumes you downloaded the build_wxwidgets script to your Downloads directory: | ||
Line 160: | Line 176: | ||
:~/Downloads/build_wxwidgets | :~/Downloads/build_wxwidgets | ||
− | [[File: | + | [[File:Bom wxwidgets 2812 build.png]] |
After all configurations are built, you will be prompted for your password: | After all configurations are built, you will be prompted for your password: | ||
− | [[File: | + | [[File:Bom wxwidgets 2812 install.png]] |
+ | |||
+ | All configurations have been built and installed: | ||
+ | |||
+ | [[File:Bom wxwidgets 2812 complete.png]] | ||
+ | |||
+ | To verify, list the installed configurations: | ||
+ | |||
+ | [[File:Bom wxwidgets 2812 list.png]] | ||
+ | |||
+ | Make sure you see 1 default configuration and 3 alternates: | ||
+ | |||
+ | [[File:File:Bom wxwidgets 2812 installed.png]] | ||
wxWidgets installation is now complete. | wxWidgets installation is now complete. |
Revision as of 11:20, 19 January 2013
This guide will help you establish a working development environment for Audacity on OS X Snow Leopard, Lion, or Mountain Lion. You may use the environment for general development as well, but the intent is to get you started building Audacity as quickly and easily as possible. To that end, the steps detailed below will concentrate on Audacity and general development will be left up to you.
Contents
Download Xcode 3.2.6
To download Xcode, you will need to register at the Apple Developer site:
Once registered, the available downloads are located here:
Xcode 3.2.6 is the last version that (officially) supports the PPC architecture and the macosx10.4u SDK. Unless you're building release versions, the PPC support isn't absolutely necessary, but the SDK is required.
Enter “Xcode 3.2.6” in the search box on the left, press enter, and download the “Xcode 3.2.6 and iOS SDK 4.3” dmg:
Download Xcode 4.5.2
Snow Leopard users may skip this step.
NOTE: You may choose to install other versions of Xcode, but at the time this guide was written, 4.5.2 was the latest and other versions may not work as outlined here.
Enter “Xcode 4.5.2” in the search box on the left, press enter, and download the “Xcode 4.5.2” dmg:
Enter “Command Line Tools” in the search box on the left, press enter and download the “Command Line Tools” dmg that corresponds to your version of OS X:
Download MacPorts
Two build utilities, cmake and pkgconfig, will need to be installed and MacPorts or Fink are the easiest way to get them. This guide will use MacPorts so you will need to make adjustments if you choose to use Fink. Download the version of MacPorts which matches your OS X version from:
Download wxWidgets
You must download the wxMac version 2.8.12 of wxWidgets from:
Download the File:Build wxwidgets script that will be used to build wxWidgets for use with Audacity.
Install Xcode 3.2.6
Locate the Xcode 3.2.6 dmg, xcode_3.2.6_and_ios_sdk_4.3.dmg, on your system and double click it to have Finder verify and mount it:
The “Xcode and iOS SDK” installer checks the version of OS X that is currently running and it will not work on any version above Snow Leopard. However, this version check can be bypassed by starting the installation from the command line.
NOTE: It is advisable to have all OS X updates applied to your system before installing Xcode 3.2.6. This is especially important for Lion users as the installation will fail.
Open a Terminal window and start the installation by entering the following commands:
export COMMAND_LINE_INSTALL=1 open "/Volumes/Xcode and iOS SDK/Xcode and iOS SDK.mpkg"
This will start the installation while bypassing the version check:
Proceed through the various installation pages until you get to the “Custom Install” page:
Open the Essentials item by clicking the arrow:
The minimum required options are “Unix Development” and “Mac OS X 10.4 SDK”, but if you're running Snow Leopard, you may elect to install everything. On Lion or above, you will not be able to use “System Tools” and may choose to use the “iOS SDK” and “Documentation” from Xcode 4.5.2:
Continue through the installation dialogs to start the installation and close the installer when complete:
This completes the Xcode 3.2.6 installation.
Install Xcode 4.5.2
Snow Leopard users should skip this step.
Locate the Xcode 4.5.2 dmg, xcode4520418508a.dmg, on your system and double click it to have Finder verify and mount it:
The Xcode folder will open when it's mounted:
You may choose to drag the Xcode app to wherever you like, but this guide expects it to be located in the Applications folder:
Locate the Command Line Tools dmg, xcode452cltools10_76938212a.dmg, on your system and double click it to have Finder verify and mount it:
The Command Line Tools folder will open:
Start the installation by double clicking the installer, “Command Line Tools (Lion).mpkg” in this case:
File:File:Bom tools 452 installer.png
Once the installation completes, close the installer:
Open a Terminal window and enter:
- sudo xcode-select -switch "/Applications/Xcode.app/Contents/Developer"
You will be asked to enter your password:
This completes the Xcode 4.5.2 installation.
Install MacPorts
Locate the MacPorts installer and double click to start the installation:
Click through the installation pages and close the installer when installation completes:
Open a Terminal window and install the cmake and pkgconfig packages:
You will be prompted to enter your password:
The packages will be downloaded and installed:
This completes the MacPorts installation.
Install wxWidgets
Open a Terminal window and extract the wxWidgets source:
- tar xf ~/Downloads/wxMac-2.8.12.tar
Change to the newly created directory:
- cd wxMac-2.8.12
Start the build. This assumes you downloaded the build_wxwidgets script to your Downloads directory:
- ~/Downloads/build_wxwidgets
After all configurations are built, you will be prompted for your password:
All configurations have been built and installed:
To verify, list the installed configurations:
Make sure you see 1 default configuration and 3 alternates:
File:File:Bom wxwidgets 2812 installed.png
wxWidgets installation is now complete.