blob: 89ce2ba57ebd74e26c22e08c615618ee03b3b2db (
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
|
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 Cross libs and runtime environment
4. How to compile and run
4.1 Using XCode
4.2 Using Command line
5. Packaging
6. Gesture Handling on iPad/iPhone/iPod touch
7. Usage/Development on un-jailbroken devices (only interesting for official
apple developers!)
-----------------------------------------------------------------------------
1. Introduction
-----------------------------------------------------------------------------
This is a platform port of Kodi for the Apple iOS operating system.
The current build system supports Xcode 6.x and 7.x with iOS SDK 8.x and 9.x
There are two ways to build Kodi for Mac.
1) command-line or
2) Xcode.
The minimum version of iOS you need to run(!) Kodi is 5.1.1 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 iOS is composed of a main binary with numerous dynamic libraries and
codecs that support a multitude of music and video formats.
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.
-----------------------------------------------------------------------------
2. Getting the source code
-----------------------------------------------------------------------------
$ cd $HOME
$ git clone git://github.com/xbmc/xbmc.git Kodi
$ cd Kodi
-----------------------------------------------------------------------------
3.1 Install Xcode
-----------------------------------------------------------------------------
See point 3.1.1 below for an updated list of supported Xcode/osx constellations!!!
Install latest Xcode (6.1.0 as of the writing). You can download it from
1. The MacOSX AppStore (Xcode).
Xcode 6.1.0 only runs on 10.9.5 and later (at least Mavericks).
Xcode 6.4.0 only runs on 10.10 and later (at least Yosemite).
Xcode 7.x only runs on 10.10 and later (at least Yosemite).
The preferred iOS SDK Version is 8.1.
-----------------------------------------------------------------------------
3.1.1 Supported Xcode and OSX constellations
-----------------------------------------------------------------------------
As far as we know the compilation for iOS should work with the following
constellations of Xcode and OSX versions (to be updated once we know more):
1. Xcode 6.0.1 against iOS SDK 8.0 on 10.9.x (Mavericks)
2. Xcode 6.1.0 against iOS SDK 8.1 on 10.10.x (Yosemite)
3. Xcode 6.3.0 against iOS SDK 8.3 on 10.10.x (Yosemite)
4. Xcode 6.4.0 against iOS SDK 8.4 on 10.10.x (Yosemite)
5. Xcode 7.x against iOS SDK 9.x on 10.10.x (Yosemite)
-----------------------------------------------------------------------------
3.2 Install Cross libs and runtime environment
-----------------------------------------------------------------------------
The following commands will build using the latest iOS SDK found on your
system.
$ cd $HOME/Kodi
$ cd tools/depends
$ ./bootstrap
$ ./configure --host=arm-apple-darwin
$ make
$ 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 iOS SDK version (if
multiple versions are installed) - then append it to the configure line
above (example below would use iOS SDK 8.0):
$ ./configure --host=arm-apple-darwin --with-sdk=8.0
Ensure that you also adapt the xcode project to use this SDK version or
if building via cmdline the SDKROOT parameter of the xcodebuild command.
-----------------------------------------------------------------------------
4. How to compile
-----------------------------------------------------------------------------
Both Xcode and Terminal compilation require that build environment be setup
from the step 3.2.
$ cd $HOME/Kodi
$ make -C tools/depends/target/xbmc
$ make clean
$ make xcode_depends
-----------------------------------------------------------------------------
4.1 Using Xcode
-----------------------------------------------------------------------------
Start XCode and open the Kodi project (Kodi.xcodeproj)
located in $HOME/Kodi.
There are two relevant build configurations : Release and Debug. Compile always for device
end not simulator and select the target Kodi-iOS.
If you have selected a specific iOS SDK Version in step 3.2 then you might need
to adapt the active target to use the same iOS SDK version. Else build will fail
-----------------------------------------------------------------------------
4.2 Using Terminal (command-line)
-----------------------------------------------------------------------------
$ cd $HOME/Kodi
$ xcodebuild -project Kodi.xcodeproj -target Kodi-iOS -configuration Release build \
ONLY_ACTIVE_ARCH=YES ARCHS=armv7 VALID_ARCHS=armv7 SDKROOT=iphoneos8.0
Make sure to set SDKROOT to the iOS SDK you want to use. This should be the same
you used on point 3.2! If latest SDK should be used (and you didn't specify anything
in step 3.2) - just remove the SDKROOT=iphoneos8.0 from the command line.
-----------------------------------------------------------------------------
5. Packaging
-----------------------------------------------------------------------------
This section describes how to package Kodi in a deb image for
distribution.
1. Build Kodi for iOS from XCode so that the application bundle is
correctly updated.
2. $ cd tools/darwin/packaging/ios
3. $ chmod +x ./mkdeb-ios.sh && ./mkdeb-ios.sh release
4. Use release or debug - you have to be sure that you build the corresponding
version before.
5. The resulting deb file can be copied to the iOS device via ssh/scp and then be
installed manually. For this you need to SSH into the iOS device and do:
$ dpkg -i <name of the deb file>
-----------------------------------------------------------------------------
6. Gesture Handling on iPad/iPhone/iPod touch
-----------------------------------------------------------------------------
- Double finger swipe left -> Back
- Double finger tap/single finger long tap -> Right mouse
- Single finger tap -> Left mouse
- Panning, and flicking -> For navigating in lists
- Dragging -> For scrollbars and sliders
- Zoom gesture -> In the pictureviewer
Gestures can be adapted in system/keymaps/touchscreen.xml
------------------------------------------------------------------------------
7. Usage/Development on un-jailbroken devices (only interesting for official apple developers!)
------------------------------------------------------------------------------
If you are a developer with an official apple code signing identity you can deploy Kodi
via xcode to work on it on non-jailbroken devices. For this to happen you just need to alter the
Xcode project by setting your codesign identity. Just select the "iPhone Developer" shortcut.
Its also important that you select the signing on all 4 spots
in the project settings. After that the last buildstep in our support script
will do a full sign of all binaries and the bundle with the given identity (all *.viz, *.pvr, *.so files
Xcode doesn't know anything about). This should allow you to deploy Kodi to all non-jailbroken devices
which you can deploy normal apps to. In that case (Kodi will be sandboxed like any other app) - all Kodi
files are then located in the sandboxed "Documents" folder and can be easily accessed via iTunes file
sharing.
Keep in mind that no hardware acceleration will be possible without jailbreaking when using iOS < Version 8.
From Xcode7 on - this approach is also available for non paying app developers (apple allows self signing from now on)
|