Building From Source

From LinuxMCE
Revision as of 06:56, 10 June 2009 by Colinjones (Talk | contribs) (Added the correct link for building 0810)

Jump to: navigation, search

Building for 0810

Please see Building_LinuxMCE_0810

Building for 0804

Please see Building_LinuxMCE

Building on 0710

See also: Setting Up A Development Environment

Preparations

Set up a directory for the development tree. For example type the following in a shell as "linuxmce" user:

cd /usr/src
sudo mkdir lmce
sudo chown linuxmce lmce
cd lmce

Install Subversion

sudo apt-get install subversion

Fetch the source:

svn co http://svn.linuxmce.org/svn/branches/LinuxMCE-0710/

Copy the libraries needed for to bootstrap:

cp /usr/pluto/lib/* trunk/src/lib

Run configure:

cd trunk
./configure

For the svn.linuxmce.org source there is no configure script yet. Run these to prepare bootstrapping:

find . -iname Makefile -exec sed -e 's/<-mkr_t_compile_defines->/-DKDE_LMCE -DDEBUG -DTHREAD_LOG -DLOG_ALL_QUERIES -I\/opt\/libxine1-pluto\/include -I\/opt\/libsdl1.2-1.2.7+1.2.8cvs20041007\/include -I\/opt\/libsdl1.2-1.2.7+1.2.8cvs20041007\/include\/SD/' -i '{}' \;
find . -iname Makefile -exec sed -e 's/<-mkr_t_compile_libs->/-L\/opt\/libxine1-pluto\/lib -L\/opt\/libsdl1.2-1.2.7+1.2.8cvs20041007\/lib/' -i '{}' \;

Building

Run make:

make

Building UpdateMedia

Since 7.10 does not use configure, it can be tough getting the entire tree to build. If all you need to build is UpdateMedia (for example), save yourself some trouble and just build that component. For the specific case of UpdateMedia, here are the steps to build based on a 7.10 DVD install and after following the above instructions:

Install mysqlclient-dev:

sudo apt-get install libmysqlclient15-dev

Install attr-dev:

sudo apt-get install attr-dev

Install taglib. Download version 1.5 from http://developer.kde.org/~wheeler/taglib.html, and extract to /usr/src. Then install it with the following commands:

cd /usr/src
sudo chown linuxmce taglib-1.5
cd taglib-1.5
./configure
make
sudo make install
sudo ln -s /usr/local/include/taglib /usr/include/taglib

Install id3lib. Download version 3.8.3 from http://id3lib.sourceforge.net/, and extract to /usr/src. Then install it with the following commands:

cd /usr/src
sudo chown linuxmce id3lib-3.8.3
cd id3lib-3.8.3
./configure
make
sudo make install

Build UpdateMedia:

cd /usr/src/lmce/LinuxMCE-0710/src/UpdateMedia
make

If all goes well, your new binary for UpdateMedia should be in the current folder.

Building on 0604

Source code for LinuxMCE 0704 is on the Mirrors. This page hasn't been updated for 0704 yet

Before You Begin

The build script is tested and designed to run on Ubuntu 6.10 x86 but it can be changed to work on various platforms or at least to give others a starting point on how to do it. It'll be harder to port it to non deb based distributions since the software depends on many debian specific stuff but this i hope to be change over time.

Also since this script was written with a single goal in mind -- to get everything done -- I might have left, by mistake, some lines of code that may not run on your computers (hardcoded paths and stuff like this). But I rely on you to at least try to fix them before asking for help but if the problem is not so obvious I would gladly give you advice.

The Build Scripts

The build scripts are in sourceforge svn so to get them you will need subversion installed.

sudo apt-get install subversion
svn co https://linuxmce.svn.sourceforge.net/svnroot/linuxmce/trunk/src/Ubuntu_Helpers

Before running the build script, i insist that you take a look over it so that you know what is doing and not run it blindly.

The main script that you need to run would be BuildUbuntu.sh. This script should checkout the svn for you, compile the source, build the packages, build an iso and everything else so you can end up with a usable linuxmce build. In this script you can find some functions that are called one by one to perform several operations, here's a short description:

  • Install_Build_Needed_Packages: This will install all the deb packages that you