blob: e730cd617788251dc56dff6551bb437c6238b10c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
|
TOC
1. Introduction
2. Getting the source code
3. Install required libs
3.1. Install Xcode
3.1.1 Supported Xcode and OSX constellations
3.2. Install Kodi build depends
3.2.1 Compiling as 32 Bit binary
3.2.2 Compiling as 64 Bit binary
3.2.3 Compile binary addons
4. How to compile and run
4.1 Using XCode
4.2 Using Command line
5. Packaging
-----------------------------------------------------------------------------
1. Introduction
-----------------------------------------------------------------------------
This is a platform port of Kodi for the Apple OSX operating system. 10.9 and 10.10 Intel development
platforms are supported. Xcode 6 or newer are the recommended versions.
There are 3 ways to build Kodi for Mac, from command-line with make, from command-line
using xcodebuild or from Xcode.
The minimum version of OSX you need to run(!) Kodi is 10.7 atm.
Generally, Xcode is the easiest as it presents the build system in a GUI environment.
The command-line build is still under development.
Kodi for Mac is composed of a main binary with numerous dynamic libraries and
codecs that support a multitude of music and video formats.
On Mavericks (OSX 10.9.x) we recommend using Xcode 6.1.
On Yosemite (OSX 10.10.x) we recommend using Xcode 6.4.
On El Capitan (OSX 10.11.x) we recommend using Xcode 7.x or Xcode 8.x.
On Sierra (macOS 10.12.x) we recomment using Xcode 8.x.
NOTE TO NEW OS X USERS: All lines that are prefixed with the '$' character are
commands that need to be typed into a Terminal window. Note that the '$'
character itself should NOT be typed as part of the command.
ATTENTION: You need to download and install XQuartz from https://xquartz.macosforge.org/landing/ since
its not part of OSX anymore since 10.8.
-----------------------------------------------------------------------------
2. Getting the source code
-----------------------------------------------------------------------------
$ cd $HOME
$ git clone git://github.com/xbmc/xbmc.git Kodi
-----------------------------------------------------------------------------
3.1 Install XCODE
-----------------------------------------------------------------------------
See point 3.1.1 below for an updated list of supported/tested Xcode/osx constellations!!!
Install latest Xcode (6.4.0 ). You can download it from the MacOSX AppStore (Xcode).
Xcode 6.4 runs on 10.10 and later (at least Yosemite).
-----------------------------------------------------------------------------
3.1.1 Supported Xcode and OSX constellations
-----------------------------------------------------------------------------
As far as we know the compilation for mac osx should work with the following
constellations of Xcode and osx versions (to be updated once we know more):
1. XCode 6.0.1 against OSX SDK 10.9 (M)
2. XCode 6.1.0 against OSX SDK 10.10 (Y)
3. XCode 6.2.0 against OSX SDK 10.10 (Y)
4. XCode 6.3.0 against OSX SDK 10.10 (Y)
5. Xcode 6.4.0 against OSX SDK 10.10 (Y)
6. Xcode 7.x against OSX SDK 10.11 (EC)
7. Xcode 8.0 against OSX SDK 10.12 (EC)
8. Xcode 8.0 against OSX SDK 10.12 (S)
-----------------------------------------------------------------------------
3.2 Install Kodi build depends
-----------------------------------------------------------------------------
The following commands will build using the latest OSX SDK found on your system.
3.2.1 Compiling as 32 Bit binary
$ cd $HOME/Kodi
$ cd tools/depends
$ ./bootstrap
$ ./configure --host=i386-apple-darwin
$ make
3.2.2 Compiling as 64 Bit binary
$ cd $HOME/Kodi
$ cd tools/depends
$ ./bootstrap
$ ./configure --host=x86_64-apple-darwin
$ make
3.2.3 Compile binary addons
$ make -C target/binary-addons
NOTE: if you only want to build specific addons you can specify like this:
$ make -C target/binary-addons ADDONS="pvr.hts pvr.dvblink"
NOTE: You can speedup compilation on multicore systems by doing
"make -j<number of cores>" instead of "make". For a dualcore this would read:
$ make -j2
ADVANCED developers only! If you want to specify an OSX SDK version (if
multiple versions are installed) - then append it to the configure line
above (example below would use OSX SDK 10.9 and build for 64bit):
$ ./configure --host=x86_64-apple-darwin --with-sdk=10.9
Ensure that you also adapt the xcode project to use this SDK version.
-----------------------------------------------------------------------------
4. How to compile
-----------------------------------------------------------------------------
Both Xcode and Terminal compilation require that build environment be setup
first. This is a simple step and involves the following:
4.a Compilation by using command-line building via xcodebuild or
by compiling via Xcode GUI
$ cd $HOME/Kodi
$ make -C tools/depends/target/xbmc
$ make clean
$ make xcode_depends
4.b Compilation by using command-line building via make (experimental)
$ cd $HOME/Kodi
$ make -C tools/depends/target/xbmc
$ make clean
The configure operation will setup the build environment for codecs and
internal libraries that are used by Kodi. This step is required for both Xcode
and command-line building. The "make clean" ensures that there are no stale
binaries from git that might cause problems.
-----------------------------------------------------------------------------
4.1 Using Xcode
-----------------------------------------------------------------------------
Start XCode and open the Kodi project (Kodi.xcodeproj) located in $HOME/Kodi.
For development, Kodi is run from the $HOME/Kodi directory and needs to have
the KODI_HOME environment variable set to know where that directory is located.
To set KODI_HOME environment variable:
Xcode 6 and later
Menu -> Product -> Edit Sheme -> "Run Kodi"/"Debug" -> Add KODI_HOME into
the List of "Environment Variables". Set the value to the path to the Kodi
root folder. For example, "/Users/bigdog/Documents/Kodi"
There are two build targets "Kodi" and "Kodi.app" (each in 32Bit and 64Bit flavour)
with debug and release settings. The "Kodi" target is used for rapid build and
debug cycles while the "Kodi.app" target is used to build a self contained
OSX application bundle.
Set the build target to "Kodi" or "Kodi.app" and be sure to select the same
architecture as selected in step 3.2 (either i386 for 32Bit or x86_64 for 64Bit),
then build.
If you have selected a specific OSX SDK Version in step 3.2 then you might need
to adapt the active target to use the same OSX SDK version. Else build will fail
The build process will take a long time when building the first time.
You can see the progress in "Build Results". There are a large number of static
and dynamic libraries that will need to be built. Once these are built,
subsequent builds will be faster.
After the build, you can ether run Kodi for Mac from Xcode or run it from
the command-line. If you run it from the command-line, make sure your set
the KODI_HOME environment variable (export KODI_HOME=$HOME/Kodi). Then, to
run the debug version:
$ ./build/Debug/Kodi
Or the release version:
$ ./build/Release/Kodi
You can also build via Xcode from the command-line using the following:
$ xcodebuild -configuration Release ONLY_ACTIVE_ARCH=YES ARCHS=x86_64 VALID_ARCHS=x86_64 \
-target "Kodi.app" -project Kodi.xcodeproj
You can specify "Release" instead of "Debug" as a configuration. Be sure to set *_ARCHS
variables to the same architecture as selected in step 3.2 (either i386 for 32Bit or x86_64
for 64Bit).
-----------------------------------------------------------------------------
4.2 Using Terminal (command-line) (this is a work in progress and might fail)
-----------------------------------------------------------------------------
There are two methods, a) make/Xcode and b) make (which might fail as it's under
construction).
You could try xcodebuild from the command-line with altered SDK - like 10.9 in the example
below(normally unneeded - for advanced developers).
a)
$ cd $HOME/Kodi
$ export KODI_HOME=`pwd`
$ make xcode_depends
$ xcodebuild -sdk macosx10.9 -project Kodi.xcodeproj -target Kodi.app ONLY_ACTIVE_ARCH=YES \
ARCHS=x86_64 VALID_ARCHS=x86_64 -configuration Release build
b) Building via make:
$ cd $HOME/Kodi
$ export KODI_HOME=`pwd`
$ make
$ ./Kodi.bin
-----------------------------------------------------------------------------
5. Packaging
-----------------------------------------------------------------------------
This section describes how to package Kodi in a disk image for
distribution.
1. Build Kodi.app from XCode so that the application bundle is correctly updated.
2. $ cd tools/darwin/packaging/osx
3. $ chmod +x ./mkdmg-osx.sh && ./mkdmg-osx.sh release
4. Use release or debug - you have to be sure that you build the corresponding
version before.
6. Find the corresponding dmg in the packaging dir.
|