XBMC will be renamed to Kodi for v14. Read here for more details
Various pages on the wiki might contain old references to "XBMC", but will most often still apply to "Kodi". Find out how you can help here.

HOW-TO:Compile XBMC for Linux

From Kodi
(Difference between revisions)
Jump to: navigation, search
(take advantage of <source> tag for syntax highlighting)
Line 42: Line 42:
 
$ sudo apt-get install subversion
 
$ sudo apt-get install subversion
 
$ cd $HOME
 
$ cd $HOME
$ svn checkout http://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk
+
$ svn checkout {{svn}}
 
</source>
 
</source>
  

Revision as of 21:33, 22 September 2009

Merge-arrow.gif
It has been suggested that the HOW-TOHOW-TO compile XBMC for Linux on Fedora Red Hat Enterprise Linux CentOS article should be merged into this article (discuss).
Merge-arrow.gif
It has been suggested that the HOW-TOHOW-TO compile XBMC for Linux on Debian/Ubuntu article should be merged into this article (discuss).
Merge-arrow.gif
It has been suggested that the HOW-TOHOW-TO compile XBMC for Linux on openSUSE Linux article should be merged into this article (discuss).
Merge-arrow.gif
It has been suggested that the HOW-TOHOW-TO compile XBMC for Linux on Moblin v2 article should be merged into this article (discuss).


Template:Current event

Goto: Installing XBMC for Linux

This is only a copy and paste from the README.linux just to get this article started. Please refer to the SVN version of README.linux to be sure you got the latest edition!


Note: This is an initial Linux port. It does not yet include all the features of XBMC. Don't expect too much. For more information read the XBMC for Linux port project article in this wiki.
Note: XBMC is open source (GPL) software and as so the source code is available for anyone to modify and/or compile (under the rules of the GPL).


1 Prerequisites

  • Correctly installed graphics device-drivers which supports 24bpp or 32bpp for 3D hardware-acceleration, (Team-XBMC recommends that you run Envy which is a application that automaticly downloads and installs the correct proprietary device-driver for your ATI or NVIDIA graphic chip).

2 Getting the source code

For the first time:

$ sudo apt-get install subversion
$ cd $HOME
$ svn checkout {{svn}}

In order to update the source code (and clean old make files):

$ cd $HOME/XBMC
$ svn up
$ make clean

3 Installing required Ubuntu packages

The current list of required packages for each supported version is located in the README.linux file in the SVN

Use a single command to get all build dependencies

For this, you need to specify the PPA in your apt sources. Please find them on the forum.

Update apt :

$ sudo apt-get update

Here is the magic command to get the build dependencies (used to compile the version on the PPA).

$ sudo apt-get build-dep xbmc

4 How to compile

4.1 Default compile and install

Requires 3D GPU that has supported OpenGL 3D hardware acceleration, set bitdepth to 24bpp or 32bpp

$ cd $HOME/XBMC
$ ./bootstrap
$ ./configure
$ make
$ sudo make install

4.2 ./configure command line switches

These switches are possible when running configure:

  • --prefix=/path
    • Install XBMC to /path rather than default (/usr/local)
  • --disable-gl
    • Much much slower GUI rendering but works on all adapters and bitdepths. For development purposes only.
  • --disable-debug
    • No debug information (smaller executable, no FreeMem text in screens)
    • open issue: FreeMem is still shown even with --disable-debug

It is also possible to combine these options, for example:

$ ./configure --disable-debug --disable-gl

4.3 Quicker compilation

By adding -j<number> to the make command, you describe how many cores will be used. So for dualcore the commands are:

$ make -j2

or

$ make -j2 sdl_2d

Exprimental: You could add distcc if you have more than one computer networked. This will run make on several computers sharing the workload between them.

5 How to run

Everything is now taken care of by the install script. Simply run the xbmc command from anywhere:

$ xbmc

6 Fullscreen

Toggle FS with \ key while XBMC is running.

7 Multi-monitor Fullscreen

If you have a multi-monitor setup and you want to use fullscreen, make sure to set the env variable SDL_VIDEO_FULLSCREEN_HEAD to the display no. which you want SDL to use for the fullscreen mode.

For e.g. "SDL_VIDEO_FULLSCREEN_HEAD=1 ./xbmc.bin -fs" to tell SDL to use display no.1

Personal tools
Namespaces

Variants
Actions
Navigation
Wiki help
Toolbox