Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 250 lines (194 sloc) 9.969 kb
45285e8 step 3/4: Move linuxport to trunk. How'd I get roped into this?
AlTheKiller authored
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 MacPorts 1.7
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.4 Intel development platforms are supported. The current build system
18 is Xcode 2.5 or Xcode 3.1.2 There are two ways to build XBMC for Mac.
19 1) command-line or
20 2) Xcode.
21
22 Generally, Xcode is the easiest as it presents the build system in a GUI environment.
23 The command-line build is still under development.
24
25 XBMC for Mac is composed of a main binary with numerous dynamic libraries and
26 codecs that support a multitude of music and video formats.
27
28 NOTE TO NEW OS X USERS: All lines that are prefixed with the '$' character are
29 commands that need to be typed into a Terminal window. Note that the '$'
30 character itself should NOT be typed as part of the command.
31
32
33 -----------------------------------------------------------------------------
34 2. Getting the source code
35 -----------------------------------------------------------------------------
36
37 $ cd $HOME
98d0f9c changed: point to git in README.xxx files
spiff authored
38 $ git clone git://github.com/xbmc/xbmc.git xbmc
45285e8 step 3/4: Move linuxport to trunk. How'd I get roped into this?
AlTheKiller authored
39
40 -----------------------------------------------------------------------------
41 3.0 Install XCODE
42 -----------------------------------------------------------------------------
43 Install latest Xcode. You can download it from Apple's site after registration at
44 (http://developer.apple.com/tools/download). You also need to install the 10.4
45 sdk. If using Xcode 3.x, you MUST use Xcode 3.1.2 so update your existing version
46 if you are running a previous Xcode 3.x version. Xcode 3.x only runs on 10.5.
47
48
49 -----------------------------------------------------------------------------
50 3.1 Install MacPorts 1.7
51 -----------------------------------------------------------------------------
52
4452423 [osx] add URL to xbmc-port-depends
davilla authored
53 These build instructions depend on MacPorts 1.7.1 from xbmc-port-depends at
54 http://code.google.com/p/xbmc-port-depends/ .
6f73960 [osx] must build universal against 10.4uSDK
davilla authored
55 If you have another version of MacPorts installed, it's best to remove it and
56 install this 1.7.1 version. To remove a previous install of MacPorts, enter the
57 following from a terminal windows:
45285e8 step 3/4: Move linuxport to trunk. How'd I get roped into this?
AlTheKiller authored
58
59 $ sudo rm -rf \
60 /opt/local \
61 /etc/manpaths.d/macports \
62 /etc/paths.d/macports \
63 /Applications/DarwinPorts \
64 /Applications/MacPorts \
65 /Library/LaunchDaemons/org.macports.* \
66 /Library/Receipts/DarwinPorts*.pkg \
67 /Library/Receipts/MacPorts*.pkg \
68 /Library/StartupItems/DarwinPortsStartup \
69 /Library/Tcl/darwinports1.0 \
70 /Library/Tcl/macports1.0
71
55fe941 [osx] update readme.osx, remove samba3 and mysql5 portfile mods, these a...
davilla authored
72 Install MacPorts 1.7.1 (see http://code.google.com/p/xbmc-port-depends/). No NOT
31cc236 [osx] update OSX build info to build macports from xbmc-port-depends
davilla authored
73 install the versions from http://www.macports.org, they were hopelessly broke
6f73960 [osx] must build universal against 10.4uSDK
davilla authored
74 for XBMC usage when their devs released MacPorts 1.8. Change MacPorts's behavior
75 to always build universal against 10.4sdk using the following instructions.
45285e8 step 3/4: Move linuxport to trunk. How'd I get roped into this?
AlTheKiller authored
76
77 1)
78 $ sudo nano /opt/local/etc/macports/macports.conf
79 a) change "universal_target 10.5" to "universal_target 10.4"
80
81 b) change "universal_sysroot /Developer/SDKs/MacOSX10.5.sdk" to
82 "universal_sysroot /Developer/SDKs/MacOSX10.4u.sdk"
83
84 c) change "universal_archs ppc i386"
85 to reflect the arch you are building by removing the unused arch.
86
87 2) These are needed to build openssl (used by samba3 and mysql5) against 10.4sdk
88 $ sudo ln -s /Developer/SDKs/MacOSX10.4u.sdk/usr/lib/dylib1.o /Developer/SDKs/MacOSX10.4u.sdk/usr/lib/dylib1.10.5.o
89 $ sudo ln -s /Developer/SDKs/MacOSX10.4u.sdk/usr/lib/crt1.o /Developer/SDKs/MacOSX10.4u.sdk/usr/lib/crt1.10.5.o
90
91
92 Then install the following port packages (order is very important):
93
94 $ sudo port install pcre +universal
95 $ sudo port install expat +universal
96 $ sudo port install libiconv +universal
97 $ sudo port install gettext +universal
98 $ sudo port install libtool yasm cmake gmake pkgconfig
99
100 $ sudo port install lzo +universal
101 $ sudo port install lzo2 +universal
102 $ sudo port install bzip2 +universal
103 $ sudo port install fontconfig +universal
104 $ sudo port install boost +universal
105
106 $ sudo port install jpeg +universal
107 $ sudo port install tiff +universal
108 $ sudo port install libpng +universal
109 $ sudo port install libogg +universal
110 $ sudo port install libvorbis +universal
111 $ sudo port install libmad macosx_deployment_target=10.4
112 $ sudo port install fribidi +universal
113 $ sudo port install libmms +universal
2c2d90a sync xcode project
davilla authored
114 $ sudo port install wavpack +universal
115 $ sudo port install libmpeg2 +no_sdl +no_x11 +universal
45285e8 step 3/4: Move linuxport to trunk. How'd I get roped into this?
AlTheKiller authored
116
117 $ sudo port install glew +universal
118 $ sudo port install libcdio +universal
119 $ sudo port install openssl +universal
08385e5 add libssh2 as a depends
davilla authored
120 $ sudo port install libssh2 +universal
45285e8 step 3/4: Move linuxport to trunk. How'd I get roped into this?
AlTheKiller authored
121 $ sudo port install samba3 macosx_deployment_target=10.4
122 $ sudo port install mysql5 +universal
123 $ sudo port install sqlite3 +universal
124 $ sudo port install libsamplerate +universal
125
126 $ sudo port install libsdl +no_x11 +universal
127 $ sudo port install smpeg +universal
128 $ sudo port install libsdl_mixer +universal
129 $ sudo port install libsdl_image +universal
130
131 If you understand the following two lines, you can run it to automate
132 the installation of the ports in the above order:
133
134 sudo bash
f266b7d [OSX] update, remove useless use of cat, thanks JordiGH
davilla authored
135 perl -ne 'print `port install $1` if /^ \$ sudo port install (.*)$/;' README.osx
45285e8 step 3/4: Move linuxport to trunk. How'd I get roped into this?
AlTheKiller authored
136
137 Finally, fix the mysql package default install location with this symlink:
138
139 $ sudo ln -s /opt/local/include/mysql5/mysql/ /opt/local/include/mysql
140
141 -----------------------------------------------------------------------------
142 4. How to compile
143 -----------------------------------------------------------------------------
144 Both Xcode and Terminal compilation require that build environment be setup
145 first. This is a simple step and involves the following:
146
147 $ cd $HOME/XBMC
148 $ ./bootstrap
58c8ed6 [osx] update to include out-of-make depends, this is getting very icky
davilla authored
149 $ make -C lib/librtmp
150 $ sudo make -C lib/librtmp install
45285e8 step 3/4: Move linuxport to trunk. How'd I get roped into this?
AlTheKiller authored
151 $ ./configure
152 $ make clean
153 $ make xcode_depends
58c8ed6 [osx] update to include out-of-make depends, this is getting very icky
davilla authored
154 $ make -C lib/addons/script.module.pil
155 $ make -C lib/addons/script.module.pysqlite
156 $ sh lib/librtmp/darwin_package_librtmp.sh
45285e8 step 3/4: Move linuxport to trunk. How'd I get roped into this?
AlTheKiller authored
157
158 The configure operation will setup the build environment for codecs and
159 internal libraries that are used by XBMC. This step is required for both Xcode
58c8ed6 [osx] update to include out-of-make depends, this is getting very icky
davilla authored
160 and command-line building. The "make clean" ensures that there are no stale
98d0f9c changed: point to git in README.xxx files
spiff authored
161 binaries from git that might cause problems. The last step will pre-build
45285e8 step 3/4: Move linuxport to trunk. How'd I get roped into this?
AlTheKiller authored
162 the majority of the codecs and libs:
163
164
165 The configure operation will default to building "debug". To build "release"
166 codecs and libraries for Xcode, do the configure step with "--disable-debug"
167 but remember that Xcode will need to be also built "Release":
168
169 $ ./configure --disable-debug
170
171 -----------------------------------------------------------------------------
172 4.1 Using Xcode
173 -----------------------------------------------------------------------------
174 Start XCode and open the XBMC project (XBMC.xcodeproj) located in $HOME/XBMC.
175 For development, XBMC is run from the $HOME/XBMC directory and needs to have
176 the XBMC_HOME environment variable set to know where that directory is located.
177 To set XBMC_HOME environment variable:
178
179 Menu -> Project -> Edit Active Executable "XBMC", click "Arguments" tab and
180 add "XBMC_HOME" as an enviroment variable. Set the value to the path to the
181 XBMC root folder. For example, "/Users/bigdog/Documents/XBMC"
182
183 There are two build targets "XBMC" and "XBMC.app" with debug and release
184 settings. The "XBMC" target is used for rapid build and debug cycles while
185 the "XBMC.app" target is used to build a self contained OSX application.
186
187 Set the build target to "XBMC" or "XBMC.app", then build. The build process
188 will take a long time when builting the first time. You can see the progress
189 in "Build Results". There are a large number of static and dynamic libaries
190 that will need to be built. Once these are built, subsequent builds will be
191 faster.
192
193 After the build, you can ether run XBMC for Mac from Xcode or run it from
194 the command-line. If you run it from the command-line, make sure your set
195 the XBMC_HOME environment variable (export XBMC_HOME=$HOME/XBMC). Then, to
196 run the debug version:
197
198 $ ./build/Debug/XBMC
199
200 Or the release version:
201
202 $ ./build/Release/XBMC
203
204 You can also build via Xcode from the command-line using the following:
205
206 $ xcodebuild -configuration Release -target "XBMC.app" -project XBMC.xcodeproj
207
208 You can specify "Release" instead of "Debug" as a configuration.
209
210 -----------------------------------------------------------------------------
211 4.2 Using Terminal (command-line) (this is a work in progress and might fail)
212 -----------------------------------------------------------------------------
213 There are two methods, a) make/Xcode and b) make (which might fail as it's under
214 construction).
215
216 If you want to build a cross-compiled version that can run under 10.5/10.4/AppleTV,
217 then you'll need to follow the additional steps listed in $HOME/XBMC/tools/XBMCTex/README.osx
218 before running xcodebuild from the command-line.
219
220 a)
221 $ cd $HOME/XBMC
222 $ export XBMC_HOME=`pwd`
223 $ make xcode_depends
58c8ed6 [osx] update to include out-of-make depends, this is getting very icky
davilla authored
224 $ make -C lib/addons/script.module.pil
225 $ make -C lib/addons/script.module.pysqlite
226 $ sh lib/librtmp/darwin_package_librtmp.sh
45285e8 step 3/4: Move linuxport to trunk. How'd I get roped into this?
AlTheKiller authored
227 $ xcodebuild -sdk macosx10.4 -project XBMC.xcodeproj -target XBMC.app -configuration Release build
228
229 b)
230 $ cd $HOME/XBMC
231 $ export XBMC_HOME=`pwd`
232 $ make xbmc
233 $ ./xbmc.bin
234
235 -----------------------------------------------------------------------------
236 5. Packaging
237 -----------------------------------------------------------------------------
238 This section describes how to package XBMC in a disk image for
239 distribution.
240
58c8ed6 [osx] update to include out-of-make depends, this is getting very icky
davilla authored
241 1. build XBMC.app from XCode so that the application bundle is correctly updated.
45285e8 step 3/4: Move linuxport to trunk. How'd I get roped into this?
AlTheKiller authored
242
58c8ed6 [osx] update to include out-of-make depends, this is getting very icky
davilla authored
243 2. make -C tools/PackageMaker/
45285e8 step 3/4: Move linuxport to trunk. How'd I get roped into this?
AlTheKiller authored
244
58c8ed6 [osx] update to include out-of-make depends, this is getting very icky
davilla authored
245 3. If completed successfully, a disk image named XBMC_for_Mac.dmg will be
122a3c1 [osx] update README.osx to reflect packagemaker changes
davilla authored
246 present in the users XBMC build directory:
45285e8 step 3/4: Move linuxport to trunk. How'd I get roped into this?
AlTheKiller authored
247
248 Remember to unmount/eject XBMC.dmg before attempting to recreate it,
249 otherwise dmgmaker.pl will fail.
Something went wrong with that request. Please try again.