Difference between revisions of "Building From Source"

From LinuxMCE
Jump to: navigation, search
(The Build Scripts)
 
(29 intermediate revisions by 15 users not shown)
Line 1: Line 1:
 +
{| align="right"
 +
  | __TOC__
 +
  |}
 +
[[Category:Building]]
 +
[[Category:Programmer's Guide]]
 +
 +
= Building for 0810 =
 +
Please see [[Building_LinuxMCE_0810|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 commands to set environment variables for the build (or add to your .profile file to automatically run at shell start)
 +
export SNR_LDFLAGS=" "
 +
export SNR_CPPFLAGS="-DKDE_LMCE"
 +
 +
 +
== 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==
 
== 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.
 
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 left by mistake some lines of code that may not run on your computers (hardcoded paths and stuff like this) but i relay on you to at lease try to fix them before asking for help but if the problem is not so obvious i would gladly give you advices.
+
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 ==
Line 13: Line 90:
 
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:
 
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.
+
*''Install_Build_Needed_Packages'': This will install all the deb packages that you
*''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 : https://linuxmce.svn.sourceforge.net/nroot/linuxmce/
+
 
+
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
+

Latest revision as of 17:05, 13 October 2012

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 commands to set environment variables for the build (or add to your .profile file to automatically run at shell start)

export SNR_LDFLAGS=" "
export SNR_CPPFLAGS="-DKDE_LMCE"


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