This shows you the differences between two versions of the page.
|
compiling_on_os_x [2012/04/15 18:12] rryan [2. Install build dependencies (Method 2 - Compile by hand)] |
compiling_on_os_x [2013/05/11 02:07] (current) jus [3. Get Mixxx] Update bzr checkout command for v1.11 |
||
|---|---|---|---|
| Line 6: | Line 6: | ||
| ===== 1. Install Xcode development tools ===== | ===== 1. Install Xcode development tools ===== | ||
| - | You will need the [[http://developer.apple.com/technologies/tools/|Xcode development tools]] installed. | + | You will need the [[http://developer.apple.com/technologies/tools/|Xcode development tools]] installed. Xcode is a package provided by Apple containing compilers, libraries and additional tools required to develop applications for Mac OS X. |
| + | |||
| + | === Install Xcode on Mac OS X 10.7 Lion & 10.8 Mountain Lion === | ||
| + | Get the latest version of Xcode for free using the [[http://itunes.apple.com/us/app/xcode/id448457090?mt=12|Mac App Store]]. Alternatively download Xcode as a disk image from the [[https://developer.apple.com/downloads/index.action|Apple developer website]]. Downloading it requires a free registration at Apple's developer site. | ||
| + | |||
| + | After installing Xcode, the Command Line Tools for Xcode must be installed. Goto //Xcode > Preferences > Downloads > Components > Command line tools// and click //Install// or download the latest version for your OS manually from the [[https://developer.apple.com/downloads/index.action|Apple developer website]]. | ||
| + | |||
| + | === Install Xcode on Mac OS X 10.6 Snow Leopard === | ||
| Xcode 3.2.6 is the last version that can be downloaded for free for users of Snow Leopard (10.6.x) . Downloading it requires a free registration at Apple's developer site (but a paid developer program membership is not required). [[https://developer.apple.com/devcenter/download.action?path=/Developer_Tools/xcode_3.2.6_and_ios_sdk_4.3__final/xcode_3.2.6_and_ios_sdk_4.3.dmg|Download]] | Xcode 3.2.6 is the last version that can be downloaded for free for users of Snow Leopard (10.6.x) . Downloading it requires a free registration at Apple's developer site (but a paid developer program membership is not required). [[https://developer.apple.com/devcenter/download.action?path=/Developer_Tools/xcode_3.2.6_and_ios_sdk_4.3__final/xcode_3.2.6_and_ios_sdk_4.3.dmg|Download]] | ||
| Line 12: | Line 19: | ||
| Xcode 4.2 for Snow Leopard (10.6.x) requires that you have a [[http://developer.apple.com/programs/mac/|PAID (99$/year) developer account]], it can NOT be downloaded or updated from the Mac App Store (MAS). [[https://developer.apple.com/devcenter/download.action?path=/Developer_Tools/xcode_4.2_with_ios_5_sdk/xcode_4.2_and_ios_5_sdk_for_snow_leopard.dmg|Download]] | Xcode 4.2 for Snow Leopard (10.6.x) requires that you have a [[http://developer.apple.com/programs/mac/|PAID (99$/year) developer account]], it can NOT be downloaded or updated from the Mac App Store (MAS). [[https://developer.apple.com/devcenter/download.action?path=/Developer_Tools/xcode_4.2_with_ios_5_sdk/xcode_4.2_and_ios_5_sdk_for_snow_leopard.dmg|Download]] | ||
| - | Xcode 4.2 for Lion (10.7.x) can be downloaded for free from the Mac App Store (MAS), it will not install on Snow Leopard 10.6.x). [[http://itunes.apple.com/us/app/xcode/id448457090?mt=12|Download]] | + | === Install Xcode on Mac OS X 10.5 Leopard or earlier === |
| + | |||
| + | If you have an earlier release of Mac OS X, you may download the latest version of Xcode for OS X 10.5 ([[http://connect.apple.com/cgi-bin/WebObjects/MemberSite.woa/wa/getSoftware?bundleID=20491|v3.1.4]]) or for 10.4 ([[http://connect.apple.com/cgi-bin/WebObjects/MemberSite.woa/wa/getSoftware?bundleID=19907|v2.5]]). | ||
| + | |||
| + | Older versions of Xcode can be be installed from your original Mac OS X Install Disc 2 as well, look at [[http://www.techsww.com/tutorials/operating_systems/macosx/tools/configuring_macosx_compile_install_software_xcode_tools.php|this page]] for a guide. Run Software Update after installation to get the latest version for your OS. | ||
| + | |||
| + | If you need a specific older version, check the [[https://connect.apple.com/cgi-bin/WebObjects/MemberSite.woa/wo/5.1.17.2.1.3.3.1.0.1.1.0.3.1.3.3.1|Apple Developer Tools download archive]]. Downloading it requires a free registration at Apple's developer site. | ||
| + | ===== 2. Install build dependencies ===== | ||
| + | |||
| + | ==== Method 1 - Install using Homebrew ==== | ||
| + | |||
| + | **This is the preferred method of compiling Mixxx on OS X** | ||
| + | |||
| + | [[http://mxcl.github.com/homebrew/|Homebrew]] is yet another package manager for OS X. It is growing quickly in popularity. Assuming you have already installed Homebrew and gotten it working: | ||
| + | |||
| + | * Open the [[http://www.apple.com/macosx/apps/all.html#terminal|Terminal]] application and use the following command to install the necessary libraries: | ||
| + | |||
| + | brew install scons portaudio libsndfile libogg libvorbis portmidi bzr taglib libshout protobuf flac libjpeg qt | ||
| - | Older versions of Xcode can be be installed from your original Mac OS X Install Disc 2, look at [[http://www.techsww.com/tutorials/operating_systems/macosx/tools/configuring_macosx_compile_install_software_xcode_tools.php|this page]] for a guide. | + | * **OPTIONAL:** Mixxx supports using OSX-provided versions of the MP3 and AAC codec. If you don't want to use the OSX versions of these codecs you can build the codecs into Mixxx directly. To do this, you have to install the MP3 and AAC codecs using Homebrew: |
| - | If you need a specific older version, check the [[http://connect.apple.com/cgi-bin/WebObjects/MemberSite.woa/wo/4.1.17.2.1.3.3.1.0.1.1.0.3.3.3.3.1|Apple download archive]]. Downloading it requires a free registration at Apple's developer site. | + | brew install libid3tag libmad mp4v2 faad2 |
| - | ===== 2. Install build dependencies (Method 1 - MacPorts) ===== | + | ==== Method 2 - MacPorts ==== |
| Mixxx relies on several external libraries for various features. Fortunately, you can automatically download and install most of these dependencies through [[http://www.macports.org/|MacPorts]]. MacPorts is a package management system that simplifies the installation of software on Mac OS X. | Mixxx relies on several external libraries for various features. Fortunately, you can automatically download and install most of these dependencies through [[http://www.macports.org/|MacPorts]]. MacPorts is a package management system that simplifies the installation of software on Mac OS X. | ||
| Line 27: | Line 51: | ||
| sudo port install scons libid3tag libmad portaudio libsndfile libogg libvorbis mp4v2 portmidi faad2 bzr taglib libshout2 protobuf-cpp | sudo port install scons libid3tag libmad portaudio libsndfile libogg libvorbis mp4v2 portmidi faad2 bzr taglib libshout2 protobuf-cpp | ||
| - | * Finally, after that has completed, download and install the [[http://qt.nokia.com/downloads/qt-for-open-source-cpp-development-on-mac-os-x|Qt SDK package]] for your platform. | + | * Finally, after that has completed, download and install the [[https://qt-project.org/downloads|Qt SDK package]] for your platform (qt-mac and qt-mac-debug-libs required, SDK-Installer will not work with standard settings). |
| * Optionally, also install HSS1394 (a high-speed MIDI-over-Firewire protocol). See the entry for HSS1394 under the section "[[compiling_on_os_x#install_build_dependencies_method_2_-_compile_by_hand|Install build dependencies (Method 2 - Compile by hand)]]" for details about installation or exclusion. | * Optionally, also install HSS1394 (a high-speed MIDI-over-Firewire protocol). See the entry for HSS1394 under the section "[[compiling_on_os_x#install_build_dependencies_method_2_-_compile_by_hand|Install build dependencies (Method 2 - Compile by hand)]]" for details about installation or exclusion. | ||
| - | ==== If This is Your First Time Using MacPorts ==== | + | === If This is Your First Time Using MacPorts === |
| After installing MacPorts, using MacPorts to install the required libraries is a simple process. Using the command ''sudo port install X'', where X is the name of each library you’ll need, MacPorts will automatically download and install the required dependencies. This can be done one at time by entering single entries like ''sudo port install scons'' for each library listed above or all at once by entering the entire command given above. | After installing MacPorts, using MacPorts to install the required libraries is a simple process. Using the command ''sudo port install X'', where X is the name of each library you’ll need, MacPorts will automatically download and install the required dependencies. This can be done one at time by entering single entries like ''sudo port install scons'' for each library listed above or all at once by entering the entire command given above. | ||
| Line 67: | Line 91: | ||
| It probably means that the config file for port hasn't been updated. Perhaps there has been a newer version of the library released. You may be hosed at this point, but if you have an older version of the library already installed on your system, it may still compile and run properly. | It probably means that the config file for port hasn't been updated. Perhaps there has been a newer version of the library released. You may be hosed at this point, but if you have an older version of the library already installed on your system, it may still compile and run properly. | ||
| - | ===== 2. Install build dependencies (Method 2 - Compile by hand) ===== | + | ==== Method 3 - Compile by hand ==== |
| You will need to install the following by hand for the compile process: | You will need to install the following by hand for the compile process: | ||
| Line 79: | Line 103: | ||
| * portmidi ([[http://sourceforge.net/apps/trac/portmedia/wiki/portmidi|Download]], or "sudo port install portmidi" | * portmidi ([[http://sourceforge.net/apps/trac/portmedia/wiki/portmidi|Download]], or "sudo port install portmidi" | ||
| * faad2 ([[http://sourceforge.net/projects/faac/|Download]]) or "sudo port install faad2" | * faad2 ([[http://sourceforge.net/projects/faac/|Download]]) or "sudo port install faad2" | ||
| - | * QT 4.6.0+ ([[http://qt.nokia.com/downloads/qt-for-open-source-cpp-development-on-mac-os-x|Download]]) -- get the Cocoa Mac binary package for Mac OS X 10.5 - 10.6 (32-bit and 64-bit) and install to the default location. -- DO NOT use qt4-mac delivered through macports. It will give you an error messages that some header files are missing e.g. libmad and others. This is due to a missing QTCore framework. | + | * QT 4.6.0+ ([[https://qt-project.org/downloads|Download]]) -- get the Cocoa Mac binary package for Mac OS X 10.5 - 10.6 (32-bit and 64-bit) and install to the default location. -- DO NOT use qt4-mac delivered through macports. It will give you an error messages that some header files are missing e.g. libmad and others. This is due to a missing QTCore framework. |
| * Bazaar ([[http://bazaar-vcs.org/Download|Download]]) -- Get the installer for your version of OS X. The installer contains the [[http://mixxx.org/wiki/doku.php/using_bazaar?s[]=explorer#gui_clients|Bazaar Explorer GUI]]. -- or "sudo port install bzr" and "sudo port install bzr-explorer" for the GUI | * Bazaar ([[http://bazaar-vcs.org/Download|Download]]) -- Get the installer for your version of OS X. The installer contains the [[http://mixxx.org/wiki/doku.php/using_bazaar?s[]=explorer#gui_clients|Bazaar Explorer GUI]]. -- or "sudo port install bzr" and "sudo port install bzr-explorer" for the GUI | ||
| * HSS1394 -- only applicable to 1.9+ -- "bzr checkout lp:hss1394" then "scons" then "sudo scons install" but you probably don't need it unless you got a HSS1394 MIDI device like the Stanton SCS 1 series. Get around this by including "hss1394=0" when running scons on mixxx (see below). | * HSS1394 -- only applicable to 1.9+ -- "bzr checkout lp:hss1394" then "scons" then "sudo scons install" but you probably don't need it unless you got a HSS1394 MIDI device like the Stanton SCS 1 series. Get around this by including "hss1394=0" when running scons on mixxx (see below). | ||
| Line 86: | Line 110: | ||
| * [[http://code.google.com/p/protobuf/|protobuf]] -- or "sudo port install protobuf-cpp" | * [[http://code.google.com/p/protobuf/|protobuf]] -- or "sudo port install protobuf-cpp" | ||
| * [[http://www.vamp-plugins.org/develop.html|vamp-plugin-sdk]] (**optional** if not installed, Mixxx uses an internal version) | * [[http://www.vamp-plugins.org/develop.html|vamp-plugin-sdk]] (**optional** if not installed, Mixxx uses an internal version) | ||
| + | |||
| ===== 3. Get Mixxx ===== | ===== 3. Get Mixxx ===== | ||
| If you want to compile Mixxx, you'll need to download the source code. Either grab the source for the latest release off our [[http://www.mixxx.org/download.php|downloads page]], or checkout the latest Mixxx code: | If you want to compile Mixxx, you'll need to download the source code. Either grab the source for the latest release off our [[http://www.mixxx.org/download.php|downloads page]], or checkout the latest Mixxx code: | ||
| <code> | <code> | ||
| - | bzr checkout lp:mixxx/1.9 (for old stable v1.9) | + | bzr checkout lp:mixxx/1.10 (for old stable v1.10) |
| - | bzr checkout lp:mixxx/1.10 (for current stable v1.10) | + | bzr checkout lp:mixxx/1.11 (for current stable v1.11) |
| bzr checkout lp:mixxx (for latest trunk) | bzr checkout lp:mixxx (for latest trunk) | ||
| </code> | </code> | ||
| Line 97: | Line 122: | ||
| ===== 4. Compile and install ===== | ===== 4. Compile and install ===== | ||
| - | If you got the source code from BZR, change to the newly created "mixxx" directory, and use scons to compile and install: | + | If you used Homebrew, you need to set your compiler paths accordingly. In the below code you should customize ''HOMEBREW_PATH'' to be the path to your homebrew installation. In this example we will use ''/usr/local/homebrew'' (default is ''/usr/local''). |
| + | |||
| + | <code> | ||
| + | HOMEBREW_PATH=/usr/local/homebrew | ||
| + | export CFLAGS=-I$HOMEBREW_PATH/include | ||
| + | export CXXFLAGS=-I$HOMEBREW_PATH/include | ||
| + | export LDFLAGS=-L$HOMEBREW_PATH/lib | ||
| + | export QTDIR=$HOMEBREW_PATH/Cellar/qt/4.8.4/ | ||
| + | </code> | ||
| + | |||
| + | If you got the source code from BZR, change to the newly created ''mixxx'' directory, and use scons to compile and install: | ||
| <code> | <code> | ||
| cd mixxx | cd mixxx | ||
| - | scons | + | cd mixxx (Bazaar creates two subdirectories...) |
| + | scons hss1394=0 mad=0 faad=0 coreaudio=1 verbose=0 | ||
| scons bundle | scons bundle | ||
| + | </code> | ||
| + | |||
| + | Setting ''coreaudio=1'' will use CoreAudio to decode MP3 and AAC files. If you want to use ''libmad'' or ''libfaad'' for MP3 and AAC decoding, simply set the ''mad'' and ''faad'' flags and clear the ''coreaudio'' flag. For example: | ||
| + | |||
| + | <code> | ||
| + | scons hss1394=0 mad=1 faad=1 coreaudio=0 verbose=0 | ||
| </code> | </code> | ||
| Line 110: | Line 152: | ||
| </code> | </code> | ||
| - | Then try the "scons" command above like this: | + | If you installed Qt to a custom location you will have to provide this via the ''qtdir'' flag. For example, you could try: |
| <code> | <code> | ||
| scons qtdir=/Developer | scons qtdir=/Developer | ||
| </code> | </code> | ||
| + | |||
| + | Because /Developer is a common place for Qt to drop its frameworks. | ||
| If it you get a message like: | If it you get a message like: | ||
| Line 126: | Line 170: | ||
| </code> | </code> | ||
| - | This should generate Mixxx.app. Generating the .app has some expensive scanning and relinking steps so if you want to avoid this you can skip 'scons bundle' and instead on the first run of mixxx run it as: | + | This should generate ''Mixxx.app'' which you can run by double-clicking on or typing ''open Mixxx.app''. Generating the .app has some expensive scanning and relinking steps so if you want to avoid this you can skip ''scons bundle'' and instead on the first run of mixxx run it as: |
| <code> | <code> | ||