Difference between revisions of "Building From Source"

From LinuxMCE
Jump to: navigation, search
m (Added note about 0810 build instructions)
m
Line 1: Line 1:
 +
{| align="right"
 +
  | __TOC__
 +
  |}
 +
[[Category: Tutorials]]
 +
[[Category:Development]]
 +
[[Category:Programmer's Guide]]
 
= Building for 0810 =
 
= Building for 0810 =
 
Please see [[Building_LinuxMCE]]
 
Please see [[Building_LinuxMCE]]
Line 67: Line 73:
  
 
The sql dumps of the databases needed for the build : http://www.linuxmce.org/build/linuxmce-databases-1.0.tar.gz
 
The sql dumps of the databases needed for the build : http://www.linuxmce.org/build/linuxmce-databases-1.0.tar.gz
 
[[Category: Tutorials]]
 
[[Category:Development]]
 

Revision as of 15:08, 6 December 2008

Building for 0810

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

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

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