Difference between revisions of "Building On Mac"

From Audacity Wiki
Jump to: navigation, search
(cmake)
(few tweaks, mainly to cover having automatically extracted the tar archives (as happens if you install The Unarchiver))
Line 2: Line 2:
  
 
{{advice|1=
 
{{advice|1=
If Audacity is your only goal for getting this development environment established you don't really need to download and install Xcode 4 (steps 2 and 7). However, products like MacPorts and Fink require Xcode 4 to be installed if you are using Lion or Mountain Lion, so now would be a good time to install Xcode 4. And it wouldn't hurt to go ahead with Xcode 4 installation in case you might need it in the future.}}
+
Xcode 4 (steps 2 and 7) is not required on Snow Leopard. Xcode 4 is strongly recommended on Lion or later (it is required on those systems for [http://en.wikipedia.org/wiki/MacPorts MacPorts], [http://en.wikipedia.org/wiki/Fink Fink] and almost any other package management or development-related product).}} {{ednote|1='''Gale 21Jan13:''' Hi Leland, can you be a bit more specific in the advice div above. On a new system that lacks MacPorts or Fink, you can do without either of those and you can use only Xcode 3? You can ignore steps 2 and 7 in the Contents entirely?
{{ednote|'''Gale 21Jan13:''' Hi Leland, can you be a bit more specific in the advice div above. On a new system that lacks MacPorts or Fink, you can do without either of those and you can use only Xcode 3? You can ignore steps 2 and 7 in the Contents entirely?
+
* '''Leland 21Jan13:''' Is that better Gale?  I'm starting to think that I should just leave that note out entirely since it may be clearer for users to just do the steps from top to bottom.  What do ya think?
 
+
* '''Gale 17Feb13:''' I've shortened the advice to make it look more or less mandatory to use it on Lion or greater, and more or less mandatory to omit it on Snow Leopard. But change it if it's too dogmatic.:=) }}  
'''Leland 21Jan13:''' Is that better Gale?  I'm starting to think that I should just leave that note out entirely since it may be clearer for users to just do the steps from top to bottom.  What do ya think?}}  
 
  
 
== Download Xcode 3.2.6 ==
 
== Download Xcode 3.2.6 ==
Line 22: Line 21:
  
 
:[[File:Bom xcode 326 download.png|780px]]
 
:[[File:Bom xcode 326 download.png|780px]]
 +
  
 
== Download Xcode 4.5.2 ==
 
== Download Xcode 4.5.2 ==
  
Snow Leopard users may skip this step.
+
Snow Leopard users should 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.
 
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.
Line 36: Line 36:
  
 
:[[File:Bom tools 452 download.png|780px]]
 
:[[File:Bom tools 452 download.png|780px]]
 +
  
 
== Download wxWidgets ==
 
== Download wxWidgets ==
Line 46: Line 47:
  
 
Download the "[[Media:Build wxwidgets.gz|Build wxwidgets.gz]]" script that will be used to build wxWidgets for use with Audacity.  Make sure you save the file as "build_wxwidgets.gz".  Safari will automatically uncompress the file, others may not.
 
Download the "[[Media:Build wxwidgets.gz|Build wxwidgets.gz]]" script that will be used to build wxWidgets for use with Audacity.  Make sure you save the file as "build_wxwidgets.gz".  Safari will automatically uncompress the file, others may not.
 +
  
 
== Download cmake ==
 
== Download cmake ==
Line 54: Line 56:
  
 
[[File:Bom cmake download.png|780px]]
 
[[File:Bom cmake download.png|780px]]
 +
  
 
== Download pkg-config ==
 
== Download pkg-config ==
Line 62: Line 65:
  
 
[[File:Bom pkg-config download.png|780px]]
 
[[File:Bom pkg-config download.png|780px]]
 +
  
 
== Install Xcode 3.2.6 ==
 
== Install Xcode 3.2.6 ==
Line 69: Line 73:
 
[[File:Bom xcode 326 mount.png|center|480px]]
 
[[File:Bom xcode 326 mount.png|center|480px]]
  
The “Xcode and iOS SDK” installer checks the version of OS X that is currently running and that check will not succeed on versions above Snow Leopard. However the 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 that check will not succeed on versions above Snow Leopard. However the 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 otherwise  the installation will fail.}}
 
{{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 otherwise  the installation will fail.}}
 
{{advice|On Lion and Mountain Lion, the "Security & Privacy" section of System Preferences must be temporarily set to allow applications downloaded from "Anywhere", or Gatekeeper will prevent the package being opened.}}   
 
{{advice|On Lion and Mountain Lion, the "Security & Privacy" section of System Preferences must be temporarily set to allow applications downloaded from "Anywhere", or Gatekeeper will prevent the package being opened.}}   
Line 131: Line 135:
 
[[File:Bom audiacty_build_xcode_folder.png|780px]]
 
[[File:Bom audiacty_build_xcode_folder.png|780px]]
  
Now double click the "Xcode" application to start it:
+
Now double-click the "Xcode" application to start it:
  
 
[[File:Bom audiacty_build_xcode_start.png|780px]]
 
[[File:Bom audiacty_build_xcode_start.png|780px]]
Line 142: Line 146:
  
 
This completes the Xcode 3.2.6 installation.
 
This completes the Xcode 3.2.6 installation.
 +
  
 
== Install Xcode 4.5.2 ==
 
== Install Xcode 4.5.2 ==
Line 174: Line 179:
 
[[File:Bom tools 452 complete.png|780px]]
 
[[File:Bom tools 452 complete.png|780px]]
  
and you may eject the Command Lin Tools .dmg.  
+
and you may eject the Command Line Tools .dmg.  
  
 
In the Terminal window, enter:
 
In the Terminal window, enter:
Line 186: Line 191:
 
[[File:Bom xcode 452 switched.png|780px]]
 
[[File:Bom xcode 452 switched.png|780px]]
  
To make it a little easier to use Xcode 3.2.6 from the command line, create a link to the 3.2.6 version of xcodebuild.  You make change the "xcodebuild3" to whatever you like, just remember when building Audacity from the command line to use what you specify here:
+
To make it a little easier to use Xcode 3.2.6 from the command-line, create a link to the 3.2.6 version of xcodebuild.  You make change the "xcodebuild3" to whatever you like, just remember when building Audacity from the command-line to use what you specify here:
  
 
:sudo ln -s /Developer/usr/bin/xcodebuild /usr/bin/xcodebuild3
 
:sudo ln -s /Developer/usr/bin/xcodebuild /usr/bin/xcodebuild3
Line 193: Line 198:
  
 
This completes the Xcode 4.5.2 installation.
 
This completes the Xcode 4.5.2 installation.
 +
  
 
== Install cmake ==
 
== Install cmake ==
Line 227: Line 233:
  
 
This completes the cmake installation.
 
This completes the cmake installation.
 +
  
 
== Install pkg-config ==
 
== Install pkg-config ==
  
Open a terminal window, extract the pkg-config archive and change to the extracted directory using:
+
As with cmake, use the Terminal to extract the pkg-config archive and change to the extracted directory:
  
 
:tar xf ~/Downloads/pkg-config-0.27.1.tar
 
:tar xf ~/Downloads/pkg-config-0.27.1.tar
Line 237: Line 244:
 
[[File:Bom pkgconfig extract.png|780px]]
 
[[File:Bom pkgconfig extract.png|780px]]
  
Configure pkg-config:
+
or if you already extracted pkg-config, change to that extracted directory:
 +
:cd ~/Downloads/pkg-config-0.27.1
 +
 
 +
Now configure pkg-config:
  
 
:sh configure --with-internal-glib
 
:sh configure --with-internal-glib
Line 243: Line 253:
 
[[File:Bom pkgconfig configure.png|780px]]
 
[[File:Bom pkgconfig configure.png|780px]]
  
Build pkg-config:
+
and build pkg-config:
  
 
:make
 
:make
Line 256: Line 266:
  
 
This completes the pkg-config installation.
 
This completes the pkg-config installation.
 +
  
 
== Install wxWidgets ==
 
== Install wxWidgets ==
  
Open a Terminal window and extract the wxWidgets source:
+
In the Terminal, extract the wxWidgets source if not already extracted:
  
 
:tar xf ~/Downloads/wxMac-2.8.12.tar
 
:tar xf ~/Downloads/wxMac-2.8.12.tar
Line 265: Line 276:
 
[[File:Bom wxwidgets 2812 extract.png|780px]]
 
[[File:Bom wxwidgets 2812 extract.png|780px]]
  
Change to the newly created directory:
+
Change to the extracted directory:
  
 
:cd wxMac-2.8.12
 
:cd wxMac-2.8.12
 +
 +
:or:
 +
 +
:cd ~/Downloads/wxMac-2.8.12
  
 
[[File:Bom wxwidgets 2812 cd.png|780px]]
 
[[File:Bom wxwidgets 2812 cd.png|780px]]
Line 277: Line 292:
 
[[File:Bom wxwidgets 2812 build.png|780px]]
 
[[File:Bom wxwidgets 2812 build.png|780px]]
  
After all configurations are built, you will be prompted for your password:
+
After all configurations are built, you will be prompted for your password. Watch the build for the password prompt, because if the requests for a password time out, you'll have to build again:
  
 
[[File:Bom wxwidgets 2812 install.png|780px]]
 
[[File:Bom wxwidgets 2812 install.png|780px]]
  
 
All configurations have been built and installed:
 
All configurations have been built and installed:
 +
~/Downloads/wxMac-2.8.12
 +
~/Downloads/wxMac-2.8.12/bld_release_shared ~/Downloads/wxMac-2.8.12
  
 
[[File:Bom wxwidgets 2812 complete.png|780px]]
 
[[File:Bom wxwidgets 2812 complete.png|780px]]
Line 287: Line 304:
 
To verify, list the installed configurations:
 
To verify, list the installed configurations:
  
 +
:wx-config --list
 
[[File:Bom wxwidgets 2812 list.png|780px]]
 
[[File:Bom wxwidgets 2812 list.png|780px]]
  
Make sure you see 1 default configuration and 3 alternates:
+
Make sure you see 1 default configuration (mac-unicode-release-2.8)
 +
and 3 alternates:
  
 
[[File:Bom wxwidgets 2812 installed.png|780px]]  
 
[[File:Bom wxwidgets 2812 installed.png|780px]]  
  
 
wxWidgets installation is now complete.
 
wxWidgets installation is now complete.
 +
  
 
== Create links ==
 
== Create links ==
Line 303: Line 323:
  
 
[[File:Bom create links.png|780px]]
 
[[File:Bom create links.png|780px]]
 +
  
 
== Download Audacity ==
 
== Download Audacity ==
  
Now that everything is in place, we finally get to the whole purpose of this exercise, building Audacity.  But first, you must decide if you want to use the source for the current stable version of Audacity or if you want to get the absolute latest development source. Remember that the latter may not build (usually does) due to active development.
+
Now that everything is in place, we finally get to the whole purpose of this exercise, building Audacity.  But first, you must decide if you want to use the tarball or tagged source which gives you the current release of Audacity, or if you want to get the absolute latest development source (SVN HEAD).  
 +
{{advice|Remember that occasionally, SVN HEAD may not build becaue of development in progress, or if it does, there may be bugs.}}
  
 
Make your choice when downloading from here:
 
Make your choice when downloading from here:
Line 314: Line 336:
 
[[File:Bom audiacty_build_download.png|780px]]
 
[[File:Bom audiacty_build_download.png|780px]]
  
Once you have the source downloaded and extracted, you may use either the xcodebuild command line utility or the Xcode 3.2.6 IDE.
+
Once you have the source downloaded and extracted, you may use either the xcodebuild command-line utility or the Xcode 3.2.6 IDE.
  
The Audacity xcode project has 4 configurations defined:
+
The Audacity xcode project has four configurations defined:
  
 
:Debug Static - disables optimization, enables debugging code, and links to static libraries
 
:Debug Static - disables optimization, enables debugging code, and links to static libraries
Line 324: Line 346:
  
 
So you'll need to select which one you want to use in the following steps, but "Debug Static" will be used for this guide.
 
So you'll need to select which one you want to use in the following steps, but "Debug Static" will be used for this guide.
 +
  
 
== Build with xcodebuild ==
 
== Build with xcodebuild ==
  
To use the command line utility, open a Terminal window, change to the Audacity mac directory, and start the build.  If you didn't install Xcode 4.5.2 above, then use "xcodebuild" here:
+
To use the command-line utility, open a Terminal window, change to the Audacity mac directory, and start the build.  If you didn't install Xcode 4.5.2 above, then use "xcodebuild" here in place of "xcodebuild3":
  
 
:cd audacity/mac
 
:cd audacity/mac
Line 343: Line 366:
  
 
[[File:Bom audiacty_build_xcodebuild_open.png|780px]]
 
[[File:Bom audiacty_build_xcodebuild_open.png|780px]]
 +
  
 
== Build with Xcode IDE ==
 
== Build with Xcode IDE ==
Line 354: Line 378:
 
[[File:Bom audiacty_build_xcode_folder.png|780px]]
 
[[File:Bom audiacty_build_xcode_folder.png|780px]]
  
Now double click the "Xcode" application to start it:
+
Now double-click the "Xcode" application to start it:
  
 
[[File:Bom audiacty_build_xcode_start.png|780px]]
 
[[File:Bom audiacty_build_xcode_start.png|780px]]
Line 362: Line 386:
 
[[File:Bom audiacty_build_xcode_open.png|center|480px]]
 
[[File:Bom audiacty_build_xcode_open.png|center|480px]]
  
Navigate to the "audacity/mac" folder and then double click the "Audacity.xcodeproj" project:
+
Navigate to the "audacity/mac" folder and then double-click the "Audacity.xcodeproj" project:
  
 
[[File:Bom audiacty_build_xcode_xcodeproj.png|780px]]
 
[[File:Bom audiacty_build_xcode_xcodeproj.png|780px]]
  
Now just click "Build and Run" on the toolbar and a freshly built Audacity will start when the build completes.
+
Now choose the configuration required from the menu top left (underneath the window buttons), then click "Build and Run" on the toolbar. A freshly built Audacity will start when the build completes.
  
 
[[File:Bom audiacty_build_xcode_build.png|780px]]
 
[[File:Bom audiacty_build_xcode_build.png|780px]]
  
 
[[Category:Mac Platform]] [[Category:For Developers]]
 
[[Category:Mac Platform]] [[Category:For Developers]]

Revision as of 06:49, 17 February 2013

This guide will help you establish a working development environment for Audacity on OS X Snow Leopard, Lion or Mountain Lion.

The steps detailed below are focused on getting you building Audacity as quickly and easily as possible, but you may use the environment for general development as well.


Warning icon Xcode 4 (steps 2 and 7) is not required on Snow Leopard. Xcode 4 is strongly recommended on Lion or later (it is required on those systems for MacPorts, Fink and almost any other package management or development-related product).
Gale 21Jan13: Hi Leland, can you be a bit more specific in the advice div above. On a new system that lacks MacPorts or Fink, you can do without either of those and you can use only Xcode 3? You can ignore steps 2 and 7 in the Contents entirely?
  • Leland 21Jan13: Is that better Gale? I'm starting to think that I should just leave that note out entirely since it may be clearer for users to just do the steps from top to bottom. What do ya think?
  • Gale 17Feb13: I've shortened the advice to make it look more or less mandatory to use it on Lion or greater, and more or less mandatory to omit it on Snow Leopard. But change it if it's too dogmatic.:=)

Download Xcode 3.2.6

To download Xcode, you will need to register at the Apple Developer site:

http://developer.apple.com

Once registered, the available downloads are located here:

http://developer.apple.com/downloads

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:

Bom xcode 326 download.png


Download Xcode 4.5.2

Snow Leopard users should 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:

Bom xcode 452 download.png

Enter “Command Line Tools” in the search box on the left ("try "command" if you get no results), press enter and download the latest “Command Line Tools” dmg that corresponds to your version of OS X:

Bom tools 452 download.png


Download wxWidgets

You must download the wxMac version 2.8.12 of wxWidgets from:

http://www.wxwidgets.org/downloads/

Bom wxwidgets 2812 download.png

Download the "Build wxwidgets.gz" script that will be used to build wxWidgets for use with Audacity. Make sure you save the file as "build_wxwidgets.gz". Safari will automatically uncompress the file, others may not.


Download cmake

Download the latest Unix/Linux source version of cmake from:

http://www.cmake.org/cmake/resources/software.html

Bom cmake download.png


Download pkg-config

Download the latest version of pkg-config from:

http://pkgconfig.freedesktop.org/releases/

Bom pkg-config download.png


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:

Bom xcode 326 mount.png

The “Xcode and iOS SDK” installer checks the version of OS X that is currently running and that check will not succeed on versions above Snow Leopard. However the version check can be bypassed by starting the installation from the command-line.

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 otherwise the installation will fail.
Warning icon On Lion and Mountain Lion, the "Security & Privacy" section of System Preferences must be temporarily set to allow applications downloaded from "Anywhere", or Gatekeeper will prevent the package being opened.

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"

Bom xcode 326 install.png

This will start the installation while bypassing the version check.

On Mountain Lion, the installer needs to restart itself:

Bom xcode 326 restart.png

And, since the Xcode 3.2.6 certificate has expired, you will be asked to accept it:

Bom xcode 326 cert.png

You will then get to the normal installation process:

Bom xcode 326 installer.png

Proceed through the various installation pages until you get to the “Custom Install” page:

Bom xcode 326 custom install.png

Open the Essentials item by clicking the arrow:

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:

Bom xcode 326 selected options.png

Continue through the pages to start the installation.

On Mountain Lion, you will be prompted to stop iTunes near the end of the installation:

Bom xcode 326 itunes.png

To terminate the process and allow the installation to complete, open a Terminal window and enter:

sudo killall iTunesHelper

Bom xcode 326 ituneshelper.png

Close the installer when complete:

Bom xcode 326 complete.png

then eject the xcode_3.2.6_and_ios_sdk_4.3.dmg.

The first time you use Xcode you will be prompted to install Java if you do not have it installed already. So, use Finder to navigate to the "/Developer/Applications" folder, by selecting "Go to folder" from the "Go" menu in Finder:

Bom audiacty build xcode goto.png

Enter "/Developer/Applications" for the path and click "Go":

Bom audiacty build xcode folder.png

Now double-click the "Xcode" application to start it:

Bom audiacty build xcode start.png

At this point you may prompted to install Java:

Bom audiacty build xcode java.png

Wait for the installation to complete and quit Xcode.

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:

Bom xcode 452 mount.png

The Xcode folder will open when it's mounted:

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:

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:

Bom tools 452 mount.png

The Command Line Tools folder will open:

Bom tools 452 folder.png

Start the installation by double clicking the installer, “Command Line Tools (Lion).mpkg” in this case:

Bom tools 452 installer.png

Once the installation completes, close the installer:

Bom tools 452 complete.png

and you may eject the Command Line Tools .dmg.

In the Terminal window, enter:

sudo xcode-select -switch "/Applications/Xcode.app/Contents/Developer"

Bom xcode 452 switch.png

You will be asked to enter your password:

Bom xcode 452 switched.png

To make it a little easier to use Xcode 3.2.6 from the command-line, create a link to the 3.2.6 version of xcodebuild. You make change the "xcodebuild3" to whatever you like, just remember when building Audacity from the command-line to use what you specify here:

sudo ln -s /Developer/usr/bin/xcodebuild /usr/bin/xcodebuild3

Bom xcode 452 xcodebuild3.png

This completes the Xcode 4.5.2 installation.


Install cmake

In the Terminal window, extract the cmake archive if it was not extracted on download (modify the cmake version number in the command if needed):

tar xf ~/Downloads/cmake-2.8.10.2.tar

Now change to the directory of the extracted cmake:

cd cmake-2.8.10.2

or if you had already extracted cmake:

cd ~/Downloads/cmake-2.8.10.2

Configure cmake:

./configure --prefix=/usr/local --docdir=/share/doc/CMake --mandir=/share/man

Bom cmake configure.png

Build cmake:

make

Bom cmake build.png

Install cmake:

sudo make install

Bom cmake install.png

This completes the cmake installation.


Install pkg-config

As with cmake, use the Terminal to extract the pkg-config archive and change to the extracted directory:

tar xf ~/Downloads/pkg-config-0.27.1.tar
cd pkg-config-0.27.1

Bom pkgconfig extract.png

or if you already extracted pkg-config, change to that extracted directory:

cd ~/Downloads/pkg-config-0.27.1

Now configure pkg-config:

sh configure --with-internal-glib

Bom pkgconfig configure.png

and build pkg-config:

make

Bom pkgconfig build.png

Install pkg-config:

sudo make install

Bom pkgconfig install.png

This completes the pkg-config installation.


Install wxWidgets

In the Terminal, extract the wxWidgets source if not already extracted:

tar xf ~/Downloads/wxMac-2.8.12.tar

Bom wxwidgets 2812 extract.png

Change to the extracted directory:

cd wxMac-2.8.12
or:
cd ~/Downloads/wxMac-2.8.12

Bom wxwidgets 2812 cd.png

Start the build. This assumes you downloaded the build_wxwidgets script to your Downloads directory:

sh ~/Downloads/build_wxwidgets

Bom wxwidgets 2812 build.png

After all configurations are built, you will be prompted for your password. Watch the build for the password prompt, because if the requests for a password time out, you'll have to build again:

Bom wxwidgets 2812 install.png

All configurations have been built and installed: ~/Downloads/wxMac-2.8.12 ~/Downloads/wxMac-2.8.12/bld_release_shared ~/Downloads/wxMac-2.8.12

Bom wxwidgets 2812 complete.png

To verify, list the installed configurations:

wx-config --list

Bom wxwidgets 2812 list.png

Make sure you see 1 default configuration (mac-unicode-release-2.8) and 3 alternates:

Bom wxwidgets 2812 installed.png

wxWidgets installation is now complete.


Create links

To make it easier for Xcode to find the cmake, pkg-config, and wx-config, create links to them in the Xcode developer tree:

sudo ln -s /usr/local/bin/pkg-config /Developer/usr/bin
sudo ln -s /usr/local/bin/cmake /Developer/usr/bin
sudo ln -s /usr/local/bin/wx-config /Developer/usr/bin

Bom create links.png


Download Audacity

Now that everything is in place, we finally get to the whole purpose of this exercise, building Audacity. But first, you must decide if you want to use the tarball or tagged source which gives you the current release of Audacity, or if you want to get the absolute latest development source (SVN HEAD).

Warning icon Remember that occasionally, SVN HEAD may not build becaue of development in progress, or if it does, there may be bugs.

Make your choice when downloading from here:

http://audacity.sourceforge.net/download/source

Bom audiacty build download.png

Once you have the source downloaded and extracted, you may use either the xcodebuild command-line utility or the Xcode 3.2.6 IDE.

The Audacity xcode project has four configurations defined:

Debug Static - disables optimization, enables debugging code, and links to static libraries
Debug Shared - disables optimization, enables debugging code, and links to shared libraries
Release Static - enables optimization, disables debugging code, and links to static libraries
Release Shared - disables optimization, disables debugging code, and links to shared libraries

So you'll need to select which one you want to use in the following steps, but "Debug Static" will be used for this guide.


Build with xcodebuild

To use the command-line utility, open a Terminal window, change to the Audacity mac directory, and start the build. If you didn't install Xcode 4.5.2 above, then use "xcodebuild" here in place of "xcodebuild3":

cd audacity/mac
xcodebuild3 -configuration "Debug Static"

Bom audiacty build xcodebuild.png

When it completes, you should get a "Build Succeeded" message:

Bom audiacty build xcodebuild complete.png

The newly built Audacity can be started from Finder, using gdb, or simply:

open "build/Debug Static/Audacity.app"

Bom audiacty build xcodebuild open.png


Build with Xcode IDE

To build Audacity using the Xcode 3.2.6 IDE, use Finder to navigate to the "/Developer/Applications" folder, by selecting "Go to folder" from the "Go" menu in Finder:

Bom audiacty build xcode goto.png

Enter "/Developer/Applications" for the path and click "Go":

Bom audiacty build xcode folder.png

Now double-click the "Xcode" application to start it:

Bom audiacty build xcode start.png

Open the Audacity Xcode project by selecting "Open" from the "File" menu in Xcode:

Bom audiacty build xcode open.png

Navigate to the "audacity/mac" folder and then double-click the "Audacity.xcodeproj" project:

Bom audiacty build xcode xcodeproj.png

Now choose the configuration required from the menu top left (underneath the window buttons), then click "Build and Run" on the toolbar. A freshly built Audacity will start when the build completes.

Bom audiacty build xcode build.png