Merge pull request #2055 from skyblaster/patch-1
[vuplus_xbmc] / docs / README.ios
1 TOC
2 1. Introduction
3 2. Getting the source code
4 3. Install required libs
5   3.1. Install Xcode
6   3.2. Install Cross libs and runtime environment
7 4. How to compile and run
8         4.1 Using XCode
9         4.2 Using Command line
10 5. Packaging
11 6. Gesture Handling on iPad/iPhone/iPod touch
12 7. Remote control on ATV2
13
14 -----------------------------------------------------------------------------
15 1. Introduction
16 -----------------------------------------------------------------------------
17
18 This is a platform port of XBMC for the Apple iOS operating system. 
19 The current build system supports Xcode 3.2.6 or Xcode 4.3.x with iOS SDK 4.2/4.3/5.1
20 There are two ways to build XBMC for Mac.
21
22 1) command-line or
23 2) Xcode.
24
25 Generally, Xcode is the easiest as it presents the build system in a GUI environment.
26 The command-line build is still under development.
27
28 XBMC for iOS is composed of a main binary with numerous dynamic libraries and
29 codecs that support a multitude of music and video formats.
30
31 NOTE TO NEW OS X USERS: All lines that are prefixed with the '$' character are
32 commands that need to be typed into a Terminal window. Note that the '$'
33 character itself should NOT be typed as part of the command.
34
35
36 -----------------------------------------------------------------------------
37 2. Getting the source code
38 -----------------------------------------------------------------------------
39
40  $ cd $HOME
41  $ git clone git://github.com/xbmc/xbmc.git xbmc
42  $ cd xbmc
43  $ git submodule update --init addons/skin.touched
44
45 -----------------------------------------------------------------------------
46 3.0 Install Xcode
47 -----------------------------------------------------------------------------
48 See point 3.0a below for an updated list of supported Xcode/osx constellations!!!
49
50 Install latest Xcode (4.3.2 or 3.2.6 as of the writing). You can download it from 
51
52 1. Apple's site after registration at http://developer.apple.com/tools/download (Xcode 3.2.6)
53 2. In the MacOSX AppStore (Xcode 4.3.x). 
54
55 If you are using XCode 4.3.x you also need to install the "Command Line Tools". To do so
56 after installing Xcode you have to go to "Xcode->Preferences->Downloads" and install the
57 package "Command Line Tools".
58
59 Xcode 3.2.6 only runs on 10.6.x (Snow Leopard). 
60 Xcode 4.3.x only runs on 10.7.x (Lion).
61
62 The preferred iOS SDK Version is 4.3 (when using Xcode 3.2.6) or 5.1 (when using
63 Xcode 4.3.x).
64
65 -----------------------------------------------------------------------------
66 3.0a Supported Xcode and OSX constellations
67 -----------------------------------------------------------------------------
68 As far as we know the compilation for ios and atv2 should work with the following
69 constellations of Xcode and osx versions (to be updated once we know more):
70
71 1. XCode 3.2.6 against iOS SDK 4.3 on 10.6.x (Snow Leopard)
72 2. XCode 4.3.x against iOS SDK 4.3 and 5.1 on 10.7.x (Lion)
73 3. XCode 4.6 against iOS SDK 4.3, 5.1 and 6.1 on 10.7.x (Lion) and 10.8.x (ML)
74 3.a Building against iOS SDK 6.0 will only allow to run on targets with iOS 5.1 and below.
75     There is no support for devices running iOS 6.0 for now!
76
77 -----------------------------------------------------------------------------
78 3.1 Install Cross libs and runtime environment
79 -----------------------------------------------------------------------------
80
81  The following commands will build using the latest iOS SDK found on your 
82  system.
83
84  $ cd $HOME/XBMC
85  $ cd tools/depends
86  $ ./bootstrap
87  $ ./configure --host=arm-apple-darwin
88  $ make
89
90  NOTE: You can speedup compilation on multicore systems by doing 
91  "make -j<number of cores>" instead of "make". For a dualcore this would read:
92  "make -j2"
93
94  ADVANCED developers only! If you want to specify an iOS SDK version (if
95  multiple versions are installed) - then append it to the configure line
96  above (example below would use iOS SDK 6.0):
97
98  $ ./configure --host=arm-apple-darwin --with-sdk=6.0
99
100  Ensure that you also adapt the xcode project to use this SDK version or
101  if building via cmdline the SDKROOT parameter of the xcodebuild command.
102
103 -----------------------------------------------------------------------------
104 4. How to compile
105 -----------------------------------------------------------------------------
106 Both Xcode and Terminal compilation require that build environment be setup
107 from the step 3.1.
108
109  $ cd $HOME/XBMC
110  $ make -C tools/depends/target/xbmc
111  $ make clean
112  $ make xcode_depends
113
114 -----------------------------------------------------------------------------
115 4.1 Using Xcode
116 -----------------------------------------------------------------------------
117 Start XCode and open the XBMC project (XBMC-IOS.xcodeproj or XBMC-ATV2.xcodeproj)
118 located in $HOME/XBMC.
119
120 There are two relevant build targets : Release and Debug. Compile always for device
121 end not simulator.
122
123 If you have selected a specific iOS SDK Version in step 3.1 then you might need 
124 to adapt the active target to use the same iOS SDK version. Else build will fail 
125 (you will see alot of errors with at least non-found boost/shared_ptr.hpp).
126
127 -----------------------------------------------------------------------------
128 4.2 Using Terminal (command-line)
129 -----------------------------------------------------------------------------
130
131  $ cd $HOME/XBMC
132  $ xcodebuild -project XBMC-IOS.xcodeproj -target XBMC -configuration Release build \
133    ONLY_ACTIVE_ARCH=YES ARCHS=armv7 VALID_ARCHS=armv7 IPHONEOS_DEPLOYMENT_TARGET=4.1 \
134    SDKROOT=iphoneos4.2
135
136 or
137
138  $ xcodebuild -project XBMC-ATV2.xcodeproj -target XBMC -configuration Release build \
139   ONLY_ACTIVE_ARCH=YES ARCHS=armv7 VALID_ARCHS=armv7 IPHONEOS_DEPLOYMENT_TARGET=4.1 \
140   SDKROOT=iphoneos4.2
141  
142  Make sure to set SDKROOT to the iOS SDK you want to use. This should be the same
143  you used on point 3.1!
144
145 -----------------------------------------------------------------------------
146 5. Packaging
147 -----------------------------------------------------------------------------
148
149 This section describes how to package XBMC in a deb image for
150 distribution.
151
152   1. build XBMC for iOS or ATV2 from XCode so that the application bundle is 
153      correctly updated.
154
155   2. 
156    $ cd tools/darwin/packaging/xbmc-atv2
157    or
158    $ cd tools/darwin/packaging/xbmc-ios
159
160   3. $ ./mkdeb-xbmc-atv2.sh release
161      or
162      $ ./mkdeb-xbmc-ios.sh release
163      
164   4. Use release or debug - you have to be sure that you build the corresponding 
165      version before.
166   
167   5. The resulting deb file can be copied to the iOS/ATV2 via ssh/scp and then be 
168      installed manually. For this you need to ssh into the iOS/ATV2 and do:
169      $ dpkg -i <name of the deb file>
170
171 -----------------------------------------------------------------------------
172 6. Gesture Handling on iPad/iPhone/iPod touch
173 -----------------------------------------------------------------------------
174
175  - double finger swipe left                   -> back
176  - double finger tap/single finger long tap   -> right mouse
177  - single finger tap                          -> left mouse
178  - panning, and flicking                      -> for navigating in lists
179  - dragging                                   -> for scrollbars and sliders
180  - zoom gesture                               -> in the pictureviewer
181
182 -----------------------------------------------------------------------------
183 7. Remote control on ATV2
184 -----------------------------------------------------------------------------
185
186  - Select             -> like enter/left click - OK button on other remotes (during playback its pause by defaul)
187  - Select long press  -> During playback show the overlay
188  - Cursor keys        -> for moving around and selecting controls
189  - Menu               -> back
190  - Menu long press    -> context menu
191