Difference between revisions of "Release Process/Mac"

From Audacity Wiki
Jump to: navigation, search
(add more details)
m (Steps to build DMG and zip)
Line 8: Line 8:
 
#If you have XCode 4.x installed along side XCode 3.x, this is okay, but you will need to configure and make with a configure that explicitly specifies the gcc-4.0 in the 3.x XCode directory, because XCode 4 installs gcc-4.0 to /usr/bin, which comes first in your path, so 'CC=gcc-4.0' will fail since it does not have a ppc assembler.  Here is my example for an XCode3 directory at /Developer:
 
#If you have XCode 4.x installed along side XCode 3.x, this is okay, but you will need to configure and make with a configure that explicitly specifies the gcc-4.0 in the 3.x XCode directory, because XCode 4 installs gcc-4.0 to /usr/bin, which comes first in your path, so 'CC=gcc-4.0' will fail since it does not have a ppc assembler.  Here is my example for an XCode3 directory at /Developer:
 
CC=/Developer/usr/bin/gcc-4.0 CXX=/Developer/usr/bin/g++-4.0 LD=/Developer/usr/bin/g++-4.0 ../configure --disable-shared --enable-universal_binary --prefix=/Users/admin/wx/wx2.8.12r --enable-static --disable-compat26 --with-expat=builtin --with-zlib=builtin --with-regex=builtin --enable-unicode --disable-dependency-tracking --disable-monolithic --disable-debug --with-macosx-sdk=/Developer/SDKs/MacOSX10.4u.sdk --with-macosx-version-min=10.4 --enable-release;make;make install
 
CC=/Developer/usr/bin/gcc-4.0 CXX=/Developer/usr/bin/g++-4.0 LD=/Developer/usr/bin/g++-4.0 ../configure --disable-shared --enable-universal_binary --prefix=/Users/admin/wx/wx2.8.12r --enable-static --disable-compat26 --with-expat=builtin --with-zlib=builtin --with-regex=builtin --enable-unicode --disable-dependency-tracking --disable-monolithic --disable-debug --with-macosx-sdk=/Developer/SDKs/MacOSX10.4u.sdk --with-macosx-version-min=10.4 --enable-release;make;make install
 +
#After you've finished building, go to the install and directory and do a 'file lib/libwx_macu_core-2.8.a'.  This should tell you the file has two architectures, ppc and i386.  If not, you have to repeat these steps and see what went wrong.
  
 
#get a clean audacity checkout
 
#get a clean audacity checkout
Line 15: Line 16:
 
#make sure you have set up your Release_Static.xcconfig to point to the wxMac install you just made ('WX_PREFIX=/path/to/wxMacx.y.z'), and and that you have 'ARCHS=ppc i386'
 
#make sure you have set up your Release_Static.xcconfig to point to the wxMac install you just made ('WX_PREFIX=/path/to/wxMacx.y.z'), and and that you have 'ARCHS=ppc i386'
 
#I needed to edit scripts/mac_release_build to use the correct xcodebuild, since the default one that is first on your path at /usr/bin/xcodebuild will be the 4.2 one if you have XCode4 as well.  (this is done by editing 'xcodebuild -configuration 'Release Static'' to '/Developer/usr/bin/xcodebuild -configuration 'Release Static''.  In the future we should make this a parameter for the script if we are going to support PPC.
 
#I needed to edit scripts/mac_release_build to use the correct xcodebuild, since the default one that is first on your path at /usr/bin/xcodebuild will be the 4.2 one if you have XCode4 as well.  (this is done by editing 'xcodebuild -configuration 'Release Static'' to '/Developer/usr/bin/xcodebuild -configuration 'Release Static''.  In the future we should make this a parameter for the script if we are going to support PPC.
#run ./scripts/mac_release_build (FROM THE ROOT DIRECTORY)
+
#run ./scripts/mac_release_build (From the svn root and *not* the scripts directory) This will take around 20 mins, but you should see in the first few lines of output the line setenv ARCHS "i386 ppc"
 +
.  If you see only i386, something is probably wrong.  In one debugged case, there were accidentally two 'ARCHS=' variable settings in the xcconfig file, the first 'i386 ppc' and the latter was 'i386', so the build ended being just i386.
 +
#The dmg and zip will be one directory above the root.  expand them and cd to the directory and type 'file Audacity.app/Contents/MacOS/Audacity', which should report there is both ppc and i386 architectures in this binary.

Revision as of 03:39, 18 February 2012

Steps to build DMG and zip

build wx

  1. If you already have a universal, current wxMac with all patches then you can skip this
  2. download wxMac
  3. apply patches - some may be on list. (as of 2.8.12 there is one patch: wxMacAdditions/wxMac_bug_2_10.5.8_PPC.patch)
  4. configure for universal *against the 10.4 sdk* or ppcs won't be able to run.
  5. You will need xcode 3.x installed, and can do a configure;make;make install as normal, but make sure this is in your configure line: --enable-universal-binary --with-macosx-sdk=/Developer/SDKs/MacOSX10.4u.sdk --with-macosx-version-min=10.4
  6. If you have XCode 4.x installed along side XCode 3.x, this is okay, but you will need to configure and make with a configure that explicitly specifies the gcc-4.0 in the 3.x XCode directory, because XCode 4 installs gcc-4.0 to /usr/bin, which comes first in your path, so 'CC=gcc-4.0' will fail since it does not have a ppc assembler. Here is my example for an XCode3 directory at /Developer:

CC=/Developer/usr/bin/gcc-4.0 CXX=/Developer/usr/bin/g++-4.0 LD=/Developer/usr/bin/g++-4.0 ../configure --disable-shared --enable-universal_binary --prefix=/Users/admin/wx/wx2.8.12r --enable-static --disable-compat26 --with-expat=builtin --with-zlib=builtin --with-regex=builtin --enable-unicode --disable-dependency-tracking --disable-monolithic --disable-debug --with-macosx-sdk=/Developer/SDKs/MacOSX10.4u.sdk --with-macosx-version-min=10.4 --enable-release;make;make install

  1. After you've finished building, go to the install and directory and do a 'file lib/libwx_macu_core-2.8.a'. This should tell you the file has two architectures, ppc and i386. If not, you have to repeat these steps and see what went wrong.
  1. get a clean audacity checkout
  2. open a terminal
  3. cd to the audacity root directory
  4. copy over three shared object plugins (gverb_1216.so hard_limiter_1413.so sc4_1882.so) into the 'plugins' directory in the root svn directory from the previous version of audacity release (these don't have problems so its unlikely you'll have to build them).
  5. make sure you have set up your Release_Static.xcconfig to point to the wxMac install you just made ('WX_PREFIX=/path/to/wxMacx.y.z'), and and that you have 'ARCHS=ppc i386'
  6. I needed to edit scripts/mac_release_build to use the correct xcodebuild, since the default one that is first on your path at /usr/bin/xcodebuild will be the 4.2 one if you have XCode4 as well. (this is done by editing 'xcodebuild -configuration 'Release Static to '/Developer/usr/bin/xcodebuild -configuration 'Release Static. In the future we should make this a parameter for the script if we are going to support PPC.
  7. run ./scripts/mac_release_build (From the svn root and *not* the scripts directory) This will take around 20 mins, but you should see in the first few lines of output the line setenv ARCHS "i386 ppc"

. If you see only i386, something is probably wrong. In one debugged case, there were accidentally two 'ARCHS=' variable settings in the xcconfig file, the first 'i386 ppc' and the latter was 'i386', so the build ended being just i386.

  1. The dmg and zip will be one directory above the root. expand them and cd to the directory and type 'file Audacity.app/Contents/MacOS/Audacity', which should report there is both ppc and i386 architectures in this binary.