Merge branch 'single_query_playcounts'
[vuplus_xbmc] / README.osx
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 XBMC build depends
7 4. How to compile and run
8         4.1 Using XCode
9         4.2 Using Command line
10 5. Packaging
11
12 -----------------------------------------------------------------------------
13 1. Introduction
14 -----------------------------------------------------------------------------
15
16 This is a platform port of XBMC for the Apple OSX operating system. Both 10.5
17 and 10.6 Intel development platforms are supported. The current build system
18 is Xcode 3.1.2 There are two ways to build XBMC for Mac, from command-line or
19 from Xcode.
20
21 Generally, Xcode is the easiest as it presents the build system in a GUI environment.
22 The command-line build is still under development.
23
24 XBMC for Mac is composed of a main binary with numerous dynamic libraries and
25 codecs that support a multitude of music and video formats.
26
27 NOTE TO NEW OS X USERS: All lines that are prefixed with the '$' character are
28 commands that need to be typed into a Terminal window. Note that the '$'
29 character itself should NOT be typed as part of the command.
30
31
32 -----------------------------------------------------------------------------
33 2. Getting the source code
34 -----------------------------------------------------------------------------
35
36  $ cd $HOME
37  $ git clone git://github.com/xbmc/xbmc.git xbmc
38
39 -----------------------------------------------------------------------------
40 3.0 Install XCODE
41 -----------------------------------------------------------------------------
42 Install latest Xcode. You can download it from Apple's site after registration at
43 (http://developer.apple.com/tools/download). You also need to install the 10.4
44 sdk. If using Xcode 3.x, you MUST use Xcode 3.1.2 so update your existing version
45 if you are running a previous Xcode 3.x version. Xcode 3.x only runs on 10.5.
46
47 -----------------------------------------------------------------------------
48 3.1 Install XBMC build depends
49 -----------------------------------------------------------------------------
50
51  $ cd $HOME/XBMC
52  $ make -C tools/osx/osx-depends
53
54 -----------------------------------------------------------------------------
55 4. How to compile
56 -----------------------------------------------------------------------------
57 Both Xcode and Terminal compilation require that build environment be setup
58 first. This is a simple step and involves the following:
59
60  $ cd $HOME/XBMC
61  $ make -C tools/osx/osx-depends/xbmc
62  $ make clean
63  $ make xcode_depends
64
65 The configure operation will setup the build environment for codecs and
66 internal libraries that are used by XBMC. This step is required for both Xcode
67 and command-line building. The "make clean" ensures that there are no stale
68 binaries from git that might cause problems. The last step will pre-build
69 the majority of the codecs and libs:
70
71 -----------------------------------------------------------------------------
72 4.1 Using Xcode
73 -----------------------------------------------------------------------------
74 Start XCode and open the XBMC project (XBMC.xcodeproj) located in $HOME/XBMC.
75 For development, XBMC is run from the $HOME/XBMC directory and needs to have
76 the XBMC_HOME environment variable set to know where that directory is located.
77 To set XBMC_HOME environment variable:
78
79 Menu -> Project -> Edit Active Executable "XBMC", click "Arguments" tab and
80 add "XBMC_HOME" as an enviroment variable. Set the value to the path to the
81 XBMC root folder. For example, "/Users/bigdog/Documents/XBMC"
82
83 There are two build targets "XBMC" and "XBMC.app" with debug and release
84 settings. The "XBMC" target is used for rapid build and debug cycles while
85 the "XBMC.app" target is used to build a self contained OSX application.
86
87 Set the build target to "XBMC" or "XBMC.app", then build. The build process
88 will take a long time when builting the first time. You can see the progress
89 in "Build Results". There are a large number of static and dynamic libaries
90 that will need to be built. Once these are built, subsequent builds will be
91 faster.
92
93 After the build, you can ether run XBMC for Mac from Xcode or run it from
94 the command-line. If you run it from the command-line, make sure your set
95 the XBMC_HOME environment variable (export XBMC_HOME=$HOME/XBMC). Then, to
96 run the debug version:
97
98 $ ./build/Debug/XBMC
99
100 Or the release version:
101
102 $ ./build/Release/XBMC
103
104 You can also build via Xcode from the command-line using the following:
105
106 $ xcodebuild -configuration Release -target "XBMC.app" -project XBMC.xcodeproj
107
108 You can specify "Release" instead of "Debug" as a configuration.
109
110 -----------------------------------------------------------------------------
111 4.2 Using Terminal (command-line) (this is a work in progress and might fail)
112 -----------------------------------------------------------------------------
113 There are two methods, a) make/Xcode and b) make (which might fail as it's under
114 construction).
115
116 If you want to build a cross-compiled version that can run under 10.5/10.4/AppleTV, 
117 then you'll need to follow the additional steps listed in $HOME/XBMC/tools/XBMCTex/README.osx
118 before running xcodebuild from the command-line.
119
120  a)
121  $ cd $HOME/XBMC
122  $ export XBMC_HOME=`pwd`
123  $ make xcode_depends
124  $ xcodebuild -sdk macosx10.4 -project XBMC.xcodeproj -target XBMC.app -configuration Release build
125
126  b)
127  $ cd $HOME/XBMC
128  $ export XBMC_HOME=`pwd`
129  $ make xbmc
130  $ ./xbmc.bin
131
132 -----------------------------------------------------------------------------
133 5. Packaging
134 -----------------------------------------------------------------------------
135 This section describes how to package XBMC in a disk image for
136 distribution.
137
138   1. build XBMC.app from XCode so that the application bundle is correctly updated.
139
140   2. make -C tools/PackageMaker/
141
142   3. If completed successfully, a disk image named XBMC_for_Mac.dmg will be
143   present in the users XBMC build directory:
144
145 Remember to unmount/eject XBMC.dmg before attempting to recreate it,
146 otherwise dmgmaker.pl will fail.