Getting Started/Build/Historic/KDE4: Difference between revisions

From KDE TechBase
(Created page with '== Build Recipes == The recipes provided here should be used when following the Build pages for KDE Software. These recipes will not be repeated in the Build pages, only variat...')
 
No edit summary
(4 intermediate revisions by the same user not shown)
Line 16: Line 16:


==== Git Unstable Master ====
==== Git Unstable Master ====
This will be the most commonly used version of the Easy Recipe.
This will be the most commonly used version of the Easy Recipe.


  cd $KDESRC/master/<module>
  cd $KDE_SRC/master/<module>
  git clone kde:<project>.git
  git clone kde:<project>.git
  cd <project>
  cd <project>
  cmakekde
  kdebuild


==== Git Unstable Branch ====
==== Git Unstable Branch ====
Line 27: Line 28:
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.
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 $KDESRC/master/<module>/<project>
  cd $KDE_SRC/master/<module>/<project>
  git branch --track <branch> origin/<branch>
  git branch --track <branch> origin/<branch>
  git checkout <branch>
  git checkout <branch>
  cmakekde
  kdebuild


==== Git Stable Branch ====
==== Git Stable Branch ====


This recipe creates a new clone of the Project and sets it to use a stable branch.  This may be wasteful of disk space if you already have an Unstable clone, but it does allow you to work on Unstable and Stable at the same time without excessive management or rebuilding.  It also closely mirrors how Subversion works.
This recipe uses [[/Development/Git/Configuration#Multiple_Work_Branches|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.
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 $KDESRC/<stable-branch>/<module>
  cd $KDE_SRC/master/<module>
git clone kde:<project>.git
git-new-workdir <project> $KDE_SRC/<stable-branch>/<module>/<project> <stable-branch>
cd <project>
  cd $KDE_SRC/<stable-branch>/<module>/<project>
  git branch --track <stable-branch> origin/<stable-branch>
  kdebuild
  git checkout <stable-branch>
 
  cmakekde
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 ===
==== Subversion Unstable ====


  cd $KDESRC/master
  cd $KDE_SRC/master
  svn checkout svn://anonsvn.kde.org/home/kde/trunk/KDE/<module>
  svn checkout svn://anonsvn.kde.org/home/kde/trunk/KDE/<module>
  cd <module>
  cd <module>
  cmakekde
  kdebuild


If you have a developer account the Subversion command will be:
If you have a developer account the Subversion command will be:
  svn checkout svn+ssh://<username>@svn.kde.org/home/kde/trunk/KDE/<module>
  svn checkout svn+ssh://<username>@svn.kde.org/home/kde/trunk/KDE/<module>


=== Subversion Stable ===
==== Subversion Stable ====


  cd $KDESRC/<stable-branch>
  cd $KDE_SRC/<stable-branch>
  svn checkout svn://anonsvn.kde.org/home/kde/branches/KDE/<branch>/<module>
  svn checkout svn://anonsvn.kde.org/home/kde/branches/KDE/<branch>/<module>
  cd <module>
  cd <module>
  cmakekde
  kdebuild


If you have a developer account the Subversion command will be:
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>
  svn checkout svn+ssh://<username>@svn.kde.org/home/kde/branches/KDE/<branch>/<module>


=== Full Stable Git Recipe ===
=== Full Recipe ===
 
==== Git Unstable Master ====
 
This will be the most commonly used version of the Full Recipe.


  cd <your source root directory>
  cd <your source root directory>
Line 77: Line 84:
       \ -DKDE4_BUILD_TESTS=TRUE
       \ -DKDE4_BUILD_TESTS=TRUE
  nice make -j2 # for faster compiles use -j(X+1)' where X is your number of processor cores
  nice make -j2 # for faster compiles use -j(X+1)' where X is your number of processor cores
  make insta
  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 [[/Development/Git/Configuration#Multiple_Work_Branches|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

Revision as of 17:13, 25 May 2011

Build Recipes

The recipes provided here should be used when following the Build pages for KDE Software. These recipes will not be repeated in the Build pages, only variations from the standard recipe will be documented, usually just the git or svn repository address, but sometimes also additional configuration options.

The Easy Recipe relies on you setting up your environment according to the KDE recommendations. This will give you many shortcuts to save on typing. See the Build Environment section on how to do this.

The Full Recipe is provided for those who wish to control their own build or want to see the full steps required, and don't mind lots of typing.

In Git many KDE Modules have been split up into separate Projects for each Application or Library. Putting all the Git Projects into the same source directory would get very messy. To help keep everything easy to update the recipe recommends you organize the Projects into separate sub-directories for each Module.

For Subversion the repository address changes if you have a developers account or if you want a stable release.

For Git the repository address does not change if you have a developers account or if you want a stable release, you always clone the project from anongit. However a stable build requires some extra steps.

Easy Recipe

Git Unstable Master

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

cd $KDE_SRC/master/<module>
git clone kde:<project>.git
cd <project>
kdebuild

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 $KDE_SRC/master/<module>/<project>
git branch --track <branch> origin/<branch>
git checkout <branch>
kdebuild

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 $KDE_SRC/<stable-branch>/<module>/<project>
kdebuild

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 $KDE_SRC/master
svn checkout svn://anonsvn.kde.org/home/kde/trunk/KDE/<module>
cd <module>
kdebuild

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 $KDE_SRC/<stable-branch>
svn checkout svn://anonsvn.kde.org/home/kde/branches/KDE/<branch>/<module>
cd <module>
kdebuild

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>

Full Recipe

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