Building From Source

From LinuxMCE
Revision as of 05:11, 19 June 2008 by Jeangot (Talk | contribs)

Jump to: navigation, search

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.charonmedia.org/svn/trunk

Copy the libraries needed for to bootstrap:

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

Run configure:

cd trunk
./configure

For the svn.linuxmce.com source there is no configure script yet. Run these to prepare bootstrapping (ONLY FOR THE SVN.LINUXMCE.COM source, NOT the charonmedia):

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 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 will need to build the sourcecode. Probably you will only need to run it once and comment it after the first run on BuildPackages.sh.
  • Create Diskless Archive: Runs a debootstrap to create a base filesystem for Diskless Media Directors. It's needed later when it'll be packed in a deb packages. You also don't need to run this every time but is safer to leave it uncommented so that the diskless archive will have the latest ubuntu updates.
  • Import_Skins: Since linuxmce uses a lot of pngs for the all sort of skins, you won't find them in the svn. This function will download a tar.bz2 archive with all the skins and unpack it so that the package builder will now where to take it from.
  • Checkout_Svn: Will do a svn checkout on sourceforge to get all the needed sources
  • Build_Replacements: LinuxMCE needs some 3rd party some packages that are not part of ubuntu distribution. This function will build / get them for you.
  • Build_MakeRelease_Binary: This function compiles the building tools that will do the compilation / package creation of all the other packages by using information stored in the pluto_main_build database.
  • Import_Build_Database: Imports a fresh copy of the pluto databases needed at build time.
  • Create_Fake_Windows_Binaries: Orbiter and other aplications don't only run on Linux. Usually the pluto guys compile their applications on windows and put the binaries on the linux build machine so that package creating application will know where to get them. Since we can't compile windows binaries on linux i made this function that creates some fake binary files with a touch so that the package builder won't fail to run.
  • Build_Pluto_Stuff: Uses MakeRelase to compile the sources and build packages out of them
  • Create_Local_Repository: Optional you can create a local repository so that you can easily test your debs.

There is also the get-packages.sh script that is called by BuildUbuntu.sh and has the goal to create and iso with all the needed packages for a linuxmce installation.

Source Code Location

Our source code is located on sourceforge and you can get it by svn from : http://svn.charonmedia.org/svn/

The png used for the skins are located here : http://www.linuxmce.com/linuxmce-skins-1.0.tar.bz2

The sql dumps of the databases needed for the build : http://www.linuxmce.com/linuxmce-databases-1.0.tar.gz