Getting Started/Build/Historic/KDE4

From KDE TechBase
Revision as of 10:15, 11 March 2016 by Alexmerry (talk | contribs) (clean up for archiving)

Build Recipes

Git Unstable Master

This will be the most commonly used version of the Full Recipe.

cd <your source root directory>
git clone git://anongit.kde.org/<module>.git
cd <your build root directory, or the module source dir>
mkdir <your module build dir>
cd <your module build dir>
cmake <path to your module source dir>
      \ -DCMAKE_INSTALL_PREFIX=$KDEDIR 
      \ -DCMAKE_BUILD_TYPE=debugfull
      \ -DKDE4_BUILD_TESTS=TRUE
nice make -j2 # for faster compiles use -j(X+1)' where X is your number of processor cores
make install

Git Unstable Branch

This recipe uses the same Git clone as your main Unstable Master build but allows you to build a specific development branch you may be interested in. It assumes you have already cloned the project repository. Use 'git branch -r' to find out the available development branches.

cd <your project source directory>
git branch --track <branch> origin/<branch>
git checkout <branch>
cd <your module build dir>
cmake <path to your module source dir>
      \ -DCMAKE_INSTALL_PREFIX=$KDEDIR 
      \ -DCMAKE_BUILD_TYPE=debugfull
      \ -DKDE4_BUILD_TESTS=TRUE
nice make -j2 # for faster compiles use -j(X+1)' where X is your number of processor cores
make install

Git Stable Branch

This recipe uses git-new-workdir script to set up a separate work directory for working on the stable branch. This will save excessive rebuilding when switching between stable and unstable and uses less space than a separate clone.

The stable branch name will be of the form 'KDE/4.6' or '4.6' depending on the Project. Use 'git branch -r' to find out the available release branches.

cd $KDE_SRC/master/<module>
git-new-workdir <project> $KDE_SRC/<stable-branch>/<module>/<project> <stable-branch>
cd <your build branch directory, or the module source dir>
mkdir <your module build dir>
cd <your module build dir>
cmake <path to your module source dir>
      \ -DCMAKE_INSTALL_PREFIX=$KDEDIR 
      \ -DCMAKE_BUILD_TYPE=debugfull
      \ -DKDE4_BUILD_TESTS=TRUE
nice make -j2 # for faster compiles use -j(X+1)' where X is your number of processor cores
make install

An example git-new-workdir command for KDE SC 4.6 would be:

git-new-workdir ~/kde/src/master/kdelibs ~/kde/src/4.6/kdelibs KDE/4.6

Subversion Unstable

cd <your source root directory>
svn checkout svn://anonsvn.kde.org/home/kde/trunk/KDE/<module>
cd <project>
git branch --track <stable-branch> origin/<stable-branch>
git checkout <stable-branch>
cd <your build root directory, or the module source dir>
mkdir <your module build dir>
cd <your module build dir>
cmake <path to your module source dir>
      \ -DCMAKE_INSTALL_PREFIX=$KDEDIR 
      \ -DCMAKE_BUILD_TYPE=debugfull
      \ -DKDE4_BUILD_TESTS=TRUE
nice make -j2 # for faster compiles use -j(X+1)' where X is your number of processor cores
make install

If you have a developer account the Subversion command will be:

svn checkout svn+ssh://<username>@svn.kde.org/home/kde/trunk/KDE/<module>

Subversion Stable

cd <your source branch directory>
svn checkout svn://anonsvn.kde.org/home/kde/branches/KDE/<branch>/<module>
cd <project>
git branch --track <stable-branch> origin/<stable-branch>
git checkout <stable-branch>
cd <your build branch directory, or the module source dir>
mkdir <your module build dir>
cd <your module build dir>
cmake <path to your module source dir>
      \ -DCMAKE_INSTALL_PREFIX=$KDEDIR 
      \ -DCMAKE_BUILD_TYPE=debugfull
      \ -DKDE4_BUILD_TESTS=TRUE
nice make -j2 # for faster compiles use -j(X+1)' where X is your number of processor cores
make install

If you have a developer account the Subversion command will be:

svn checkout svn+ssh://<username>@svn.kde.org/home/kde/branches/KDE/<branch>/<module>

Useful Tips

make /fast

If you want to recompile part of a module without rebuilding any other parts of a module that it uses then you can pass make the /fast option.

For example if you just want to rebuild the contentes of kdelibs/kdeui without rebuilding the contents of kdelibs/kdecore that it uses, then simply do:

 make kdeui/fast
 make install/fast