3 2. Getting the source code
4 3. Install required libs
6 3.2. Install XBMC build depends
7 4. How to compile and run
12 -----------------------------------------------------------------------------
14 -----------------------------------------------------------------------------
16 This is a platform port of XBMC for the Apple OSX operating system. 10.6, 10.7
17 and 10.8 Intel development platforms are supported. Xcode 3.2.6 and 4.3 and newer
18 are the recommended versions.
19 There are 3 ways to build XBMC for Mac, from command-line with make, from command-line
20 using xcodebuild or from Xcode.
22 Generally, Xcode is the easiest as it presents the build system in a GUI environment.
23 The command-line build is still under development.
25 XBMC for Mac is composed of a main binary with numerous dynamic libraries and
26 codecs that support a multitude of music and video formats.
28 On Snow Leopard (OSX 10.6.x) we recommend using Xcode 3.2.6.
29 On Lion (OSX 10.7.x) we recommend using Xcode 4.3.x.
30 On Mountain Lion (OSX 10.8.1) we recommend using Xcode 4.4.
32 NOTE TO NEW OS X USERS: All lines that are prefixed with the '$' character are
33 commands that need to be typed into a Terminal window. Note that the '$'
34 character itself should NOT be typed as part of the command.
37 -----------------------------------------------------------------------------
38 2. Getting the source code
39 -----------------------------------------------------------------------------
42 $ git clone git://github.com/xbmc/xbmc.git xbmc
44 -----------------------------------------------------------------------------
46 -----------------------------------------------------------------------------
47 Install latest Xcode (4.3.2 or 3.2.6 as of the writing). You can download it from
49 1. Apple's site after registration at http://developer.apple.com/tools/download (Xcode 3.2.6)
50 2. In the MacOSX AppStore (Xcode 4.3.x).
52 If you are using XCode 4.3.x or later you also need to install the "Command Line Tools". To do so
53 after installing Xcode you have to go to "Xcode->Preferences->Downloads" and install the
54 package "Command Line Tools".
56 Xcode 3.2.6 only runs on 10.6.x (Snow Leopard).
57 Xcode 4.3.x only runs on 10.7.x (Lion).
58 Xcode 4.4 only runs on 10.8.x (Mountain Lion).
60 -----------------------------------------------------------------------------
61 3.1 Install XBMC build depends
62 -----------------------------------------------------------------------------
64 3.1.1 Compiling as 32 Bit binary
66 $ cd tools/darwin/depends
68 $ ./configure --with-darwin=osx
71 3.1.2 Compiling as 64 Bit binary
73 $ cd tools/darwin/depends
75 $ ./configure --with-darwin=osx --with-arch=x86_64
78 -----------------------------------------------------------------------------
80 -----------------------------------------------------------------------------
81 Both Xcode and Terminal compilation require that build environment be setup
82 first. This is a simple step and involves the following:
84 4.a Compilation by using command-line building via xcodebuild or
85 by compiling via Xcode GUI
88 $ make -C tools/darwin/depends/xbmc
91 $ make -C lib/addons/script.module.pil
93 4.b Compilation by using command-line building via make (experimental)
96 $ make -C tools/darwin/depends/xbmc
99 The configure operation will setup the build environment for codecs and
100 internal libraries that are used by XBMC. This step is required for both Xcode
101 and command-line building. The "make clean" ensures that there are no stale
102 binaries from git that might cause problems.
104 -----------------------------------------------------------------------------
106 -----------------------------------------------------------------------------
107 Start XCode and open the XBMC project (XBMC.xcodeproj) located in $HOME/XBMC.
108 For development, XBMC is run from the $HOME/XBMC directory and needs to have
109 the XBMC_HOME environment variable set to know where that directory is located.
110 To set XBMC_HOME environment variable:
113 Menu -> Project -> Edit Active Executable "XBMC", click "Arguments" tab and
114 add "XBMC_HOME" as an enviroment variable. Set the value to the path to the
115 XBMC root folder. For example, "/Users/bigdog/Documents/XBMC"
117 Xcode 4.3.x and later
118 Menu -> Product -> Edit Sheme -> "Run XBMC"/"Debug" -> Add XBMC_HOME into
119 the List of "Environment Variables".Set the value to the path to thev XBMC
120 root folder. For example, "/Users/bigdog/Documents/XBMC"
122 There are two build targets "XBMC" and "XBMC.app" (each in 32Bit and 64Bit flavour)
123 with debug and release settings. The "XBMC" target is used for rapid build and
124 debug cycles while the "XBMC.app" target is used to build a self contained
127 Set the build target to "XBMC" or "XBMC.app" and be sure to select the same
128 architecture as selected in step 3.1 (either i386 for 32Bit or x86_64 for 64Bit),
131 The build process will take a long time when building the first time.
132 You can see the progress in "Build Results". There are a large number of static
133 and dynamic libaries that will need to be built. Once these are built,
134 subsequent builds will be faster.
136 After the build, you can ether run XBMC for Mac from Xcode or run it from
137 the command-line. If you run it from the command-line, make sure your set
138 the XBMC_HOME environment variable (export XBMC_HOME=$HOME/XBMC). Then, to
139 run the debug version:
143 Or the release version:
145 $ ./build/Release/XBMC
147 You can also build via Xcode from the command-line using the following:
149 $ xcodebuild -configuration Release ONLY_ACTIVE_ARCH=YES ARCHS=i386 VALID_ARCHS=i386 \
150 -target "XBMC.app" -project XBMC.xcodeproj
152 You can specify "Release" instead of "Debug" as a configuration. Be sure to set *_ARCHS
153 variables to the same architecture as selected in step 3.1 (either i386 for 32Bit or x86_64
156 -----------------------------------------------------------------------------
157 4.2 Using Terminal (command-line) (this is a work in progress and might fail)
158 -----------------------------------------------------------------------------
159 There are two methods, a) make/Xcode and b) make (which might fail as it's under
162 If you want to build a cross-compiled version that can run under 10.6/10.7,
163 you could try xcodebuild from the command-line (normally unneeded - for advanced
168 $ export XBMC_HOME=`pwd`
170 $ make -C lib/addons/script.module.pil
171 $ xcodebuild -sdk macosx10.7 -project XBMC.xcodeproj -target XBMC.app ONLY_ACTIVE_ARCH=YES \
172 ARCHS=x86_64 VALID_ARCHS=x86_64 -configuration Release build
176 $ export XBMC_HOME=`pwd`
180 -----------------------------------------------------------------------------
182 -----------------------------------------------------------------------------
183 This section describes how to package XBMC in a disk image for
186 1. build XBMC.app from XCode so that the application bundle is correctly updated.
188 2. make -C tools/darwin/packaging/xbmc-osx
190 3. If completed successfully, a disk image named XBMC_for_Mac.dmg will be
191 present in the users XBMC build directory:
193 Remember to unmount/eject XBMC.dmg before attempting to recreate it,
194 otherwise dmgmaker.pl will fail.