Difference between revisions of "Developing On Mac"

From Audacity Wiki
Jump to: navigation, search
(a bit about different versions)
(Latest hints on compiling OS X from CVS HEAD (error corrections welcome))
Line 8: Line 8:
 
= Compiling on Mac OS X =
 
= Compiling on Mac OS X =
  
Currently only command-line building is supported; there is no up-to-date Project Builder or Xcode project file.  Compile just as you would a Unix program (see [[Developing On Linux|here]]). After building "audacity", an additional step is performed, that creates "Audacity.app".  Make sure that you run "Audacity.app" and not "audacity", otherwise it won't work.
+
==General==
 +
Read the instructions in "compile.txt" in the "Mac" subdirectory of the source tree. Compile at the command-line if there is no no up-to-date Project Builder or Xcode project file.  Compile just as you would a Unix program (see [[Developing On Linux|here]]). After building "audacity", an additional step is performed, that creates "Audacity.app".  Make sure that you run "Audacity.app" and not "audacity", otherwise it won't work.
 +
 
 +
==wxWidgets==
 +
wxMac is the version of wxWidgets for Mac OS.
 +
 
 +
* Audacity 1.2.x / wxWidgets 2.4 ONLY: In the "mac" directory there is a patch file for wxMac-2.4.0 - it's recommended that you apply this patch first.  This enables support for custom cursors, allows disabling anti-aliased text (for speed), and fixes a couple of bugs.
 +
*Audacity 1.3.x / wxWidgets 2.6 or 2.8: Audacity 1.3.x can be built with wxMac 2.6 or 2.8. There have however been reports of stability issues with wxMac 2.8, so in general stick to the latest wxMac 2.6.x (currently wxMac 2.6.4).
 +
 
 +
 
 +
==Latest position building from CVS HEAD==
 +
 
 +
As of 12 January 08, CVS HEAD is reported to build on OSX 10.4 and 10.5, using {{external|[http://www.nabble.com/attachment/14778377/0/audacity-mac.diff this patch]}}. Applying this patch should fix most problems.
 +
 
 +
This scenario is reported to build from CVS HEAD as a Universal Binary on both Power PC and Intel Mac on OS X 10.5.1, using Xcode 3 and either wxWidgets 2.6.4 or 2.8.7, or the OS X 10.5.1 wxWidgets shared library.  The general principles are:
 +
#Build wxWidgets from the command line. Make a build directory inside the wxWidgets directory and from there run:
 +
{{Codelist|<nowiki> ../configure --disable-shared --enable-universal_binary
 +
--prefix=/path/to/audacity-beta/wx/ --enable-static -enable-unicode
 +
--disable-dependency-tracking --disable-monolithic</nowiki>}}<br>
 +
{{Hint|1='''For wxWidgets 2.6.x:'''
 +
# add <i>'''--with-expat=builtin'''</i>&nbsp; to the above
 +
# in utils/wxrc add <i>'''-mmacosx-version-min=10.4'''</i>&nbsp; to the CXX line
 +
# change the <nowiki>#</nowiki>define of ICONV_CHAR_CAST in src/common/strconv.cpp to: <br><i><b><nowiki>#define CONV_CHAR_CAST(x) ((const char **)(x))</nowiki></b></i>}}<br>
 +
:2. Do make followed by make install.
 +
:3. Compile Audacity 1.3.4 using Xcode. Open the Xcode project file and update it if required. In the list of targets do a "Get Info" on Audacity and Configure. You need to change a few "User-Defined" settings. Most of the Wx ones need changing to which version of wxWidgets you've chosen and the path that you set above in --prefix when building it. You may have to change the CONFIG_STATIC and CONFIG_UNICODE in Configure. Most of the settings required for these variables can be gained from running wx-config --libs, --ld or --cflags.
 +
 
 +
'''Notes:'''
 +
#If problems are encountered with twolame, use {{external|1=[http://sourceforge.net/project/showfiles.php?group_id=136040&package_id=150051 twolame-0.3.10]}} then apply {{external|1=[http://audacityteam.org/forum/download/file.php?id=113 this patch]}} to it.
 +
#If further problems are encountered, please view {{external|1=[http://audacityteam.org/forum/viewtopic.php?f=17&t=1649&st=0&sk=t&sd=a this thread]}} on the {{external|[http://audacityteam.org/forum Audacity Forum]}} or email the Audacity developer list:<br>(audacity-devel _AT_ lists_DOT_sourceforge_DOT_net) or click {{external|1=[mailto:[email protected]?subject=Building_on_Mac here]}}.  
  
== Audacity 1.2.x / wxWidgets 2.4.* ==
 
Note that in the "mac" directory there is a patch file for wxMac-2.4.0 - it's recommended that you apply this patch first.  This enables support for custom cursors, allows disabling anti-aliased text (for speed), and fixes a couple of bugs.
 
  
== Audacity 1.3.x / wxWidgets ==
 
Audacity 1.3.x can be built with wxMac 2.6 or 2.8. There have however been reports of stability issues with wxMac 2.8, so in general stick to the latest wxMac 2.6.x (currently wxMac 2.6.4).
 
  
 
[[Category:Mac Platform]] [[Category:For Developers]]
 
[[Category:Mac Platform]] [[Category:For Developers]]

Revision as of 08:05, 13 January 2008

Related Pages:



Compiling on Mac OS X

General

Read the instructions in "compile.txt" in the "Mac" subdirectory of the source tree. Compile at the command-line if there is no no up-to-date Project Builder or Xcode project file. Compile just as you would a Unix program (see here). After building "audacity", an additional step is performed, that creates "Audacity.app". Make sure that you run "Audacity.app" and not "audacity", otherwise it won't work.

wxWidgets

wxMac is the version of wxWidgets for Mac OS.

  • Audacity 1.2.x / wxWidgets 2.4 ONLY: In the "mac" directory there is a patch file for wxMac-2.4.0 - it's recommended that you apply this patch first. This enables support for custom cursors, allows disabling anti-aliased text (for speed), and fixes a couple of bugs.
  • Audacity 1.3.x / wxWidgets 2.6 or 2.8: Audacity 1.3.x can be built with wxMac 2.6 or 2.8. There have however been reports of stability issues with wxMac 2.8, so in general stick to the latest wxMac 2.6.x (currently wxMac 2.6.4).


Latest position building from CVS HEAD

As of 12 January 08, CVS HEAD is reported to build on OSX 10.4 and 10.5, using this patch . Applying this patch should fix most problems.

This scenario is reported to build from CVS HEAD as a Universal Binary on both Power PC and Intel Mac on OS X 10.5.1, using Xcode 3 and either wxWidgets 2.6.4 or 2.8.7, or the OS X 10.5.1 wxWidgets shared library. The general principles are:

  1. Build wxWidgets from the command line. Make a build directory inside the wxWidgets directory and from there run:
../configure --disable-shared --enable-universal_binary --prefix=/path/to/audacity-beta/wx/ --enable-static -enable-unicode --disable-dependency-tracking --disable-monolithic

For wxWidgets 2.6.x:
  1. add --with-expat=builtin  to the above
  2. in utils/wxrc add -mmacosx-version-min=10.4  to the CXX line
  3. change the #define of ICONV_CHAR_CAST in src/common/strconv.cpp to:
    #define CONV_CHAR_CAST(x) ((const char **)(x))

2. Do make followed by make install.
3. Compile Audacity 1.3.4 using Xcode. Open the Xcode project file and update it if required. In the list of targets do a "Get Info" on Audacity and Configure. You need to change a few "User-Defined" settings. Most of the Wx ones need changing to which version of wxWidgets you've chosen and the path that you set above in --prefix when building it. You may have to change the CONFIG_STATIC and CONFIG_UNICODE in Configure. Most of the settings required for these variables can be gained from running wx-config --libs, --ld or --cflags.

Notes:

  1. If problems are encountered with twolame, use twolame-0.3.10  then apply this patch  to it.
  2. If further problems are encountered, please view this thread  on the Audacity Forum  or email the Audacity developer list:
    (audacity-devel _AT_ lists_DOT_sourceforge_DOT_net) or click here .