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
|
TOC
1. Introduction
2. Getting the source code
3. Install required libs
3.1. Install Xcode
3.2. Install XBMC build depends
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 XBMC for the Apple OSX operating system. Both 10.5
and 10.6 Intel development platforms are supported. The current build system
is Xcode 3.1.2 There are two ways to build XBMC for Mac, from command-line or
from Xcode.
Generally, Xcode is the easiest as it presents the build system in a GUI environment.
The command-line build is still under development.
XBMC for Mac 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 xbmc
-----------------------------------------------------------------------------
3.0 Install XCODE
-----------------------------------------------------------------------------
Install latest Xcode. You can download it from Apple's site after registration at
(http://developer.apple.com/tools/download). You also need to install the 10.4
sdk. If using Xcode 3.x, you MUST use Xcode 3.1.2 so update your existing version
if you are running a previous Xcode 3.x version. Xcode 3.x only runs on 10.5.
-----------------------------------------------------------------------------
3.1 Install XBMC build depends
-----------------------------------------------------------------------------
$ cd $HOME/XBMC
$ cd tools/darwin/depends
$ ./bootstrap
$ ./configure --with-darwin=osx
$ make
-----------------------------------------------------------------------------
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:
$ cd $HOME/XBMC
$ make -C tools/darwin/depends/xbmc
$ make clean
$ make xcode_depends
The configure operation will setup the build environment for codecs and
internal libraries that are used by XBMC. 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. The last step will pre-build
the majority of the codecs and libs:
-----------------------------------------------------------------------------
4.1 Using Xcode
-----------------------------------------------------------------------------
Start XCode and open the XBMC project (XBMC.xcodeproj) located in $HOME/XBMC.
For development, XBMC is run from the $HOME/XBMC directory and needs to have
the XBMC_HOME environment variable set to know where that directory is located.
To set XBMC_HOME environment variable:
Menu -> Project -> Edit Active Executable "XBMC", click "Arguments" tab and
add "XBMC_HOME" as an enviroment variable. Set the value to the path to the
XBMC root folder. For example, "/Users/bigdog/Documents/XBMC"
There are two build targets "XBMC" and "XBMC.app" with debug and release
settings. The "XBMC" target is used for rapid build and debug cycles while
the "XBMC.app" target is used to build a self contained OSX application.
Set the build target to "XBMC" or "XBMC.app", then build. The build process
will take a long time when builting the first time. You can see the progress
in "Build Results". There are a large number of static and dynamic libaries
that will need to be built. Once these are built, subsequent builds will be
faster.
After the build, you can ether run XBMC for Mac from Xcode or run it from
the command-line. If you run it from the command-line, make sure your set
the XBMC_HOME environment variable (export XBMC_HOME=$HOME/XBMC). Then, to
run the debug version:
$ ./build/Debug/XBMC
Or the release version:
$ ./build/Release/XBMC
You can also build via Xcode from the command-line using the following:
$ xcodebuild -configuration Release -target "XBMC.app" -project XBMC.xcodeproj
You can specify "Release" instead of "Debug" as a configuration.
-----------------------------------------------------------------------------
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).
If you want to build a cross-compiled version that can run under 10.5/10.4/AppleTV,
then you'll need to follow the additional steps listed in $HOME/XBMC/tools/XBMCTex/README.osx
before running xcodebuild from the command-line.
a)
$ cd $HOME/XBMC
$ export XBMC_HOME=`pwd`
$ make xcode_depends
$ xcodebuild -sdk macosx10.4 -project XBMC.xcodeproj -target XBMC.app -configuration Release build
b)
$ cd $HOME/XBMC
$ export XBMC_HOME=`pwd`
$ make xbmc
$ ./xbmc.bin
-----------------------------------------------------------------------------
5. Packaging
-----------------------------------------------------------------------------
This section describes how to package XBMC in a disk image for
distribution.
1. build XBMC.app from XCode so that the application bundle is correctly updated.
2. make -C tools/darwin/packaging/xbmc-osx
3. If completed successfully, a disk image named XBMC_for_Mac.dmg will be
present in the users XBMC build directory:
Remember to unmount/eject XBMC.dmg before attempting to recreate it,
otherwise dmgmaker.pl will fail.
|