Instructions for building on macOS.

Building on macOS has been made much simpler with the Audacity 2.4.0 release. Still,
read this document throughly before starting.

1) Get and install the Xcode version that is for your macOS version. 

      MacOS                   Xcode Version
      Catalina - 10.15        11.3
      Mojave - 10.14          10.3
      High Sierra - 10.13     9.4.1
      Sierra - 10.12          9.2
      El Capitan - 10.11      8.2.1
      Yosemite - 10.10        7.2.1

2) Clone wxWidgets 3.1.1

   git clone --recurse-submodules https://github.com/audacity/wxWidgets.git

   Ensure that you clone with the "--recurse-submodules" option, and do not
   just download the Zip package, otherwise there will be required components
   missing.

   Don't be tempted to use Widgets already installed by a package manager such 
   as Homebrew because this will cause problems.

   We have applied some Audacity specific patches to wxWidgets to better 
   support VoiceOver, so please use the audacity-fixes-3.1.1 branch.  It's
   the default branch on our GitHub copy.
   https://github.com/audacity/wxWidgets/tree/audacity-fixes-3.1.1

   git checkout audacity-fixes-3.1.1

3) Change directory to the folder wxWidgets was cloned to then build/install 
   wxWidgets:

   sudo <path to Audacity source>/mac/scripts/build_wxwidgets

   Check that this worked by looking for <path to wxWidgets>/bld_release_x86_64 
   containing library .o files.  There should also be 3 other directories for
   other combinations of debug/release i386/x86_64.  If this step did not work,
   then later steps to build Audacity won't either.

   If building wxWidgets worked, you should now be able to build Audacity 
   using either the Xcode application or the Xcodebuild command line tool. 

4) Change directory to <path to Audacity source>/mac
   * Optionally, if you have built before, clean the Debug build with:

      xcodebuild clean

   * Or clean up other versions using some variant of:

      xcodebuild clean -configuration Release64

         'Release64' is for the 64 bit build. 'Release' is for the 32 bit build.
         'Debug64' is for 64 bit debug build, 'Debug' is for 32 bit debug build.
  
5) Build Audacity and create DMG and ZIP bundles in 
   /private/tmp by typing the following in the terminal:

      xcodebuild -configuration Release64 install

Notes: 

   - If you get errors about 'plist' at this stage, probably you skipped the step 
     of cleaning first.  

   - If you use the Xcode application, don't make any changes to Audacity.xcodeproj
     recommended by Xcode.  

   - Instructions on optional signing of DMGs, showing languages other than English,
     and other useful information can be found on our wiki at: 
     http://wiki.audacityteam.org/wiki/Building_On_Mac

