SourceForge has been redesigned. Learn more.
Close

[r18344]: / branches / linuxport / XBMC / README.osx  Maximize  Restore  History

Download this file

178 lines (135 with data), 6.8 kB

  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
TOC
1. Introduction
2. Getting the source code
3. Install required libs
  3.1. Install Xcode
  3.2. Install MacPorts
4. How to compile and run
	4.1 Using XCode
	4.2 Using Command line

-----------------------------------------------------------------------------
1. Introduction
-----------------------------------------------------------------------------

This is a platform port of XBMC for the Apple OSX operating system. Both 10.5
and 10.4 Intel platforms are supported. The current build system is Xcode 2.5
or Xcode 3.1.2 There are two ways to build XBMC for Mac. 1) command-line or
2) Xcode. Generally, Xcode is the easiest as it presents the build system
in a GUI environment.

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
 $ svn checkout https://xbmc.svn.sourceforge.net/svnroot/xbmc/branches/linuxport/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.


-----------------------------------------------------------------------------
3.1 Install MacPorts
-----------------------------------------------------------------------------

If necessary, you can remove a previous install of MacPorts, enter the following from a terminal
windows:

 $ sudo rm -rf \
    /opt/local \
    /etc/manpaths.d/macports \
    /etc/paths.d/macports \
    /Applications/DarwinPorts \
    /Applications/MacPorts \
    /Library/LaunchDaemons/org.macports.* \
    /Library/Receipts/DarwinPorts*.pkg \
    /Library/Receipts/MacPorts*.pkg \
    /Library/StartupItems/DarwinPortsStartup \
    /Library/Tcl/darwinports1.0 \
    /Library/Tcl/macports1.0


Install MacPorts (http://www.macports.org/). then install the following
packages from the Terminal window:

 $ sudo port install lzo
 $ sudo port install glew
 $ sudo port install pcre
 $ sudo port install yasm
 $ sudo port install bzip2
 $ sudo port install boost
 $ sudo port install libogg
 $ sudo port install libmad
 $ sudo port install libvorbis
 $ sudo port install mysql5
 $ sudo port install fribidi
 $ sudo port install libiconv
 $ sudo port install freetype
 $ sudo port install readline
 $ sudo port install portaudio
 $ sudo port install fontconfig
 $ sudo port install cmake
 $ sudo port install libsdl
 $ sudo port install libsdl_mixer
 $ sudo port install libsdl_image
 $ sudo port install samba3


Fix the mysql package default install locations with this sym link:

 $ sudo ln -s /opt/local/include/mysql5/mysql/ /opt/local/include/mysql

Important Note:
In MacPorts, building +universal on 10.5 won't let you run it on 10.4. You need
to take the extra step of setting the sysroot to be the 10.4u SDK. Edit 
"/opt/local/etc/macports/macports.conf" and change the universal_sysroot line
(or add a new one if it's not present) to:

universal_sysroot /Developer/SDKs/MacOSX10.4u.sdk

Also some MacPort packages marked 'universal_variant no' will need the CFLAGS,
CXXFLAGS, and LDFLAGS changed with the addition of:

-isysroot /Developer/SDKs/MacOSX10.4u.sdk

-----------------------------------------------------------------------------
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
 $ autoconf
 $ ./configure
 $ make clean

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 last step "make clean" ensures that there are
no stale binaries from svn that might cause problems

If you want to pre-build the majority of the codecs and libs:

 $ make externals more_libs
 
The configure operation will default to building "debug". To build "release"
codecs and libraries for Xcode, do the configure step with "--disable-debug"
but remember that Xcode willneed to be also built "Release":

 $ ./configure --disable-debug

-----------------------------------------------------------------------------
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)
-----------------------------------------------------------------------------
 $ cd $HOME/XBMC
 $ make externals more_libs
 $ make xbmc
 $ ./xbmc.bin