<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://techbase.kde.org/skins/common/feed.css?0.2"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://techbase.kde.org/api.php?action=feedcontributions&amp;user=Tstaerk&amp;feedformat=atom</id>
		<title>KDE TechBase - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://techbase.kde.org/api.php?action=feedcontributions&amp;user=Tstaerk&amp;feedformat=atom"/>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Special:Contributions/Tstaerk"/>
		<updated>2013-05-23T20:02:53Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.20.2</generator>

	<entry>
		<id>http://techbase.kde.org/Development/Tutorials/Plasma/ContainmentAction</id>
		<title>Development/Tutorials/Plasma/ContainmentAction</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Development/Tutorials/Plasma/ContainmentAction"/>
				<updated>2013-03-09T11:22:49Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: /* See also */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;You can use Plasma ContainmentAction e.g. for Context Menus on your Plasma Desktop. They will run as plugins meaning you can add and remove them after compilation. If they exist, their name will be stored in [[Development/Tutorials/Desktop_File|.desktop files]]. ContainmentActions can only be written in C++ or QML, not in other Plasma programming languages, e.g. NOT in javascript.&lt;br /&gt;
&lt;br /&gt;
= Example =&lt;br /&gt;
We will now create a simple example for Plasma ContainmentAction plugins. The code can be downloaded at https://github.com/tstaerk/kde-contextmenu/tree/tutorial. It creates a custom context menu that looks like this:&lt;br /&gt;
&lt;br /&gt;
[[File:Snapshot-kde-contextmenu-2.png]]&lt;br /&gt;
&lt;br /&gt;
The code is here:&lt;br /&gt;
&lt;br /&gt;
== kde-contextmenu.desktop ==&lt;br /&gt;
 [Desktop Entry]&lt;br /&gt;
 Name=KDE Context Menu&lt;br /&gt;
 Type=Service&lt;br /&gt;
 Icon=favorites&lt;br /&gt;
 Comment=Simple application launcher&lt;br /&gt;
 &lt;br /&gt;
 ServiceTypes=Plasma/ContainmentActions&lt;br /&gt;
 &lt;br /&gt;
 X-KDE-Library=kde-contextmenu&lt;br /&gt;
 X-KDE-PluginInfo-Author=R. Hacker&lt;br /&gt;
 X-KDE-PluginInfo-Email=hacker@home.org&lt;br /&gt;
 X-KDE-PluginInfo-Name=kde-contextmenu&lt;br /&gt;
 X-KDE-PluginInfo-Version=pre0.1&lt;br /&gt;
 X-KDE-PluginInfo-Website=http://techbase.kde.org&lt;br /&gt;
 X-KDE-PluginInfo-EnabledByDefault=true&lt;br /&gt;
&lt;br /&gt;
The '''''Name''''' will show up later in this article when you select your context menu.&lt;br /&gt;
&lt;br /&gt;
If you want to know which '''''ServiceTypes''''' exist, you can find out with the Linux command&lt;br /&gt;
 ls `kde4-config --prefix`/share/kde4/servicetypes&lt;br /&gt;
&lt;br /&gt;
== CMakeLists.txt ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
project(kde-contextmenu)&lt;br /&gt;
&lt;br /&gt;
set(KDE_MIN_VERSION &amp;quot;4.3.85&amp;quot;) # for the &amp;lt; 4.2 macro&lt;br /&gt;
find_package(KDE4 4.3.85 REQUIRED)&lt;br /&gt;
&lt;br /&gt;
include(MacroLibrary)&lt;br /&gt;
include(KDE4Defaults)&lt;br /&gt;
&lt;br /&gt;
add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS})&lt;br /&gt;
include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDE4_INCLUDES})&lt;br /&gt;
&lt;br /&gt;
set(contextmenu_SRCS&lt;br /&gt;
    launch.cpp&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
kde4_add_plugin(kde-contextmenu ${contextmenu_SRCS})&lt;br /&gt;
target_link_libraries(kde-contextmenu ${KDE4_PLASMA_LIBS} ${KDE4_KIO_LIBS})&lt;br /&gt;
&lt;br /&gt;
install(TARGETS kde-contextmenu DESTINATION ${PLUGIN_INSTALL_DIR})&lt;br /&gt;
install(FILES kde-contextmenu.desktop DESTINATION ${SERVICES_INSTALL_DIR})&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== launch.h ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#ifndef CONTEXTMENU_HEADER&lt;br /&gt;
#define CONTEXTMENU_HEADER&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;plasma/containmentactions.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
class QAction;&lt;br /&gt;
class KMenu;&lt;br /&gt;
&lt;br /&gt;
class ConTextMenu : public Plasma::ContainmentActions&lt;br /&gt;
{&lt;br /&gt;
    Q_OBJECT&lt;br /&gt;
    public:&lt;br /&gt;
        ConTextMenu(QObject* parent, const QVariantList&amp;amp; args);&lt;br /&gt;
        ~ConTextMenu();&lt;br /&gt;
&lt;br /&gt;
        void init(const KConfigGroup &amp;amp;config);&lt;br /&gt;
&lt;br /&gt;
        void contextEvent(QEvent *event);&lt;br /&gt;
        //returns true if something (other than a separator) was successfully added&lt;br /&gt;
        bool addApps(QMenu *menu);&lt;br /&gt;
&lt;br /&gt;
    public slots:&lt;br /&gt;
        void switchTo(QAction *action);&lt;br /&gt;
&lt;br /&gt;
    protected:&lt;br /&gt;
        void makeMenu();&lt;br /&gt;
&lt;br /&gt;
    private:&lt;br /&gt;
        KMenu *m_menu;&lt;br /&gt;
        QAction *m_action;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
K_EXPORT_PLASMA_CONTAINMENTACTIONS(favorites, ConTextMenu)&lt;br /&gt;
&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== launch.cpp ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#include &amp;quot;launch.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;QGraphicsSceneMouseEvent&amp;gt;&lt;br /&gt;
#include &amp;lt;QGraphicsSceneWheelEvent&amp;gt;&lt;br /&gt;
#include &amp;lt;QFileInfo&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;KDebug&amp;gt;&lt;br /&gt;
#include &amp;lt;KIcon&amp;gt;&lt;br /&gt;
#include &amp;lt;KMenu&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;Plasma/DataEngine&amp;gt;&lt;br /&gt;
#include &amp;lt;Plasma/Containment&amp;gt;&lt;br /&gt;
#include &amp;lt;Plasma/Service&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ConTextMenu::ConTextMenu(QObject *parent, const QVariantList &amp;amp;args)&lt;br /&gt;
    : Plasma::ContainmentActions(parent, args)&lt;br /&gt;
    , m_action(new QAction(this))&lt;br /&gt;
{&lt;br /&gt;
    m_menu = new KMenu();&lt;br /&gt;
    connect(m_menu, SIGNAL(triggered(QAction*)), this, SLOT(switchTo(QAction*)));&lt;br /&gt;
&lt;br /&gt;
    m_action-&amp;gt;setMenu(m_menu);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
ConTextMenu::~ConTextMenu()&lt;br /&gt;
{&lt;br /&gt;
    delete m_menu;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void ConTextMenu::init(const KConfigGroup &amp;amp;)&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void ConTextMenu::contextEvent(QEvent *event)&lt;br /&gt;
{&lt;br /&gt;
    makeMenu();&lt;br /&gt;
    m_menu-&amp;gt;adjustSize();&lt;br /&gt;
    m_menu-&amp;gt;exec(popupPosition(m_menu-&amp;gt;size(), event));&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void ConTextMenu::makeMenu()&lt;br /&gt;
{&lt;br /&gt;
    m_menu-&amp;gt;clear();&lt;br /&gt;
    addApps(m_menu);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
bool ConTextMenu::addApps(QMenu *menu)&lt;br /&gt;
{&lt;br /&gt;
    QAction* action = menu-&amp;gt;addAction(KIcon(&amp;quot;system-run&amp;quot;), &amp;quot;Open a console&amp;quot;);&lt;br /&gt;
    action-&amp;gt;setData(&amp;quot;kde4-konsole.desktop&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    action = menu-&amp;gt;addAction(KIcon(&amp;quot;firefox&amp;quot;), &amp;quot;Surf the web&amp;quot;);&lt;br /&gt;
    action-&amp;gt;setData(&amp;quot;firefox.desktop&amp;quot;);&lt;br /&gt;
    &lt;br /&gt;
    action = menu-&amp;gt;addAction(KIcon(&amp;quot;ksnapshot&amp;quot;), &amp;quot;Take a screenshot&amp;quot;);&lt;br /&gt;
    action-&amp;gt;setData(&amp;quot;kde4-ksnapshot.desktop&amp;quot;);&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void ConTextMenu::switchTo(QAction *action)&lt;br /&gt;
{&lt;br /&gt;
    QString source = action-&amp;gt;data().toString();&lt;br /&gt;
    kDebug() &amp;lt;&amp;lt; source;&lt;br /&gt;
    Plasma::Service *service = dataEngine(&amp;quot;apps&amp;quot;)-&amp;gt;serviceForSource(source);&lt;br /&gt;
    if (service)&lt;br /&gt;
    {&lt;br /&gt;
        service-&amp;gt;startOperationCall(service-&amp;gt;operationDescription(&amp;quot;launch&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#include &amp;quot;launch.moc&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Install it ==&lt;br /&gt;
Compile, link and install it using the command&lt;br /&gt;
 cmake -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` . &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&lt;br /&gt;
&lt;br /&gt;
== Test it ==&lt;br /&gt;
To test it, have your system re-discover its .desktop files by running the command&lt;br /&gt;
 kbuildsycoca4&lt;br /&gt;
Then right-click onto your desktop, select &amp;quot;Folder View Settings&amp;quot; -&amp;gt; Mouse Actions and the context menu:&lt;br /&gt;
&lt;br /&gt;
[[File:Snapshot-kde-contextmenu-1.png]]&lt;br /&gt;
&lt;br /&gt;
Then click &amp;quot;Apply&amp;quot;. You will see the config file ~/.kde4/share/config/plasma-desktop-appletsrc changes. Next time when you middle-click (or whatever you selected) onto your desktop, your own context menu will appear:&lt;br /&gt;
&lt;br /&gt;
[[File:Snapshot-kde-contextmenu-2.png]]&lt;br /&gt;
&lt;br /&gt;
= Debugging =&lt;br /&gt;
To debug your Plasma ContainmentAction call&lt;br /&gt;
 kdebugdialog --fullmode&lt;br /&gt;
search for &amp;quot;plasma&amp;quot; and direct kDebug's output to /tmp/whatever.txt&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
* [http://quickgit.kde.org/?p=kde-workspace.git&amp;amp;a=tree&amp;amp;f=plasma%2Fgeneric%2Fcontainmentactions Source code: ContainmentActions from kde-workspace]&lt;br /&gt;
* [http://www.staerk.de/thorsten/Kde-contextmenu kde-contextmenu's home page]&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Development/Tutorials/Plasma/ContainmentAction</id>
		<title>Development/Tutorials/Plasma/ContainmentAction</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Development/Tutorials/Plasma/ContainmentAction"/>
				<updated>2013-03-06T19:19:57Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: /* Test it */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;You can use Plasma ContainmentAction e.g. for Context Menus on your Plasma Desktop. They will run as plugins meaning you can add and remove them after compilation. If they exist, their name will be stored in [[Development/Tutorials/Desktop_File|.desktop files]]. ContainmentActions can only be written in C++ or QML, not in other Plasma programming languages, e.g. NOT in javascript.&lt;br /&gt;
&lt;br /&gt;
= Example =&lt;br /&gt;
We will now create a simple example for Plasma ContainmentAction plugins. The code can be downloaded at https://github.com/tstaerk/kde-contextmenu/tree/tutorial. It creates a custom context menu that looks like this:&lt;br /&gt;
&lt;br /&gt;
[[File:Snapshot-kde-contextmenu-2.png]]&lt;br /&gt;
&lt;br /&gt;
The code is here:&lt;br /&gt;
&lt;br /&gt;
== kde-contextmenu.desktop ==&lt;br /&gt;
 [Desktop Entry]&lt;br /&gt;
 Name=KDE Context Menu&lt;br /&gt;
 Type=Service&lt;br /&gt;
 Icon=favorites&lt;br /&gt;
 Comment=Simple application launcher&lt;br /&gt;
 &lt;br /&gt;
 ServiceTypes=Plasma/ContainmentActions&lt;br /&gt;
 &lt;br /&gt;
 X-KDE-Library=kde-contextmenu&lt;br /&gt;
 X-KDE-PluginInfo-Author=R. Hacker&lt;br /&gt;
 X-KDE-PluginInfo-Email=hacker@home.org&lt;br /&gt;
 X-KDE-PluginInfo-Name=kde-contextmenu&lt;br /&gt;
 X-KDE-PluginInfo-Version=pre0.1&lt;br /&gt;
 X-KDE-PluginInfo-Website=http://techbase.kde.org&lt;br /&gt;
 X-KDE-PluginInfo-EnabledByDefault=true&lt;br /&gt;
&lt;br /&gt;
The '''''Name''''' will show up later in this article when you select your context menu.&lt;br /&gt;
&lt;br /&gt;
If you want to know which '''''ServiceTypes''''' exist, you can find out with the Linux command&lt;br /&gt;
 ls `kde4-config --prefix`/share/kde4/servicetypes&lt;br /&gt;
&lt;br /&gt;
== CMakeLists.txt ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
project(kde-contextmenu)&lt;br /&gt;
&lt;br /&gt;
set(KDE_MIN_VERSION &amp;quot;4.3.85&amp;quot;) # for the &amp;lt; 4.2 macro&lt;br /&gt;
find_package(KDE4 4.3.85 REQUIRED)&lt;br /&gt;
&lt;br /&gt;
include(MacroLibrary)&lt;br /&gt;
include(KDE4Defaults)&lt;br /&gt;
&lt;br /&gt;
add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS})&lt;br /&gt;
include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDE4_INCLUDES})&lt;br /&gt;
&lt;br /&gt;
set(contextmenu_SRCS&lt;br /&gt;
    launch.cpp&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
kde4_add_plugin(kde-contextmenu ${contextmenu_SRCS})&lt;br /&gt;
target_link_libraries(kde-contextmenu ${KDE4_PLASMA_LIBS} ${KDE4_KIO_LIBS})&lt;br /&gt;
&lt;br /&gt;
install(TARGETS kde-contextmenu DESTINATION ${PLUGIN_INSTALL_DIR})&lt;br /&gt;
install(FILES kde-contextmenu.desktop DESTINATION ${SERVICES_INSTALL_DIR})&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== launch.h ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#ifndef CONTEXTMENU_HEADER&lt;br /&gt;
#define CONTEXTMENU_HEADER&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;plasma/containmentactions.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
class QAction;&lt;br /&gt;
class KMenu;&lt;br /&gt;
&lt;br /&gt;
class ConTextMenu : public Plasma::ContainmentActions&lt;br /&gt;
{&lt;br /&gt;
    Q_OBJECT&lt;br /&gt;
    public:&lt;br /&gt;
        ConTextMenu(QObject* parent, const QVariantList&amp;amp; args);&lt;br /&gt;
        ~ConTextMenu();&lt;br /&gt;
&lt;br /&gt;
        void init(const KConfigGroup &amp;amp;config);&lt;br /&gt;
&lt;br /&gt;
        void contextEvent(QEvent *event);&lt;br /&gt;
        //returns true if something (other than a separator) was successfully added&lt;br /&gt;
        bool addApps(QMenu *menu);&lt;br /&gt;
&lt;br /&gt;
    public slots:&lt;br /&gt;
        void switchTo(QAction *action);&lt;br /&gt;
&lt;br /&gt;
    protected:&lt;br /&gt;
        void makeMenu();&lt;br /&gt;
&lt;br /&gt;
    private:&lt;br /&gt;
        KMenu *m_menu;&lt;br /&gt;
        QAction *m_action;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
K_EXPORT_PLASMA_CONTAINMENTACTIONS(favorites, ConTextMenu)&lt;br /&gt;
&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== launch.cpp ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#include &amp;quot;launch.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;QGraphicsSceneMouseEvent&amp;gt;&lt;br /&gt;
#include &amp;lt;QGraphicsSceneWheelEvent&amp;gt;&lt;br /&gt;
#include &amp;lt;QFileInfo&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;KDebug&amp;gt;&lt;br /&gt;
#include &amp;lt;KIcon&amp;gt;&lt;br /&gt;
#include &amp;lt;KMenu&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;Plasma/DataEngine&amp;gt;&lt;br /&gt;
#include &amp;lt;Plasma/Containment&amp;gt;&lt;br /&gt;
#include &amp;lt;Plasma/Service&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ConTextMenu::ConTextMenu(QObject *parent, const QVariantList &amp;amp;args)&lt;br /&gt;
    : Plasma::ContainmentActions(parent, args)&lt;br /&gt;
    , m_action(new QAction(this))&lt;br /&gt;
{&lt;br /&gt;
    m_menu = new KMenu();&lt;br /&gt;
    connect(m_menu, SIGNAL(triggered(QAction*)), this, SLOT(switchTo(QAction*)));&lt;br /&gt;
&lt;br /&gt;
    m_action-&amp;gt;setMenu(m_menu);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
ConTextMenu::~ConTextMenu()&lt;br /&gt;
{&lt;br /&gt;
    delete m_menu;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void ConTextMenu::init(const KConfigGroup &amp;amp;)&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void ConTextMenu::contextEvent(QEvent *event)&lt;br /&gt;
{&lt;br /&gt;
    makeMenu();&lt;br /&gt;
    m_menu-&amp;gt;adjustSize();&lt;br /&gt;
    m_menu-&amp;gt;exec(popupPosition(m_menu-&amp;gt;size(), event));&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void ConTextMenu::makeMenu()&lt;br /&gt;
{&lt;br /&gt;
    m_menu-&amp;gt;clear();&lt;br /&gt;
    addApps(m_menu);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
bool ConTextMenu::addApps(QMenu *menu)&lt;br /&gt;
{&lt;br /&gt;
    QAction* action = menu-&amp;gt;addAction(KIcon(&amp;quot;system-run&amp;quot;), &amp;quot;Open a console&amp;quot;);&lt;br /&gt;
    action-&amp;gt;setData(&amp;quot;kde4-konsole.desktop&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    action = menu-&amp;gt;addAction(KIcon(&amp;quot;firefox&amp;quot;), &amp;quot;Surf the web&amp;quot;);&lt;br /&gt;
    action-&amp;gt;setData(&amp;quot;firefox.desktop&amp;quot;);&lt;br /&gt;
    &lt;br /&gt;
    action = menu-&amp;gt;addAction(KIcon(&amp;quot;ksnapshot&amp;quot;), &amp;quot;Take a screenshot&amp;quot;);&lt;br /&gt;
    action-&amp;gt;setData(&amp;quot;kde4-ksnapshot.desktop&amp;quot;);&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void ConTextMenu::switchTo(QAction *action)&lt;br /&gt;
{&lt;br /&gt;
    QString source = action-&amp;gt;data().toString();&lt;br /&gt;
    kDebug() &amp;lt;&amp;lt; source;&lt;br /&gt;
    Plasma::Service *service = dataEngine(&amp;quot;apps&amp;quot;)-&amp;gt;serviceForSource(source);&lt;br /&gt;
    if (service)&lt;br /&gt;
    {&lt;br /&gt;
        service-&amp;gt;startOperationCall(service-&amp;gt;operationDescription(&amp;quot;launch&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#include &amp;quot;launch.moc&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Install it ==&lt;br /&gt;
Compile, link and install it using the command&lt;br /&gt;
 cmake -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` . &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&lt;br /&gt;
&lt;br /&gt;
== Test it ==&lt;br /&gt;
To test it, have your system re-discover its .desktop files by running the command&lt;br /&gt;
 kbuildsycoca4&lt;br /&gt;
Then right-click onto your desktop, select &amp;quot;Folder View Settings&amp;quot; -&amp;gt; Mouse Actions and the context menu:&lt;br /&gt;
&lt;br /&gt;
[[File:Snapshot-kde-contextmenu-1.png]]&lt;br /&gt;
&lt;br /&gt;
Then click &amp;quot;Apply&amp;quot;. You will see the config file ~/.kde4/share/config/plasma-desktop-appletsrc changes. Next time when you middle-click (or whatever you selected) onto your desktop, your own context menu will appear:&lt;br /&gt;
&lt;br /&gt;
[[File:Snapshot-kde-contextmenu-2.png]]&lt;br /&gt;
&lt;br /&gt;
= Debugging =&lt;br /&gt;
To debug your Plasma ContainmentAction call&lt;br /&gt;
 kdebugdialog --fullmode&lt;br /&gt;
search for &amp;quot;plasma&amp;quot; and direct kDebug's output to /tmp/whatever.txt&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
* [http://quickgit.kde.org/?p=kde-workspace.git&amp;amp;a=tree&amp;amp;f=plasma%2Fgeneric%2Fcontainmentactions ContainmentActions from kde-workspace]&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Development/Tutorials/Plasma/ContainmentAction</id>
		<title>Development/Tutorials/Plasma/ContainmentAction</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Development/Tutorials/Plasma/ContainmentAction"/>
				<updated>2013-03-06T19:15:47Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: /* kde-contextmenu.desktop */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;You can use Plasma ContainmentAction e.g. for Context Menus on your Plasma Desktop. They will run as plugins meaning you can add and remove them after compilation. If they exist, their name will be stored in [[Development/Tutorials/Desktop_File|.desktop files]]. ContainmentActions can only be written in C++ or QML, not in other Plasma programming languages, e.g. NOT in javascript.&lt;br /&gt;
&lt;br /&gt;
= Example =&lt;br /&gt;
We will now create a simple example for Plasma ContainmentAction plugins. The code can be downloaded at https://github.com/tstaerk/kde-contextmenu/tree/tutorial. It creates a custom context menu that looks like this:&lt;br /&gt;
&lt;br /&gt;
[[File:Snapshot-kde-contextmenu-2.png]]&lt;br /&gt;
&lt;br /&gt;
The code is here:&lt;br /&gt;
&lt;br /&gt;
== kde-contextmenu.desktop ==&lt;br /&gt;
 [Desktop Entry]&lt;br /&gt;
 Name=KDE Context Menu&lt;br /&gt;
 Type=Service&lt;br /&gt;
 Icon=favorites&lt;br /&gt;
 Comment=Simple application launcher&lt;br /&gt;
 &lt;br /&gt;
 ServiceTypes=Plasma/ContainmentActions&lt;br /&gt;
 &lt;br /&gt;
 X-KDE-Library=kde-contextmenu&lt;br /&gt;
 X-KDE-PluginInfo-Author=R. Hacker&lt;br /&gt;
 X-KDE-PluginInfo-Email=hacker@home.org&lt;br /&gt;
 X-KDE-PluginInfo-Name=kde-contextmenu&lt;br /&gt;
 X-KDE-PluginInfo-Version=pre0.1&lt;br /&gt;
 X-KDE-PluginInfo-Website=http://techbase.kde.org&lt;br /&gt;
 X-KDE-PluginInfo-EnabledByDefault=true&lt;br /&gt;
&lt;br /&gt;
The '''''Name''''' will show up later in this article when you select your context menu.&lt;br /&gt;
&lt;br /&gt;
If you want to know which '''''ServiceTypes''''' exist, you can find out with the Linux command&lt;br /&gt;
 ls `kde4-config --prefix`/share/kde4/servicetypes&lt;br /&gt;
&lt;br /&gt;
== CMakeLists.txt ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
project(kde-contextmenu)&lt;br /&gt;
&lt;br /&gt;
set(KDE_MIN_VERSION &amp;quot;4.3.85&amp;quot;) # for the &amp;lt; 4.2 macro&lt;br /&gt;
find_package(KDE4 4.3.85 REQUIRED)&lt;br /&gt;
&lt;br /&gt;
include(MacroLibrary)&lt;br /&gt;
include(KDE4Defaults)&lt;br /&gt;
&lt;br /&gt;
add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS})&lt;br /&gt;
include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDE4_INCLUDES})&lt;br /&gt;
&lt;br /&gt;
set(contextmenu_SRCS&lt;br /&gt;
    launch.cpp&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
kde4_add_plugin(kde-contextmenu ${contextmenu_SRCS})&lt;br /&gt;
target_link_libraries(kde-contextmenu ${KDE4_PLASMA_LIBS} ${KDE4_KIO_LIBS})&lt;br /&gt;
&lt;br /&gt;
install(TARGETS kde-contextmenu DESTINATION ${PLUGIN_INSTALL_DIR})&lt;br /&gt;
install(FILES kde-contextmenu.desktop DESTINATION ${SERVICES_INSTALL_DIR})&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== launch.h ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#ifndef CONTEXTMENU_HEADER&lt;br /&gt;
#define CONTEXTMENU_HEADER&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;plasma/containmentactions.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
class QAction;&lt;br /&gt;
class KMenu;&lt;br /&gt;
&lt;br /&gt;
class ConTextMenu : public Plasma::ContainmentActions&lt;br /&gt;
{&lt;br /&gt;
    Q_OBJECT&lt;br /&gt;
    public:&lt;br /&gt;
        ConTextMenu(QObject* parent, const QVariantList&amp;amp; args);&lt;br /&gt;
        ~ConTextMenu();&lt;br /&gt;
&lt;br /&gt;
        void init(const KConfigGroup &amp;amp;config);&lt;br /&gt;
&lt;br /&gt;
        void contextEvent(QEvent *event);&lt;br /&gt;
        //returns true if something (other than a separator) was successfully added&lt;br /&gt;
        bool addApps(QMenu *menu);&lt;br /&gt;
&lt;br /&gt;
    public slots:&lt;br /&gt;
        void switchTo(QAction *action);&lt;br /&gt;
&lt;br /&gt;
    protected:&lt;br /&gt;
        void makeMenu();&lt;br /&gt;
&lt;br /&gt;
    private:&lt;br /&gt;
        KMenu *m_menu;&lt;br /&gt;
        QAction *m_action;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
K_EXPORT_PLASMA_CONTAINMENTACTIONS(favorites, ConTextMenu)&lt;br /&gt;
&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== launch.cpp ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#include &amp;quot;launch.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;QGraphicsSceneMouseEvent&amp;gt;&lt;br /&gt;
#include &amp;lt;QGraphicsSceneWheelEvent&amp;gt;&lt;br /&gt;
#include &amp;lt;QFileInfo&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;KDebug&amp;gt;&lt;br /&gt;
#include &amp;lt;KIcon&amp;gt;&lt;br /&gt;
#include &amp;lt;KMenu&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;Plasma/DataEngine&amp;gt;&lt;br /&gt;
#include &amp;lt;Plasma/Containment&amp;gt;&lt;br /&gt;
#include &amp;lt;Plasma/Service&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ConTextMenu::ConTextMenu(QObject *parent, const QVariantList &amp;amp;args)&lt;br /&gt;
    : Plasma::ContainmentActions(parent, args)&lt;br /&gt;
    , m_action(new QAction(this))&lt;br /&gt;
{&lt;br /&gt;
    m_menu = new KMenu();&lt;br /&gt;
    connect(m_menu, SIGNAL(triggered(QAction*)), this, SLOT(switchTo(QAction*)));&lt;br /&gt;
&lt;br /&gt;
    m_action-&amp;gt;setMenu(m_menu);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
ConTextMenu::~ConTextMenu()&lt;br /&gt;
{&lt;br /&gt;
    delete m_menu;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void ConTextMenu::init(const KConfigGroup &amp;amp;)&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void ConTextMenu::contextEvent(QEvent *event)&lt;br /&gt;
{&lt;br /&gt;
    makeMenu();&lt;br /&gt;
    m_menu-&amp;gt;adjustSize();&lt;br /&gt;
    m_menu-&amp;gt;exec(popupPosition(m_menu-&amp;gt;size(), event));&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void ConTextMenu::makeMenu()&lt;br /&gt;
{&lt;br /&gt;
    m_menu-&amp;gt;clear();&lt;br /&gt;
    addApps(m_menu);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
bool ConTextMenu::addApps(QMenu *menu)&lt;br /&gt;
{&lt;br /&gt;
    QAction* action = menu-&amp;gt;addAction(KIcon(&amp;quot;system-run&amp;quot;), &amp;quot;Open a console&amp;quot;);&lt;br /&gt;
    action-&amp;gt;setData(&amp;quot;kde4-konsole.desktop&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    action = menu-&amp;gt;addAction(KIcon(&amp;quot;firefox&amp;quot;), &amp;quot;Surf the web&amp;quot;);&lt;br /&gt;
    action-&amp;gt;setData(&amp;quot;firefox.desktop&amp;quot;);&lt;br /&gt;
    &lt;br /&gt;
    action = menu-&amp;gt;addAction(KIcon(&amp;quot;ksnapshot&amp;quot;), &amp;quot;Take a screenshot&amp;quot;);&lt;br /&gt;
    action-&amp;gt;setData(&amp;quot;kde4-ksnapshot.desktop&amp;quot;);&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void ConTextMenu::switchTo(QAction *action)&lt;br /&gt;
{&lt;br /&gt;
    QString source = action-&amp;gt;data().toString();&lt;br /&gt;
    kDebug() &amp;lt;&amp;lt; source;&lt;br /&gt;
    Plasma::Service *service = dataEngine(&amp;quot;apps&amp;quot;)-&amp;gt;serviceForSource(source);&lt;br /&gt;
    if (service)&lt;br /&gt;
    {&lt;br /&gt;
        service-&amp;gt;startOperationCall(service-&amp;gt;operationDescription(&amp;quot;launch&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#include &amp;quot;launch.moc&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Install it ==&lt;br /&gt;
Compile, link and install it using the command&lt;br /&gt;
 cmake -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` . &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&lt;br /&gt;
&lt;br /&gt;
== Test it ==&lt;br /&gt;
To test it, have your system re-discover its .desktop files by running the command&lt;br /&gt;
 kbuildsycoca4&lt;br /&gt;
Then right-click onto your desktop, select &amp;quot;Folder View Settings&amp;quot; -&amp;gt; Mouse Actions and the context menu:&lt;br /&gt;
&lt;br /&gt;
[[File:Snapshot-kde-contextmenu-1.png]]&lt;br /&gt;
&lt;br /&gt;
Then click &amp;quot;Apply&amp;quot;. Next time you middle-click (or whatever you selected) onto your desktop, your own context menu will appear:&lt;br /&gt;
&lt;br /&gt;
[[File:Snapshot-kde-contextmenu-2.png]]&lt;br /&gt;
&lt;br /&gt;
= Debugging =&lt;br /&gt;
To debug your Plasma ContainmentAction call&lt;br /&gt;
 kdebugdialog --fullmode&lt;br /&gt;
search for &amp;quot;plasma&amp;quot; and direct kDebug's output to /tmp/whatever.txt&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
* [http://quickgit.kde.org/?p=kde-workspace.git&amp;amp;a=tree&amp;amp;f=plasma%2Fgeneric%2Fcontainmentactions ContainmentActions from kde-workspace]&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Development/Tutorials/Plasma/ContainmentAction</id>
		<title>Development/Tutorials/Plasma/ContainmentAction</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Development/Tutorials/Plasma/ContainmentAction"/>
				<updated>2013-03-06T19:10:26Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: /* kde-contextmenu.desktop */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;You can use Plasma ContainmentAction e.g. for Context Menus on your Plasma Desktop. They will run as plugins meaning you can add and remove them after compilation. If they exist, their name will be stored in [[Development/Tutorials/Desktop_File|.desktop files]]. ContainmentActions can only be written in C++ or QML, not in other Plasma programming languages, e.g. NOT in javascript.&lt;br /&gt;
&lt;br /&gt;
= Example =&lt;br /&gt;
We will now create a simple example for Plasma ContainmentAction plugins. The code can be downloaded at https://github.com/tstaerk/kde-contextmenu/tree/tutorial. It creates a custom context menu that looks like this:&lt;br /&gt;
&lt;br /&gt;
[[File:Snapshot-kde-contextmenu-2.png]]&lt;br /&gt;
&lt;br /&gt;
The code is here:&lt;br /&gt;
&lt;br /&gt;
== kde-contextmenu.desktop ==&lt;br /&gt;
 [Desktop Entry]&lt;br /&gt;
 Name=KDE Context Menu&lt;br /&gt;
 Type=Service&lt;br /&gt;
 Icon=favorites&lt;br /&gt;
 Comment=Simple application launcher&lt;br /&gt;
 &lt;br /&gt;
 ServiceTypes=Plasma/ContainmentActions&lt;br /&gt;
 &lt;br /&gt;
 X-KDE-Library=kde-contextmenu&lt;br /&gt;
 X-KDE-PluginInfo-Author=R. Hacker&lt;br /&gt;
 X-KDE-PluginInfo-Email=hacker@home.org&lt;br /&gt;
 X-KDE-PluginInfo-Name=kde-contextmenu&lt;br /&gt;
 X-KDE-PluginInfo-Version=pre0.1&lt;br /&gt;
 X-KDE-PluginInfo-Website=http://techbase.kde.org&lt;br /&gt;
 X-KDE-PluginInfo-EnabledByDefault=true&lt;br /&gt;
&lt;br /&gt;
If you want to know which '''''ServiceTypes''''' exist, you can find out with the Linux command&lt;br /&gt;
 ls `kde4-config --prefix`/share/kde4/servicetypes&lt;br /&gt;
&lt;br /&gt;
== CMakeLists.txt ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
project(kde-contextmenu)&lt;br /&gt;
&lt;br /&gt;
set(KDE_MIN_VERSION &amp;quot;4.3.85&amp;quot;) # for the &amp;lt; 4.2 macro&lt;br /&gt;
find_package(KDE4 4.3.85 REQUIRED)&lt;br /&gt;
&lt;br /&gt;
include(MacroLibrary)&lt;br /&gt;
include(KDE4Defaults)&lt;br /&gt;
&lt;br /&gt;
add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS})&lt;br /&gt;
include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDE4_INCLUDES})&lt;br /&gt;
&lt;br /&gt;
set(contextmenu_SRCS&lt;br /&gt;
    launch.cpp&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
kde4_add_plugin(kde-contextmenu ${contextmenu_SRCS})&lt;br /&gt;
target_link_libraries(kde-contextmenu ${KDE4_PLASMA_LIBS} ${KDE4_KIO_LIBS})&lt;br /&gt;
&lt;br /&gt;
install(TARGETS kde-contextmenu DESTINATION ${PLUGIN_INSTALL_DIR})&lt;br /&gt;
install(FILES kde-contextmenu.desktop DESTINATION ${SERVICES_INSTALL_DIR})&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== launch.h ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#ifndef CONTEXTMENU_HEADER&lt;br /&gt;
#define CONTEXTMENU_HEADER&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;plasma/containmentactions.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
class QAction;&lt;br /&gt;
class KMenu;&lt;br /&gt;
&lt;br /&gt;
class ConTextMenu : public Plasma::ContainmentActions&lt;br /&gt;
{&lt;br /&gt;
    Q_OBJECT&lt;br /&gt;
    public:&lt;br /&gt;
        ConTextMenu(QObject* parent, const QVariantList&amp;amp; args);&lt;br /&gt;
        ~ConTextMenu();&lt;br /&gt;
&lt;br /&gt;
        void init(const KConfigGroup &amp;amp;config);&lt;br /&gt;
&lt;br /&gt;
        void contextEvent(QEvent *event);&lt;br /&gt;
        //returns true if something (other than a separator) was successfully added&lt;br /&gt;
        bool addApps(QMenu *menu);&lt;br /&gt;
&lt;br /&gt;
    public slots:&lt;br /&gt;
        void switchTo(QAction *action);&lt;br /&gt;
&lt;br /&gt;
    protected:&lt;br /&gt;
        void makeMenu();&lt;br /&gt;
&lt;br /&gt;
    private:&lt;br /&gt;
        KMenu *m_menu;&lt;br /&gt;
        QAction *m_action;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
K_EXPORT_PLASMA_CONTAINMENTACTIONS(favorites, ConTextMenu)&lt;br /&gt;
&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== launch.cpp ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#include &amp;quot;launch.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;QGraphicsSceneMouseEvent&amp;gt;&lt;br /&gt;
#include &amp;lt;QGraphicsSceneWheelEvent&amp;gt;&lt;br /&gt;
#include &amp;lt;QFileInfo&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;KDebug&amp;gt;&lt;br /&gt;
#include &amp;lt;KIcon&amp;gt;&lt;br /&gt;
#include &amp;lt;KMenu&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;Plasma/DataEngine&amp;gt;&lt;br /&gt;
#include &amp;lt;Plasma/Containment&amp;gt;&lt;br /&gt;
#include &amp;lt;Plasma/Service&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ConTextMenu::ConTextMenu(QObject *parent, const QVariantList &amp;amp;args)&lt;br /&gt;
    : Plasma::ContainmentActions(parent, args)&lt;br /&gt;
    , m_action(new QAction(this))&lt;br /&gt;
{&lt;br /&gt;
    m_menu = new KMenu();&lt;br /&gt;
    connect(m_menu, SIGNAL(triggered(QAction*)), this, SLOT(switchTo(QAction*)));&lt;br /&gt;
&lt;br /&gt;
    m_action-&amp;gt;setMenu(m_menu);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
ConTextMenu::~ConTextMenu()&lt;br /&gt;
{&lt;br /&gt;
    delete m_menu;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void ConTextMenu::init(const KConfigGroup &amp;amp;)&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void ConTextMenu::contextEvent(QEvent *event)&lt;br /&gt;
{&lt;br /&gt;
    makeMenu();&lt;br /&gt;
    m_menu-&amp;gt;adjustSize();&lt;br /&gt;
    m_menu-&amp;gt;exec(popupPosition(m_menu-&amp;gt;size(), event));&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void ConTextMenu::makeMenu()&lt;br /&gt;
{&lt;br /&gt;
    m_menu-&amp;gt;clear();&lt;br /&gt;
    addApps(m_menu);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
bool ConTextMenu::addApps(QMenu *menu)&lt;br /&gt;
{&lt;br /&gt;
    QAction* action = menu-&amp;gt;addAction(KIcon(&amp;quot;system-run&amp;quot;), &amp;quot;Open a console&amp;quot;);&lt;br /&gt;
    action-&amp;gt;setData(&amp;quot;kde4-konsole.desktop&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    action = menu-&amp;gt;addAction(KIcon(&amp;quot;firefox&amp;quot;), &amp;quot;Surf the web&amp;quot;);&lt;br /&gt;
    action-&amp;gt;setData(&amp;quot;firefox.desktop&amp;quot;);&lt;br /&gt;
    &lt;br /&gt;
    action = menu-&amp;gt;addAction(KIcon(&amp;quot;ksnapshot&amp;quot;), &amp;quot;Take a screenshot&amp;quot;);&lt;br /&gt;
    action-&amp;gt;setData(&amp;quot;kde4-ksnapshot.desktop&amp;quot;);&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void ConTextMenu::switchTo(QAction *action)&lt;br /&gt;
{&lt;br /&gt;
    QString source = action-&amp;gt;data().toString();&lt;br /&gt;
    kDebug() &amp;lt;&amp;lt; source;&lt;br /&gt;
    Plasma::Service *service = dataEngine(&amp;quot;apps&amp;quot;)-&amp;gt;serviceForSource(source);&lt;br /&gt;
    if (service)&lt;br /&gt;
    {&lt;br /&gt;
        service-&amp;gt;startOperationCall(service-&amp;gt;operationDescription(&amp;quot;launch&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#include &amp;quot;launch.moc&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Install it ==&lt;br /&gt;
Compile, link and install it using the command&lt;br /&gt;
 cmake -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` . &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&lt;br /&gt;
&lt;br /&gt;
== Test it ==&lt;br /&gt;
To test it, have your system re-discover its .desktop files by running the command&lt;br /&gt;
 kbuildsycoca4&lt;br /&gt;
Then right-click onto your desktop, select &amp;quot;Folder View Settings&amp;quot; -&amp;gt; Mouse Actions and the context menu:&lt;br /&gt;
&lt;br /&gt;
[[File:Snapshot-kde-contextmenu-1.png]]&lt;br /&gt;
&lt;br /&gt;
Then click &amp;quot;Apply&amp;quot;. Next time you middle-click (or whatever you selected) onto your desktop, your own context menu will appear:&lt;br /&gt;
&lt;br /&gt;
[[File:Snapshot-kde-contextmenu-2.png]]&lt;br /&gt;
&lt;br /&gt;
= Debugging =&lt;br /&gt;
To debug your Plasma ContainmentAction call&lt;br /&gt;
 kdebugdialog --fullmode&lt;br /&gt;
search for &amp;quot;plasma&amp;quot; and direct kDebug's output to /tmp/whatever.txt&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
* [http://quickgit.kde.org/?p=kde-workspace.git&amp;amp;a=tree&amp;amp;f=plasma%2Fgeneric%2Fcontainmentactions ContainmentActions from kde-workspace]&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Development/Tutorials/Plasma/ContainmentAction</id>
		<title>Development/Tutorials/Plasma/ContainmentAction</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Development/Tutorials/Plasma/ContainmentAction"/>
				<updated>2013-03-06T19:00:54Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;You can use Plasma ContainmentAction e.g. for Context Menus on your Plasma Desktop. They will run as plugins meaning you can add and remove them after compilation. If they exist, their name will be stored in [[Development/Tutorials/Desktop_File|.desktop files]]. ContainmentActions can only be written in C++ or QML, not in other Plasma programming languages, e.g. NOT in javascript.&lt;br /&gt;
&lt;br /&gt;
= Example =&lt;br /&gt;
We will now create a simple example for Plasma ContainmentAction plugins. The code can be downloaded at https://github.com/tstaerk/kde-contextmenu/tree/tutorial. It creates a custom context menu that looks like this:&lt;br /&gt;
&lt;br /&gt;
[[File:Snapshot-kde-contextmenu-2.png]]&lt;br /&gt;
&lt;br /&gt;
The code is here:&lt;br /&gt;
&lt;br /&gt;
== kde-contextmenu.desktop ==&lt;br /&gt;
 [Desktop Entry]&lt;br /&gt;
 Name=KDE Context Menu&lt;br /&gt;
 Type=Service&lt;br /&gt;
 Icon=favorites&lt;br /&gt;
 Comment=Simple application launcher&lt;br /&gt;
 &lt;br /&gt;
 ServiceTypes=Plasma/ContainmentActions&lt;br /&gt;
 &lt;br /&gt;
 X-KDE-Library=kde-contextmenu&lt;br /&gt;
 X-KDE-PluginInfo-Author=R. Hacker&lt;br /&gt;
 X-KDE-PluginInfo-Email=hacker@home.org&lt;br /&gt;
 X-KDE-PluginInfo-Name=kde-contextmenu&lt;br /&gt;
 X-KDE-PluginInfo-Version=pre0.1&lt;br /&gt;
 X-KDE-PluginInfo-Website=http://techbase.kde.org&lt;br /&gt;
 X-KDE-PluginInfo-EnabledByDefault=true&lt;br /&gt;
&lt;br /&gt;
== CMakeLists.txt ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
project(kde-contextmenu)&lt;br /&gt;
&lt;br /&gt;
set(KDE_MIN_VERSION &amp;quot;4.3.85&amp;quot;) # for the &amp;lt; 4.2 macro&lt;br /&gt;
find_package(KDE4 4.3.85 REQUIRED)&lt;br /&gt;
&lt;br /&gt;
include(MacroLibrary)&lt;br /&gt;
include(KDE4Defaults)&lt;br /&gt;
&lt;br /&gt;
add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS})&lt;br /&gt;
include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDE4_INCLUDES})&lt;br /&gt;
&lt;br /&gt;
set(contextmenu_SRCS&lt;br /&gt;
    launch.cpp&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
kde4_add_plugin(kde-contextmenu ${contextmenu_SRCS})&lt;br /&gt;
target_link_libraries(kde-contextmenu ${KDE4_PLASMA_LIBS} ${KDE4_KIO_LIBS})&lt;br /&gt;
&lt;br /&gt;
install(TARGETS kde-contextmenu DESTINATION ${PLUGIN_INSTALL_DIR})&lt;br /&gt;
install(FILES kde-contextmenu.desktop DESTINATION ${SERVICES_INSTALL_DIR})&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== launch.h ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#ifndef CONTEXTMENU_HEADER&lt;br /&gt;
#define CONTEXTMENU_HEADER&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;plasma/containmentactions.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
class QAction;&lt;br /&gt;
class KMenu;&lt;br /&gt;
&lt;br /&gt;
class ConTextMenu : public Plasma::ContainmentActions&lt;br /&gt;
{&lt;br /&gt;
    Q_OBJECT&lt;br /&gt;
    public:&lt;br /&gt;
        ConTextMenu(QObject* parent, const QVariantList&amp;amp; args);&lt;br /&gt;
        ~ConTextMenu();&lt;br /&gt;
&lt;br /&gt;
        void init(const KConfigGroup &amp;amp;config);&lt;br /&gt;
&lt;br /&gt;
        void contextEvent(QEvent *event);&lt;br /&gt;
        //returns true if something (other than a separator) was successfully added&lt;br /&gt;
        bool addApps(QMenu *menu);&lt;br /&gt;
&lt;br /&gt;
    public slots:&lt;br /&gt;
        void switchTo(QAction *action);&lt;br /&gt;
&lt;br /&gt;
    protected:&lt;br /&gt;
        void makeMenu();&lt;br /&gt;
&lt;br /&gt;
    private:&lt;br /&gt;
        KMenu *m_menu;&lt;br /&gt;
        QAction *m_action;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
K_EXPORT_PLASMA_CONTAINMENTACTIONS(favorites, ConTextMenu)&lt;br /&gt;
&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== launch.cpp ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#include &amp;quot;launch.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;QGraphicsSceneMouseEvent&amp;gt;&lt;br /&gt;
#include &amp;lt;QGraphicsSceneWheelEvent&amp;gt;&lt;br /&gt;
#include &amp;lt;QFileInfo&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;KDebug&amp;gt;&lt;br /&gt;
#include &amp;lt;KIcon&amp;gt;&lt;br /&gt;
#include &amp;lt;KMenu&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;Plasma/DataEngine&amp;gt;&lt;br /&gt;
#include &amp;lt;Plasma/Containment&amp;gt;&lt;br /&gt;
#include &amp;lt;Plasma/Service&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ConTextMenu::ConTextMenu(QObject *parent, const QVariantList &amp;amp;args)&lt;br /&gt;
    : Plasma::ContainmentActions(parent, args)&lt;br /&gt;
    , m_action(new QAction(this))&lt;br /&gt;
{&lt;br /&gt;
    m_menu = new KMenu();&lt;br /&gt;
    connect(m_menu, SIGNAL(triggered(QAction*)), this, SLOT(switchTo(QAction*)));&lt;br /&gt;
&lt;br /&gt;
    m_action-&amp;gt;setMenu(m_menu);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
ConTextMenu::~ConTextMenu()&lt;br /&gt;
{&lt;br /&gt;
    delete m_menu;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void ConTextMenu::init(const KConfigGroup &amp;amp;)&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void ConTextMenu::contextEvent(QEvent *event)&lt;br /&gt;
{&lt;br /&gt;
    makeMenu();&lt;br /&gt;
    m_menu-&amp;gt;adjustSize();&lt;br /&gt;
    m_menu-&amp;gt;exec(popupPosition(m_menu-&amp;gt;size(), event));&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void ConTextMenu::makeMenu()&lt;br /&gt;
{&lt;br /&gt;
    m_menu-&amp;gt;clear();&lt;br /&gt;
    addApps(m_menu);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
bool ConTextMenu::addApps(QMenu *menu)&lt;br /&gt;
{&lt;br /&gt;
    QAction* action = menu-&amp;gt;addAction(KIcon(&amp;quot;system-run&amp;quot;), &amp;quot;Open a console&amp;quot;);&lt;br /&gt;
    action-&amp;gt;setData(&amp;quot;kde4-konsole.desktop&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    action = menu-&amp;gt;addAction(KIcon(&amp;quot;firefox&amp;quot;), &amp;quot;Surf the web&amp;quot;);&lt;br /&gt;
    action-&amp;gt;setData(&amp;quot;firefox.desktop&amp;quot;);&lt;br /&gt;
    &lt;br /&gt;
    action = menu-&amp;gt;addAction(KIcon(&amp;quot;ksnapshot&amp;quot;), &amp;quot;Take a screenshot&amp;quot;);&lt;br /&gt;
    action-&amp;gt;setData(&amp;quot;kde4-ksnapshot.desktop&amp;quot;);&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void ConTextMenu::switchTo(QAction *action)&lt;br /&gt;
{&lt;br /&gt;
    QString source = action-&amp;gt;data().toString();&lt;br /&gt;
    kDebug() &amp;lt;&amp;lt; source;&lt;br /&gt;
    Plasma::Service *service = dataEngine(&amp;quot;apps&amp;quot;)-&amp;gt;serviceForSource(source);&lt;br /&gt;
    if (service)&lt;br /&gt;
    {&lt;br /&gt;
        service-&amp;gt;startOperationCall(service-&amp;gt;operationDescription(&amp;quot;launch&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#include &amp;quot;launch.moc&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Install it ==&lt;br /&gt;
Compile, link and install it using the command&lt;br /&gt;
 cmake -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` . &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&lt;br /&gt;
&lt;br /&gt;
== Test it ==&lt;br /&gt;
To test it, have your system re-discover its .desktop files by running the command&lt;br /&gt;
 kbuildsycoca4&lt;br /&gt;
Then right-click onto your desktop, select &amp;quot;Folder View Settings&amp;quot; -&amp;gt; Mouse Actions and the context menu:&lt;br /&gt;
&lt;br /&gt;
[[File:Snapshot-kde-contextmenu-1.png]]&lt;br /&gt;
&lt;br /&gt;
Then click &amp;quot;Apply&amp;quot;. Next time you middle-click (or whatever you selected) onto your desktop, your own context menu will appear:&lt;br /&gt;
&lt;br /&gt;
[[File:Snapshot-kde-contextmenu-2.png]]&lt;br /&gt;
&lt;br /&gt;
= Debugging =&lt;br /&gt;
To debug your Plasma ContainmentAction call&lt;br /&gt;
 kdebugdialog --fullmode&lt;br /&gt;
search for &amp;quot;plasma&amp;quot; and direct kDebug's output to /tmp/whatever.txt&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
* [http://quickgit.kde.org/?p=kde-workspace.git&amp;amp;a=tree&amp;amp;f=plasma%2Fgeneric%2Fcontainmentactions ContainmentActions from kde-workspace]&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Development/Tutorials/Plasma/ContainmentAction</id>
		<title>Development/Tutorials/Plasma/ContainmentAction</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Development/Tutorials/Plasma/ContainmentAction"/>
				<updated>2013-03-04T13:35:22Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: run kbuildsycoca or you do not have a guarantee that the .desktop file will be discovered&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;You can use Plasma ContainmentAction e.g. for Context Menus on your Plasma Desktop. They will run as plugins meaning you can add and remove them after compilation. If they exist, their name will be stored in [[Development/Tutorials/Desktop_File|.desktop files]].&lt;br /&gt;
&lt;br /&gt;
= Example =&lt;br /&gt;
We will now create a simple example for Plasma ContainmentAction plugins. The code can be downloaded at https://github.com/tstaerk/kde-contextmenu/tree/tutorial. It creates a custom context menu that looks like this:&lt;br /&gt;
&lt;br /&gt;
[[File:Snapshot-kde-contextmenu-2.png]]&lt;br /&gt;
&lt;br /&gt;
The code is here:&lt;br /&gt;
&lt;br /&gt;
== kde-contextmenu.desktop ==&lt;br /&gt;
 [Desktop Entry]&lt;br /&gt;
 Name=KDE Context Menu&lt;br /&gt;
 Type=Service&lt;br /&gt;
 Icon=favorites&lt;br /&gt;
 Comment=Simple application launcher&lt;br /&gt;
 &lt;br /&gt;
 ServiceTypes=Plasma/ContainmentActions&lt;br /&gt;
 &lt;br /&gt;
 X-KDE-Library=kde-contextmenu&lt;br /&gt;
 X-KDE-PluginInfo-Author=R. Hacker&lt;br /&gt;
 X-KDE-PluginInfo-Email=hacker@home.org&lt;br /&gt;
 X-KDE-PluginInfo-Name=kde-contextmenu&lt;br /&gt;
 X-KDE-PluginInfo-Version=pre0.1&lt;br /&gt;
 X-KDE-PluginInfo-Website=http://techbase.kde.org&lt;br /&gt;
 X-KDE-PluginInfo-EnabledByDefault=true&lt;br /&gt;
&lt;br /&gt;
== CMakeLists.txt ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
project(kde-contextmenu)&lt;br /&gt;
&lt;br /&gt;
set(KDE_MIN_VERSION &amp;quot;4.3.85&amp;quot;) # for the &amp;lt; 4.2 macro&lt;br /&gt;
find_package(KDE4 4.3.85 REQUIRED)&lt;br /&gt;
&lt;br /&gt;
include(MacroLibrary)&lt;br /&gt;
include(KDE4Defaults)&lt;br /&gt;
&lt;br /&gt;
add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS})&lt;br /&gt;
include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDE4_INCLUDES})&lt;br /&gt;
&lt;br /&gt;
set(contextmenu_SRCS&lt;br /&gt;
    launch.cpp&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
kde4_add_plugin(kde-contextmenu ${contextmenu_SRCS})&lt;br /&gt;
target_link_libraries(kde-contextmenu ${KDE4_PLASMA_LIBS} ${KDE4_KIO_LIBS})&lt;br /&gt;
&lt;br /&gt;
install(TARGETS kde-contextmenu DESTINATION ${PLUGIN_INSTALL_DIR})&lt;br /&gt;
install(FILES kde-contextmenu.desktop DESTINATION ${SERVICES_INSTALL_DIR})&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== launch.h ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#ifndef CONTEXTMENU_HEADER&lt;br /&gt;
#define CONTEXTMENU_HEADER&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;plasma/containmentactions.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
class QAction;&lt;br /&gt;
class KMenu;&lt;br /&gt;
&lt;br /&gt;
class ConTextMenu : public Plasma::ContainmentActions&lt;br /&gt;
{&lt;br /&gt;
    Q_OBJECT&lt;br /&gt;
    public:&lt;br /&gt;
        ConTextMenu(QObject* parent, const QVariantList&amp;amp; args);&lt;br /&gt;
        ~ConTextMenu();&lt;br /&gt;
&lt;br /&gt;
        void init(const KConfigGroup &amp;amp;config);&lt;br /&gt;
&lt;br /&gt;
        void contextEvent(QEvent *event);&lt;br /&gt;
        //returns true if something (other than a separator) was successfully added&lt;br /&gt;
        bool addApps(QMenu *menu);&lt;br /&gt;
&lt;br /&gt;
    public slots:&lt;br /&gt;
        void switchTo(QAction *action);&lt;br /&gt;
&lt;br /&gt;
    protected:&lt;br /&gt;
        void makeMenu();&lt;br /&gt;
&lt;br /&gt;
    private:&lt;br /&gt;
        KMenu *m_menu;&lt;br /&gt;
        QAction *m_action;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
K_EXPORT_PLASMA_CONTAINMENTACTIONS(favorites, ConTextMenu)&lt;br /&gt;
&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== launch.cpp ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#include &amp;quot;launch.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;QGraphicsSceneMouseEvent&amp;gt;&lt;br /&gt;
#include &amp;lt;QGraphicsSceneWheelEvent&amp;gt;&lt;br /&gt;
#include &amp;lt;QFileInfo&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;KDebug&amp;gt;&lt;br /&gt;
#include &amp;lt;KIcon&amp;gt;&lt;br /&gt;
#include &amp;lt;KMenu&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;Plasma/DataEngine&amp;gt;&lt;br /&gt;
#include &amp;lt;Plasma/Containment&amp;gt;&lt;br /&gt;
#include &amp;lt;Plasma/Service&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ConTextMenu::ConTextMenu(QObject *parent, const QVariantList &amp;amp;args)&lt;br /&gt;
    : Plasma::ContainmentActions(parent, args)&lt;br /&gt;
    , m_action(new QAction(this))&lt;br /&gt;
{&lt;br /&gt;
    m_menu = new KMenu();&lt;br /&gt;
    connect(m_menu, SIGNAL(triggered(QAction*)), this, SLOT(switchTo(QAction*)));&lt;br /&gt;
&lt;br /&gt;
    m_action-&amp;gt;setMenu(m_menu);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
ConTextMenu::~ConTextMenu()&lt;br /&gt;
{&lt;br /&gt;
    delete m_menu;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void ConTextMenu::init(const KConfigGroup &amp;amp;)&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void ConTextMenu::contextEvent(QEvent *event)&lt;br /&gt;
{&lt;br /&gt;
    makeMenu();&lt;br /&gt;
    m_menu-&amp;gt;adjustSize();&lt;br /&gt;
    m_menu-&amp;gt;exec(popupPosition(m_menu-&amp;gt;size(), event));&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void ConTextMenu::makeMenu()&lt;br /&gt;
{&lt;br /&gt;
    m_menu-&amp;gt;clear();&lt;br /&gt;
    addApps(m_menu);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
bool ConTextMenu::addApps(QMenu *menu)&lt;br /&gt;
{&lt;br /&gt;
    QAction* action = menu-&amp;gt;addAction(KIcon(&amp;quot;system-run&amp;quot;), &amp;quot;Open a console&amp;quot;);&lt;br /&gt;
    action-&amp;gt;setData(&amp;quot;kde4-konsole.desktop&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    action = menu-&amp;gt;addAction(KIcon(&amp;quot;firefox&amp;quot;), &amp;quot;Surf the web&amp;quot;);&lt;br /&gt;
    action-&amp;gt;setData(&amp;quot;firefox.desktop&amp;quot;);&lt;br /&gt;
    &lt;br /&gt;
    action = menu-&amp;gt;addAction(KIcon(&amp;quot;ksnapshot&amp;quot;), &amp;quot;Take a screenshot&amp;quot;);&lt;br /&gt;
    action-&amp;gt;setData(&amp;quot;kde4-ksnapshot.desktop&amp;quot;);&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void ConTextMenu::switchTo(QAction *action)&lt;br /&gt;
{&lt;br /&gt;
    QString source = action-&amp;gt;data().toString();&lt;br /&gt;
    kDebug() &amp;lt;&amp;lt; source;&lt;br /&gt;
    Plasma::Service *service = dataEngine(&amp;quot;apps&amp;quot;)-&amp;gt;serviceForSource(source);&lt;br /&gt;
    if (service)&lt;br /&gt;
    {&lt;br /&gt;
        service-&amp;gt;startOperationCall(service-&amp;gt;operationDescription(&amp;quot;launch&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#include &amp;quot;launch.moc&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Install it ==&lt;br /&gt;
Compile, link and install it using the command&lt;br /&gt;
 cmake -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` . &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&lt;br /&gt;
&lt;br /&gt;
== Test it ==&lt;br /&gt;
To test it, have your system re-discover its .desktop files by running the command&lt;br /&gt;
 kbuildsycoca4&lt;br /&gt;
Then right-click onto your desktop, select &amp;quot;Folder View Settings&amp;quot; -&amp;gt; Mouse Actions and the context menu:&lt;br /&gt;
&lt;br /&gt;
[[File:Snapshot-kde-contextmenu-1.png]]&lt;br /&gt;
&lt;br /&gt;
Then click &amp;quot;Apply&amp;quot;. Next time you middle-click (or whatever you selected) onto your desktop, your own context menu will appear:&lt;br /&gt;
&lt;br /&gt;
[[File:Snapshot-kde-contextmenu-2.png]]&lt;br /&gt;
&lt;br /&gt;
= Debugging =&lt;br /&gt;
To debug your Plasma ContainmentAction call&lt;br /&gt;
 kdebugdialog --fullmode&lt;br /&gt;
search for &amp;quot;plasma&amp;quot; and direct kDebug's output to /tmp/whatever.txt&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
* [http://quickgit.kde.org/?p=kde-workspace.git&amp;amp;a=tree&amp;amp;f=plasma%2Fgeneric%2Fcontainmentactions ContainmentActions from kde-workspace]&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Development/Tutorials/Plasma/ContainmentAction</id>
		<title>Development/Tutorials/Plasma/ContainmentAction</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Development/Tutorials/Plasma/ContainmentAction"/>
				<updated>2013-03-01T15:17:23Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;You can use Plasma ContainmentAction e.g. for Context Menus on your Plasma Desktop. They will run as plugins meaning you can add and remove them after compilation. If they exist, their name will be stored in [[Development/Tutorials/Desktop_File|.desktop files]].&lt;br /&gt;
&lt;br /&gt;
= Example =&lt;br /&gt;
We will now create a simple example for Plasma ContainmentAction plugins. The code can be downloaded at https://github.com/tstaerk/kde-contextmenu/tree/tutorial. It creates a custom context menu that looks like this:&lt;br /&gt;
&lt;br /&gt;
[[File:Snapshot-kde-contextmenu-2.png]]&lt;br /&gt;
&lt;br /&gt;
The code is here:&lt;br /&gt;
&lt;br /&gt;
== kde-contextmenu.desktop ==&lt;br /&gt;
 [Desktop Entry]&lt;br /&gt;
 Name=KDE Context Menu&lt;br /&gt;
 Type=Service&lt;br /&gt;
 Icon=favorites&lt;br /&gt;
 Comment=Simple application launcher&lt;br /&gt;
 &lt;br /&gt;
 ServiceTypes=Plasma/ContainmentActions&lt;br /&gt;
 &lt;br /&gt;
 X-KDE-Library=kde-contextmenu&lt;br /&gt;
 X-KDE-PluginInfo-Author=R. Hacker&lt;br /&gt;
 X-KDE-PluginInfo-Email=hacker@home.org&lt;br /&gt;
 X-KDE-PluginInfo-Name=kde-contextmenu&lt;br /&gt;
 X-KDE-PluginInfo-Version=pre0.1&lt;br /&gt;
 X-KDE-PluginInfo-Website=http://techbase.kde.org&lt;br /&gt;
 X-KDE-PluginInfo-EnabledByDefault=true&lt;br /&gt;
&lt;br /&gt;
== CMakeLists.txt ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
project(kde-contextmenu)&lt;br /&gt;
&lt;br /&gt;
set(KDE_MIN_VERSION &amp;quot;4.3.85&amp;quot;) # for the &amp;lt; 4.2 macro&lt;br /&gt;
find_package(KDE4 4.3.85 REQUIRED)&lt;br /&gt;
&lt;br /&gt;
include(MacroLibrary)&lt;br /&gt;
include(KDE4Defaults)&lt;br /&gt;
&lt;br /&gt;
add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS})&lt;br /&gt;
include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDE4_INCLUDES})&lt;br /&gt;
&lt;br /&gt;
set(contextmenu_SRCS&lt;br /&gt;
    launch.cpp&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
kde4_add_plugin(kde-contextmenu ${contextmenu_SRCS})&lt;br /&gt;
target_link_libraries(kde-contextmenu ${KDE4_PLASMA_LIBS} ${KDE4_KIO_LIBS})&lt;br /&gt;
&lt;br /&gt;
install(TARGETS kde-contextmenu DESTINATION ${PLUGIN_INSTALL_DIR})&lt;br /&gt;
install(FILES kde-contextmenu.desktop DESTINATION ${SERVICES_INSTALL_DIR})&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== launch.h ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#ifndef CONTEXTMENU_HEADER&lt;br /&gt;
#define CONTEXTMENU_HEADER&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;plasma/containmentactions.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
class QAction;&lt;br /&gt;
class KMenu;&lt;br /&gt;
&lt;br /&gt;
class ConTextMenu : public Plasma::ContainmentActions&lt;br /&gt;
{&lt;br /&gt;
    Q_OBJECT&lt;br /&gt;
    public:&lt;br /&gt;
        ConTextMenu(QObject* parent, const QVariantList&amp;amp; args);&lt;br /&gt;
        ~ConTextMenu();&lt;br /&gt;
&lt;br /&gt;
        void init(const KConfigGroup &amp;amp;config);&lt;br /&gt;
&lt;br /&gt;
        void contextEvent(QEvent *event);&lt;br /&gt;
        //returns true if something (other than a separator) was successfully added&lt;br /&gt;
        bool addApps(QMenu *menu);&lt;br /&gt;
&lt;br /&gt;
    public slots:&lt;br /&gt;
        void switchTo(QAction *action);&lt;br /&gt;
&lt;br /&gt;
    protected:&lt;br /&gt;
        void makeMenu();&lt;br /&gt;
&lt;br /&gt;
    private:&lt;br /&gt;
        KMenu *m_menu;&lt;br /&gt;
        QAction *m_action;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
K_EXPORT_PLASMA_CONTAINMENTACTIONS(favorites, ConTextMenu)&lt;br /&gt;
&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== launch.cpp ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#include &amp;quot;launch.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;QGraphicsSceneMouseEvent&amp;gt;&lt;br /&gt;
#include &amp;lt;QGraphicsSceneWheelEvent&amp;gt;&lt;br /&gt;
#include &amp;lt;QFileInfo&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;KDebug&amp;gt;&lt;br /&gt;
#include &amp;lt;KIcon&amp;gt;&lt;br /&gt;
#include &amp;lt;KMenu&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;Plasma/DataEngine&amp;gt;&lt;br /&gt;
#include &amp;lt;Plasma/Containment&amp;gt;&lt;br /&gt;
#include &amp;lt;Plasma/Service&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ConTextMenu::ConTextMenu(QObject *parent, const QVariantList &amp;amp;args)&lt;br /&gt;
    : Plasma::ContainmentActions(parent, args)&lt;br /&gt;
    , m_action(new QAction(this))&lt;br /&gt;
{&lt;br /&gt;
    m_menu = new KMenu();&lt;br /&gt;
    connect(m_menu, SIGNAL(triggered(QAction*)), this, SLOT(switchTo(QAction*)));&lt;br /&gt;
&lt;br /&gt;
    m_action-&amp;gt;setMenu(m_menu);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
ConTextMenu::~ConTextMenu()&lt;br /&gt;
{&lt;br /&gt;
    delete m_menu;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void ConTextMenu::init(const KConfigGroup &amp;amp;)&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void ConTextMenu::contextEvent(QEvent *event)&lt;br /&gt;
{&lt;br /&gt;
    makeMenu();&lt;br /&gt;
    m_menu-&amp;gt;adjustSize();&lt;br /&gt;
    m_menu-&amp;gt;exec(popupPosition(m_menu-&amp;gt;size(), event));&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void ConTextMenu::makeMenu()&lt;br /&gt;
{&lt;br /&gt;
    m_menu-&amp;gt;clear();&lt;br /&gt;
    addApps(m_menu);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
bool ConTextMenu::addApps(QMenu *menu)&lt;br /&gt;
{&lt;br /&gt;
    QAction* action = menu-&amp;gt;addAction(KIcon(&amp;quot;system-run&amp;quot;), &amp;quot;Open a console&amp;quot;);&lt;br /&gt;
    action-&amp;gt;setData(&amp;quot;kde4-konsole.desktop&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    action = menu-&amp;gt;addAction(KIcon(&amp;quot;firefox&amp;quot;), &amp;quot;Surf the web&amp;quot;);&lt;br /&gt;
    action-&amp;gt;setData(&amp;quot;firefox.desktop&amp;quot;);&lt;br /&gt;
    &lt;br /&gt;
    action = menu-&amp;gt;addAction(KIcon(&amp;quot;ksnapshot&amp;quot;), &amp;quot;Take a screenshot&amp;quot;);&lt;br /&gt;
    action-&amp;gt;setData(&amp;quot;kde4-ksnapshot.desktop&amp;quot;);&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void ConTextMenu::switchTo(QAction *action)&lt;br /&gt;
{&lt;br /&gt;
    QString source = action-&amp;gt;data().toString();&lt;br /&gt;
    kDebug() &amp;lt;&amp;lt; source;&lt;br /&gt;
    Plasma::Service *service = dataEngine(&amp;quot;apps&amp;quot;)-&amp;gt;serviceForSource(source);&lt;br /&gt;
    if (service)&lt;br /&gt;
    {&lt;br /&gt;
        service-&amp;gt;startOperationCall(service-&amp;gt;operationDescription(&amp;quot;launch&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#include &amp;quot;launch.moc&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Install it ==&lt;br /&gt;
Compile, link and install it using the command&lt;br /&gt;
 cmake -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` . &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&lt;br /&gt;
&lt;br /&gt;
== Test it ==&lt;br /&gt;
To test it, right-click onto your desktop and select &amp;quot;Folder View Settings&amp;quot;. Then select Mouse Actions and the context menu:&lt;br /&gt;
&lt;br /&gt;
[[File:Snapshot-kde-contextmenu-1.png]]&lt;br /&gt;
&lt;br /&gt;
Then click &amp;quot;Apply&amp;quot;. Next time you middle-click (or whatever you selected) onto your desktop, your own context menu will appear:&lt;br /&gt;
&lt;br /&gt;
[[File:Snapshot-kde-contextmenu-2.png]]&lt;br /&gt;
&lt;br /&gt;
= Debugging =&lt;br /&gt;
To debug your Plasma ContainmentAction call&lt;br /&gt;
 kdebugdialog --fullmode&lt;br /&gt;
search for &amp;quot;plasma&amp;quot; and direct kDebug's output to /tmp/whatever.txt&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
* [http://quickgit.kde.org/?p=kde-workspace.git&amp;amp;a=tree&amp;amp;f=plasma%2Fgeneric%2Fcontainmentactions ContainmentActions from kde-workspace]&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Development/Tutorials/Plasma/ContainmentAction</id>
		<title>Development/Tutorials/Plasma/ContainmentAction</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Development/Tutorials/Plasma/ContainmentAction"/>
				<updated>2013-03-01T15:07:52Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: /* launch.cpp */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;You can use Plasma ContainmentAction e.g. for Context Menus on your Plasma Desktop. They will run as plugins meaning you can add and remove them after compilation. If they exist, their name will be stored in [[Development/Tutorials/Desktop_File|.desktop files]].&lt;br /&gt;
&lt;br /&gt;
= Example =&lt;br /&gt;
A simple example for Plasma ContainmentAction plugins can be found at https://github.com/tstaerk/kde-contextmenu/tree/0.1. Let's look at it here:&lt;br /&gt;
&lt;br /&gt;
== kde-contextmenu.desktop ==&lt;br /&gt;
 [Desktop Entry]&lt;br /&gt;
 Name=KDE Context Menu&lt;br /&gt;
 Type=Service&lt;br /&gt;
 Icon=favorites&lt;br /&gt;
 Comment=Simple application launcher&lt;br /&gt;
 &lt;br /&gt;
 ServiceTypes=Plasma/ContainmentActions&lt;br /&gt;
 &lt;br /&gt;
 X-KDE-Library=kde-contextmenu&lt;br /&gt;
 X-KDE-PluginInfo-Author=R. Hacker&lt;br /&gt;
 X-KDE-PluginInfo-Email=hacker@home.org&lt;br /&gt;
 X-KDE-PluginInfo-Name=kde-contextmenu&lt;br /&gt;
 X-KDE-PluginInfo-Version=pre0.1&lt;br /&gt;
 X-KDE-PluginInfo-Website=http://techbase.kde.org&lt;br /&gt;
 X-KDE-PluginInfo-EnabledByDefault=true&lt;br /&gt;
&lt;br /&gt;
== CMakeLists.txt ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
project(kde-contextmenu)&lt;br /&gt;
&lt;br /&gt;
set(KDE_MIN_VERSION &amp;quot;4.3.85&amp;quot;) # for the &amp;lt; 4.2 macro&lt;br /&gt;
find_package(KDE4 4.3.85 REQUIRED)&lt;br /&gt;
&lt;br /&gt;
include(MacroLibrary)&lt;br /&gt;
include(KDE4Defaults)&lt;br /&gt;
&lt;br /&gt;
add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS})&lt;br /&gt;
include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDE4_INCLUDES})&lt;br /&gt;
&lt;br /&gt;
set(contextmenu_SRCS&lt;br /&gt;
    launch.cpp&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
kde4_add_plugin(kde-contextmenu ${contextmenu_SRCS})&lt;br /&gt;
target_link_libraries(kde-contextmenu ${KDE4_PLASMA_LIBS} ${KDE4_KIO_LIBS})&lt;br /&gt;
&lt;br /&gt;
install(TARGETS kde-contextmenu DESTINATION ${PLUGIN_INSTALL_DIR})&lt;br /&gt;
install(FILES kde-contextmenu.desktop DESTINATION ${SERVICES_INSTALL_DIR})&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== launch.h ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#ifndef CONTEXTMENU_HEADER&lt;br /&gt;
#define CONTEXTMENU_HEADER&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;plasma/containmentactions.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
class QAction;&lt;br /&gt;
class KMenu;&lt;br /&gt;
&lt;br /&gt;
class ConTextMenu : public Plasma::ContainmentActions&lt;br /&gt;
{&lt;br /&gt;
    Q_OBJECT&lt;br /&gt;
    public:&lt;br /&gt;
        ConTextMenu(QObject* parent, const QVariantList&amp;amp; args);&lt;br /&gt;
        ~ConTextMenu();&lt;br /&gt;
&lt;br /&gt;
        void init(const KConfigGroup &amp;amp;config);&lt;br /&gt;
&lt;br /&gt;
        void contextEvent(QEvent *event);&lt;br /&gt;
        //returns true if something (other than a separator) was successfully added&lt;br /&gt;
        bool addApps(QMenu *menu);&lt;br /&gt;
&lt;br /&gt;
    public slots:&lt;br /&gt;
        void switchTo(QAction *action);&lt;br /&gt;
&lt;br /&gt;
    protected:&lt;br /&gt;
        void makeMenu();&lt;br /&gt;
&lt;br /&gt;
    private:&lt;br /&gt;
        KMenu *m_menu;&lt;br /&gt;
        QAction *m_action;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
K_EXPORT_PLASMA_CONTAINMENTACTIONS(favorites, ConTextMenu)&lt;br /&gt;
&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== launch.cpp ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#include &amp;quot;launch.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;QGraphicsSceneMouseEvent&amp;gt;&lt;br /&gt;
#include &amp;lt;QGraphicsSceneWheelEvent&amp;gt;&lt;br /&gt;
#include &amp;lt;QFileInfo&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;KDebug&amp;gt;&lt;br /&gt;
#include &amp;lt;KIcon&amp;gt;&lt;br /&gt;
#include &amp;lt;KMenu&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;Plasma/DataEngine&amp;gt;&lt;br /&gt;
#include &amp;lt;Plasma/Containment&amp;gt;&lt;br /&gt;
#include &amp;lt;Plasma/Service&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ConTextMenu::ConTextMenu(QObject *parent, const QVariantList &amp;amp;args)&lt;br /&gt;
    : Plasma::ContainmentActions(parent, args)&lt;br /&gt;
    , m_action(new QAction(this))&lt;br /&gt;
{&lt;br /&gt;
    m_menu = new KMenu();&lt;br /&gt;
    connect(m_menu, SIGNAL(triggered(QAction*)), this, SLOT(switchTo(QAction*)));&lt;br /&gt;
&lt;br /&gt;
    m_action-&amp;gt;setMenu(m_menu);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
ConTextMenu::~ConTextMenu()&lt;br /&gt;
{&lt;br /&gt;
    delete m_menu;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void ConTextMenu::init(const KConfigGroup &amp;amp;)&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void ConTextMenu::contextEvent(QEvent *event)&lt;br /&gt;
{&lt;br /&gt;
    makeMenu();&lt;br /&gt;
    m_menu-&amp;gt;adjustSize();&lt;br /&gt;
    m_menu-&amp;gt;exec(popupPosition(m_menu-&amp;gt;size(), event));&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void ConTextMenu::makeMenu()&lt;br /&gt;
{&lt;br /&gt;
    m_menu-&amp;gt;clear();&lt;br /&gt;
    addApps(m_menu);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
bool ConTextMenu::addApps(QMenu *menu)&lt;br /&gt;
{&lt;br /&gt;
    QAction* action = menu-&amp;gt;addAction(KIcon(&amp;quot;system-run&amp;quot;), &amp;quot;Open a console&amp;quot;);&lt;br /&gt;
    action-&amp;gt;setData(&amp;quot;kde4-konsole.desktop&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    action = menu-&amp;gt;addAction(KIcon(&amp;quot;firefox&amp;quot;), &amp;quot;Surf the web&amp;quot;);&lt;br /&gt;
    action-&amp;gt;setData(&amp;quot;firefox.desktop&amp;quot;);&lt;br /&gt;
    &lt;br /&gt;
    action = menu-&amp;gt;addAction(KIcon(&amp;quot;ksnapshot&amp;quot;), &amp;quot;Take a screenshot&amp;quot;);&lt;br /&gt;
    action-&amp;gt;setData(&amp;quot;kde4-ksnapshot.desktop&amp;quot;);&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void ConTextMenu::switchTo(QAction *action)&lt;br /&gt;
{&lt;br /&gt;
    QString source = action-&amp;gt;data().toString();&lt;br /&gt;
    kDebug() &amp;lt;&amp;lt; source;&lt;br /&gt;
    Plasma::Service *service = dataEngine(&amp;quot;apps&amp;quot;)-&amp;gt;serviceForSource(source);&lt;br /&gt;
    if (service)&lt;br /&gt;
    {&lt;br /&gt;
        service-&amp;gt;startOperationCall(service-&amp;gt;operationDescription(&amp;quot;launch&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#include &amp;quot;launch.moc&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Install it ==&lt;br /&gt;
Compile, link and install it using the command&lt;br /&gt;
 cmake -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` . &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&lt;br /&gt;
&lt;br /&gt;
== Test it ==&lt;br /&gt;
To test it, right-click onto your desktop and select &amp;quot;Folder View Settings&amp;quot;. Then select Mouse Actions and the context menu:&lt;br /&gt;
&lt;br /&gt;
[[File:Snapshot-kde-contextmenu-1.png]]&lt;br /&gt;
&lt;br /&gt;
Then click &amp;quot;Apply&amp;quot;. Next time you middle-click (or whatever you selected) onto your desktop, your own context menu will appear:&lt;br /&gt;
&lt;br /&gt;
[[File:Snapshot-kde-contextmenu-2.png]]&lt;br /&gt;
&lt;br /&gt;
= Debugging =&lt;br /&gt;
To debug your Plasma ContainmentAction call&lt;br /&gt;
 kdebugdialog --fullmode&lt;br /&gt;
search for &amp;quot;plasma&amp;quot; and direct kDebug's output to /tmp/whatever.txt&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
* [http://quickgit.kde.org/?p=kde-workspace.git&amp;amp;a=tree&amp;amp;f=plasma%2Fgeneric%2Fcontainmentactions ContainmentActions from kde-workspace]&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Development/Tutorials/Plasma/ContainmentAction</id>
		<title>Development/Tutorials/Plasma/ContainmentAction</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Development/Tutorials/Plasma/ContainmentAction"/>
				<updated>2013-03-01T15:06:22Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: launch.h&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;You can use Plasma ContainmentAction e.g. for Context Menus on your Plasma Desktop. They will run as plugins meaning you can add and remove them after compilation. If they exist, their name will be stored in [[Development/Tutorials/Desktop_File|.desktop files]].&lt;br /&gt;
&lt;br /&gt;
= Example =&lt;br /&gt;
A simple example for Plasma ContainmentAction plugins can be found at https://github.com/tstaerk/kde-contextmenu/tree/0.1. Let's look at it here:&lt;br /&gt;
&lt;br /&gt;
== kde-contextmenu.desktop ==&lt;br /&gt;
 [Desktop Entry]&lt;br /&gt;
 Name=KDE Context Menu&lt;br /&gt;
 Type=Service&lt;br /&gt;
 Icon=favorites&lt;br /&gt;
 Comment=Simple application launcher&lt;br /&gt;
 &lt;br /&gt;
 ServiceTypes=Plasma/ContainmentActions&lt;br /&gt;
 &lt;br /&gt;
 X-KDE-Library=kde-contextmenu&lt;br /&gt;
 X-KDE-PluginInfo-Author=R. Hacker&lt;br /&gt;
 X-KDE-PluginInfo-Email=hacker@home.org&lt;br /&gt;
 X-KDE-PluginInfo-Name=kde-contextmenu&lt;br /&gt;
 X-KDE-PluginInfo-Version=pre0.1&lt;br /&gt;
 X-KDE-PluginInfo-Website=http://techbase.kde.org&lt;br /&gt;
 X-KDE-PluginInfo-EnabledByDefault=true&lt;br /&gt;
&lt;br /&gt;
== CMakeLists.txt ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
project(kde-contextmenu)&lt;br /&gt;
&lt;br /&gt;
set(KDE_MIN_VERSION &amp;quot;4.3.85&amp;quot;) # for the &amp;lt; 4.2 macro&lt;br /&gt;
find_package(KDE4 4.3.85 REQUIRED)&lt;br /&gt;
&lt;br /&gt;
include(MacroLibrary)&lt;br /&gt;
include(KDE4Defaults)&lt;br /&gt;
&lt;br /&gt;
add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS})&lt;br /&gt;
include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDE4_INCLUDES})&lt;br /&gt;
&lt;br /&gt;
set(contextmenu_SRCS&lt;br /&gt;
    launch.cpp&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
kde4_add_plugin(kde-contextmenu ${contextmenu_SRCS})&lt;br /&gt;
target_link_libraries(kde-contextmenu ${KDE4_PLASMA_LIBS} ${KDE4_KIO_LIBS})&lt;br /&gt;
&lt;br /&gt;
install(TARGETS kde-contextmenu DESTINATION ${PLUGIN_INSTALL_DIR})&lt;br /&gt;
install(FILES kde-contextmenu.desktop DESTINATION ${SERVICES_INSTALL_DIR})&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== launch.h ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#ifndef CONTEXTMENU_HEADER&lt;br /&gt;
#define CONTEXTMENU_HEADER&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;plasma/containmentactions.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
class QAction;&lt;br /&gt;
class KMenu;&lt;br /&gt;
&lt;br /&gt;
class ConTextMenu : public Plasma::ContainmentActions&lt;br /&gt;
{&lt;br /&gt;
    Q_OBJECT&lt;br /&gt;
    public:&lt;br /&gt;
        ConTextMenu(QObject* parent, const QVariantList&amp;amp; args);&lt;br /&gt;
        ~ConTextMenu();&lt;br /&gt;
&lt;br /&gt;
        void init(const KConfigGroup &amp;amp;config);&lt;br /&gt;
&lt;br /&gt;
        void contextEvent(QEvent *event);&lt;br /&gt;
        //returns true if something (other than a separator) was successfully added&lt;br /&gt;
        bool addApps(QMenu *menu);&lt;br /&gt;
&lt;br /&gt;
    public slots:&lt;br /&gt;
        void switchTo(QAction *action);&lt;br /&gt;
&lt;br /&gt;
    protected:&lt;br /&gt;
        void makeMenu();&lt;br /&gt;
&lt;br /&gt;
    private:&lt;br /&gt;
        KMenu *m_menu;&lt;br /&gt;
        QAction *m_action;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
K_EXPORT_PLASMA_CONTAINMENTACTIONS(favorites, ConTextMenu)&lt;br /&gt;
&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Install it ==&lt;br /&gt;
Compile, link and install it using the command&lt;br /&gt;
 cmake -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` . &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&lt;br /&gt;
&lt;br /&gt;
== Test it ==&lt;br /&gt;
To test it, right-click onto your desktop and select &amp;quot;Folder View Settings&amp;quot;. Then select Mouse Actions and the context menu:&lt;br /&gt;
&lt;br /&gt;
[[File:Snapshot-kde-contextmenu-1.png]]&lt;br /&gt;
&lt;br /&gt;
Then click &amp;quot;Apply&amp;quot;. Next time you middle-click (or whatever you selected) onto your desktop, your own context menu will appear:&lt;br /&gt;
&lt;br /&gt;
[[File:Snapshot-kde-contextmenu-2.png]]&lt;br /&gt;
&lt;br /&gt;
= Debugging =&lt;br /&gt;
To debug your Plasma ContainmentAction call&lt;br /&gt;
 kdebugdialog --fullmode&lt;br /&gt;
search for &amp;quot;plasma&amp;quot; and direct kDebug's output to /tmp/whatever.txt&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
* [http://quickgit.kde.org/?p=kde-workspace.git&amp;amp;a=tree&amp;amp;f=plasma%2Fgeneric%2Fcontainmentactions ContainmentActions from kde-workspace]&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Development/Tutorials/Plasma/ContainmentAction</id>
		<title>Development/Tutorials/Plasma/ContainmentAction</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Development/Tutorials/Plasma/ContainmentAction"/>
				<updated>2013-03-01T00:31:22Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: /* Test it */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;You can use Plasma ContainmentAction e.g. for Context Menus on your Plasma Desktop. They will run as plugins meaning you can add and remove them after compilation. If they exist, their name will be stored in [[Development/Tutorials/Desktop_File|.desktop files]].&lt;br /&gt;
&lt;br /&gt;
= Example =&lt;br /&gt;
A simple example for Plasma ContainmentAction plugins can be found at https://github.com/tstaerk/kde-contextmenu/tree/0.1. Let's look at it here:&lt;br /&gt;
&lt;br /&gt;
== kde-contextmenu.desktop ==&lt;br /&gt;
 [Desktop Entry]&lt;br /&gt;
 Name=KDE Context Menu&lt;br /&gt;
 Type=Service&lt;br /&gt;
 Icon=favorites&lt;br /&gt;
 Comment=Simple application launcher&lt;br /&gt;
 &lt;br /&gt;
 ServiceTypes=Plasma/ContainmentActions&lt;br /&gt;
 &lt;br /&gt;
 X-KDE-Library=kde-contextmenu&lt;br /&gt;
 X-KDE-PluginInfo-Author=R. Hacker&lt;br /&gt;
 X-KDE-PluginInfo-Email=hacker@home.org&lt;br /&gt;
 X-KDE-PluginInfo-Name=kde-contextmenu&lt;br /&gt;
 X-KDE-PluginInfo-Version=pre0.1&lt;br /&gt;
 X-KDE-PluginInfo-Website=http://techbase.kde.org&lt;br /&gt;
 X-KDE-PluginInfo-EnabledByDefault=true&lt;br /&gt;
&lt;br /&gt;
== CMakeLists.txt ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
project(kde-contextmenu)&lt;br /&gt;
&lt;br /&gt;
set(KDE_MIN_VERSION &amp;quot;4.3.85&amp;quot;) # for the &amp;lt; 4.2 macro&lt;br /&gt;
find_package(KDE4 4.3.85 REQUIRED)&lt;br /&gt;
&lt;br /&gt;
include(MacroLibrary)&lt;br /&gt;
include(KDE4Defaults)&lt;br /&gt;
&lt;br /&gt;
add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS})&lt;br /&gt;
include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDE4_INCLUDES})&lt;br /&gt;
&lt;br /&gt;
set(contextmenu_SRCS&lt;br /&gt;
    launch.cpp&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
kde4_add_plugin(kde-contextmenu ${contextmenu_SRCS})&lt;br /&gt;
target_link_libraries(kde-contextmenu ${KDE4_PLASMA_LIBS} ${KDE4_KIO_LIBS})&lt;br /&gt;
&lt;br /&gt;
install(TARGETS kde-contextmenu DESTINATION ${PLUGIN_INSTALL_DIR})&lt;br /&gt;
install(FILES kde-contextmenu.desktop DESTINATION ${SERVICES_INSTALL_DIR})&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Install it ==&lt;br /&gt;
Compile, link and install it using the command&lt;br /&gt;
 cmake -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` . &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&lt;br /&gt;
&lt;br /&gt;
== Test it ==&lt;br /&gt;
To test it, right-click onto your desktop and select &amp;quot;Folder View Settings&amp;quot;. Then select Mouse Actions and the context menu:&lt;br /&gt;
&lt;br /&gt;
[[File:Snapshot-kde-contextmenu-1.png]]&lt;br /&gt;
&lt;br /&gt;
Then click &amp;quot;Apply&amp;quot;. Next time you middle-click (or whatever you selected) onto your desktop, your own context menu will appear:&lt;br /&gt;
&lt;br /&gt;
[[File:Snapshot-kde-contextmenu-2.png]]&lt;br /&gt;
&lt;br /&gt;
= Debugging =&lt;br /&gt;
To debug your Plasma ContainmentAction call&lt;br /&gt;
 kdebugdialog --fullmode&lt;br /&gt;
search for &amp;quot;plasma&amp;quot; and direct kDebug's output to /tmp/whatever.txt&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
* [http://quickgit.kde.org/?p=kde-workspace.git&amp;amp;a=tree&amp;amp;f=plasma%2Fgeneric%2Fcontainmentactions ContainmentActions from kde-workspace]&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Development/Tutorials/Plasma/ContainmentAction</id>
		<title>Development/Tutorials/Plasma/ContainmentAction</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Development/Tutorials/Plasma/ContainmentAction"/>
				<updated>2013-03-01T00:30:10Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: /* Test it */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;You can use Plasma ContainmentAction e.g. for Context Menus on your Plasma Desktop. They will run as plugins meaning you can add and remove them after compilation. If they exist, their name will be stored in [[Development/Tutorials/Desktop_File|.desktop files]].&lt;br /&gt;
&lt;br /&gt;
= Example =&lt;br /&gt;
A simple example for Plasma ContainmentAction plugins can be found at https://github.com/tstaerk/kde-contextmenu/tree/0.1. Let's look at it here:&lt;br /&gt;
&lt;br /&gt;
== kde-contextmenu.desktop ==&lt;br /&gt;
 [Desktop Entry]&lt;br /&gt;
 Name=KDE Context Menu&lt;br /&gt;
 Type=Service&lt;br /&gt;
 Icon=favorites&lt;br /&gt;
 Comment=Simple application launcher&lt;br /&gt;
 &lt;br /&gt;
 ServiceTypes=Plasma/ContainmentActions&lt;br /&gt;
 &lt;br /&gt;
 X-KDE-Library=kde-contextmenu&lt;br /&gt;
 X-KDE-PluginInfo-Author=R. Hacker&lt;br /&gt;
 X-KDE-PluginInfo-Email=hacker@home.org&lt;br /&gt;
 X-KDE-PluginInfo-Name=kde-contextmenu&lt;br /&gt;
 X-KDE-PluginInfo-Version=pre0.1&lt;br /&gt;
 X-KDE-PluginInfo-Website=http://techbase.kde.org&lt;br /&gt;
 X-KDE-PluginInfo-EnabledByDefault=true&lt;br /&gt;
&lt;br /&gt;
== CMakeLists.txt ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
project(kde-contextmenu)&lt;br /&gt;
&lt;br /&gt;
set(KDE_MIN_VERSION &amp;quot;4.3.85&amp;quot;) # for the &amp;lt; 4.2 macro&lt;br /&gt;
find_package(KDE4 4.3.85 REQUIRED)&lt;br /&gt;
&lt;br /&gt;
include(MacroLibrary)&lt;br /&gt;
include(KDE4Defaults)&lt;br /&gt;
&lt;br /&gt;
add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS})&lt;br /&gt;
include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDE4_INCLUDES})&lt;br /&gt;
&lt;br /&gt;
set(contextmenu_SRCS&lt;br /&gt;
    launch.cpp&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
kde4_add_plugin(kde-contextmenu ${contextmenu_SRCS})&lt;br /&gt;
target_link_libraries(kde-contextmenu ${KDE4_PLASMA_LIBS} ${KDE4_KIO_LIBS})&lt;br /&gt;
&lt;br /&gt;
install(TARGETS kde-contextmenu DESTINATION ${PLUGIN_INSTALL_DIR})&lt;br /&gt;
install(FILES kde-contextmenu.desktop DESTINATION ${SERVICES_INSTALL_DIR})&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Install it ==&lt;br /&gt;
Compile, link and install it using the command&lt;br /&gt;
 cmake -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` . &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&lt;br /&gt;
&lt;br /&gt;
== Test it ==&lt;br /&gt;
To test it, right-click onto your desktop and select &amp;quot;Folder View Settings&amp;quot;. Then select Mouse Actions and the context menu:&lt;br /&gt;
&lt;br /&gt;
[[File:Snapshot-kde-contextmenu-1.png]]&lt;br /&gt;
&lt;br /&gt;
= Debugging =&lt;br /&gt;
To debug your Plasma ContainmentAction call&lt;br /&gt;
 kdebugdialog --fullmode&lt;br /&gt;
search for &amp;quot;plasma&amp;quot; and direct kDebug's output to /tmp/whatever.txt&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
* [http://quickgit.kde.org/?p=kde-workspace.git&amp;amp;a=tree&amp;amp;f=plasma%2Fgeneric%2Fcontainmentactions ContainmentActions from kde-workspace]&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/File:Snapshot-kde-contextmenu-2.png</id>
		<title>File:Snapshot-kde-contextmenu-2.png</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/File:Snapshot-kde-contextmenu-2.png"/>
				<updated>2013-03-01T00:28:34Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: showing the contextmenu from the Plasma ContainmentActions plugin tutorial&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;showing the contextmenu from the Plasma ContainmentActions plugin tutorial&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Development/Tutorials/Plasma/ContainmentAction</id>
		<title>Development/Tutorials/Plasma/ContainmentAction</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Development/Tutorials/Plasma/ContainmentAction"/>
				<updated>2013-03-01T00:22:49Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: test it&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;You can use Plasma ContainmentAction e.g. for Context Menus on your Plasma Desktop. They will run as plugins meaning you can add and remove them after compilation. If they exist, their name will be stored in [[Development/Tutorials/Desktop_File|.desktop files]].&lt;br /&gt;
&lt;br /&gt;
= Example =&lt;br /&gt;
A simple example for Plasma ContainmentAction plugins can be found at https://github.com/tstaerk/kde-contextmenu/tree/0.1. Let's look at it here:&lt;br /&gt;
&lt;br /&gt;
== kde-contextmenu.desktop ==&lt;br /&gt;
 [Desktop Entry]&lt;br /&gt;
 Name=KDE Context Menu&lt;br /&gt;
 Type=Service&lt;br /&gt;
 Icon=favorites&lt;br /&gt;
 Comment=Simple application launcher&lt;br /&gt;
 &lt;br /&gt;
 ServiceTypes=Plasma/ContainmentActions&lt;br /&gt;
 &lt;br /&gt;
 X-KDE-Library=kde-contextmenu&lt;br /&gt;
 X-KDE-PluginInfo-Author=R. Hacker&lt;br /&gt;
 X-KDE-PluginInfo-Email=hacker@home.org&lt;br /&gt;
 X-KDE-PluginInfo-Name=kde-contextmenu&lt;br /&gt;
 X-KDE-PluginInfo-Version=pre0.1&lt;br /&gt;
 X-KDE-PluginInfo-Website=http://techbase.kde.org&lt;br /&gt;
 X-KDE-PluginInfo-EnabledByDefault=true&lt;br /&gt;
&lt;br /&gt;
== CMakeLists.txt ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
project(kde-contextmenu)&lt;br /&gt;
&lt;br /&gt;
set(KDE_MIN_VERSION &amp;quot;4.3.85&amp;quot;) # for the &amp;lt; 4.2 macro&lt;br /&gt;
find_package(KDE4 4.3.85 REQUIRED)&lt;br /&gt;
&lt;br /&gt;
include(MacroLibrary)&lt;br /&gt;
include(KDE4Defaults)&lt;br /&gt;
&lt;br /&gt;
add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS})&lt;br /&gt;
include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDE4_INCLUDES})&lt;br /&gt;
&lt;br /&gt;
set(contextmenu_SRCS&lt;br /&gt;
    launch.cpp&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
kde4_add_plugin(kde-contextmenu ${contextmenu_SRCS})&lt;br /&gt;
target_link_libraries(kde-contextmenu ${KDE4_PLASMA_LIBS} ${KDE4_KIO_LIBS})&lt;br /&gt;
&lt;br /&gt;
install(TARGETS kde-contextmenu DESTINATION ${PLUGIN_INSTALL_DIR})&lt;br /&gt;
install(FILES kde-contextmenu.desktop DESTINATION ${SERVICES_INSTALL_DIR})&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Install it ==&lt;br /&gt;
Compile, link and install it using the command&lt;br /&gt;
 cmake -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` . &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&lt;br /&gt;
&lt;br /&gt;
== Test it ==&lt;br /&gt;
To test it, right-click onto your desktop and select &amp;quot;Folder View Settings&amp;quot;. Then select the context menu:&lt;br /&gt;
&lt;br /&gt;
[[File:Snapshot-kde-contextmenu-1.png]]&lt;br /&gt;
&lt;br /&gt;
= Debugging =&lt;br /&gt;
To debug your Plasma ContainmentAction call&lt;br /&gt;
 kdebugdialog --fullmode&lt;br /&gt;
search for &amp;quot;plasma&amp;quot; and direct kDebug's output to /tmp/whatever.txt&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
* [http://quickgit.kde.org/?p=kde-workspace.git&amp;amp;a=tree&amp;amp;f=plasma%2Fgeneric%2Fcontainmentactions ContainmentActions from kde-workspace]&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/File:Snapshot-kde-contextmenu-1.png</id>
		<title>File:Snapshot-kde-contextmenu-1.png</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/File:Snapshot-kde-contextmenu-1.png"/>
				<updated>2013-03-01T00:21:20Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: Belongs to the tutorial how to program a Plasma ContainmentActions Plugin. Shows how to select one.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Belongs to the tutorial how to program a Plasma ContainmentActions Plugin. Shows how to select one.&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Development/Tutorials/Plasma/ContainmentAction</id>
		<title>Development/Tutorials/Plasma/ContainmentAction</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Development/Tutorials/Plasma/ContainmentAction"/>
				<updated>2013-03-01T00:10:57Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: compilation&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;You can use Plasma ContainmentAction e.g. for Context Menus on your Plasma Desktop. They will run as plugins meaning you can add and remove them after compilation. If they exist, their name will be stored in [[Development/Tutorials/Desktop_File|.desktop files]].&lt;br /&gt;
&lt;br /&gt;
= Example =&lt;br /&gt;
A simple example for Plasma ContainmentAction plugins can be found at https://github.com/tstaerk/kde-contextmenu/tree/0.1. Let's look at it here:&lt;br /&gt;
&lt;br /&gt;
== kde-contextmenu.desktop ==&lt;br /&gt;
 [Desktop Entry]&lt;br /&gt;
 Name=KDE Context Menu&lt;br /&gt;
 Type=Service&lt;br /&gt;
 Icon=favorites&lt;br /&gt;
 Comment=Simple application launcher&lt;br /&gt;
 &lt;br /&gt;
 ServiceTypes=Plasma/ContainmentActions&lt;br /&gt;
 &lt;br /&gt;
 X-KDE-Library=kde-contextmenu&lt;br /&gt;
 X-KDE-PluginInfo-Author=R. Hacker&lt;br /&gt;
 X-KDE-PluginInfo-Email=hacker@home.org&lt;br /&gt;
 X-KDE-PluginInfo-Name=kde-contextmenu&lt;br /&gt;
 X-KDE-PluginInfo-Version=pre0.1&lt;br /&gt;
 X-KDE-PluginInfo-Website=http://techbase.kde.org&lt;br /&gt;
 X-KDE-PluginInfo-EnabledByDefault=true&lt;br /&gt;
&lt;br /&gt;
== CMakeLists.txt ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
project(kde-contextmenu)&lt;br /&gt;
&lt;br /&gt;
set(KDE_MIN_VERSION &amp;quot;4.3.85&amp;quot;) # for the &amp;lt; 4.2 macro&lt;br /&gt;
find_package(KDE4 4.3.85 REQUIRED)&lt;br /&gt;
&lt;br /&gt;
include(MacroLibrary)&lt;br /&gt;
include(KDE4Defaults)&lt;br /&gt;
&lt;br /&gt;
add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS})&lt;br /&gt;
include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDE4_INCLUDES})&lt;br /&gt;
&lt;br /&gt;
set(contextmenu_SRCS&lt;br /&gt;
    launch.cpp&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
kde4_add_plugin(kde-contextmenu ${contextmenu_SRCS})&lt;br /&gt;
target_link_libraries(kde-contextmenu ${KDE4_PLASMA_LIBS} ${KDE4_KIO_LIBS})&lt;br /&gt;
&lt;br /&gt;
install(TARGETS kde-contextmenu DESTINATION ${PLUGIN_INSTALL_DIR})&lt;br /&gt;
install(FILES kde-contextmenu.desktop DESTINATION ${SERVICES_INSTALL_DIR})&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Install it ==&lt;br /&gt;
Compile, link and install it using the command&lt;br /&gt;
 cmake -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` . &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&lt;br /&gt;
&lt;br /&gt;
= Debugging =&lt;br /&gt;
To debug your Plasma ContainmentAction call&lt;br /&gt;
 kdebugdialog --fullmode&lt;br /&gt;
search for &amp;quot;plasma&amp;quot; and direct kDebug's output to /tmp/whatever.txt&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
* [http://quickgit.kde.org/?p=kde-workspace.git&amp;amp;a=tree&amp;amp;f=plasma%2Fgeneric%2Fcontainmentactions ContainmentActions from kde-workspace]&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Development/Tutorials/Plasma/ContainmentAction</id>
		<title>Development/Tutorials/Plasma/ContainmentAction</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Development/Tutorials/Plasma/ContainmentAction"/>
				<updated>2013-03-01T00:05:18Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;You can use Plasma ContainmentAction e.g. for Context Menus on your Plasma Desktop. They will run as plugins meaning you can add and remove them after compilation. If they exist, their name will be stored in [[Development/Tutorials/Desktop_File|.desktop files]].&lt;br /&gt;
&lt;br /&gt;
= Example =&lt;br /&gt;
A simple example for Plasma ContainmentAction plugins can be found at https://github.com/tstaerk/kde-contextmenu/tree/0.1. Let's look at it here:&lt;br /&gt;
&lt;br /&gt;
== kde-contextmenu.desktop ==&lt;br /&gt;
 [Desktop Entry]&lt;br /&gt;
 Name=KDE Context Menu&lt;br /&gt;
 Type=Service&lt;br /&gt;
 Icon=favorites&lt;br /&gt;
 Comment=Simple application launcher&lt;br /&gt;
 &lt;br /&gt;
 ServiceTypes=Plasma/ContainmentActions&lt;br /&gt;
 &lt;br /&gt;
 X-KDE-Library=kde-contextmenu&lt;br /&gt;
 X-KDE-PluginInfo-Author=R. Hacker&lt;br /&gt;
 X-KDE-PluginInfo-Email=hacker@home.org&lt;br /&gt;
 X-KDE-PluginInfo-Name=kde-contextmenu&lt;br /&gt;
 X-KDE-PluginInfo-Version=pre0.1&lt;br /&gt;
 X-KDE-PluginInfo-Website=http://techbase.kde.org&lt;br /&gt;
 X-KDE-PluginInfo-EnabledByDefault=true&lt;br /&gt;
&lt;br /&gt;
== CMakeLists.txt ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
project(kde-contextmenu)&lt;br /&gt;
&lt;br /&gt;
set(KDE_MIN_VERSION &amp;quot;4.3.85&amp;quot;) # for the &amp;lt; 4.2 macro&lt;br /&gt;
find_package(KDE4 4.3.85 REQUIRED)&lt;br /&gt;
&lt;br /&gt;
include(MacroLibrary)&lt;br /&gt;
include(KDE4Defaults)&lt;br /&gt;
&lt;br /&gt;
add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS})&lt;br /&gt;
include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDE4_INCLUDES})&lt;br /&gt;
&lt;br /&gt;
set(contextmenu_SRCS&lt;br /&gt;
    launch.cpp&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
kde4_add_plugin(kde-contextmenu ${contextmenu_SRCS})&lt;br /&gt;
target_link_libraries(kde-contextmenu ${KDE4_PLASMA_LIBS} ${KDE4_KIO_LIBS})&lt;br /&gt;
&lt;br /&gt;
install(TARGETS kde-contextmenu DESTINATION ${PLUGIN_INSTALL_DIR})&lt;br /&gt;
install(FILES kde-contextmenu.desktop DESTINATION ${SERVICES_INSTALL_DIR})&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Debugging =&lt;br /&gt;
To debug your Plasma ContainmentAction call&lt;br /&gt;
 kdebugdialog --fullmode&lt;br /&gt;
search for &amp;quot;plasma&amp;quot; and direct kDebug's output to /tmp/whatever.txt&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
* [http://quickgit.kde.org/?p=kde-workspace.git&amp;amp;a=tree&amp;amp;f=plasma%2Fgeneric%2Fcontainmentactions ContainmentActions from kde-workspace]&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Development/Tutorials/Plasma/ContainmentAction</id>
		<title>Development/Tutorials/Plasma/ContainmentAction</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Development/Tutorials/Plasma/ContainmentAction"/>
				<updated>2013-02-28T23:15:06Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: CMakeLists.txt&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;You can use Plasma ContainmentAction e.g. for Context Menus on your Plasma Desktop. They will run as plugins meaning you can add and remove them after compilation. If they exist, their name will be stored in [[Development/Tutorials/Desktop_File|.desktop files]].&lt;br /&gt;
&lt;br /&gt;
= Example =&lt;br /&gt;
A simple example for Plasma ContainmentAction plugins can be found at https://github.com/tstaerk/kde-contextmenu/tree/0.1. Let's look at it here:&lt;br /&gt;
&lt;br /&gt;
== kde-contextmenu.desktop ==&lt;br /&gt;
 [Desktop Entry]&lt;br /&gt;
 Name=KDE Context Menu&lt;br /&gt;
 Type=Service&lt;br /&gt;
 Icon=favorites&lt;br /&gt;
 Comment=Simple application launcher&lt;br /&gt;
 &lt;br /&gt;
 ServiceTypes=Plasma/ContainmentActions&lt;br /&gt;
 &lt;br /&gt;
 X-KDE-Library=kde-contextmenu&lt;br /&gt;
 X-KDE-PluginInfo-Author=R. Hacker&lt;br /&gt;
 X-KDE-PluginInfo-Email=hacker@home.org&lt;br /&gt;
 X-KDE-PluginInfo-Name=kde-contextmenu&lt;br /&gt;
 X-KDE-PluginInfo-Version=pre0.1&lt;br /&gt;
 X-KDE-PluginInfo-Website=http://techbase.kde.org&lt;br /&gt;
 X-KDE-PluginInfo-EnabledByDefault=true&lt;br /&gt;
&lt;br /&gt;
== CMakeLists.txt ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
project(kde-contextmenu)&lt;br /&gt;
&lt;br /&gt;
set(KDE_MIN_VERSION &amp;quot;4.3.85&amp;quot;) # for the &amp;lt; 4.2 macro&lt;br /&gt;
find_package(KDE4 4.3.85 REQUIRED)&lt;br /&gt;
&lt;br /&gt;
include(MacroLibrary)&lt;br /&gt;
include(KDE4Defaults)&lt;br /&gt;
&lt;br /&gt;
add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS})&lt;br /&gt;
include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDE4_INCLUDES})&lt;br /&gt;
&lt;br /&gt;
set(contextmenu_SRCS&lt;br /&gt;
    launch.cpp&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
kde4_add_plugin(kde-contextmenu ${contextmenu_SRCS})&lt;br /&gt;
target_link_libraries(kde-contextmenu ${KDE4_PLASMA_LIBS} ${KDE4_KIO_LIBS})&lt;br /&gt;
&lt;br /&gt;
install(TARGETS kde-contextmenu DESTINATION ${PLUGIN_INSTALL_DIR})&lt;br /&gt;
install(FILES kde-contextmenu.desktop DESTINATION ${SERVICES_INSTALL_DIR})&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Debugging =&lt;br /&gt;
To debug your Plasma ContainmentAction call&lt;br /&gt;
 kdebugdialog --fullmode&lt;br /&gt;
search for &amp;quot;plasma&amp;quot; and direct kDebug's output to /tmp/whatever.txt&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Development/Tutorials/Plasma/ContainmentAction</id>
		<title>Development/Tutorials/Plasma/ContainmentAction</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Development/Tutorials/Plasma/ContainmentAction"/>
				<updated>2013-02-28T23:10:37Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;You can use Plasma ContainmentAction e.g. for Context Menus on your Plasma Desktop. They will run as plugins meaning you can add and remove them after compilation. If they exist, their name will be stored in [[Development/Tutorials/Desktop_File|.desktop files]].&lt;br /&gt;
&lt;br /&gt;
= Example =&lt;br /&gt;
A simple example for Plasma ContainmentAction plugins can be found at https://github.com/tstaerk/kde-contextmenu/tree/0.1. Let's look at it here:&lt;br /&gt;
&lt;br /&gt;
== kde-contextmenu.desktop ==&lt;br /&gt;
 [Desktop Entry]&lt;br /&gt;
 Name=KDE Context Menu&lt;br /&gt;
 Type=Service&lt;br /&gt;
 Icon=favorites&lt;br /&gt;
 Comment=Simple application launcher&lt;br /&gt;
 &lt;br /&gt;
 ServiceTypes=Plasma/ContainmentActions&lt;br /&gt;
 &lt;br /&gt;
 X-KDE-Library=kde-contextmenu&lt;br /&gt;
 X-KDE-PluginInfo-Author=R. Hacker&lt;br /&gt;
 X-KDE-PluginInfo-Email=hacker@home.org&lt;br /&gt;
 X-KDE-PluginInfo-Name=kde-contextmenu&lt;br /&gt;
 X-KDE-PluginInfo-Version=pre0.1&lt;br /&gt;
 X-KDE-PluginInfo-Website=http://techbase.kde.org&lt;br /&gt;
 X-KDE-PluginInfo-EnabledByDefault=true&lt;br /&gt;
&lt;br /&gt;
= Debugging =&lt;br /&gt;
To debug your Plasma ContainmentAction call&lt;br /&gt;
 kdebugdialog --fullmode&lt;br /&gt;
search for &amp;quot;plasma&amp;quot; and direct kDebug's output to /tmp/whatever.txt&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Development/Tutorials/Plasma/ContainmentAction</id>
		<title>Development/Tutorials/Plasma/ContainmentAction</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Development/Tutorials/Plasma/ContainmentAction"/>
				<updated>2013-02-28T22:46:33Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;You can use Plasma ContainmentAction e.g. for Context Menus on your Plasma Desktop. They will run as plugins meaning you can add and remove them after compilation. If they exist, their name will be stored in [[Development/Tutorials/Desktop_File|.desktop files]].&lt;br /&gt;
&lt;br /&gt;
= Debugging =&lt;br /&gt;
To debug your Plasma ContainmentAction call&lt;br /&gt;
 kdebugdialog --fullmode&lt;br /&gt;
search for &amp;quot;plasma&amp;quot; and direct kDebug's output to /tmp/whatever.txt&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Development/Tutorials/Plasma/ContainmentAction</id>
		<title>Development/Tutorials/Plasma/ContainmentAction</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Development/Tutorials/Plasma/ContainmentAction"/>
				<updated>2013-02-28T22:18:10Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: debugging&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Debugging =&lt;br /&gt;
To debug your Plasma ContainmentAction call&lt;br /&gt;
 kdebugdialog --fullmode&lt;br /&gt;
search for &amp;quot;plasma&amp;quot; and direct kDebug's output to /tmp/whatever.txt&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Development/Tutorials/Plasma</id>
		<title>Development/Tutorials/Plasma</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Development/Tutorials/Plasma"/>
				<updated>2013-02-28T22:14:49Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: plasma containment actions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== QML ==&lt;br /&gt;
Plasmoids that use the QML (aka QtQuick) declarative language to describe their user interface while having the logic of the applet, in JavaScript (QML is essentially a forge between CSS and JavaScript). &lt;br /&gt;
&lt;br /&gt;
This is now the '''recommended''' method of creating plasmoids, where possible. The plasmoid, or applet serves as the visualization for the data which a Plasma::DataEngine contains.&lt;br /&gt;
&lt;br /&gt;
It allows easily the declaring of an interface and to easily create things like ListViews with native Plasma theming. It is what Plasma is leaning the most towards, especially in the Mobile, MediaCenter shells.&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Plasma/QML/GettingStarted|Getting Started]]&lt;br /&gt;
:''Creating and running your first plasmoid in QML''&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Plasma/QML/Basic_ListView|Basic List Plasmoid]]&lt;br /&gt;
:''Make a QML ListView which displays basic text objects as items. Utilizes native Plasma theming and animations.''&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Plasma/QML/API|API Reference]]&lt;br /&gt;
:''The QML Plasmoid API. Useful for referencing what is available in the runtime, what are the differences with the pure JavaScript ScriptEngine, the differences between pure Qt QML and Plasma, and as a study aid for the tutorials above.''&lt;br /&gt;
&lt;br /&gt;
== C++ ==&lt;br /&gt;
&lt;br /&gt;
=== Plasmoids ===&lt;br /&gt;
;[[Development/Tutorials/Plasma/GettingStarted|Getting Started With Plasmoids]]&lt;br /&gt;
:''Creating your first plasmoid in C++ with SVG background, icon and text''&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Plasma/GettingStarted..Some_More|Getting Started With Plasmoids..Some more]] :''A few more starter's tips.''&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Plasma/UsingExtenders|How to use extenders in your Plasmoid]]&lt;br /&gt;
:''A simple example that shows how to use extenders in a Plasmoid.''&lt;br /&gt;
&lt;br /&gt;
;[http://www.linux-magazine.com/w3/issue/114/036-040_plasma.pdf Creating Plasmoids]&lt;br /&gt;
:''May 2010 article from Linux Magazine''&lt;br /&gt;
&lt;br /&gt;
;[http://www.ibm.com/developerworks/linux/library/l-kde-plasmoids/index.html Create Plasmoids using KDevelop]&lt;br /&gt;
:''Article explaining the structure of Plasma and how to create a Plasmoid''&lt;br /&gt;
&lt;br /&gt;
;[http://community.kde.org/User:Mxttie#Adding_configuration Adding configuration to your plasmoid]&lt;br /&gt;
:''Article explaining how to add a configuration dialog to your plasmoid.''&lt;br /&gt;
&lt;br /&gt;
=== DataEngines ===&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Plasma/DataEngines|Writing a DataEngine]]&lt;br /&gt;
:''DataEngines provide a standardized interface to various (read only) data sources for visualizations to use. Learn what a DataEngine is and how to write one of your own.''&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Plasma/Services|Writing a Service]]&lt;br /&gt;
:''Services provide a standardized interface for visualizations to perform &amp;quot;write operations&amp;quot;. This can be for example, uploading pasted test to a pastebin service..''&lt;br /&gt;
&lt;br /&gt;
=== PackageStructures ===&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Plasma/PackageStructure|Writing a PackageStructure Plugin]]&lt;br /&gt;
:''PackageStructure plugins allow custom Packages to be defined, installed, removed and listed as well as provide access their contents at runtime. Packages may contain any kind of data addons, including scripts.''&lt;br /&gt;
&lt;br /&gt;
=== Runners ===&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Plasma/AbstractRunner|Creating Runners]]&lt;br /&gt;
:''Runners are plugins that provide action-based search functionality in the Plasma workspace &amp;quot;run command&amp;quot; dialog. These plugins can be used by any application that links again libplasma.''&lt;br /&gt;
&lt;br /&gt;
=== Wallpapers ===&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Plasma/WallpaperHelloWorld|Wallpaper Tutorial 1]]&lt;br /&gt;
:''This tutorial shows you how to make a simple Hello World plasma wallpaper plugin.''&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Plasma/WallpaperConfiguration|Wallpaper Tutorial 2]]&lt;br /&gt;
:''This tutorial covers how to add configuration options to the wallpaper.''&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Plasma/WallpaperDoubleBuffer|Wallpaper Tutorial 3]]&lt;br /&gt;
:''This tutorial improves the wallpaper by using the so-called 'double buffer' technique.''&lt;br /&gt;
&lt;br /&gt;
=== Plasma Shells ===&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Plasma/ShellDesign|Creating a Plasma Shell]]&lt;br /&gt;
:''This tutorial covers the essentials of writing a new Plasma shell from scratch. A must-read for anyone creating a new or modifying an existing Plasma Shell. Existing Plasma shells include Plasma Desktop, Plasma Netbook, Plasma Mobile, Plasma Media Center, Plasma Screensaver, Plasma KPart and Plasma KDM, and all follow the patterns documented here.''&lt;br /&gt;
&lt;br /&gt;
=== Containment actions ===&lt;br /&gt;
;[[Development/Tutorials/Plasma/ContainmentAction|Creating a Plasma ContainmentAction]]&lt;br /&gt;
:&amp;quot;This tutorial covers the essentials of writing a new Plasma ContainmentAction. You can use a ContainmentAction e.g. for desktop context menus.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==  JavaScript ==&lt;br /&gt;
&lt;br /&gt;
Plasma has built-in JavaScript (also known as ECMAScript, and often referred to as QtScript in the context of Qt) scripting support without requiring any external dependencies.&lt;br /&gt;
&lt;br /&gt;
=== Plasmoids ===&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Plasma/JavaScript/GettingStarted|Getting Started]]&lt;br /&gt;
:''Creating and running your first plasmoid in JavaScript''&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Plasma/JavaScript/DataEngine|Getting Data]]&lt;br /&gt;
:''How to retrieve data from a data engine''&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Plasma/JavaScript/NowPlaying|Now Playing]]&lt;br /&gt;
:''Slightly more advanced data engine usage: displaying what's currently playing''&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Plasma/JavaScript/SystemMonitor|System Monitor]]&lt;br /&gt;
:''How to access systemmonitor data engine''&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Plasma/JavaScript/CheatSheet|Cheat Sheet]]&lt;br /&gt;
:''A cheat sheet, rather than a tutorial, of things to remember and watch out for when developing JavaScript plasmoids''&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Plasma/JavaScript/API|API Reference]]&lt;br /&gt;
:''The Simplified JavaScript Plasmoid API. Useful for referencing what is available in the runtime and as a study aid for the tutorials above.''&lt;br /&gt;
&lt;br /&gt;
=== Other Applications Of Javascript ===&lt;br /&gt;
;[[KDE_System_Administration/PlasmaDestkopScripting|Scripting Plasma Shells]]&lt;br /&gt;
:The KDE Plasma Desktop and Netbook provide means to manage the desktop shell (desktop, panels, widget) via scripts written in JavaScript. This article describes how to take advantage of this feature set as well as documents the full API. This is primarily a system administration tool, but may also be of interest to power users.&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Plasma/JavaScript/Animations|Javascript Animations]]&lt;br /&gt;
:''How to write Animations using Javascript for use in Plasma applications''&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Plasma/ComicPlugin|Creating Comic Plugins]]&lt;br /&gt;
:''This guide shows you how to create a comic plugin for the comic plasmoid.''&lt;br /&gt;
&lt;br /&gt;
== Python ==&lt;br /&gt;
There are some sample plasmoids written in python https://projects.kde.org/projects/kde/kdeexamples/repository/revisions/master/show/plasma/python&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Plasmoids ===&lt;br /&gt;
;[[Development/Tutorials/Plasma/Python/GettingStarted|Getting Started]]&lt;br /&gt;
:''Creating and running your first plasmoid in Python''&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Plasma/Python/Using widgets|Using widgets]]&lt;br /&gt;
:''Introduction to using Plasma widgets''&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Plasma/Python/Using DataEngines|Using DataEngines]]&lt;br /&gt;
:''How to use DataEngines from a plasmoid''&lt;br /&gt;
&lt;br /&gt;
=== DataEngines ===&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Plasma/Python/Writing DataEngines|Writing DataEngines]]&lt;br /&gt;
:''How to write your own Plasma DataEngine''&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Plasma/PythonPlasmoid|Writing a Plasmoid in Python]]&lt;br /&gt;
:''Writing a simple battery graph in python''&lt;br /&gt;
&lt;br /&gt;
=== Runners ===&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Plasma/PythonRunner|Writing a KRunner plugin in Python]]&lt;br /&gt;
:''Writing a simple krunner plugin in python''&lt;br /&gt;
&lt;br /&gt;
== Ruby ==&lt;br /&gt;
&lt;br /&gt;
=== Plasmoids ===&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Plasma/Ruby/GettingStarted|Getting Started]]&lt;br /&gt;
:''Creating and running your first plasmoid in Ruby''&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Plasma/Ruby/Using widgets|Using widgets]]&lt;br /&gt;
:''Introduction to using Plasma widgets''&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Plasma/Ruby/SimplePasteApplet|Writing a simple paste applet]]&lt;br /&gt;
:''A tutorial explaining how to set up a plasmoid, create a simple paste applet using widgets and add Plasma features seen elsewhere. Complete with tips for those who have never programmed before.''&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Plasma/Ruby/Blinker|Use SVG artwork in the simplest way possible]]&lt;br /&gt;
:''Follow a fellow student as he asks around about SVG usage and explains why the code examples work. This is a wiki so feel free to add your own insights until this tutorial can be considered complete.''&lt;br /&gt;
&lt;br /&gt;
=== DataEngines ===&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Plasma/Ruby/Writing DataEngines|Writing DataEngines]]&lt;br /&gt;
:''How to write your own Plasma DataEngine using Ruby''&lt;br /&gt;
&lt;br /&gt;
== Web Technologies (HTML/JS/CSS) ==&lt;br /&gt;
;[[Development/Tutorials/Plasma/Web/GettingStarted|Getting Started]]&lt;br /&gt;
:''Creating and running your first plasmoid in HTML''&lt;br /&gt;
&lt;br /&gt;
== Plasma integration for applications ==&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Solid_Device_Actions|Creating a Device Notifier action]]&lt;br /&gt;
:''When your application is interested in removable hardware''&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Plasma/ApplicationShell|Integrate Plasma in Applications]]&lt;br /&gt;
:''This tutorial shows you how to make an application dashboard based on Plasma technologies.''&lt;br /&gt;
&lt;br /&gt;
== Packages ==&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Plasma/PackageOverview|Plasma Packages]]&lt;br /&gt;
:''An overview of what makes up a Plasma Package and what they are and can be used for.''&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Plasma/PackageStructure|Writing a PackageStructure Plugin in C++]]&lt;br /&gt;
:''PackageStructure plugins allow custom Packages to be defined, installed, removed and listed as well as provide access their contents at runtime. Packages may contain any kind of data addons, including scripts.''&lt;br /&gt;
&lt;br /&gt;
== Themes ==&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Plasma/Theme|Creating a Plasma Theme Quickstart]]&lt;br /&gt;
:''A quick guide to creating your first Plasma theme''&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Plasma/ThemeDetails|The Plasma Theme Structure In Detail]]&lt;br /&gt;
:''A comprehensive guide to the contents of a Plasma SVG theme, including configuration options, wallpapers, on-disk layout, names of all standard SVG files and every element in them.''&lt;br /&gt;
&lt;br /&gt;
== Activity Templates ==&lt;br /&gt;
&lt;br /&gt;
;[[KDE_System_Administration/PlasmaDesktopScripting#Activity_templates|Creating a Plasma Activity Template Quickstart]]&lt;br /&gt;
:''A quick guide to creating your first Plasma Activity Template''&lt;br /&gt;
&lt;br /&gt;
== Resources ==&lt;br /&gt;
&lt;br /&gt;
* [[Projects/Plasma|Projects: Plasma]]&lt;br /&gt;
* [http://api.kde.org/4.x-api/kdelibs-apidocs/plasma/html/index.html Plasma api documentation]&lt;br /&gt;
* [http://techbase.kde.org/Projects/Plasma/Eclipse_Integration Plasma Eclipse Integration]&lt;br /&gt;
* The [https://mail.kde.org/mailman/listinfo/plasma-devel plasma-devel mailing list] and #plasma on IRC (irc.freenode.org).&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Development/Tutorials/Plasma/JavaScript/GettingStarted</id>
		<title>Development/Tutorials/Plasma/JavaScript/GettingStarted</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Development/Tutorials/Plasma/JavaScript/GettingStarted"/>
				<updated>2013-02-25T17:04:47Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: find out where it has been installed&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
{{TutorialBrowser|&lt;br /&gt;
&lt;br /&gt;
series=JavaScript Plasmoids|&lt;br /&gt;
&lt;br /&gt;
name=Introduction To Writing Plasmoids with JavaScript|&lt;br /&gt;
&lt;br /&gt;
next=[[../DataEngine|Getting Data: How to retrieve data from a DataEngine]]|&lt;br /&gt;
&lt;br /&gt;
reading=[[../API|JavaScript Plasmoid API reference]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
In this tutorial we'll cover creating a very simple Plasmoid in JavaScript, otherwise known as [http://doc.trolltech.com/latest/qtscript.html QtScript] or [http://www.ecmascript.org/ ECMAScript], to provide a Plasma widget.&lt;br /&gt;
&lt;br /&gt;
Using JavaScript doesn't require any external dependencies, since it is part of the Qt libraries.  As of KDE 4.3, the Plasma JavaScript engine is part of kdebase/runtime, and so can be used in any Plasma-based application, not just the Plasma Desktop.&lt;br /&gt;
&lt;br /&gt;
== What is a widget? ==&lt;br /&gt;
In the context of Plasma, a &amp;quot;widget&amp;quot; is a single, self-contained graphical object on the canvas. They can be added and removed individually, configured separately from other widgets, etc. These &amp;quot;mini applications&amp;quot; are sometimes referred to in other widget platforms as &amp;quot;applets&amp;quot;, &amp;quot;apps&amp;quot;, &amp;quot;gadgets&amp;quot;, &amp;quot;karambas&amp;quot;, &amp;quot;desklets&amp;quot;. We chose the word &amp;quot;widget&amp;quot; for Plasma as it is used by other some other existing systems.&lt;br /&gt;
&lt;br /&gt;
The API of a widget is defined by the host &amp;quot;ScriptEngine&amp;quot;, with the exception of native Plasma widgets written in C++ which allows plugins in loadable libraries which use the API of the Plasma library directly. Currently Plasma supports both such &amp;quot;native&amp;quot; widgets written in C++, ones written in various dynamic languages (Plasmoids) as well as:&lt;br /&gt;
&lt;br /&gt;
* SuperKaramba's karambas&lt;br /&gt;
* Enlightenment 17 edje content&lt;br /&gt;
* Google Gadgets&lt;br /&gt;
* MacOS dashboard widgets (though not all)&lt;br /&gt;
&lt;br /&gt;
These are loaded via host AppletScriptEngine plugins that bridge between the widget itself and Plasma's canvas.&lt;br /&gt;
&lt;br /&gt;
== What is a Plasmoid? ==&lt;br /&gt;
A Plasmoid is a widget that can be loaded into Plasma that uses the native Plasma API and comes packaged in a single archive file which includes the code, metadata, images, configuration definitions, etc. Plasmoids may be currently written using various scripting languages and APIs. This tutorial covers the Simplified JavaScript API for Plasmoids&lt;br /&gt;
&lt;br /&gt;
== Hello world ==&lt;br /&gt;
The first step for any software project is to set up your project's directory on disk. For this tutorial we are going to create a very simple [http://en.wikipedia.org/wiki/Hello_world &amp;quot;Hello world&amp;quot;] plasmoid called &amp;quot;hello-javascript&amp;quot;. Create a directory on somewhere called &amp;lt;tt&amp;gt;hello-javascript&amp;lt;/tt&amp;gt; which in turn contains a &amp;lt;tt&amp;gt;contents&amp;lt;/tt&amp;gt; directory which then contains a &amp;lt;tt&amp;gt;code&amp;lt;/tt&amp;gt; directory. This command below will do all this.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd&lt;br /&gt;
mkdir -p hello-javascript/contents/code&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The only required part of the structure, in fact, is the &amp;lt;tt&amp;gt;contents&amp;lt;/tt&amp;gt; directory - almost everything will go in this directory.  But separating your code into a different directory from application data is a good habit to have.&lt;br /&gt;
&lt;br /&gt;
=== Metadata.desktop ===&lt;br /&gt;
In the &amp;lt;tt&amp;gt;hello-javascript&amp;lt;/tt&amp;gt; directory [[Development/Tutorials/Desktop_File|create a .desktop file]] called &amp;lt;tt&amp;gt;metadata.desktop&amp;lt;/tt&amp;gt; with the following content:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
[Desktop Entry]&lt;br /&gt;
Name=Hello JavaScript&lt;br /&gt;
Comment=An example JavaScript widget&lt;br /&gt;
Icon=chronometer&lt;br /&gt;
&lt;br /&gt;
Type=Service&lt;br /&gt;
X-KDE-ServiceTypes=Plasma/Applet&lt;br /&gt;
&lt;br /&gt;
X-Plasma-API=javascript&lt;br /&gt;
X-Plasma-MainScript=code/main.js&lt;br /&gt;
X-Plasma-DefaultSize=200,100&lt;br /&gt;
&lt;br /&gt;
X-KDE-PluginInfo-Author=&amp;lt;Your name here&amp;gt;&lt;br /&gt;
X-KDE-PluginInfo-Email=&amp;lt;Your email here&amp;gt;&lt;br /&gt;
X-KDE-PluginInfo-Name=hello-javascript&lt;br /&gt;
X-KDE-PluginInfo-Version=1.0&lt;br /&gt;
X-KDE-PluginInfo-Website=http://plasma.kde.org/&lt;br /&gt;
X-KDE-PluginInfo-Category=Examples&lt;br /&gt;
X-KDE-PluginInfo-Depends=&lt;br /&gt;
X-KDE-PluginInfo-License=GPL&lt;br /&gt;
X-KDE-PluginInfo-EnabledByDefault=true&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This &amp;lt;tt&amp;gt;metadata.desktop&amp;lt;/tt&amp;gt; file list important information needed by Plasma to load the widget, and also information about what the widget is and who created it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;Name&amp;lt;/tt&amp;gt; gives the name of widget as seen by the user when they go to the Add Widget dialog on the desktop.  There can be additional name entries for different languages.  For example, you could add a Dutch translation by inserting the line &amp;lt;tt&amp;gt;Name[nl]=Hallo JavaScript&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;Comment&amp;lt;/tt&amp;gt; gives a more detailed description of the widget.  This is also displayed in the Add Widget dialog, and can be translated in the same way as &amp;lt;tt&amp;gt;Name&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;Icon&amp;lt;/tt&amp;gt; gives the name of the icon to associate with this plasmoid. The icon is shown in the Add Widget dialog.  It must be the name of an icon that is either distributed with KDE (such as &amp;lt;tt&amp;gt;chronometer&amp;lt;/tt&amp;gt;) or provided by your plasmoid. If you want to provide the icon, you can use &amp;lt;tt&amp;gt;Icon=icon.png&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;Type&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;X-KDE-ServiceTypes&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;X-Plasma-API&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;X-Plasma-MainScript&amp;lt;/tt&amp;gt; fields are required for Plasma to find your plasmoid and know what to do with it.  Note that &amp;lt;tt&amp;gt;X-Plasma-MainScript&amp;lt;/tt&amp;gt; is a path relative the &amp;lt;tt&amp;gt;contents&amp;lt;/tt&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;X-Plasma-DefaultSize&amp;lt;/tt&amp;gt; specifies the default size for widget, as &amp;lt;tt&amp;gt;width,height&amp;lt;/tt&amp;gt;.  While the units aren't technically pixels, they have the same value as pixels providing you don't do anything like zoom in or out on your desktop.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;X-KDE-PluginInfo-Category&amp;lt;/tt&amp;gt; gives a category for the widget. This is used in the Add Widgets dialog to group and filter widgets. The value must be one of the category names listed at [[Projects/Plasma/PIG]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;X-KDE-PluginInfo-Name&amp;lt;/tt&amp;gt; is the internal name of the plasmoid (you can think of this as the name of the plasmoid, as opposed to the name of the widget which is given by &amp;lt;tt&amp;gt;Name&amp;lt;/tt&amp;gt;).  This is the name you will use as an argument to &amp;lt;tt&amp;gt;plasmoidviewer&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;plasmapkg&amp;lt;/tt&amp;gt; when you need to provide a plasmoid name rather than a path.  It doesn't have to be the same name as the directory containing &amp;lt;tt&amp;gt;metadata.desktop&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;X-KDE-PluginInfo-Author&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;X-KDE-PluginInfo-Email&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;X-KDE-PluginInfo-Version&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;X-KDE-PluginInfo-Website&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;X-KDE-PluginInfo-License&amp;lt;/tt&amp;gt; are informational, and are displayed in the About dialog for the plasmoid (which can be viewed by clicking the information icon next to the corresponding widget in the Add Widgets dialog of plasma).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;X-KDE-PluginInfo-EnabledByDefault&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;X-KDE-PluginInfo-Depends&amp;lt;/tt&amp;gt; rarely need to be changed from the values given here.&lt;br /&gt;
&lt;br /&gt;
=== Main script ===&lt;br /&gt;
The name of the main script file is given by &amp;lt;tt&amp;gt;X-Plasma-MainScript&amp;lt;/tt&amp;gt; in metadata.desktop, and is relative to the &amp;lt;tt&amp;gt;contents&amp;lt;/tt&amp;gt; directory.  In our case, we will need to create the file &amp;lt;tt&amp;gt;hello-javascript/contents/code/main.js&amp;lt;/tt&amp;gt;.  Put the following code in it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
layout = new LinearLayout(plasmoid);&lt;br /&gt;
&lt;br /&gt;
label = new Label();&lt;br /&gt;
layout.addItem(label);&lt;br /&gt;
&lt;br /&gt;
label.text = 'Hello JavaScript!';&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;strong&amp;gt;plasmoid&amp;lt;/strong&amp;gt; is a global variable that represents your widget.  It has some useful methods that we'll come to in later tutorials.&lt;br /&gt;
&lt;br /&gt;
First, we create a layout, because plasmoids don't have a layout by default.  This just makes sure that the label is the correct size and in the correct place.  Passing &amp;lt;tt&amp;gt;plasmoid&amp;lt;/tt&amp;gt; to the &amp;lt;tt&amp;gt;LinearLayout&amp;lt;/tt&amp;gt; attaches the layout to the widget.&lt;br /&gt;
&lt;br /&gt;
Next we add a label to the layout, and finally we set the label text.&lt;br /&gt;
&lt;br /&gt;
=== Testing (KDE 4.3+) ===&lt;br /&gt;
If you have KDE 4.3 or later, you can test your plasmoid without installing it by entering the &amp;lt;tt&amp;gt;hello-javascript&amp;lt;/tt&amp;gt; directory and running &amp;lt;tt&amp;gt;plasmoidviewer&amp;lt;/tt&amp;gt;.  Alternatively, call &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
plasmoidviewer ~/hello-javascript&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is very convenient for development as you can edit the Plasmoid and test the changes immediately without re-installing the plasmoid over and over again.&lt;br /&gt;
&lt;br /&gt;
=== Installing ===&lt;br /&gt;
You can install the plasmoid by running the following command from within the &amp;lt;tt&amp;gt;hello-javascript&amp;lt;/tt&amp;gt; directory:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
plasmapkg -i .&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The final argument to &amp;lt;tt&amp;gt;plasmapkg&amp;lt;/tt&amp;gt; is the path to the directory containing &amp;lt;tt&amp;gt;metadata.desktop&amp;lt;/tt&amp;gt; and the &amp;lt;tt&amp;gt;contents&amp;lt;/tt&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
You can now add your widget to the desktop using the Add Widgets dialog, or view it by running&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
plasmoidviewer hello-javascript&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to see where your plasmoid has actually been installed you can find out like this:&lt;br /&gt;
 # plasmapkg -i .&lt;br /&gt;
 plasmapkg(6482)/libplasma Plasma::Package::installPackage: &amp;quot;/root/.kde4/share/apps/plasma/plasmoids//hello-javascript&amp;quot; already exists &lt;br /&gt;
 Installation of /root/hello-javascript failed.&lt;br /&gt;
In this case it has been installed to /root/.kde4/share/apps/plasma/plasmoids//hello-javascript.&lt;br /&gt;
&lt;br /&gt;
=== Packaging ===&lt;br /&gt;
If you want to share your plasmoid, you'll have to package it.  Run the following from within the &amp;lt;tt&amp;gt;hello-javascript&amp;lt;/tt&amp;gt; directory:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
zip -r ../hello-javascript.zip . &amp;amp;&amp;amp;&lt;br /&gt;
mv ../hello-javascript.zip ../hello-javascript.plasmoid&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You now have a plasmoid package you can share with the world.  To install it, either use the &amp;quot;Install new widgets&amp;quot; functionality in the Add Widgets dialog, or go to the directory containing &amp;lt;tt&amp;gt;hello-javascript.plasmoid&amp;lt;/tt&amp;gt; and run&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
plasmapkg -i hello-javascript.plasmoid&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To uninstall the plasmoid, use &amp;lt;tt&amp;gt;plasmapkg&amp;lt;/tt&amp;gt; again with its -r option:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
plasmapkg -r hello-javascript&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that while the argument to &amp;lt;tt&amp;gt;plasmapkg -i&amp;lt;/tt&amp;gt; is a file or directory, you need to pass the plasmoid name (given by &amp;lt;tt&amp;gt;X-KDE-PluginInfo-Name&amp;lt;/tt&amp;gt; in &amp;lt;tt&amp;gt;metadata.desktop&amp;lt;/tt&amp;gt;) to &amp;lt;tt&amp;gt;plasmapkg -r&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== QtScript ==&lt;br /&gt;
The Simplified JavaScript API is powered by Qt's QtScript system which provides access to a full featured ECMA Script interpreter. If it works in ECMA Script, it will work in a Simplified JavaScript Plasmoid.&lt;br /&gt;
&lt;br /&gt;
{{note|QtScript uses the high performance ECMA Script interpreter from WebKit and shares this code with QtWebKit.&lt;br /&gt;
&lt;br /&gt;
However, QtScript does not include things such as a DOM API those familiar with JavaScript from a web browser context may expect. It is ''just'' ECMA Script with Qt integration.}}&lt;br /&gt;
&lt;br /&gt;
On top of the ECMA Script language, QtScript provides Qt integration features. Probably the most useful one in the context of writing Plasmoids is the use of signals and slots which is Qt's callback mechanism. Signals may be emitted in QtScript by calling the signal method in question, a signal can be connected to a slot by using the connect() method (and disconnected with disconnect()) and any function defined in the Plasmoid may be used as a slot. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
function onClick()&lt;br /&gt;
{&lt;br /&gt;
    print(&amp;quot;We got clicked!&amp;quot;)&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function onFirstClick()&lt;br /&gt;
{&lt;br /&gt;
    print(&amp;quot;First click!&amp;quot;)&lt;br /&gt;
    button.clicked.disconnect(onFirstClick)&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
button = new PushButton&lt;br /&gt;
button.clicked.connect(onClick)&lt;br /&gt;
button.clicked.connect(onFirstClick)&lt;br /&gt;
button.clicked()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will print out:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
We got clicked!&lt;br /&gt;
First click!&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
on the console when the Plasmoid starts, and the &amp;quot;We got clicked!&amp;quot; again whenever the button is clicked by the user.&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Development/Tutorials/Plasma/JavaScript/GettingStarted</id>
		<title>Development/Tutorials/Plasma/JavaScript/GettingStarted</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Development/Tutorials/Plasma/JavaScript/GettingStarted"/>
				<updated>2013-02-25T16:10:05Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: actually it's not needed to use a text editor&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
{{TutorialBrowser|&lt;br /&gt;
&lt;br /&gt;
series=JavaScript Plasmoids|&lt;br /&gt;
&lt;br /&gt;
name=Introduction To Writing Plasmoids with JavaScript|&lt;br /&gt;
&lt;br /&gt;
next=[[../DataEngine|Getting Data: How to retrieve data from a DataEngine]]|&lt;br /&gt;
&lt;br /&gt;
reading=[[../API|JavaScript Plasmoid API reference]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
In this tutorial we'll cover creating a very simple Plasmoid in JavaScript, otherwise known as [http://doc.trolltech.com/latest/qtscript.html QtScript] or [http://www.ecmascript.org/ ECMAScript], to provide a Plasma widget.&lt;br /&gt;
&lt;br /&gt;
Using JavaScript doesn't require any external dependencies, since it is part of the Qt libraries.  As of KDE 4.3, the Plasma JavaScript engine is part of kdebase/runtime, and so can be used in any Plasma-based application, not just the Plasma Desktop.&lt;br /&gt;
&lt;br /&gt;
== What is a widget? ==&lt;br /&gt;
In the context of Plasma, a &amp;quot;widget&amp;quot; is a single, self-contained graphical object on the canvas. They can be added and removed individually, configured separately from other widgets, etc. These &amp;quot;mini applications&amp;quot; are sometimes referred to in other widget platforms as &amp;quot;applets&amp;quot;, &amp;quot;apps&amp;quot;, &amp;quot;gadgets&amp;quot;, &amp;quot;karambas&amp;quot;, &amp;quot;desklets&amp;quot;. We chose the word &amp;quot;widget&amp;quot; for Plasma as it is used by other some other existing systems.&lt;br /&gt;
&lt;br /&gt;
The API of a widget is defined by the host &amp;quot;ScriptEngine&amp;quot;, with the exception of native Plasma widgets written in C++ which allows plugins in loadable libraries which use the API of the Plasma library directly. Currently Plasma supports both such &amp;quot;native&amp;quot; widgets written in C++, ones written in various dynamic languages (Plasmoids) as well as:&lt;br /&gt;
&lt;br /&gt;
* SuperKaramba's karambas&lt;br /&gt;
* Enlightenment 17 edje content&lt;br /&gt;
* Google Gadgets&lt;br /&gt;
* MacOS dashboard widgets (though not all)&lt;br /&gt;
&lt;br /&gt;
These are loaded via host AppletScriptEngine plugins that bridge between the widget itself and Plasma's canvas.&lt;br /&gt;
&lt;br /&gt;
== What is a Plasmoid? ==&lt;br /&gt;
A Plasmoid is a widget that can be loaded into Plasma that uses the native Plasma API and comes packaged in a single archive file which includes the code, metadata, images, configuration definitions, etc. Plasmoids may be currently written using various scripting languages and APIs. This tutorial covers the Simplified JavaScript API for Plasmoids&lt;br /&gt;
&lt;br /&gt;
== Hello world ==&lt;br /&gt;
The first step for any software project is to set up your project's directory on disk. For this tutorial we are going to create a very simple [http://en.wikipedia.org/wiki/Hello_world &amp;quot;Hello world&amp;quot;] plasmoid called &amp;quot;hello-javascript&amp;quot;. Create a directory on somewhere called &amp;lt;tt&amp;gt;hello-javascript&amp;lt;/tt&amp;gt; which in turn contains a &amp;lt;tt&amp;gt;contents&amp;lt;/tt&amp;gt; directory which then contains a &amp;lt;tt&amp;gt;code&amp;lt;/tt&amp;gt; directory. This command below will do all this.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd&lt;br /&gt;
mkdir -p hello-javascript/contents/code&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The only required part of the structure, in fact, is the &amp;lt;tt&amp;gt;contents&amp;lt;/tt&amp;gt; directory - almost everything will go in this directory.  But separating your code into a different directory from application data is a good habit to have.&lt;br /&gt;
&lt;br /&gt;
=== Metadata.desktop ===&lt;br /&gt;
In the &amp;lt;tt&amp;gt;hello-javascript&amp;lt;/tt&amp;gt; directory [[Development/Tutorials/Desktop_File|create a .desktop file]] called &amp;lt;tt&amp;gt;metadata.desktop&amp;lt;/tt&amp;gt; with the following content:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
[Desktop Entry]&lt;br /&gt;
Name=Hello JavaScript&lt;br /&gt;
Comment=An example JavaScript widget&lt;br /&gt;
Icon=chronometer&lt;br /&gt;
&lt;br /&gt;
Type=Service&lt;br /&gt;
X-KDE-ServiceTypes=Plasma/Applet&lt;br /&gt;
&lt;br /&gt;
X-Plasma-API=javascript&lt;br /&gt;
X-Plasma-MainScript=code/main.js&lt;br /&gt;
X-Plasma-DefaultSize=200,100&lt;br /&gt;
&lt;br /&gt;
X-KDE-PluginInfo-Author=&amp;lt;Your name here&amp;gt;&lt;br /&gt;
X-KDE-PluginInfo-Email=&amp;lt;Your email here&amp;gt;&lt;br /&gt;
X-KDE-PluginInfo-Name=hello-javascript&lt;br /&gt;
X-KDE-PluginInfo-Version=1.0&lt;br /&gt;
X-KDE-PluginInfo-Website=http://plasma.kde.org/&lt;br /&gt;
X-KDE-PluginInfo-Category=Examples&lt;br /&gt;
X-KDE-PluginInfo-Depends=&lt;br /&gt;
X-KDE-PluginInfo-License=GPL&lt;br /&gt;
X-KDE-PluginInfo-EnabledByDefault=true&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This &amp;lt;tt&amp;gt;metadata.desktop&amp;lt;/tt&amp;gt; file list important information needed by Plasma to load the widget, and also information about what the widget is and who created it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;Name&amp;lt;/tt&amp;gt; gives the name of widget as seen by the user when they go to the Add Widget dialog on the desktop.  There can be additional name entries for different languages.  For example, you could add a Dutch translation by inserting the line &amp;lt;tt&amp;gt;Name[nl]=Hallo JavaScript&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;Comment&amp;lt;/tt&amp;gt; gives a more detailed description of the widget.  This is also displayed in the Add Widget dialog, and can be translated in the same way as &amp;lt;tt&amp;gt;Name&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;Icon&amp;lt;/tt&amp;gt; gives the name of the icon to associate with this plasmoid. The icon is shown in the Add Widget dialog.  It must be the name of an icon that is either distributed with KDE (such as &amp;lt;tt&amp;gt;chronometer&amp;lt;/tt&amp;gt;) or provided by your plasmoid. If you want to provide the icon, you can use &amp;lt;tt&amp;gt;Icon=icon.png&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;Type&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;X-KDE-ServiceTypes&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;X-Plasma-API&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;X-Plasma-MainScript&amp;lt;/tt&amp;gt; fields are required for Plasma to find your plasmoid and know what to do with it.  Note that &amp;lt;tt&amp;gt;X-Plasma-MainScript&amp;lt;/tt&amp;gt; is a path relative the &amp;lt;tt&amp;gt;contents&amp;lt;/tt&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;X-Plasma-DefaultSize&amp;lt;/tt&amp;gt; specifies the default size for widget, as &amp;lt;tt&amp;gt;width,height&amp;lt;/tt&amp;gt;.  While the units aren't technically pixels, they have the same value as pixels providing you don't do anything like zoom in or out on your desktop.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;X-KDE-PluginInfo-Category&amp;lt;/tt&amp;gt; gives a category for the widget. This is used in the Add Widgets dialog to group and filter widgets. The value must be one of the category names listed at [[Projects/Plasma/PIG]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;X-KDE-PluginInfo-Name&amp;lt;/tt&amp;gt; is the internal name of the plasmoid (you can think of this as the name of the plasmoid, as opposed to the name of the widget which is given by &amp;lt;tt&amp;gt;Name&amp;lt;/tt&amp;gt;).  This is the name you will use as an argument to &amp;lt;tt&amp;gt;plasmoidviewer&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;plasmapkg&amp;lt;/tt&amp;gt; when you need to provide a plasmoid name rather than a path.  It doesn't have to be the same name as the directory containing &amp;lt;tt&amp;gt;metadata.desktop&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;X-KDE-PluginInfo-Author&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;X-KDE-PluginInfo-Email&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;X-KDE-PluginInfo-Version&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;X-KDE-PluginInfo-Website&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;X-KDE-PluginInfo-License&amp;lt;/tt&amp;gt; are informational, and are displayed in the About dialog for the plasmoid (which can be viewed by clicking the information icon next to the corresponding widget in the Add Widgets dialog of plasma).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;X-KDE-PluginInfo-EnabledByDefault&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;X-KDE-PluginInfo-Depends&amp;lt;/tt&amp;gt; rarely need to be changed from the values given here.&lt;br /&gt;
&lt;br /&gt;
=== Main script ===&lt;br /&gt;
The name of the main script file is given by &amp;lt;tt&amp;gt;X-Plasma-MainScript&amp;lt;/tt&amp;gt; in metadata.desktop, and is relative to the &amp;lt;tt&amp;gt;contents&amp;lt;/tt&amp;gt; directory.  In our case, we will need to create the file &amp;lt;tt&amp;gt;hello-javascript/contents/code/main.js&amp;lt;/tt&amp;gt;.  Put the following code in it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
layout = new LinearLayout(plasmoid);&lt;br /&gt;
&lt;br /&gt;
label = new Label();&lt;br /&gt;
layout.addItem(label);&lt;br /&gt;
&lt;br /&gt;
label.text = 'Hello JavaScript!';&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;strong&amp;gt;plasmoid&amp;lt;/strong&amp;gt; is a global variable that represents your widget.  It has some useful methods that we'll come to in later tutorials.&lt;br /&gt;
&lt;br /&gt;
First, we create a layout, because plasmoids don't have a layout by default.  This just makes sure that the label is the correct size and in the correct place.  Passing &amp;lt;tt&amp;gt;plasmoid&amp;lt;/tt&amp;gt; to the &amp;lt;tt&amp;gt;LinearLayout&amp;lt;/tt&amp;gt; attaches the layout to the widget.&lt;br /&gt;
&lt;br /&gt;
Next we add a label to the layout, and finally we set the label text.&lt;br /&gt;
&lt;br /&gt;
=== Testing (KDE 4.3+) ===&lt;br /&gt;
If you have KDE 4.3 or later, you can test your plasmoid without installing it by entering the &amp;lt;tt&amp;gt;hello-javascript&amp;lt;/tt&amp;gt; directory and running &amp;lt;tt&amp;gt;plasmoidviewer&amp;lt;/tt&amp;gt;.  Alternatively, call &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
plasmoidviewer ~/hello-javascript&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is very convenient for development as you can edit the Plasmoid and test the changes immediately without re-installing the plasmoid over and over again.&lt;br /&gt;
&lt;br /&gt;
=== Installing ===&lt;br /&gt;
You can install the plasmoid by running the following command from within the &amp;lt;tt&amp;gt;hello-javascript&amp;lt;/tt&amp;gt; directory:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
plasmapkg -i .&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The final argument to &amp;lt;tt&amp;gt;plasmapkg&amp;lt;/tt&amp;gt; is the path to the directory containing &amp;lt;tt&amp;gt;metadata.desktop&amp;lt;/tt&amp;gt; and the &amp;lt;tt&amp;gt;contents&amp;lt;/tt&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
You can now add your widget to the desktop using the Add Widgets dialog, or view it by running&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
plasmoidviewer hello-javascript&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Packaging ===&lt;br /&gt;
If you want to share your plasmoid, you'll have to package it.  Run the following from within the &amp;lt;tt&amp;gt;hello-javascript&amp;lt;/tt&amp;gt; directory:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
zip -r ../hello-javascript.zip . &amp;amp;&amp;amp;&lt;br /&gt;
mv ../hello-javascript.zip ../hello-javascript.plasmoid&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You now have a plasmoid package you can share with the world.  To install it, either use the &amp;quot;Install new widgets&amp;quot; functionality in the Add Widgets dialog, or go to the directory containing &amp;lt;tt&amp;gt;hello-javascript.plasmoid&amp;lt;/tt&amp;gt; and run&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
plasmapkg -i hello-javascript.plasmoid&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To uninstall the plasmoid, use &amp;lt;tt&amp;gt;plasmapkg&amp;lt;/tt&amp;gt; again with its -r option:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
plasmapkg -r hello-javascript&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that while the argument to &amp;lt;tt&amp;gt;plasmapkg -i&amp;lt;/tt&amp;gt; is a file or directory, you need to pass the plasmoid name (given by &amp;lt;tt&amp;gt;X-KDE-PluginInfo-Name&amp;lt;/tt&amp;gt; in &amp;lt;tt&amp;gt;metadata.desktop&amp;lt;/tt&amp;gt;) to &amp;lt;tt&amp;gt;plasmapkg -r&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== QtScript ==&lt;br /&gt;
The Simplified JavaScript API is powered by Qt's QtScript system which provides access to a full featured ECMA Script interpreter. If it works in ECMA Script, it will work in a Simplified JavaScript Plasmoid.&lt;br /&gt;
&lt;br /&gt;
{{note|QtScript uses the high performance ECMA Script interpreter from WebKit and shares this code with QtWebKit.&lt;br /&gt;
&lt;br /&gt;
However, QtScript does not include things such as a DOM API those familiar with JavaScript from a web browser context may expect. It is ''just'' ECMA Script with Qt integration.}}&lt;br /&gt;
&lt;br /&gt;
On top of the ECMA Script language, QtScript provides Qt integration features. Probably the most useful one in the context of writing Plasmoids is the use of signals and slots which is Qt's callback mechanism. Signals may be emitted in QtScript by calling the signal method in question, a signal can be connected to a slot by using the connect() method (and disconnected with disconnect()) and any function defined in the Plasmoid may be used as a slot. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
function onClick()&lt;br /&gt;
{&lt;br /&gt;
    print(&amp;quot;We got clicked!&amp;quot;)&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function onFirstClick()&lt;br /&gt;
{&lt;br /&gt;
    print(&amp;quot;First click!&amp;quot;)&lt;br /&gt;
    button.clicked.disconnect(onFirstClick)&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
button = new PushButton&lt;br /&gt;
button.clicked.connect(onClick)&lt;br /&gt;
button.clicked.connect(onFirstClick)&lt;br /&gt;
button.clicked()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will print out:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
We got clicked!&lt;br /&gt;
First click!&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
on the console when the Plasmoid starts, and the &amp;quot;We got clicked!&amp;quot; again whenever the button is clicked by the user.&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Development/Tutorials/Plasma/JavaScript/GettingStarted</id>
		<title>Development/Tutorials/Plasma/JavaScript/GettingStarted</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Development/Tutorials/Plasma/JavaScript/GettingStarted"/>
				<updated>2013-02-25T16:05:41Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: the &amp;quot;hello world&amp;quot; program explains how to write, execute and install a program&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
{{TutorialBrowser|&lt;br /&gt;
&lt;br /&gt;
series=JavaScript Plasmoids|&lt;br /&gt;
&lt;br /&gt;
name=Introduction To Writing Plasmoids with JavaScript|&lt;br /&gt;
&lt;br /&gt;
next=[[../DataEngine|Getting Data: How to retrieve data from a DataEngine]]|&lt;br /&gt;
&lt;br /&gt;
reading=[[../API|JavaScript Plasmoid API reference]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
In this tutorial we'll cover creating a very simple Plasmoid in JavaScript, otherwise known as [http://doc.trolltech.com/latest/qtscript.html QtScript] or [http://www.ecmascript.org/ ECMAScript], to provide a Plasma widget.&lt;br /&gt;
&lt;br /&gt;
Using JavaScript doesn't require any external dependencies, since it is part of the Qt libraries.  As of KDE 4.3, the Plasma JavaScript engine is part of kdebase/runtime, and so can be used in any Plasma-based application, not just the Plasma Desktop.&lt;br /&gt;
&lt;br /&gt;
== What is a widget? ==&lt;br /&gt;
In the context of Plasma, a &amp;quot;widget&amp;quot; is a single, self-contained graphical object on the canvas. They can be added and removed individually, configured separately from other widgets, etc. These &amp;quot;mini applications&amp;quot; are sometimes referred to in other widget platforms as &amp;quot;applets&amp;quot;, &amp;quot;apps&amp;quot;, &amp;quot;gadgets&amp;quot;, &amp;quot;karambas&amp;quot;, &amp;quot;desklets&amp;quot;. We chose the word &amp;quot;widget&amp;quot; for Plasma as it is used by other some other existing systems.&lt;br /&gt;
&lt;br /&gt;
The API of a widget is defined by the host &amp;quot;ScriptEngine&amp;quot;, with the exception of native Plasma widgets written in C++ which allows plugins in loadable libraries which use the API of the Plasma library directly. Currently Plasma supports both such &amp;quot;native&amp;quot; widgets written in C++, ones written in various dynamic languages (Plasmoids) as well as:&lt;br /&gt;
&lt;br /&gt;
* SuperKaramba's karambas&lt;br /&gt;
* Enlightenment 17 edje content&lt;br /&gt;
* Google Gadgets&lt;br /&gt;
* MacOS dashboard widgets (though not all)&lt;br /&gt;
&lt;br /&gt;
These are loaded via host AppletScriptEngine plugins that bridge between the widget itself and Plasma's canvas.&lt;br /&gt;
&lt;br /&gt;
== What is a Plasmoid? ==&lt;br /&gt;
A Plasmoid is a widget that can be loaded into Plasma that uses the native Plasma API and comes packaged in a single archive file which includes the code, metadata, images, configuration definitions, etc. Plasmoids may be currently written using various scripting languages and APIs. This tutorial covers the Simplified JavaScript API for Plasmoids&lt;br /&gt;
&lt;br /&gt;
== Hello world ==&lt;br /&gt;
The first step for any software project is to set up your project's directory on disk. For this tutorial we are going to create a very simple [http://en.wikipedia.org/wiki/Hello_world &amp;quot;Hello world&amp;quot;] plasmoid called &amp;quot;hello-javascript&amp;quot;. Create a directory on somewhere called &amp;lt;tt&amp;gt;hello-javascript&amp;lt;/tt&amp;gt; which in turn contains a &amp;lt;tt&amp;gt;contents&amp;lt;/tt&amp;gt; directory which then contains a &amp;lt;tt&amp;gt;code&amp;lt;/tt&amp;gt; directory. This command below will do all this.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd&lt;br /&gt;
mkdir -p hello-javascript/contents/code&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The only required part of the structure, in fact, is the &amp;lt;tt&amp;gt;contents&amp;lt;/tt&amp;gt; directory - almost everything will go in this directory.  But separating your code into a different directory from application data is a good habit to have.&lt;br /&gt;
&lt;br /&gt;
=== Metadata.desktop ===&lt;br /&gt;
In the &amp;lt;tt&amp;gt;hello-javascript&amp;lt;/tt&amp;gt; directory create a file called &amp;lt;tt&amp;gt;metadata.desktop&amp;lt;/tt&amp;gt; and open it in your text editor. Copy the following code into &amp;lt;tt&amp;gt;metadata.desktop&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
[Desktop Entry]&lt;br /&gt;
Name=Hello JavaScript&lt;br /&gt;
Comment=An example JavaScript widget&lt;br /&gt;
Icon=chronometer&lt;br /&gt;
&lt;br /&gt;
Type=Service&lt;br /&gt;
X-KDE-ServiceTypes=Plasma/Applet&lt;br /&gt;
&lt;br /&gt;
X-Plasma-API=javascript&lt;br /&gt;
X-Plasma-MainScript=code/main.js&lt;br /&gt;
X-Plasma-DefaultSize=200,100&lt;br /&gt;
&lt;br /&gt;
X-KDE-PluginInfo-Author=&amp;lt;Your name here&amp;gt;&lt;br /&gt;
X-KDE-PluginInfo-Email=&amp;lt;Your email here&amp;gt;&lt;br /&gt;
X-KDE-PluginInfo-Name=hello-javascript&lt;br /&gt;
X-KDE-PluginInfo-Version=1.0&lt;br /&gt;
X-KDE-PluginInfo-Website=http://plasma.kde.org/&lt;br /&gt;
X-KDE-PluginInfo-Category=Examples&lt;br /&gt;
X-KDE-PluginInfo-Depends=&lt;br /&gt;
X-KDE-PluginInfo-License=GPL&lt;br /&gt;
X-KDE-PluginInfo-EnabledByDefault=true&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This &amp;lt;tt&amp;gt;metadata.desktop&amp;lt;/tt&amp;gt; file list important information needed by Plasma to load the widget, and also information about what the widget is and who created it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;Name&amp;lt;/tt&amp;gt; gives the name of widget as seen by the user when they go to the Add Widget dialog on the desktop.  There can be additional name entries for different languages.  For example, you could add a Dutch translation by inserting the line &amp;lt;tt&amp;gt;Name[nl]=Hallo JavaScript&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;Comment&amp;lt;/tt&amp;gt; gives a more detailed description of the widget.  This is also displayed in the Add Widget dialog, and can be translated in the same way as &amp;lt;tt&amp;gt;Name&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;Icon&amp;lt;/tt&amp;gt; gives the name of the icon to associate with this plasmoid. The icon is shown in the Add Widget dialog.  It must be the name of an icon that is either distributed with KDE (such as &amp;lt;tt&amp;gt;chronometer&amp;lt;/tt&amp;gt;) or provided by your plasmoid. If you want to provide the icon, you can use &amp;lt;tt&amp;gt;Icon=icon.png&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;Type&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;X-KDE-ServiceTypes&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;X-Plasma-API&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;X-Plasma-MainScript&amp;lt;/tt&amp;gt; fields are required for Plasma to find your plasmoid and know what to do with it.  Note that &amp;lt;tt&amp;gt;X-Plasma-MainScript&amp;lt;/tt&amp;gt; is a path relative the &amp;lt;tt&amp;gt;contents&amp;lt;/tt&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;X-Plasma-DefaultSize&amp;lt;/tt&amp;gt; specifies the default size for widget, as &amp;lt;tt&amp;gt;width,height&amp;lt;/tt&amp;gt;.  While the units aren't technically pixels, they have the same value as pixels providing you don't do anything like zoom in or out on your desktop.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;X-KDE-PluginInfo-Category&amp;lt;/tt&amp;gt; gives a category for the widget. This is used in the Add Widgets dialog to group and filter widgets. The value must be one of the category names listed at [[Projects/Plasma/PIG]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;X-KDE-PluginInfo-Name&amp;lt;/tt&amp;gt; is the internal name of the plasmoid (you can think of this as the name of the plasmoid, as opposed to the name of the widget which is given by &amp;lt;tt&amp;gt;Name&amp;lt;/tt&amp;gt;).  This is the name you will use as an argument to &amp;lt;tt&amp;gt;plasmoidviewer&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;plasmapkg&amp;lt;/tt&amp;gt; when you need to provide a plasmoid name rather than a path.  It doesn't have to be the same name as the directory containing &amp;lt;tt&amp;gt;metadata.desktop&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;X-KDE-PluginInfo-Author&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;X-KDE-PluginInfo-Email&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;X-KDE-PluginInfo-Version&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;X-KDE-PluginInfo-Website&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;X-KDE-PluginInfo-License&amp;lt;/tt&amp;gt; are informational, and are displayed in the About dialog for the plasmoid (which can be viewed by clicking the information icon next to the corresponding widget in the Add Widgets dialog of plasma).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;X-KDE-PluginInfo-EnabledByDefault&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;X-KDE-PluginInfo-Depends&amp;lt;/tt&amp;gt; rarely need to be changed from the values given here.&lt;br /&gt;
&lt;br /&gt;
=== Main script ===&lt;br /&gt;
The name of the main script file is given by &amp;lt;tt&amp;gt;X-Plasma-MainScript&amp;lt;/tt&amp;gt; in metadata.desktop, and is relative to the &amp;lt;tt&amp;gt;contents&amp;lt;/tt&amp;gt; directory.  In our case, we will need to create the file &amp;lt;tt&amp;gt;hello-javascript/contents/code/main.js&amp;lt;/tt&amp;gt;.  Put the following code in it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
layout = new LinearLayout(plasmoid);&lt;br /&gt;
&lt;br /&gt;
label = new Label();&lt;br /&gt;
layout.addItem(label);&lt;br /&gt;
&lt;br /&gt;
label.text = 'Hello JavaScript!';&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;strong&amp;gt;plasmoid&amp;lt;/strong&amp;gt; is a global variable that represents your widget.  It has some useful methods that we'll come to in later tutorials.&lt;br /&gt;
&lt;br /&gt;
First, we create a layout, because plasmoids don't have a layout by default.  This just makes sure that the label is the correct size and in the correct place.  Passing &amp;lt;tt&amp;gt;plasmoid&amp;lt;/tt&amp;gt; to the &amp;lt;tt&amp;gt;LinearLayout&amp;lt;/tt&amp;gt; attaches the layout to the widget.&lt;br /&gt;
&lt;br /&gt;
Next we add a label to the layout, and finally we set the label text.&lt;br /&gt;
&lt;br /&gt;
=== Testing (KDE 4.3+) ===&lt;br /&gt;
If you have KDE 4.3 or later, you can test your plasmoid without installing it by entering the &amp;lt;tt&amp;gt;hello-javascript&amp;lt;/tt&amp;gt; directory and running &amp;lt;tt&amp;gt;plasmoidviewer&amp;lt;/tt&amp;gt;.  Alternatively, call &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
plasmoidviewer ~/hello-javascript&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is very convenient for development as you can edit the Plasmoid and test the changes immediately without re-installing the plasmoid over and over again.&lt;br /&gt;
&lt;br /&gt;
=== Installing ===&lt;br /&gt;
You can install the plasmoid by running the following command from within the &amp;lt;tt&amp;gt;hello-javascript&amp;lt;/tt&amp;gt; directory:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
plasmapkg -i .&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The final argument to &amp;lt;tt&amp;gt;plasmapkg&amp;lt;/tt&amp;gt; is the path to the directory containing &amp;lt;tt&amp;gt;metadata.desktop&amp;lt;/tt&amp;gt; and the &amp;lt;tt&amp;gt;contents&amp;lt;/tt&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
You can now add your widget to the desktop using the Add Widgets dialog, or view it by running&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
plasmoidviewer hello-javascript&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Packaging ===&lt;br /&gt;
If you want to share your plasmoid, you'll have to package it.  Run the following from within the &amp;lt;tt&amp;gt;hello-javascript&amp;lt;/tt&amp;gt; directory:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
zip -r ../hello-javascript.zip . &amp;amp;&amp;amp;&lt;br /&gt;
mv ../hello-javascript.zip ../hello-javascript.plasmoid&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You now have a plasmoid package you can share with the world.  To install it, either use the &amp;quot;Install new widgets&amp;quot; functionality in the Add Widgets dialog, or go to the directory containing &amp;lt;tt&amp;gt;hello-javascript.plasmoid&amp;lt;/tt&amp;gt; and run&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
plasmapkg -i hello-javascript.plasmoid&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To uninstall the plasmoid, use &amp;lt;tt&amp;gt;plasmapkg&amp;lt;/tt&amp;gt; again with its -r option:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
plasmapkg -r hello-javascript&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that while the argument to &amp;lt;tt&amp;gt;plasmapkg -i&amp;lt;/tt&amp;gt; is a file or directory, you need to pass the plasmoid name (given by &amp;lt;tt&amp;gt;X-KDE-PluginInfo-Name&amp;lt;/tt&amp;gt; in &amp;lt;tt&amp;gt;metadata.desktop&amp;lt;/tt&amp;gt;) to &amp;lt;tt&amp;gt;plasmapkg -r&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== QtScript ==&lt;br /&gt;
The Simplified JavaScript API is powered by Qt's QtScript system which provides access to a full featured ECMA Script interpreter. If it works in ECMA Script, it will work in a Simplified JavaScript Plasmoid.&lt;br /&gt;
&lt;br /&gt;
{{note|QtScript uses the high performance ECMA Script interpreter from WebKit and shares this code with QtWebKit.&lt;br /&gt;
&lt;br /&gt;
However, QtScript does not include things such as a DOM API those familiar with JavaScript from a web browser context may expect. It is ''just'' ECMA Script with Qt integration.}}&lt;br /&gt;
&lt;br /&gt;
On top of the ECMA Script language, QtScript provides Qt integration features. Probably the most useful one in the context of writing Plasmoids is the use of signals and slots which is Qt's callback mechanism. Signals may be emitted in QtScript by calling the signal method in question, a signal can be connected to a slot by using the connect() method (and disconnected with disconnect()) and any function defined in the Plasmoid may be used as a slot. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
function onClick()&lt;br /&gt;
{&lt;br /&gt;
    print(&amp;quot;We got clicked!&amp;quot;)&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function onFirstClick()&lt;br /&gt;
{&lt;br /&gt;
    print(&amp;quot;First click!&amp;quot;)&lt;br /&gt;
    button.clicked.disconnect(onFirstClick)&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
button = new PushButton&lt;br /&gt;
button.clicked.connect(onClick)&lt;br /&gt;
button.clicked.connect(onFirstClick)&lt;br /&gt;
button.clicked()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will print out:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
We got clicked!&lt;br /&gt;
First click!&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
on the console when the Plasmoid starts, and the &amp;quot;We got clicked!&amp;quot; again whenever the button is clicked by the user.&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Development/Tutorials/Plasma/JavaScript/GettingStarted</id>
		<title>Development/Tutorials/Plasma/JavaScript/GettingStarted</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Development/Tutorials/Plasma/JavaScript/GettingStarted"/>
				<updated>2013-02-25T16:03:28Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: hello world&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
{{TutorialBrowser|&lt;br /&gt;
&lt;br /&gt;
series=JavaScript Plasmoids|&lt;br /&gt;
&lt;br /&gt;
name=Introduction To Writing Plasmoids with JavaScript|&lt;br /&gt;
&lt;br /&gt;
next=[[../DataEngine|Getting Data: How to retrieve data from a DataEngine]]|&lt;br /&gt;
&lt;br /&gt;
reading=[[../API|JavaScript Plasmoid API reference]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
In this tutorial we'll cover creating a very simple Plasmoid in JavaScript, otherwise known as [http://doc.trolltech.com/latest/qtscript.html QtScript] or [http://www.ecmascript.org/ ECMAScript], to provide a Plasma widget.&lt;br /&gt;
&lt;br /&gt;
Using JavaScript doesn't require any external dependencies, since it is part of the Qt libraries.  As of KDE 4.3, the Plasma JavaScript engine is part of kdebase/runtime, and so can be used in any Plasma-based application, not just the Plasma Desktop.&lt;br /&gt;
&lt;br /&gt;
== What is a widget? ==&lt;br /&gt;
In the context of Plasma, a &amp;quot;widget&amp;quot; is a single, self-contained graphical object on the canvas. They can be added and removed individually, configured separately from other widgets, etc. These &amp;quot;mini applications&amp;quot; are sometimes referred to in other widget platforms as &amp;quot;applets&amp;quot;, &amp;quot;apps&amp;quot;, &amp;quot;gadgets&amp;quot;, &amp;quot;karambas&amp;quot;, &amp;quot;desklets&amp;quot;. We chose the word &amp;quot;widget&amp;quot; for Plasma as it is used by other some other existing systems.&lt;br /&gt;
&lt;br /&gt;
The API of a widget is defined by the host &amp;quot;ScriptEngine&amp;quot;, with the exception of native Plasma widgets written in C++ which allows plugins in loadable libraries which use the API of the Plasma library directly. Currently Plasma supports both such &amp;quot;native&amp;quot; widgets written in C++, ones written in various dynamic languages (Plasmoids) as well as:&lt;br /&gt;
&lt;br /&gt;
* SuperKaramba's karambas&lt;br /&gt;
* Enlightenment 17 edje content&lt;br /&gt;
* Google Gadgets&lt;br /&gt;
* MacOS dashboard widgets (though not all)&lt;br /&gt;
&lt;br /&gt;
These are loaded via host AppletScriptEngine plugins that bridge between the widget itself and Plasma's canvas.&lt;br /&gt;
&lt;br /&gt;
== What is a Plasmoid? ==&lt;br /&gt;
&lt;br /&gt;
A Plasmoid is a widget that can be loaded into Plasma that uses the native Plasma API and comes packaged in a single archive file which includes the code, metadata, images, configuration definitions, etc. Plasmoids may be currently written using various scripting languages and APIs. This tutorial covers the Simplified JavaScript API for Plasmoids&lt;br /&gt;
&lt;br /&gt;
== Hello world ==&lt;br /&gt;
The first step for any software project is to set up your project's directory on disk. For this tutorial we are going to create a very simple [http://en.wikipedia.org/wiki/Hello_world &amp;quot;Hello world&amp;quot;] plasmoid called &amp;quot;hello-javascript&amp;quot;. Create a directory on somewhere called &amp;lt;tt&amp;gt;hello-javascript&amp;lt;/tt&amp;gt; which in turn contains a &amp;lt;tt&amp;gt;contents&amp;lt;/tt&amp;gt; directory which then contains a &amp;lt;tt&amp;gt;code&amp;lt;/tt&amp;gt; directory. This command below will do all this.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd&lt;br /&gt;
mkdir -p hello-javascript/contents/code&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The only required part of the structure, in fact, is the &amp;lt;tt&amp;gt;contents&amp;lt;/tt&amp;gt; directory - almost everything will go in this directory.  But separating your code into a different directory from application data is a good habit to have.&lt;br /&gt;
&lt;br /&gt;
== Metadata.desktop ==&lt;br /&gt;
&lt;br /&gt;
In the &amp;lt;tt&amp;gt;hello-javascript&amp;lt;/tt&amp;gt; directory create a file called &amp;lt;tt&amp;gt;metadata.desktop&amp;lt;/tt&amp;gt; and open it in your text editor. Copy the following code into &amp;lt;tt&amp;gt;metadata.desktop&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
[Desktop Entry]&lt;br /&gt;
Name=Hello JavaScript&lt;br /&gt;
Comment=An example JavaScript widget&lt;br /&gt;
Icon=chronometer&lt;br /&gt;
&lt;br /&gt;
Type=Service&lt;br /&gt;
X-KDE-ServiceTypes=Plasma/Applet&lt;br /&gt;
&lt;br /&gt;
X-Plasma-API=javascript&lt;br /&gt;
X-Plasma-MainScript=code/main.js&lt;br /&gt;
X-Plasma-DefaultSize=200,100&lt;br /&gt;
&lt;br /&gt;
X-KDE-PluginInfo-Author=&amp;lt;Your name here&amp;gt;&lt;br /&gt;
X-KDE-PluginInfo-Email=&amp;lt;Your email here&amp;gt;&lt;br /&gt;
X-KDE-PluginInfo-Name=hello-javascript&lt;br /&gt;
X-KDE-PluginInfo-Version=1.0&lt;br /&gt;
X-KDE-PluginInfo-Website=http://plasma.kde.org/&lt;br /&gt;
X-KDE-PluginInfo-Category=Examples&lt;br /&gt;
X-KDE-PluginInfo-Depends=&lt;br /&gt;
X-KDE-PluginInfo-License=GPL&lt;br /&gt;
X-KDE-PluginInfo-EnabledByDefault=true&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This &amp;lt;tt&amp;gt;metadata.desktop&amp;lt;/tt&amp;gt; file list important information needed by Plasma to load the widget, and also information about what the widget is and who created it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;Name&amp;lt;/tt&amp;gt; gives the name of widget as seen by the user when they go to the Add Widget dialog on the desktop.  There can be additional name entries for different languages.  For example, you could add a Dutch translation by inserting the line &amp;lt;tt&amp;gt;Name[nl]=Hallo JavaScript&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;Comment&amp;lt;/tt&amp;gt; gives a more detailed description of the widget.  This is also displayed in the Add Widget dialog, and can be translated in the same way as &amp;lt;tt&amp;gt;Name&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;Icon&amp;lt;/tt&amp;gt; gives the name of the icon to associate with this plasmoid. The icon is shown in the Add Widget dialog.  It must be the name of an icon that is either distributed with KDE (such as &amp;lt;tt&amp;gt;chronometer&amp;lt;/tt&amp;gt;) or provided by your plasmoid. If you want to provide the icon, you can use &amp;lt;tt&amp;gt;Icon=icon.png&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;Type&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;X-KDE-ServiceTypes&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;X-Plasma-API&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;X-Plasma-MainScript&amp;lt;/tt&amp;gt; fields are required for Plasma to find your plasmoid and know what to do with it.  Note that &amp;lt;tt&amp;gt;X-Plasma-MainScript&amp;lt;/tt&amp;gt; is a path relative the &amp;lt;tt&amp;gt;contents&amp;lt;/tt&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;X-Plasma-DefaultSize&amp;lt;/tt&amp;gt; specifies the default size for widget, as &amp;lt;tt&amp;gt;width,height&amp;lt;/tt&amp;gt;.  While the units aren't technically pixels, they have the same value as pixels providing you don't do anything like zoom in or out on your desktop.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;X-KDE-PluginInfo-Category&amp;lt;/tt&amp;gt; gives a category for the widget. This is used in the Add Widgets dialog to group and filter widgets. The value must be one of the category names listed at [[Projects/Plasma/PIG]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;X-KDE-PluginInfo-Name&amp;lt;/tt&amp;gt; is the internal name of the plasmoid (you can think of this as the name of the plasmoid, as opposed to the name of the widget which is given by &amp;lt;tt&amp;gt;Name&amp;lt;/tt&amp;gt;).  This is the name you will use as an argument to &amp;lt;tt&amp;gt;plasmoidviewer&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;plasmapkg&amp;lt;/tt&amp;gt; when you need to provide a plasmoid name rather than a path.  It doesn't have to be the same name as the directory containing &amp;lt;tt&amp;gt;metadata.desktop&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;X-KDE-PluginInfo-Author&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;X-KDE-PluginInfo-Email&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;X-KDE-PluginInfo-Version&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;X-KDE-PluginInfo-Website&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;X-KDE-PluginInfo-License&amp;lt;/tt&amp;gt; are informational, and are displayed in the About dialog for the plasmoid (which can be viewed by clicking the information icon next to the corresponding widget in the Add Widgets dialog of plasma).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;X-KDE-PluginInfo-EnabledByDefault&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;X-KDE-PluginInfo-Depends&amp;lt;/tt&amp;gt; rarely need to be changed from the values given here.&lt;br /&gt;
&lt;br /&gt;
== Main script ==&lt;br /&gt;
&lt;br /&gt;
The name of the main script file is given by &amp;lt;tt&amp;gt;X-Plasma-MainScript&amp;lt;/tt&amp;gt; in metadata.desktop, and is relative to the &amp;lt;tt&amp;gt;contents&amp;lt;/tt&amp;gt; directory.  In our case, we will need to create the file &amp;lt;tt&amp;gt;hello-javascript/contents/code/main.js&amp;lt;/tt&amp;gt;.  Put the following code in it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
layout = new LinearLayout(plasmoid);&lt;br /&gt;
&lt;br /&gt;
label = new Label();&lt;br /&gt;
layout.addItem(label);&lt;br /&gt;
&lt;br /&gt;
label.text = 'Hello JavaScript!';&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;strong&amp;gt;plasmoid&amp;lt;/strong&amp;gt; is a global variable that represents your widget.  It has some useful methods that we'll come to in later tutorials.&lt;br /&gt;
&lt;br /&gt;
First, we create a layout, because plasmoids don't have a layout by default.  This just makes sure that the label is the correct size and in the correct place.  Passing &amp;lt;tt&amp;gt;plasmoid&amp;lt;/tt&amp;gt; to the &amp;lt;tt&amp;gt;LinearLayout&amp;lt;/tt&amp;gt; attaches the layout to the widget.&lt;br /&gt;
&lt;br /&gt;
Next we add a label to the layout, and finally we set the label text.&lt;br /&gt;
&lt;br /&gt;
== Testing (KDE 4.3+) ==&lt;br /&gt;
&lt;br /&gt;
If you have KDE 4.3 or later, you can test your plasmoid without installing it by entering the &amp;lt;tt&amp;gt;hello-javascript&amp;lt;/tt&amp;gt; directory and running &amp;lt;tt&amp;gt;plasmoidviewer&amp;lt;/tt&amp;gt;.  Alternatively, call &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
plasmoidviewer ~/hello-javascript&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is very convenient for development as you can edit the Plasmoid and test the changes immediately without re-installing the plasmoid over and over again.&lt;br /&gt;
&lt;br /&gt;
== Installing ==&lt;br /&gt;
&lt;br /&gt;
You can install the plasmoid by running the following command from within the &amp;lt;tt&amp;gt;hello-javascript&amp;lt;/tt&amp;gt; directory:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
plasmapkg -i .&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The final argument to &amp;lt;tt&amp;gt;plasmapkg&amp;lt;/tt&amp;gt; is the path to the directory containing &amp;lt;tt&amp;gt;metadata.desktop&amp;lt;/tt&amp;gt; and the &amp;lt;tt&amp;gt;contents&amp;lt;/tt&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
You can now add your widget to the desktop using the Add Widgets dialog, or view it by running&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
plasmoidviewer hello-javascript&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Packaging ==&lt;br /&gt;
&lt;br /&gt;
If you want to share your plasmoid, you'll have to package it.  Run the following from within the &amp;lt;tt&amp;gt;hello-javascript&amp;lt;/tt&amp;gt; directory:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
zip -r ../hello-javascript.zip . &amp;amp;&amp;amp;&lt;br /&gt;
mv ../hello-javascript.zip ../hello-javascript.plasmoid&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You now have a plasmoid package you can share with the world.  To install it, either use the &amp;quot;Install new widgets&amp;quot; functionality in the Add Widgets dialog, or go to the directory containing &amp;lt;tt&amp;gt;hello-javascript.plasmoid&amp;lt;/tt&amp;gt; and run&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
plasmapkg -i hello-javascript.plasmoid&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To uninstall the plasmoid, use &amp;lt;tt&amp;gt;plasmapkg&amp;lt;/tt&amp;gt; again with its -r option:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
plasmapkg -r hello-javascript&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that while the argument to &amp;lt;tt&amp;gt;plasmapkg -i&amp;lt;/tt&amp;gt; is a file or directory, you need to pass the plasmoid name (given by &amp;lt;tt&amp;gt;X-KDE-PluginInfo-Name&amp;lt;/tt&amp;gt; in &amp;lt;tt&amp;gt;metadata.desktop&amp;lt;/tt&amp;gt;) to &amp;lt;tt&amp;gt;plasmapkg -r&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== QtScript ==&lt;br /&gt;
The Simplified JavaScript API is powered by Qt's QtScript system which provides access to a full featured ECMA Script interpreter. If it works in ECMA Script, it will work in a Simplified JavaScript Plasmoid.&lt;br /&gt;
&lt;br /&gt;
{{note|QtScript uses the high performance ECMA Script interpreter from WebKit and shares this code with QtWebKit.&lt;br /&gt;
&lt;br /&gt;
However, QtScript does not include things such as a DOM API those familiar with JavaScript from a web browser context may expect. It is ''just'' ECMA Script with Qt integration.}}&lt;br /&gt;
&lt;br /&gt;
On top of the ECMA Script language, QtScript provides Qt integration features. Probably the most useful one in the context of writing Plasmoids is the use of signals and slots which is Qt's callback mechanism. Signals may be emitted in QtScript by calling the signal method in question, a signal can be connected to a slot by using the connect() method (and disconnected with disconnect()) and any function defined in the Plasmoid may be used as a slot. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
function onClick()&lt;br /&gt;
{&lt;br /&gt;
    print(&amp;quot;We got clicked!&amp;quot;)&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function onFirstClick()&lt;br /&gt;
{&lt;br /&gt;
    print(&amp;quot;First click!&amp;quot;)&lt;br /&gt;
    button.clicked.disconnect(onFirstClick)&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
button = new PushButton&lt;br /&gt;
button.clicked.connect(onClick)&lt;br /&gt;
button.clicked.connect(onFirstClick)&lt;br /&gt;
button.clicked()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will print out:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
We got clicked!&lt;br /&gt;
First click!&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
on the console when the Plasmoid starts, and the &amp;quot;We got clicked!&amp;quot; again whenever the button is clicked by the user.&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Development/Tutorials/Plasma/JavaScript/GettingStarted</id>
		<title>Development/Tutorials/Plasma/JavaScript/GettingStarted</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Development/Tutorials/Plasma/JavaScript/GettingStarted"/>
				<updated>2013-02-25T16:01:27Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: this was very confusing. I thought this script was a &amp;quot;hello world&amp;quot; example, but it does not even explain how you execute it.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
{{TutorialBrowser|&lt;br /&gt;
&lt;br /&gt;
series=JavaScript Plasmoids|&lt;br /&gt;
&lt;br /&gt;
name=Introduction To Writing Plasmoids with JavaScript|&lt;br /&gt;
&lt;br /&gt;
next=[[../DataEngine|Getting Data: How to retrieve data from a DataEngine]]|&lt;br /&gt;
&lt;br /&gt;
reading=[[../API|JavaScript Plasmoid API reference]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
In this tutorial we'll cover creating a very simple Plasmoid in JavaScript, otherwise known as [http://doc.trolltech.com/latest/qtscript.html QtScript] or [http://www.ecmascript.org/ ECMAScript], to provide a Plasma widget.&lt;br /&gt;
&lt;br /&gt;
Using JavaScript doesn't require any external dependencies, since it is part of the Qt libraries.  As of KDE 4.3, the Plasma JavaScript engine is part of kdebase/runtime, and so can be used in any Plasma-based application, not just the Plasma Desktop.&lt;br /&gt;
&lt;br /&gt;
== What is a widget? ==&lt;br /&gt;
In the context of Plasma, a &amp;quot;widget&amp;quot; is a single, self-contained graphical object on the canvas. They can be added and removed individually, configured separately from other widgets, etc. These &amp;quot;mini applications&amp;quot; are sometimes referred to in other widget platforms as &amp;quot;applets&amp;quot;, &amp;quot;apps&amp;quot;, &amp;quot;gadgets&amp;quot;, &amp;quot;karambas&amp;quot;, &amp;quot;desklets&amp;quot;. We chose the word &amp;quot;widget&amp;quot; for Plasma as it is used by other some other existing systems.&lt;br /&gt;
&lt;br /&gt;
The API of a widget is defined by the host &amp;quot;ScriptEngine&amp;quot;, with the exception of native Plasma widgets written in C++ which allows plugins in loadable libraries which use the API of the Plasma library directly. Currently Plasma supports both such &amp;quot;native&amp;quot; widgets written in C++, ones written in various dynamic languages (Plasmoids) as well as:&lt;br /&gt;
&lt;br /&gt;
* SuperKaramba's karambas&lt;br /&gt;
* Enlightenment 17 edje content&lt;br /&gt;
* Google Gadgets&lt;br /&gt;
* MacOS dashboard widgets (though not all)&lt;br /&gt;
&lt;br /&gt;
These are loaded via host AppletScriptEngine plugins that bridge between the widget itself and Plasma's canvas.&lt;br /&gt;
&lt;br /&gt;
== What is a Plasmoid? ==&lt;br /&gt;
&lt;br /&gt;
A Plasmoid is a widget that can be loaded into Plasma that uses the native Plasma API and comes packaged in a single archive file which includes the code, metadata, images, configuration definitions, etc. Plasmoids may be currently written using various scripting languages and APIs. This tutorial covers the Simplified JavaScript API for Plasmoids&lt;br /&gt;
&lt;br /&gt;
== Project Structure ==&lt;br /&gt;
&lt;br /&gt;
The first step for any software project is to set up your project's directory on disk. For this tutorial we are going to create a very simple &amp;quot;hello-javascript&amp;quot; plasmoid. Create a directory on somewhere called &amp;lt;tt&amp;gt;hello-javascript&amp;lt;/tt&amp;gt; which in turn contains a &amp;lt;tt&amp;gt;contents&amp;lt;/tt&amp;gt; directory which then contains a &amp;lt;tt&amp;gt;code&amp;lt;/tt&amp;gt; directory. This command below will do all this.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd&lt;br /&gt;
mkdir -p hello-javascript/contents/code&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The only required part of the structure, in fact, is the &amp;lt;tt&amp;gt;contents&amp;lt;/tt&amp;gt; directory - almost everything will go in this directory.  But separating your code into a different directory from application data is a good habit to have.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Metadata.desktop ==&lt;br /&gt;
&lt;br /&gt;
In the &amp;lt;tt&amp;gt;hello-javascript&amp;lt;/tt&amp;gt; directory create a file called &amp;lt;tt&amp;gt;metadata.desktop&amp;lt;/tt&amp;gt; and open it in your text editor. Copy the following code into &amp;lt;tt&amp;gt;metadata.desktop&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
[Desktop Entry]&lt;br /&gt;
Name=Hello JavaScript&lt;br /&gt;
Comment=An example JavaScript widget&lt;br /&gt;
Icon=chronometer&lt;br /&gt;
&lt;br /&gt;
Type=Service&lt;br /&gt;
X-KDE-ServiceTypes=Plasma/Applet&lt;br /&gt;
&lt;br /&gt;
X-Plasma-API=javascript&lt;br /&gt;
X-Plasma-MainScript=code/main.js&lt;br /&gt;
X-Plasma-DefaultSize=200,100&lt;br /&gt;
&lt;br /&gt;
X-KDE-PluginInfo-Author=&amp;lt;Your name here&amp;gt;&lt;br /&gt;
X-KDE-PluginInfo-Email=&amp;lt;Your email here&amp;gt;&lt;br /&gt;
X-KDE-PluginInfo-Name=hello-javascript&lt;br /&gt;
X-KDE-PluginInfo-Version=1.0&lt;br /&gt;
X-KDE-PluginInfo-Website=http://plasma.kde.org/&lt;br /&gt;
X-KDE-PluginInfo-Category=Examples&lt;br /&gt;
X-KDE-PluginInfo-Depends=&lt;br /&gt;
X-KDE-PluginInfo-License=GPL&lt;br /&gt;
X-KDE-PluginInfo-EnabledByDefault=true&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This &amp;lt;tt&amp;gt;metadata.desktop&amp;lt;/tt&amp;gt; file list important information needed by Plasma to load the widget, and also information about what the widget is and who created it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;Name&amp;lt;/tt&amp;gt; gives the name of widget as seen by the user when they go to the Add Widget dialog on the desktop.  There can be additional name entries for different languages.  For example, you could add a Dutch translation by inserting the line &amp;lt;tt&amp;gt;Name[nl]=Hallo JavaScript&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;Comment&amp;lt;/tt&amp;gt; gives a more detailed description of the widget.  This is also displayed in the Add Widget dialog, and can be translated in the same way as &amp;lt;tt&amp;gt;Name&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;Icon&amp;lt;/tt&amp;gt; gives the name of the icon to associate with this plasmoid. The icon is shown in the Add Widget dialog.  It must be the name of an icon that is either distributed with KDE (such as &amp;lt;tt&amp;gt;chronometer&amp;lt;/tt&amp;gt;) or provided by your plasmoid. If you want to provide the icon, you can use &amp;lt;tt&amp;gt;Icon=icon.png&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;Type&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;X-KDE-ServiceTypes&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;X-Plasma-API&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;X-Plasma-MainScript&amp;lt;/tt&amp;gt; fields are required for Plasma to find your plasmoid and know what to do with it.  Note that &amp;lt;tt&amp;gt;X-Plasma-MainScript&amp;lt;/tt&amp;gt; is a path relative the &amp;lt;tt&amp;gt;contents&amp;lt;/tt&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;X-Plasma-DefaultSize&amp;lt;/tt&amp;gt; specifies the default size for widget, as &amp;lt;tt&amp;gt;width,height&amp;lt;/tt&amp;gt;.  While the units aren't technically pixels, they have the same value as pixels providing you don't do anything like zoom in or out on your desktop.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;X-KDE-PluginInfo-Category&amp;lt;/tt&amp;gt; gives a category for the widget. This is used in the Add Widgets dialog to group and filter widgets. The value must be one of the category names listed at [[Projects/Plasma/PIG]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;X-KDE-PluginInfo-Name&amp;lt;/tt&amp;gt; is the internal name of the plasmoid (you can think of this as the name of the plasmoid, as opposed to the name of the widget which is given by &amp;lt;tt&amp;gt;Name&amp;lt;/tt&amp;gt;).  This is the name you will use as an argument to &amp;lt;tt&amp;gt;plasmoidviewer&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;plasmapkg&amp;lt;/tt&amp;gt; when you need to provide a plasmoid name rather than a path.  It doesn't have to be the same name as the directory containing &amp;lt;tt&amp;gt;metadata.desktop&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;X-KDE-PluginInfo-Author&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;X-KDE-PluginInfo-Email&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;X-KDE-PluginInfo-Version&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;X-KDE-PluginInfo-Website&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;X-KDE-PluginInfo-License&amp;lt;/tt&amp;gt; are informational, and are displayed in the About dialog for the plasmoid (which can be viewed by clicking the information icon next to the corresponding widget in the Add Widgets dialog of plasma).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;X-KDE-PluginInfo-EnabledByDefault&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;X-KDE-PluginInfo-Depends&amp;lt;/tt&amp;gt; rarely need to be changed from the values given here.&lt;br /&gt;
&lt;br /&gt;
== Main script ==&lt;br /&gt;
&lt;br /&gt;
The name of the main script file is given by &amp;lt;tt&amp;gt;X-Plasma-MainScript&amp;lt;/tt&amp;gt; in metadata.desktop, and is relative to the &amp;lt;tt&amp;gt;contents&amp;lt;/tt&amp;gt; directory.  In our case, we will need to create the file &amp;lt;tt&amp;gt;hello-javascript/contents/code/main.js&amp;lt;/tt&amp;gt;.  Put the following code in it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
layout = new LinearLayout(plasmoid);&lt;br /&gt;
&lt;br /&gt;
label = new Label();&lt;br /&gt;
layout.addItem(label);&lt;br /&gt;
&lt;br /&gt;
label.text = 'Hello JavaScript!';&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;strong&amp;gt;plasmoid&amp;lt;/strong&amp;gt; is a global variable that represents your widget.  It has some useful methods that we'll come to in later tutorials.&lt;br /&gt;
&lt;br /&gt;
First, we create a layout, because plasmoids don't have a layout by default.  This just makes sure that the label is the correct size and in the correct place.  Passing &amp;lt;tt&amp;gt;plasmoid&amp;lt;/tt&amp;gt; to the &amp;lt;tt&amp;gt;LinearLayout&amp;lt;/tt&amp;gt; attaches the layout to the widget.&lt;br /&gt;
&lt;br /&gt;
Next we add a label to the layout, and finally we set the label text.&lt;br /&gt;
&lt;br /&gt;
== Testing (KDE 4.3+) ==&lt;br /&gt;
&lt;br /&gt;
If you have KDE 4.3 or later, you can test your plasmoid without installing it by entering the &amp;lt;tt&amp;gt;hello-javascript&amp;lt;/tt&amp;gt; directory and running &amp;lt;tt&amp;gt;plasmoidviewer&amp;lt;/tt&amp;gt;.  Alternatively, call &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
plasmoidviewer ~/hello-javascript&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is very convenient for development as you can edit the Plasmoid and test the changes immediately without re-installing the plasmoid over and over again.&lt;br /&gt;
&lt;br /&gt;
== Installing ==&lt;br /&gt;
&lt;br /&gt;
You can install the plasmoid by running the following command from within the &amp;lt;tt&amp;gt;hello-javascript&amp;lt;/tt&amp;gt; directory:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
plasmapkg -i .&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The final argument to &amp;lt;tt&amp;gt;plasmapkg&amp;lt;/tt&amp;gt; is the path to the directory containing &amp;lt;tt&amp;gt;metadata.desktop&amp;lt;/tt&amp;gt; and the &amp;lt;tt&amp;gt;contents&amp;lt;/tt&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
You can now add your widget to the desktop using the Add Widgets dialog, or view it by running&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
plasmoidviewer hello-javascript&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Packaging ==&lt;br /&gt;
&lt;br /&gt;
If you want to share your plasmoid, you'll have to package it.  Run the following from within the &amp;lt;tt&amp;gt;hello-javascript&amp;lt;/tt&amp;gt; directory:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
zip -r ../hello-javascript.zip . &amp;amp;&amp;amp;&lt;br /&gt;
mv ../hello-javascript.zip ../hello-javascript.plasmoid&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You now have a plasmoid package you can share with the world.  To install it, either use the &amp;quot;Install new widgets&amp;quot; functionality in the Add Widgets dialog, or go to the directory containing &amp;lt;tt&amp;gt;hello-javascript.plasmoid&amp;lt;/tt&amp;gt; and run&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
plasmapkg -i hello-javascript.plasmoid&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To uninstall the plasmoid, use &amp;lt;tt&amp;gt;plasmapkg&amp;lt;/tt&amp;gt; again with its -r option:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
plasmapkg -r hello-javascript&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that while the argument to &amp;lt;tt&amp;gt;plasmapkg -i&amp;lt;/tt&amp;gt; is a file or directory, you need to pass the plasmoid name (given by &amp;lt;tt&amp;gt;X-KDE-PluginInfo-Name&amp;lt;/tt&amp;gt; in &amp;lt;tt&amp;gt;metadata.desktop&amp;lt;/tt&amp;gt;) to &amp;lt;tt&amp;gt;plasmapkg -r&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== QtScript ==&lt;br /&gt;
The Simplified JavaScript API is powered by Qt's QtScript system which provides access to a full featured ECMA Script interpreter. If it works in ECMA Script, it will work in a Simplified JavaScript Plasmoid.&lt;br /&gt;
&lt;br /&gt;
{{note|QtScript uses the high performance ECMA Script interpreter from WebKit and shares this code with QtWebKit.&lt;br /&gt;
&lt;br /&gt;
However, QtScript does not include things such as a DOM API those familiar with JavaScript from a web browser context may expect. It is ''just'' ECMA Script with Qt integration.}}&lt;br /&gt;
&lt;br /&gt;
On top of the ECMA Script language, QtScript provides Qt integration features. Probably the most useful one in the context of writing Plasmoids is the use of signals and slots which is Qt's callback mechanism. Signals may be emitted in QtScript by calling the signal method in question, a signal can be connected to a slot by using the connect() method (and disconnected with disconnect()) and any function defined in the Plasmoid may be used as a slot. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
function onClick()&lt;br /&gt;
{&lt;br /&gt;
    print(&amp;quot;We got clicked!&amp;quot;)&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function onFirstClick()&lt;br /&gt;
{&lt;br /&gt;
    print(&amp;quot;First click!&amp;quot;)&lt;br /&gt;
    button.clicked.disconnect(onFirstClick)&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
button = new PushButton&lt;br /&gt;
button.clicked.connect(onClick)&lt;br /&gt;
button.clicked.connect(onFirstClick)&lt;br /&gt;
button.clicked()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will print out:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
We got clicked!&lt;br /&gt;
First click!&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
on the console when the Plasmoid starts, and the &amp;quot;We got clicked!&amp;quot; again whenever the button is clicked by the user.&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Thread:Talk:Development/Tutorials/Plasma/JavaScript/GettingStarted/good_work</id>
		<title>Thread:Talk:Development/Tutorials/Plasma/JavaScript/GettingStarted/good work</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Thread:Talk:Development/Tutorials/Plasma/JavaScript/GettingStarted/good_work"/>
				<updated>2013-02-25T15:45:13Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: New thread: good work&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;good work. That's all --[[User:Tstaerk|Tstaerk]] ([[User talk:Tstaerk|talk]]) 15:45, 25 February 2013 (UTC)&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Development/Tutorials/Plasma/JavaScript/GettingStarted</id>
		<title>Development/Tutorials/Plasma/JavaScript/GettingStarted</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Development/Tutorials/Plasma/JavaScript/GettingStarted"/>
				<updated>2013-02-25T15:44:03Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: give the user a clear direction. Don't say /path/to/javascript if he does not know the path to javascript.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
{{TutorialBrowser|&lt;br /&gt;
&lt;br /&gt;
series=JavaScript Plasmoids|&lt;br /&gt;
&lt;br /&gt;
name=Introduction To Writing Plasmoids with JavaScript|&lt;br /&gt;
&lt;br /&gt;
next=[[../DataEngine|Getting Data: How to retrieve data from a DataEngine]]|&lt;br /&gt;
&lt;br /&gt;
reading=[[../API|JavaScript Plasmoid API reference]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
In this tutorial we'll cover creating a very simple Plasmoid in JavaScript, otherwise known as [http://doc.trolltech.com/latest/qtscript.html QtScript] or [http://www.ecmascript.org/ ECMAScript], to provide a Plasma widget.&lt;br /&gt;
&lt;br /&gt;
Using JavaScript doesn't require any external dependencies, since it is part of the Qt libraries.  As of KDE 4.3, the Plasma JavaScript engine is part of kdebase/runtime, and so can be used in any Plasma-based application, not just the Plasma Desktop.&lt;br /&gt;
&lt;br /&gt;
== QtScript ==&lt;br /&gt;
The Simplified JavaScript API is powered by Qt's QtScript system which provides access to a full featured ECMA Script interpreter. If it works in ECMA Script, it will work in a Simplified JavaScript Plasmoid.&lt;br /&gt;
&lt;br /&gt;
{{note|QtScript uses the high performance ECMA Script interpreter from WebKit and shares this code with QtWebKit.&lt;br /&gt;
&lt;br /&gt;
However, QtScript does not include things such as a DOM API those familiar with JavaScript from a web browser context may expect. It is ''just'' ECMA Script with Qt integration.}}&lt;br /&gt;
&lt;br /&gt;
On top of the ECMA Script language, QtScript provides Qt integration features. Probably the most useful one in the context of writing Plasmoids is the use of signals and slots which is Qt's callback mechanism. Signals may be emitted in QtScript by calling the signal method in question, a signal can be connected to a slot by using the connect() method (and disconnected with disconnect()) and any function defined in the Plasmoid may be used as a slot. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
function onClick()&lt;br /&gt;
{&lt;br /&gt;
    print(&amp;quot;We got clicked!&amp;quot;)&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function onFirstClick()&lt;br /&gt;
{&lt;br /&gt;
    print(&amp;quot;First click!&amp;quot;)&lt;br /&gt;
    button.clicked.disconnect(onFirstClick)&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
button = new PushButton&lt;br /&gt;
button.clicked.connect(onClick)&lt;br /&gt;
button.clicked.connect(onFirstClick)&lt;br /&gt;
button.clicked()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will print out:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
We got clicked!&lt;br /&gt;
First click!&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
on the console when the Plasmoid starts, and the &amp;quot;We got clicked!&amp;quot; again whenever the button is clicked by the user.&lt;br /&gt;
&lt;br /&gt;
== What is a widget? ==&lt;br /&gt;
In the context of Plasma, a &amp;quot;widget&amp;quot; is a single, self-contained graphical object on the canvas. They can be added and removed individually, configured separately from other widgets, etc. These &amp;quot;mini applications&amp;quot; are sometimes referred to in other widget platforms as &amp;quot;applets&amp;quot;, &amp;quot;apps&amp;quot;, &amp;quot;gadgets&amp;quot;, &amp;quot;karambas&amp;quot;, &amp;quot;desklets&amp;quot;. We chose the word &amp;quot;widget&amp;quot; for Plasma as it is used by other some other existing systems.&lt;br /&gt;
&lt;br /&gt;
The API of a widget is defined by the host &amp;quot;ScriptEngine&amp;quot;, with the exception of native Plasma widgets written in C++ which allows plugins in loadable libraries which use the API of the Plasma library directly. Currently Plasma supports both such &amp;quot;native&amp;quot; widgets written in C++, ones written in various dynamic languages (Plasmoids) as well as:&lt;br /&gt;
&lt;br /&gt;
* SuperKaramba's karambas&lt;br /&gt;
* Enlightenment 17 edje content&lt;br /&gt;
* Google Gadgets&lt;br /&gt;
* MacOS dashboard widgets (though not all)&lt;br /&gt;
&lt;br /&gt;
These are loaded via host AppletScriptEngine plugins that bridge between the widget itself and Plasma's canvas.&lt;br /&gt;
&lt;br /&gt;
== What is a Plasmoid? ==&lt;br /&gt;
&lt;br /&gt;
A Plasmoid is a widget that can be loaded into Plasma that uses the native Plasma API and comes packaged in a single archive file which includes the code, metadata, images, configuration definitions, etc. Plasmoids may be currently written using various scripting languages and APIs. This tutorial covers the Simplified JavaScript API for Plasmoids&lt;br /&gt;
&lt;br /&gt;
== Project Structure ==&lt;br /&gt;
&lt;br /&gt;
The first step for any software project is to set up your project's directory on disk. For this tutorial we are going to create a very simple &amp;quot;hello-javascript&amp;quot; plasmoid. Create a directory on somewhere called &amp;lt;tt&amp;gt;hello-javascript&amp;lt;/tt&amp;gt; which in turn contains a &amp;lt;tt&amp;gt;contents&amp;lt;/tt&amp;gt; directory which then contains a &amp;lt;tt&amp;gt;code&amp;lt;/tt&amp;gt; directory. This command below will do all this.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd&lt;br /&gt;
mkdir -p hello-javascript/contents/code&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The only required part of the structure, in fact, is the &amp;lt;tt&amp;gt;contents&amp;lt;/tt&amp;gt; directory - almost everything will go in this directory.  But separating your code into a different directory from application data is a good habit to have.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Metadata.desktop ==&lt;br /&gt;
&lt;br /&gt;
In the &amp;lt;tt&amp;gt;hello-javascript&amp;lt;/tt&amp;gt; directory create a file called &amp;lt;tt&amp;gt;metadata.desktop&amp;lt;/tt&amp;gt; and open it in your text editor. Copy the following code into &amp;lt;tt&amp;gt;metadata.desktop&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
[Desktop Entry]&lt;br /&gt;
Name=Hello JavaScript&lt;br /&gt;
Comment=An example JavaScript widget&lt;br /&gt;
Icon=chronometer&lt;br /&gt;
&lt;br /&gt;
Type=Service&lt;br /&gt;
X-KDE-ServiceTypes=Plasma/Applet&lt;br /&gt;
&lt;br /&gt;
X-Plasma-API=javascript&lt;br /&gt;
X-Plasma-MainScript=code/main.js&lt;br /&gt;
X-Plasma-DefaultSize=200,100&lt;br /&gt;
&lt;br /&gt;
X-KDE-PluginInfo-Author=&amp;lt;Your name here&amp;gt;&lt;br /&gt;
X-KDE-PluginInfo-Email=&amp;lt;Your email here&amp;gt;&lt;br /&gt;
X-KDE-PluginInfo-Name=hello-javascript&lt;br /&gt;
X-KDE-PluginInfo-Version=1.0&lt;br /&gt;
X-KDE-PluginInfo-Website=http://plasma.kde.org/&lt;br /&gt;
X-KDE-PluginInfo-Category=Examples&lt;br /&gt;
X-KDE-PluginInfo-Depends=&lt;br /&gt;
X-KDE-PluginInfo-License=GPL&lt;br /&gt;
X-KDE-PluginInfo-EnabledByDefault=true&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This &amp;lt;tt&amp;gt;metadata.desktop&amp;lt;/tt&amp;gt; file list important information needed by Plasma to load the widget, and also information about what the widget is and who created it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;Name&amp;lt;/tt&amp;gt; gives the name of widget as seen by the user when they go to the Add Widget dialog on the desktop.  There can be additional name entries for different languages.  For example, you could add a Dutch translation by inserting the line &amp;lt;tt&amp;gt;Name[nl]=Hallo JavaScript&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;Comment&amp;lt;/tt&amp;gt; gives a more detailed description of the widget.  This is also displayed in the Add Widget dialog, and can be translated in the same way as &amp;lt;tt&amp;gt;Name&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;Icon&amp;lt;/tt&amp;gt; gives the name of the icon to associate with this plasmoid. The icon is shown in the Add Widget dialog.  It must be the name of an icon that is either distributed with KDE (such as &amp;lt;tt&amp;gt;chronometer&amp;lt;/tt&amp;gt;) or provided by your plasmoid. If you want to provide the icon, you can use &amp;lt;tt&amp;gt;Icon=icon.png&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;Type&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;X-KDE-ServiceTypes&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;X-Plasma-API&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;X-Plasma-MainScript&amp;lt;/tt&amp;gt; fields are required for Plasma to find your plasmoid and know what to do with it.  Note that &amp;lt;tt&amp;gt;X-Plasma-MainScript&amp;lt;/tt&amp;gt; is a path relative the &amp;lt;tt&amp;gt;contents&amp;lt;/tt&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;X-Plasma-DefaultSize&amp;lt;/tt&amp;gt; specifies the default size for widget, as &amp;lt;tt&amp;gt;width,height&amp;lt;/tt&amp;gt;.  While the units aren't technically pixels, they have the same value as pixels providing you don't do anything like zoom in or out on your desktop.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;X-KDE-PluginInfo-Category&amp;lt;/tt&amp;gt; gives a category for the widget. This is used in the Add Widgets dialog to group and filter widgets. The value must be one of the category names listed at [[Projects/Plasma/PIG]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;X-KDE-PluginInfo-Name&amp;lt;/tt&amp;gt; is the internal name of the plasmoid (you can think of this as the name of the plasmoid, as opposed to the name of the widget which is given by &amp;lt;tt&amp;gt;Name&amp;lt;/tt&amp;gt;).  This is the name you will use as an argument to &amp;lt;tt&amp;gt;plasmoidviewer&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;plasmapkg&amp;lt;/tt&amp;gt; when you need to provide a plasmoid name rather than a path.  It doesn't have to be the same name as the directory containing &amp;lt;tt&amp;gt;metadata.desktop&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;X-KDE-PluginInfo-Author&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;X-KDE-PluginInfo-Email&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;X-KDE-PluginInfo-Version&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;X-KDE-PluginInfo-Website&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;X-KDE-PluginInfo-License&amp;lt;/tt&amp;gt; are informational, and are displayed in the About dialog for the plasmoid (which can be viewed by clicking the information icon next to the corresponding widget in the Add Widgets dialog of plasma).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;X-KDE-PluginInfo-EnabledByDefault&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;X-KDE-PluginInfo-Depends&amp;lt;/tt&amp;gt; rarely need to be changed from the values given here.&lt;br /&gt;
&lt;br /&gt;
== Main script ==&lt;br /&gt;
&lt;br /&gt;
The name of the main script file is given by &amp;lt;tt&amp;gt;X-Plasma-MainScript&amp;lt;/tt&amp;gt; in metadata.desktop, and is relative to the &amp;lt;tt&amp;gt;contents&amp;lt;/tt&amp;gt; directory.  In our case, we will need to create the file &amp;lt;tt&amp;gt;hello-javascript/contents/code/main.js&amp;lt;/tt&amp;gt;.  Put the following code in it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
layout = new LinearLayout(plasmoid);&lt;br /&gt;
&lt;br /&gt;
label = new Label();&lt;br /&gt;
layout.addItem(label);&lt;br /&gt;
&lt;br /&gt;
label.text = 'Hello JavaScript!';&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;strong&amp;gt;plasmoid&amp;lt;/strong&amp;gt; is a global variable that represents your widget.  It has some useful methods that we'll come to in later tutorials.&lt;br /&gt;
&lt;br /&gt;
First, we create a layout, because plasmoids don't have a layout by default.  This just makes sure that the label is the correct size and in the correct place.  Passing &amp;lt;tt&amp;gt;plasmoid&amp;lt;/tt&amp;gt; to the &amp;lt;tt&amp;gt;LinearLayout&amp;lt;/tt&amp;gt; attaches the layout to the widget.&lt;br /&gt;
&lt;br /&gt;
Next we add a label to the layout, and finally we set the label text.&lt;br /&gt;
&lt;br /&gt;
== Testing (KDE 4.3+) ==&lt;br /&gt;
&lt;br /&gt;
If you have KDE 4.3 or later, you can test your plasmoid without installing it by entering the &amp;lt;tt&amp;gt;hello-javascript&amp;lt;/tt&amp;gt; directory and running &amp;lt;tt&amp;gt;plasmoidviewer&amp;lt;/tt&amp;gt;.  Alternatively, call &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
plasmoidviewer ~/hello-javascript&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is very convenient for development as you can edit the Plasmoid and test the changes immediately without re-installing the plasmoid over and over again.&lt;br /&gt;
&lt;br /&gt;
== Installing ==&lt;br /&gt;
&lt;br /&gt;
You can install the plasmoid by running the following command from within the &amp;lt;tt&amp;gt;hello-javascript&amp;lt;/tt&amp;gt; directory:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
plasmapkg -i .&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The final argument to &amp;lt;tt&amp;gt;plasmapkg&amp;lt;/tt&amp;gt; is the path to the directory containing &amp;lt;tt&amp;gt;metadata.desktop&amp;lt;/tt&amp;gt; and the &amp;lt;tt&amp;gt;contents&amp;lt;/tt&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
You can now add your widget to the desktop using the Add Widgets dialog, or view it by running&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
plasmoidviewer hello-javascript&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Packaging ==&lt;br /&gt;
&lt;br /&gt;
If you want to share your plasmoid, you'll have to package it.  Run the following from within the &amp;lt;tt&amp;gt;hello-javascript&amp;lt;/tt&amp;gt; directory:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
zip -r ../hello-javascript.zip . &amp;amp;&amp;amp;&lt;br /&gt;
mv ../hello-javascript.zip ../hello-javascript.plasmoid&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You now have a plasmoid package you can share with the world.  To install it, either use the &amp;quot;Install new widgets&amp;quot; functionality in the Add Widgets dialog, or go to the directory containing &amp;lt;tt&amp;gt;hello-javascript.plasmoid&amp;lt;/tt&amp;gt; and run&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
plasmapkg -i hello-javascript.plasmoid&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To uninstall the plasmoid, use &amp;lt;tt&amp;gt;plasmapkg&amp;lt;/tt&amp;gt; again with its -r option:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
plasmapkg -r hello-javascript&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that while the argument to &amp;lt;tt&amp;gt;plasmapkg -i&amp;lt;/tt&amp;gt; is a file or directory, you need to pass the plasmoid name (given by &amp;lt;tt&amp;gt;X-KDE-PluginInfo-Name&amp;lt;/tt&amp;gt; in &amp;lt;tt&amp;gt;metadata.desktop&amp;lt;/tt&amp;gt;) to &amp;lt;tt&amp;gt;plasmapkg -r&amp;lt;/tt&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Development/Tutorials/Desktop_File</id>
		<title>Development/Tutorials/Desktop File</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Development/Tutorials/Desktop_File"/>
				<updated>2013-02-24T10:17:11Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: /* Menus */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
{{TutorialBrowser|&lt;br /&gt;
&lt;br /&gt;
series=Basics|&lt;br /&gt;
&lt;br /&gt;
name=Desktop File|&lt;br /&gt;
&lt;br /&gt;
pre=|&lt;br /&gt;
&lt;br /&gt;
next=| &lt;br /&gt;
&lt;br /&gt;
reading=[http://standards.freedesktop.org/desktop-entry-spec/latest/ the .desktop Free Desktop Spec];&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Desktop File ==&lt;br /&gt;
&lt;br /&gt;
In order for your application to show up in menus and/or to be automatically associated with mime types in file browsers, you need to provide a .desktop file like follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
[Desktop Entry]&lt;br /&gt;
Type=Application&lt;br /&gt;
Exec=your-app %u&lt;br /&gt;
MimeType=application/x-your-mime-type;&lt;br /&gt;
Icon=some-icon&lt;br /&gt;
X-DocPath=yourapp/index.html&lt;br /&gt;
Terminal=false&lt;br /&gt;
Name=Your App&lt;br /&gt;
GenericName=Some Generic Name&lt;br /&gt;
Comment=Short Description Of Your App&lt;br /&gt;
Categories=Qt;KDE;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Take a look at [http://standards.freedesktop.org/desktop-entry-spec/latest/ the .desktop Free Desktop Spec] to find our more about the key/value pairs above. It's important to pick a good set of Categories, see the spec for a list of valid values.&lt;br /&gt;
&lt;br /&gt;
== Your project ==&lt;br /&gt;
You want your project to show up in the K Menu like this:&lt;br /&gt;
&lt;br /&gt;
[[File:Snapshot-k-menu.png]]&lt;br /&gt;
&lt;br /&gt;
In this example, the application is called quickpen and it shows up in the category &amp;quot;Graphics&amp;quot;. To accomplish that in your project you need to take care the .desktop file is distributed to the appropriate place.&lt;br /&gt;
&lt;br /&gt;
=== qmake based projects ===&lt;br /&gt;
In case you are working on a qmake based project, add the following to your .pro file:&lt;br /&gt;
 '''target.path = /usr/local/bin'''&lt;br /&gt;
 desktop.path = /usr/share/applications&lt;br /&gt;
 desktop.files += your-app.desktop&lt;br /&gt;
&lt;br /&gt;
 '''INSTALLS += target''' desktop&lt;br /&gt;
&lt;br /&gt;
Note that the bold strings above should be in your project anyway.&lt;br /&gt;
&lt;br /&gt;
An example .pro file can be found [https://github.com/tstaerk/quickpen/blob/dc7a5560b0cbac159d1c443572c676ee7d8fbb23/quickpen.pro here]. The related .desktop file can be found [https://github.com/tstaerk/quickpen/blob/e3b03c5949085e87a659303ae7866378f6539542/quickpen.desktop here].&lt;br /&gt;
&lt;br /&gt;
=== cmake based projects ===&lt;br /&gt;
In case you are working on a cmake based project, add an install directive to your CMakeLists.txt file like this:&lt;br /&gt;
 install( PROGRAMS your-app.desktop DESTINATION ${[[Development/CMake/Addons_for_KDE#The_locations_of_install_directories|XDG_APPS_INSTALL_DIR]]} )&lt;br /&gt;
&lt;br /&gt;
An example CMakeLists.txt file can be found [http://quickgit.kde.org/?p=kdepim.git&amp;amp;a=blob&amp;amp;hb=18742d763bc8a2d2c2c7ef433cc66c39b6a95036&amp;amp;f=ktimetracker/support/CMakeLists.txt here]. The corresponding .desktop file is [http://quickgit.kde.org/?p=kdepim.git&amp;amp;a=blob&amp;amp;hb=63798b547ecb595d166cdbe2e0a04d985fcc8980&amp;amp;f=ktimetracker/support/ktimetracker.desktop here].&lt;br /&gt;
&lt;br /&gt;
= Menus =&lt;br /&gt;
You can also use a .desktop file to describe KDE's context menus. Context menus are the menus that appear when you right-click onto your desktop or onto a file or folder. Let's write a context menu for konqueror that counts the lines in a file.&lt;br /&gt;
&lt;br /&gt;
To do this, change directory to your Service Menu directory:&lt;br /&gt;
 $ kde4-config --path services&lt;br /&gt;
 /home/knoppix/.kde/share/kde4/services/:/usr/share/kde4/services/&lt;br /&gt;
 $ cd /usr/share/kde4/services/ServiceMenus/&lt;br /&gt;
&lt;br /&gt;
Create a desktop file with any name, e.g. count.desktop with the following content:&lt;br /&gt;
&lt;br /&gt;
 [Desktop Entry]&lt;br /&gt;
 Type=Service&lt;br /&gt;
 ServiceTypes=KonqPopupMenu/Plugin&lt;br /&gt;
 MimeType=all/all;&lt;br /&gt;
 Actions=countlines;&lt;br /&gt;
 X-KDE-Submenu=Count&lt;br /&gt;
 X-KDE-StartupNotify=false&lt;br /&gt;
 X-KDE-Priority=TopLevel&lt;br /&gt;
 &lt;br /&gt;
 [Desktop Action countlines]&lt;br /&gt;
 Name=Count lines&lt;br /&gt;
 Exec=kdialog --msgbox &amp;quot;$(wc -l %F)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
It will look like this:&lt;br /&gt;
&lt;br /&gt;
[[File:Snapshot-file-context-menu-kde-2.png]]&lt;br /&gt;
&lt;br /&gt;
Some remarks:&lt;br /&gt;
* it is possible to translate the strings the user sees. For a German translation you could add below X-KDE-Submenu=Count:&lt;br /&gt;
 X-KDE-Submenu[de]=Zaehlen&lt;br /&gt;
* this context menu entry will not only appear in Konqueror, but also e.g. in Dolphin.&lt;br /&gt;
* if you want this to work as a menu item, not as a submenu, just delete the line&lt;br /&gt;
 X-KDE-Submenu=Count&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
* [http://standards.freedesktop.org/desktop-entry-spec/latest/ FreeDeskTop's specification about Desktop entries]&lt;br /&gt;
&lt;br /&gt;
[[Category:Programming]]&lt;br /&gt;
[[Category:Tutorial]]&lt;br /&gt;
[[Category:FAQs]]&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Development/Tutorials/Desktop_File</id>
		<title>Development/Tutorials/Desktop File</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Development/Tutorials/Desktop_File"/>
				<updated>2013-02-24T10:10:21Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: /* Menus */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
{{TutorialBrowser|&lt;br /&gt;
&lt;br /&gt;
series=Basics|&lt;br /&gt;
&lt;br /&gt;
name=Desktop File|&lt;br /&gt;
&lt;br /&gt;
pre=|&lt;br /&gt;
&lt;br /&gt;
next=| &lt;br /&gt;
&lt;br /&gt;
reading=[http://standards.freedesktop.org/desktop-entry-spec/latest/ the .desktop Free Desktop Spec];&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Desktop File ==&lt;br /&gt;
&lt;br /&gt;
In order for your application to show up in menus and/or to be automatically associated with mime types in file browsers, you need to provide a .desktop file like follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
[Desktop Entry]&lt;br /&gt;
Type=Application&lt;br /&gt;
Exec=your-app %u&lt;br /&gt;
MimeType=application/x-your-mime-type;&lt;br /&gt;
Icon=some-icon&lt;br /&gt;
X-DocPath=yourapp/index.html&lt;br /&gt;
Terminal=false&lt;br /&gt;
Name=Your App&lt;br /&gt;
GenericName=Some Generic Name&lt;br /&gt;
Comment=Short Description Of Your App&lt;br /&gt;
Categories=Qt;KDE;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Take a look at [http://standards.freedesktop.org/desktop-entry-spec/latest/ the .desktop Free Desktop Spec] to find our more about the key/value pairs above. It's important to pick a good set of Categories, see the spec for a list of valid values.&lt;br /&gt;
&lt;br /&gt;
== Your project ==&lt;br /&gt;
You want your project to show up in the K Menu like this:&lt;br /&gt;
&lt;br /&gt;
[[File:Snapshot-k-menu.png]]&lt;br /&gt;
&lt;br /&gt;
In this example, the application is called quickpen and it shows up in the category &amp;quot;Graphics&amp;quot;. To accomplish that in your project you need to take care the .desktop file is distributed to the appropriate place.&lt;br /&gt;
&lt;br /&gt;
=== qmake based projects ===&lt;br /&gt;
In case you are working on a qmake based project, add the following to your .pro file:&lt;br /&gt;
 '''target.path = /usr/local/bin'''&lt;br /&gt;
 desktop.path = /usr/share/applications&lt;br /&gt;
 desktop.files += your-app.desktop&lt;br /&gt;
&lt;br /&gt;
 '''INSTALLS += target''' desktop&lt;br /&gt;
&lt;br /&gt;
Note that the bold strings above should be in your project anyway.&lt;br /&gt;
&lt;br /&gt;
An example .pro file can be found [https://github.com/tstaerk/quickpen/blob/dc7a5560b0cbac159d1c443572c676ee7d8fbb23/quickpen.pro here]. The related .desktop file can be found [https://github.com/tstaerk/quickpen/blob/e3b03c5949085e87a659303ae7866378f6539542/quickpen.desktop here].&lt;br /&gt;
&lt;br /&gt;
=== cmake based projects ===&lt;br /&gt;
In case you are working on a cmake based project, add an install directive to your CMakeLists.txt file like this:&lt;br /&gt;
 install( PROGRAMS your-app.desktop DESTINATION ${[[Development/CMake/Addons_for_KDE#The_locations_of_install_directories|XDG_APPS_INSTALL_DIR]]} )&lt;br /&gt;
&lt;br /&gt;
An example CMakeLists.txt file can be found [http://quickgit.kde.org/?p=kdepim.git&amp;amp;a=blob&amp;amp;hb=18742d763bc8a2d2c2c7ef433cc66c39b6a95036&amp;amp;f=ktimetracker/support/CMakeLists.txt here]. The corresponding .desktop file is [http://quickgit.kde.org/?p=kdepim.git&amp;amp;a=blob&amp;amp;hb=63798b547ecb595d166cdbe2e0a04d985fcc8980&amp;amp;f=ktimetracker/support/ktimetracker.desktop here].&lt;br /&gt;
&lt;br /&gt;
= Menus =&lt;br /&gt;
You can also use a .desktop file to describe KDE's context menus. Context menus are the menus that appear when you right-click onto your desktop or onto a file or folder. Let's write a context menu for konqueror that counts the lines in a file.&lt;br /&gt;
&lt;br /&gt;
To do this, change directory to your Service Menu directory:&lt;br /&gt;
 $ kde4-config --path services&lt;br /&gt;
 /home/knoppix/.kde/share/kde4/services/:/usr/share/kde4/services/&lt;br /&gt;
 $ cd /usr/share/kde4/services/ServiceMenus/&lt;br /&gt;
&lt;br /&gt;
Create a desktop file with any name, e.g. count.desktop with the following content:&lt;br /&gt;
&lt;br /&gt;
 [Desktop Entry]&lt;br /&gt;
 Type=Service&lt;br /&gt;
 ServiceTypes=KonqPopupMenu/Plugin&lt;br /&gt;
 MimeType=all/all;&lt;br /&gt;
 Actions=countlines;&lt;br /&gt;
 X-KDE-Submenu=Count&lt;br /&gt;
 X-KDE-StartupNotify=false&lt;br /&gt;
 X-KDE-Priority=TopLevel&lt;br /&gt;
 &lt;br /&gt;
 [Desktop Action countlines]&lt;br /&gt;
 Name=Count lines&lt;br /&gt;
 Exec=kdialog --msgbox &amp;quot;$(wc -l %F)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
It will look like this:&lt;br /&gt;
&lt;br /&gt;
[[File:Snapshot-file-context-menu-kde-2.png]]&lt;br /&gt;
&lt;br /&gt;
Some remarks:&lt;br /&gt;
* it is possible to translate the strings the user sees. For a German translation you could add below X-KDE-Submenu=Count:&lt;br /&gt;
 X-KDE-Submenu[de]=Zaehlen&lt;br /&gt;
* this context menu entry will not only appear in Konqueror, but also e.g. in Dolphin.&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
* [http://standards.freedesktop.org/desktop-entry-spec/latest/ FreeDeskTop's specification about Desktop entries]&lt;br /&gt;
&lt;br /&gt;
[[Category:Programming]]&lt;br /&gt;
[[Category:Tutorial]]&lt;br /&gt;
[[Category:FAQs]]&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/File:Snapshot-file-context-menu-kde-2.png</id>
		<title>File:Snapshot-file-context-menu-kde-2.png</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/File:Snapshot-file-context-menu-kde-2.png"/>
				<updated>2013-02-24T10:07:08Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Development/Tutorials/Desktop_File</id>
		<title>Development/Tutorials/Desktop File</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Development/Tutorials/Desktop_File"/>
				<updated>2013-02-24T10:01:35Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: /* Menus */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
{{TutorialBrowser|&lt;br /&gt;
&lt;br /&gt;
series=Basics|&lt;br /&gt;
&lt;br /&gt;
name=Desktop File|&lt;br /&gt;
&lt;br /&gt;
pre=|&lt;br /&gt;
&lt;br /&gt;
next=| &lt;br /&gt;
&lt;br /&gt;
reading=[http://standards.freedesktop.org/desktop-entry-spec/latest/ the .desktop Free Desktop Spec];&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Desktop File ==&lt;br /&gt;
&lt;br /&gt;
In order for your application to show up in menus and/or to be automatically associated with mime types in file browsers, you need to provide a .desktop file like follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
[Desktop Entry]&lt;br /&gt;
Type=Application&lt;br /&gt;
Exec=your-app %u&lt;br /&gt;
MimeType=application/x-your-mime-type;&lt;br /&gt;
Icon=some-icon&lt;br /&gt;
X-DocPath=yourapp/index.html&lt;br /&gt;
Terminal=false&lt;br /&gt;
Name=Your App&lt;br /&gt;
GenericName=Some Generic Name&lt;br /&gt;
Comment=Short Description Of Your App&lt;br /&gt;
Categories=Qt;KDE;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Take a look at [http://standards.freedesktop.org/desktop-entry-spec/latest/ the .desktop Free Desktop Spec] to find our more about the key/value pairs above. It's important to pick a good set of Categories, see the spec for a list of valid values.&lt;br /&gt;
&lt;br /&gt;
== Your project ==&lt;br /&gt;
You want your project to show up in the K Menu like this:&lt;br /&gt;
&lt;br /&gt;
[[File:Snapshot-k-menu.png]]&lt;br /&gt;
&lt;br /&gt;
In this example, the application is called quickpen and it shows up in the category &amp;quot;Graphics&amp;quot;. To accomplish that in your project you need to take care the .desktop file is distributed to the appropriate place.&lt;br /&gt;
&lt;br /&gt;
=== qmake based projects ===&lt;br /&gt;
In case you are working on a qmake based project, add the following to your .pro file:&lt;br /&gt;
 '''target.path = /usr/local/bin'''&lt;br /&gt;
 desktop.path = /usr/share/applications&lt;br /&gt;
 desktop.files += your-app.desktop&lt;br /&gt;
&lt;br /&gt;
 '''INSTALLS += target''' desktop&lt;br /&gt;
&lt;br /&gt;
Note that the bold strings above should be in your project anyway.&lt;br /&gt;
&lt;br /&gt;
An example .pro file can be found [https://github.com/tstaerk/quickpen/blob/dc7a5560b0cbac159d1c443572c676ee7d8fbb23/quickpen.pro here]. The related .desktop file can be found [https://github.com/tstaerk/quickpen/blob/e3b03c5949085e87a659303ae7866378f6539542/quickpen.desktop here].&lt;br /&gt;
&lt;br /&gt;
=== cmake based projects ===&lt;br /&gt;
In case you are working on a cmake based project, add an install directive to your CMakeLists.txt file like this:&lt;br /&gt;
 install( PROGRAMS your-app.desktop DESTINATION ${[[Development/CMake/Addons_for_KDE#The_locations_of_install_directories|XDG_APPS_INSTALL_DIR]]} )&lt;br /&gt;
&lt;br /&gt;
An example CMakeLists.txt file can be found [http://quickgit.kde.org/?p=kdepim.git&amp;amp;a=blob&amp;amp;hb=18742d763bc8a2d2c2c7ef433cc66c39b6a95036&amp;amp;f=ktimetracker/support/CMakeLists.txt here]. The corresponding .desktop file is [http://quickgit.kde.org/?p=kdepim.git&amp;amp;a=blob&amp;amp;hb=63798b547ecb595d166cdbe2e0a04d985fcc8980&amp;amp;f=ktimetracker/support/ktimetracker.desktop here].&lt;br /&gt;
&lt;br /&gt;
= Menus =&lt;br /&gt;
You can also use a .desktop file to describe KDE's context menus. Context menus are the menus that appear when you right-click onto your desktop or onto a file or folder. Let's write a context menu for konqueror that counts the lines in a file.&lt;br /&gt;
&lt;br /&gt;
To do this, change directory to your Service Menu directory:&lt;br /&gt;
 $ kde4-config --path services&lt;br /&gt;
 /home/knoppix/.kde/share/kde4/services/:/usr/share/kde4/services/&lt;br /&gt;
 $ cd /usr/share/kde4/services/ServiceMenus/&lt;br /&gt;
&lt;br /&gt;
Create a desktop file with any name, e.g. count.desktop with the following content:&lt;br /&gt;
&lt;br /&gt;
 [Desktop Entry]&lt;br /&gt;
 Type=Service&lt;br /&gt;
 ServiceTypes=KonqPopupMenu/Plugin&lt;br /&gt;
 MimeType=all/all;&lt;br /&gt;
 Actions=countlines;&lt;br /&gt;
 X-KDE-Submenu=Count&lt;br /&gt;
 X-KDE-StartupNotify=false&lt;br /&gt;
 X-KDE-Priority=TopLevel&lt;br /&gt;
 &lt;br /&gt;
 [Desktop Action countlines]&lt;br /&gt;
 Name=Count lines&lt;br /&gt;
 Exec=kdialog --msgbox &amp;quot;$(wc -l %F)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Some remarks:&lt;br /&gt;
* it is possible to translate the strings the user sees. For a German translation you could add below X-KDE-Submenu=Count:&lt;br /&gt;
 X-KDE-Submenu[de]=Zaehlen&lt;br /&gt;
* this context menu entry will not only appear in Konqueror, but also e.g. in Dolphin.&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
* [http://standards.freedesktop.org/desktop-entry-spec/latest/ FreeDeskTop's specification about Desktop entries]&lt;br /&gt;
&lt;br /&gt;
[[Category:Programming]]&lt;br /&gt;
[[Category:Tutorial]]&lt;br /&gt;
[[Category:FAQs]]&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Development/Tutorials/Desktop_File</id>
		<title>Development/Tutorials/Desktop File</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Development/Tutorials/Desktop_File"/>
				<updated>2013-02-24T09:48:36Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: /* Menus */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
{{TutorialBrowser|&lt;br /&gt;
&lt;br /&gt;
series=Basics|&lt;br /&gt;
&lt;br /&gt;
name=Desktop File|&lt;br /&gt;
&lt;br /&gt;
pre=|&lt;br /&gt;
&lt;br /&gt;
next=| &lt;br /&gt;
&lt;br /&gt;
reading=[http://standards.freedesktop.org/desktop-entry-spec/latest/ the .desktop Free Desktop Spec];&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Desktop File ==&lt;br /&gt;
&lt;br /&gt;
In order for your application to show up in menus and/or to be automatically associated with mime types in file browsers, you need to provide a .desktop file like follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
[Desktop Entry]&lt;br /&gt;
Type=Application&lt;br /&gt;
Exec=your-app %u&lt;br /&gt;
MimeType=application/x-your-mime-type;&lt;br /&gt;
Icon=some-icon&lt;br /&gt;
X-DocPath=yourapp/index.html&lt;br /&gt;
Terminal=false&lt;br /&gt;
Name=Your App&lt;br /&gt;
GenericName=Some Generic Name&lt;br /&gt;
Comment=Short Description Of Your App&lt;br /&gt;
Categories=Qt;KDE;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Take a look at [http://standards.freedesktop.org/desktop-entry-spec/latest/ the .desktop Free Desktop Spec] to find our more about the key/value pairs above. It's important to pick a good set of Categories, see the spec for a list of valid values.&lt;br /&gt;
&lt;br /&gt;
== Your project ==&lt;br /&gt;
You want your project to show up in the K Menu like this:&lt;br /&gt;
&lt;br /&gt;
[[File:Snapshot-k-menu.png]]&lt;br /&gt;
&lt;br /&gt;
In this example, the application is called quickpen and it shows up in the category &amp;quot;Graphics&amp;quot;. To accomplish that in your project you need to take care the .desktop file is distributed to the appropriate place.&lt;br /&gt;
&lt;br /&gt;
=== qmake based projects ===&lt;br /&gt;
In case you are working on a qmake based project, add the following to your .pro file:&lt;br /&gt;
 '''target.path = /usr/local/bin'''&lt;br /&gt;
 desktop.path = /usr/share/applications&lt;br /&gt;
 desktop.files += your-app.desktop&lt;br /&gt;
&lt;br /&gt;
 '''INSTALLS += target''' desktop&lt;br /&gt;
&lt;br /&gt;
Note that the bold strings above should be in your project anyway.&lt;br /&gt;
&lt;br /&gt;
An example .pro file can be found [https://github.com/tstaerk/quickpen/blob/dc7a5560b0cbac159d1c443572c676ee7d8fbb23/quickpen.pro here]. The related .desktop file can be found [https://github.com/tstaerk/quickpen/blob/e3b03c5949085e87a659303ae7866378f6539542/quickpen.desktop here].&lt;br /&gt;
&lt;br /&gt;
=== cmake based projects ===&lt;br /&gt;
In case you are working on a cmake based project, add an install directive to your CMakeLists.txt file like this:&lt;br /&gt;
 install( PROGRAMS your-app.desktop DESTINATION ${[[Development/CMake/Addons_for_KDE#The_locations_of_install_directories|XDG_APPS_INSTALL_DIR]]} )&lt;br /&gt;
&lt;br /&gt;
An example CMakeLists.txt file can be found [http://quickgit.kde.org/?p=kdepim.git&amp;amp;a=blob&amp;amp;hb=18742d763bc8a2d2c2c7ef433cc66c39b6a95036&amp;amp;f=ktimetracker/support/CMakeLists.txt here]. The corresponding .desktop file is [http://quickgit.kde.org/?p=kdepim.git&amp;amp;a=blob&amp;amp;hb=63798b547ecb595d166cdbe2e0a04d985fcc8980&amp;amp;f=ktimetracker/support/ktimetracker.desktop here].&lt;br /&gt;
&lt;br /&gt;
= Menus =&lt;br /&gt;
You can also use a .desktop file to describe KDE's context menus. Context menus are the menus that appear when you right-click onto your desktop or onto a file or folder. Let's write a context menu for konqueror that counts the lines in a file.&lt;br /&gt;
&lt;br /&gt;
To do this, change directory to your Service Menu directory:&lt;br /&gt;
 $ kde4-config --path services&lt;br /&gt;
 /home/knoppix/.kde/share/kde4/services/:/usr/share/kde4/services/&lt;br /&gt;
 $ cd /usr/share/kde4/services/ServiceMenus/&lt;br /&gt;
&lt;br /&gt;
Create a desktop file with any name, e.g. count.desktop with the following content:&lt;br /&gt;
&lt;br /&gt;
 [Desktop Entry]&lt;br /&gt;
 Type=Service&lt;br /&gt;
 ServiceTypes=KonqPopupMenu/Plugin&lt;br /&gt;
 MimeType=all/all;&lt;br /&gt;
 Actions=countlines;&lt;br /&gt;
 X-KDE-Submenu=Count&lt;br /&gt;
 X-KDE-StartupNotify=false&lt;br /&gt;
 X-KDE-Priority=TopLevel&lt;br /&gt;
 &lt;br /&gt;
 [Desktop Action countlines]&lt;br /&gt;
 Name=Count lines&lt;br /&gt;
 Exec=kdialog --msgbox &amp;quot;$(wc -l %F)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
* [http://standards.freedesktop.org/desktop-entry-spec/latest/ FreeDeskTop's specification about Desktop entries]&lt;br /&gt;
&lt;br /&gt;
[[Category:Programming]]&lt;br /&gt;
[[Category:Tutorial]]&lt;br /&gt;
[[Category:FAQs]]&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Development/Tutorials/Desktop_File</id>
		<title>Development/Tutorials/Desktop File</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Development/Tutorials/Desktop_File"/>
				<updated>2013-02-24T08:54:55Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: menus&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
{{TutorialBrowser|&lt;br /&gt;
&lt;br /&gt;
series=Basics|&lt;br /&gt;
&lt;br /&gt;
name=Desktop File|&lt;br /&gt;
&lt;br /&gt;
pre=|&lt;br /&gt;
&lt;br /&gt;
next=| &lt;br /&gt;
&lt;br /&gt;
reading=[http://standards.freedesktop.org/desktop-entry-spec/latest/ the .desktop Free Desktop Spec];&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Desktop File ==&lt;br /&gt;
&lt;br /&gt;
In order for your application to show up in menus and/or to be automatically associated with mime types in file browsers, you need to provide a .desktop file like follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
[Desktop Entry]&lt;br /&gt;
Type=Application&lt;br /&gt;
Exec=your-app %u&lt;br /&gt;
MimeType=application/x-your-mime-type;&lt;br /&gt;
Icon=some-icon&lt;br /&gt;
X-DocPath=yourapp/index.html&lt;br /&gt;
Terminal=false&lt;br /&gt;
Name=Your App&lt;br /&gt;
GenericName=Some Generic Name&lt;br /&gt;
Comment=Short Description Of Your App&lt;br /&gt;
Categories=Qt;KDE;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Take a look at [http://standards.freedesktop.org/desktop-entry-spec/latest/ the .desktop Free Desktop Spec] to find our more about the key/value pairs above. It's important to pick a good set of Categories, see the spec for a list of valid values.&lt;br /&gt;
&lt;br /&gt;
== Your project ==&lt;br /&gt;
You want your project to show up in the K Menu like this:&lt;br /&gt;
&lt;br /&gt;
[[File:Snapshot-k-menu.png]]&lt;br /&gt;
&lt;br /&gt;
In this example, the application is called quickpen and it shows up in the category &amp;quot;Graphics&amp;quot;. To accomplish that in your project you need to take care the .desktop file is distributed to the appropriate place.&lt;br /&gt;
&lt;br /&gt;
=== qmake based projects ===&lt;br /&gt;
In case you are working on a qmake based project, add the following to your .pro file:&lt;br /&gt;
 '''target.path = /usr/local/bin'''&lt;br /&gt;
 desktop.path = /usr/share/applications&lt;br /&gt;
 desktop.files += your-app.desktop&lt;br /&gt;
&lt;br /&gt;
 '''INSTALLS += target''' desktop&lt;br /&gt;
&lt;br /&gt;
Note that the bold strings above should be in your project anyway.&lt;br /&gt;
&lt;br /&gt;
An example .pro file can be found [https://github.com/tstaerk/quickpen/blob/dc7a5560b0cbac159d1c443572c676ee7d8fbb23/quickpen.pro here]. The related .desktop file can be found [https://github.com/tstaerk/quickpen/blob/e3b03c5949085e87a659303ae7866378f6539542/quickpen.desktop here].&lt;br /&gt;
&lt;br /&gt;
=== cmake based projects ===&lt;br /&gt;
In case you are working on a cmake based project, add an install directive to your CMakeLists.txt file like this:&lt;br /&gt;
 install( PROGRAMS your-app.desktop DESTINATION ${[[Development/CMake/Addons_for_KDE#The_locations_of_install_directories|XDG_APPS_INSTALL_DIR]]} )&lt;br /&gt;
&lt;br /&gt;
An example CMakeLists.txt file can be found [http://quickgit.kde.org/?p=kdepim.git&amp;amp;a=blob&amp;amp;hb=18742d763bc8a2d2c2c7ef433cc66c39b6a95036&amp;amp;f=ktimetracker/support/CMakeLists.txt here]. The corresponding .desktop file is [http://quickgit.kde.org/?p=kdepim.git&amp;amp;a=blob&amp;amp;hb=63798b547ecb595d166cdbe2e0a04d985fcc8980&amp;amp;f=ktimetracker/support/ktimetracker.desktop here].&lt;br /&gt;
&lt;br /&gt;
= Menus =&lt;br /&gt;
You can also use a .desktop file to describe KDE's context menus. For example have a look at /usr/share/kde4/services/ServiceMenus/ark_addtoservicemenu.desktop&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
* [http://standards.freedesktop.org/desktop-entry-spec/latest/ FreeDeskTop's specification about Desktop entries]&lt;br /&gt;
&lt;br /&gt;
[[Category:Programming]]&lt;br /&gt;
[[Category:Tutorial]]&lt;br /&gt;
[[Category:FAQs]]&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Development/Tutorials/Desktop_File</id>
		<title>Development/Tutorials/Desktop File</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Development/Tutorials/Desktop_File"/>
				<updated>2013-02-24T08:04:47Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: KDE's context menu&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
{{TutorialBrowser|&lt;br /&gt;
&lt;br /&gt;
series=Basics|&lt;br /&gt;
&lt;br /&gt;
name=Desktop File|&lt;br /&gt;
&lt;br /&gt;
pre=|&lt;br /&gt;
&lt;br /&gt;
next=| &lt;br /&gt;
&lt;br /&gt;
reading=[http://standards.freedesktop.org/desktop-entry-spec/latest/ the .desktop Free Desktop Spec];&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Desktop File ==&lt;br /&gt;
&lt;br /&gt;
In order for your application to show up in menus and/or to be automatically associated with mime types in file browsers, you need to provide a .desktop file like follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
[Desktop Entry]&lt;br /&gt;
Type=Application&lt;br /&gt;
Exec=your-app %u&lt;br /&gt;
MimeType=application/x-your-mime-type;&lt;br /&gt;
Icon=some-icon&lt;br /&gt;
X-DocPath=yourapp/index.html&lt;br /&gt;
Terminal=false&lt;br /&gt;
Name=Your App&lt;br /&gt;
GenericName=Some Generic Name&lt;br /&gt;
Comment=Short Description Of Your App&lt;br /&gt;
Categories=Qt;KDE;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Take a look at [http://standards.freedesktop.org/desktop-entry-spec/latest/ the .desktop Free Desktop Spec] to find our more about the key/value pairs above. It's important to pick a good set of Categories, see the spec for a list of valid values.&lt;br /&gt;
&lt;br /&gt;
== Your project ==&lt;br /&gt;
You want your project to show up in the K Menu like this:&lt;br /&gt;
&lt;br /&gt;
[[File:Snapshot-k-menu.png]]&lt;br /&gt;
&lt;br /&gt;
In this example, the application is called quickpen and it shows up in the category &amp;quot;Graphics&amp;quot;. To accomplish that in your project you need to take care the .desktop file is distributed to the appropriate place.&lt;br /&gt;
&lt;br /&gt;
=== qmake based projects ===&lt;br /&gt;
In case you are working on a qmake based project, add the following to your .pro file:&lt;br /&gt;
 '''target.path = /usr/local/bin'''&lt;br /&gt;
 desktop.path = /usr/share/applications&lt;br /&gt;
 desktop.files += your-app.desktop&lt;br /&gt;
&lt;br /&gt;
 '''INSTALLS += target''' desktop&lt;br /&gt;
&lt;br /&gt;
Note that the bold strings above should be in your project anyway.&lt;br /&gt;
&lt;br /&gt;
An example .pro file can be found [https://github.com/tstaerk/quickpen/blob/dc7a5560b0cbac159d1c443572c676ee7d8fbb23/quickpen.pro here]. The related .desktop file can be found [https://github.com/tstaerk/quickpen/blob/e3b03c5949085e87a659303ae7866378f6539542/quickpen.desktop here].&lt;br /&gt;
&lt;br /&gt;
=== cmake based projects ===&lt;br /&gt;
In case you are working on a cmake based project, add an install directive to your CMakeLists.txt file like this:&lt;br /&gt;
 install( PROGRAMS your-app.desktop DESTINATION ${[[Development/CMake/Addons_for_KDE#The_locations_of_install_directories|XDG_APPS_INSTALL_DIR]]} )&lt;br /&gt;
&lt;br /&gt;
An example CMakeLists.txt file can be found [http://quickgit.kde.org/?p=kdepim.git&amp;amp;a=blob&amp;amp;hb=18742d763bc8a2d2c2c7ef433cc66c39b6a95036&amp;amp;f=ktimetracker/support/CMakeLists.txt here]. The corresponding .desktop file is [http://quickgit.kde.org/?p=kdepim.git&amp;amp;a=blob&amp;amp;hb=63798b547ecb595d166cdbe2e0a04d985fcc8980&amp;amp;f=ktimetracker/support/ktimetracker.desktop here].&lt;br /&gt;
&lt;br /&gt;
= More =&lt;br /&gt;
You can also use a .desktop file to describe KDE's context menu.&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
* [http://standards.freedesktop.org/desktop-entry-spec/latest/ FreeDeskTop's specification about Desktop entries]&lt;br /&gt;
&lt;br /&gt;
[[Category:Programming]]&lt;br /&gt;
[[Category:Tutorial]]&lt;br /&gt;
[[Category:FAQs]]&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/kdesrc-build</id>
		<title>Getting Started/Build/kdesrc-build</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/kdesrc-build"/>
				<updated>2013-01-27T10:10:05Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: subversion -&amp;gt; git&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
{{note|It is possible to build KDE 3 using older versions of kdesrc-build, but this is not described here.}}&lt;br /&gt;
&lt;br /&gt;
== Building KDE using the kdesrc-build tool ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction to kdesrc-build ===&lt;br /&gt;
&lt;br /&gt;
[http://kdesrc-build.kde.org/ kdesrc-build] (formerly kdesvn-build) is a tool to allow users and developers to easily download and build the latest versions of the  [http://www.kde.org/ KDE Software Compilation] (KDE SC) from the KDE source code repositories.  It automates the following tasks and more:&lt;br /&gt;
&lt;br /&gt;
* Performing the initial checkout.&lt;br /&gt;
* Handling updates for modules that are already checked out.&lt;br /&gt;
* Setting up the build system for the module.&lt;br /&gt;
* Performing the build and install.&lt;br /&gt;
* Specifying your CMake options or configure flags (so you don't have to remember them every time).&lt;br /&gt;
* Logging build errors so you can review them easier for troubleshooting.&lt;br /&gt;
&lt;br /&gt;
It is not the end-all for your troubles building KDE, [[../Troubleshooting|Troubleshooting]] still applies. Many errors that occur using other methods occur here too, you read the log files that are stored for you.&lt;br /&gt;
&lt;br /&gt;
=== Why use kdesrc-build? ===&lt;br /&gt;
&lt;br /&gt;
So why use kdesrc-build?  There are several reasons you may like to use it:&lt;br /&gt;
&lt;br /&gt;
# Less manual editing of commands.  Instead of having to remember to add the correct options to the cmake command line or configure command, you can setup the options once and then kdesrc-build will use your settings from then on, saving you from wasting time because you forgot to enable a setting.&lt;br /&gt;
# Command logging to help debug build failures.  kdesrc-build logs all command outputs to a file.  This has several advantages:&lt;br /&gt;
## When a module fails to build, you already have the error output saved to disk, ready to be viewed and compared with other error messages to aid debugging.&lt;br /&gt;
## Quieter output.  Even with CMake, the output of Qt or a KDE SC module build can be extensive.  kdesrc-build does not show the details of a module build (but will show the progress), instead an overview of the build process is displayed.&lt;br /&gt;
# It's just easier.  Instead of having to learn how to use the Subversion and git tools, and how to setup a KDE build system, you can specify what modules you want build, where to install them to, and any other options you want and then have kdesrc-build actually do it, even while you're away from the computer or busy doing other things.&lt;br /&gt;
# It's easy to step in yourself.  kdesrc-build uses a standard source and build directory layout, and calls the same commands you would.  So kdesrc-build will not interfere with you performing the build or editing the source yourself if you so choose.&lt;br /&gt;
&lt;br /&gt;
=== Setting up ===&lt;br /&gt;
&lt;br /&gt;
==== Prerequisites ====&lt;br /&gt;
kdesrc-build is fairly easy to install and setup, but you also need to have the right software installed to build KDE. The requirements to build KDE are available as follows:&lt;br /&gt;
&lt;br /&gt;
* KDE 4: [[../Requirements|KDE 4 Requirements]]&lt;br /&gt;
&lt;br /&gt;
kdesrc-build requires Perl 5.10 or higher. It is installed by default with most distributions, and is included in the link above. Check your version of Perl with:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;perl -v&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will also need [https://github.com/gisle/libwww-perl#readme libwww] (sometimes called LWP), a collection of Perl Internet-related modules, and [http://search.cpan.org/~toddr/XML-Parser/Parser.pm XML::Parser] to support the XML-based KDE Project database. Both of these modules are extremely common and should be available in your distribution's packager manager. For example for SUSE install them with&lt;br /&gt;
 yast -i perl-libwww-perl&lt;br /&gt;
&lt;br /&gt;
kdesrc-build itself may be packaged on your distribution, which allows you to easily install its dependencies as well. ([http://packages.debian.org/unstable/main/kdesrc-build Debian provides packages] and a Fedora package is pending a fix to the kdesrc-build sources).&lt;br /&gt;
&lt;br /&gt;
{{note|kdesrc-build is developed on a Linux system, but it should work on the various BSD distributions as well (although GNU tools may be required).}}&lt;br /&gt;
&lt;br /&gt;
==== Download and install kdesrc-build ====&lt;br /&gt;
Download kdesrc from git like this:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone git://anongit.kde.org/kdesrc-build.git ~/kdesrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Setup the configuration ====&lt;br /&gt;
Now you should [[Getting Started/Build/kdesrc-build-config|setup your configuration]]. For the most part the defaults in the included kdesrc-buildrc-sample should be sufficient.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cp ~/kdesrc-build/kdesrc-buildrc-sample ~/.kdesrc-buildrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can start kdesrc-build using the commands&lt;br /&gt;
 cd&lt;br /&gt;
 ./kdesrc-build/kdesrc-build&lt;br /&gt;
&lt;br /&gt;
Now you can edit the configuration file ~/.kdesrc-buildrc&lt;br /&gt;
&lt;br /&gt;
{{tip|Note that the config file's name begins with a leading ., making it a hidden file. You may need to show hidden files in Dolphin or Konqueror to find the configuration file to edit it. Or, you can edit the sample before copying it to ~/.kdesrc-buildrc.}}&lt;br /&gt;
&lt;br /&gt;
Also, make sure that the modules you'll want to build are included. You'll want the following at the least:&lt;br /&gt;
&lt;br /&gt;
* qt-copy, kdesupport, kdelibs, kdepimlibs, kdebase&lt;br /&gt;
&lt;br /&gt;
Modules are built in the order they appear in your ~/.kdesrc-buildrc, so the first module should be qt-copy, kdelibs should be before any other KDE SC module, and so on.&lt;br /&gt;
&lt;br /&gt;
{{note|The sample configuration file does include these modules by default, you won't need to make many changes unless you'd like to add some modules to the build by uncommenting them.}}&lt;br /&gt;
&lt;br /&gt;
You may want to enable the make-install-prefix option if you are installing KDE SC or Qt to a directory that is not in your home directory.  make-install-prefix allows you to run su or sudo during the make install process so you can install files as root, or set certain programs to execute with higher permissions (This is required for certain programs to execute properly).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;module kdelibs&lt;br /&gt;
  make-install-prefix sudo -S # sudo with no stdin&lt;br /&gt;
end module&lt;br /&gt;
&lt;br /&gt;
module kdebase&lt;br /&gt;
  make-install-prefix sudo -S&lt;br /&gt;
end module&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If a module you'd like to build isn't already present, simply add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;module &amp;amp;lt;module-name&amp;amp;gt;&lt;br /&gt;
end module&amp;lt;/pre&amp;gt; at the end of the ~/.kdesrc-buildrc. &amp;amp;lt;module-name&amp;amp;gt; would be whatever the module is called in the software repository (for instance, kdemultimedia).&lt;br /&gt;
&lt;br /&gt;
===== Git-based modules =====&lt;br /&gt;
&lt;br /&gt;
Some KDE projects use the &amp;quot;git&amp;quot; source-control software instead of Subversion (as part of an ongoing migration to git). This includes software like Amarok and Konversation.&lt;br /&gt;
&lt;br /&gt;
To build these modules in kdesrc-build, you just need to add a couple of lines to the module configuration. For example, konversation is developed in the Git repository at [https://projects.kde.org/projects/extragear/network/konversation/repository]. So you would just add a module (you can pick whatever name for the module you like, as long as it's not already used):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;module konversation&lt;br /&gt;
    repository git://anongit.kde.org/konversation&lt;br /&gt;
    branch master&lt;br /&gt;
end module&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case I selected the &amp;quot;master&amp;quot; branch since that is the default git branch.&lt;br /&gt;
&lt;br /&gt;
Now whenever you build konversation, kdesrc-build will use git instead of Subversion.&lt;br /&gt;
&lt;br /&gt;
==== Useful kdesrc-build commands ====&lt;br /&gt;
kdesrc-build is driven from the command line, so here's a guide to some of the more useful command line options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table cellpadding=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Option&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Effect&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;tt&amp;gt;&amp;lt;span style=&amp;quot;white-space:nowrap;&amp;quot;&amp;gt;[http://kdesrc-build.kde.org/documentation/cmdline.html#cmdline-pretend --pretend]&amp;lt;/span&amp;gt;&amp;lt;/tt&amp;gt; (Short&amp;amp;nbsp;form&amp;amp;nbsp;&amp;lt;tt&amp;gt;&amp;lt;span style=&amp;quot;white-space:nowrap;&amp;quot;&amp;gt;-p&amp;lt;/span&amp;gt;&amp;lt;/tt&amp;gt;)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This option is like a dry run.  kdesrc-build will process the options and its configuration like normal, and run through the build as normal, but instead of downloading or running the build will instead output what kdesrc-build would have done.  You should always run with -p before running kdesrc-build to make sure it is doing what you expect.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;tt&amp;gt;[http://kdesrc-build.kde.org/documentation/cmdline.html#cmdline-no-svn --no-svn]&amp;lt;/tt&amp;gt; (Alt. form &amp;lt;tt&amp;gt;--no-src&amp;lt;/tt&amp;gt;)&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;This option skips the source code update step.  This is useful if you're running kdesrc-build again soon after the last update and don't want to wait to find out there were no changes.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;tt&amp;gt;[http://kdesrc-build.kde.org/documentation/cmdline.html#cmdline-refresh-build --refresh-build]&amp;lt;/tt&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;This option causes kdesrc-build to delete the current build information for the given modules and start building them again from scratch.  This option takes a lot of time but gives the best chance of a successful build.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Any other non-option arguments on the command line are assumed to be modules to build (and are built in the order provided on the command line).  If no modules are specified, all of the modules listed in the ~/.kdesrc-buildrc are built in the order listed in the file.&lt;br /&gt;
&lt;br /&gt;
== Build ==&lt;br /&gt;
We're almost there.  If you're happy with your settings then it's time to test out kdesrc-build.  In theory things are as simple as running kdesrc-build and then coming back later. ;)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd ~/kdesrc&lt;br /&gt;
./kdesrc-build&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You may want to test by building qt-copy first however.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd ~/kdesrc&lt;br /&gt;
./kdesrc-build qt-copy&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{tip|If you have the [http://www.gnu.org/software/screen/ GNU screen] program available then you should definitely use it to run kdesrc-build, as you can detach your kdesrc-build session and logout while kdesrc-build is still running.}}&lt;br /&gt;
&lt;br /&gt;
If the build failed (kdesrc-build will error out with a nice bright red error message) then there are several possibilities:&lt;br /&gt;
&lt;br /&gt;
# You are missing a key piece of required software (such as a development library)&lt;br /&gt;
# The KDE SC code being compiled is broken in some fashion to where it won't build.  This is commonly due to newly committed code that worked on the developer's machine, or occasionally on Mondays (when incompatible changes are permitted to kdelibs).&lt;br /&gt;
# kdesrc-build is not setup properly.  You may be trying to install to a directory that you have no permissions to access for instance, or you may have specified a system qtdir that does not exist.&lt;br /&gt;
# The module may depend on a newer version of qt-copy or kdelibs (or other module).  In this case you'll have to run kdesrc-build to update the out-of-date module first.&lt;br /&gt;
&lt;br /&gt;
How do you find out what the error was?  The output of the failing command will be in the log directory.  By default, all log output is in the {{path|log}} subdirectory of the KDE SC source directory.  The log directory is laid out like this: {{path|log/date-run/module/output-file.log}}.  To simplify finding the appropriate file, there are a couple of symlinks created:&lt;br /&gt;
&lt;br /&gt;
{{path|log/latest}} always has the debugging output for the last time kdesrc-build was run (--pretend doesn't count toward this)&lt;br /&gt;
{{path|log/latest/&amp;amp;lt;module&amp;amp;gt;/error.log}} has the debugging output for the command that caused a module build to fail.&lt;br /&gt;
&lt;br /&gt;
For instance if qt-copy just failed to build you could read the output like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd ~/kderc&lt;br /&gt;
kwrite log/latest/qt-copy/error.log&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replace kwrite with your preferred editor.  Hopefully the output can guide you to resolving the problem.  For instance, if the failure is a cmake output saying you're missing a library, install that library and try again. ;)  For link errors you can try running a --refresh-build on the module (or if that doesn't work, required libraries like qt-copy and kdelibs).&lt;br /&gt;
&lt;br /&gt;
If you're stumped by the error you may want to wait a day and try updating again, and hope that the reason for the error has been fixed.  You can also try mailing the [http://www.kde.org/mailinglists/ kde-devel] mailing list to see if others know about the problem or have had similar issues.&lt;br /&gt;
&lt;br /&gt;
== Running KDE ==&lt;br /&gt;
&lt;br /&gt;
Assuming you got enough of the modules to build and install to have a working KDE installation, you'll still need to setup your environment correctly to run it.  kdesrc-build doesn't help you out here (yet), so you should follow the instructions [[Getting_Started/Using_an_IDE_with_KDE4|here]].&lt;br /&gt;
&lt;br /&gt;
Make sure to use the same paths as the ones you defined in .kdesrc-buildrc: for the KDEDIRS and KDEDIR variable use the setting of the &amp;quot;prefix&amp;quot; option (in the global section). For the QTDIR variable use the setting of the &amp;quot;qtdir&amp;quot; option.&lt;br /&gt;
&lt;br /&gt;
== Keeping KDE up to date ==&lt;br /&gt;
&lt;br /&gt;
Keeping your KDE installation up to date is as simple as running kdesrc-build again.  Every kdesrc-build has these phases:&lt;br /&gt;
&lt;br /&gt;
# Update the source code for all modules being built.&lt;br /&gt;
# Build and then install all the modules.&lt;br /&gt;
&lt;br /&gt;
Old build directories are not deleted by default, so the build after a small update will not normally take as long as the initial build of a module.  This is called &amp;quot;incremental make&amp;quot;.  However it may be necessary at times to perform a full rebuild due to inconsistencies between the build directory configuation and changes to the source directory.  You can use the --refresh-build option to force a full rebuild.&lt;br /&gt;
&lt;br /&gt;
For more information on how to take advantage of kdesrc-build, see the [http://kdesrc-build.kde.org/documentation online documentation] for kdesrc-build, which describes all of the module options and command line options available for kdesrc-build and gives tips on how to perform various useful tasks.&lt;br /&gt;
&lt;br /&gt;
If you have any questions that are not answered please feel free to add them under the Discussion entry for this page and hopefully someone will be able to get the answer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
* To browse kdesrc-build's git repository, use [http://quickgit.kde.org/?p=kdesrc-build.git GitWeb].&lt;br /&gt;
* The Nokia Qt toolkit used by KDE can be browsed at [http://qt.gitorious.org/qt Nokia's Qt version on gitorious].&lt;br /&gt;
&lt;br /&gt;
[[Category:Build_KDE]]&lt;br /&gt;
[[Category:Tutorial]]&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/kdesrc-build</id>
		<title>Getting Started/Build/kdesrc-build</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/kdesrc-build"/>
				<updated>2013-01-27T09:32:57Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: /* Setup the configuration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
{{note|It is possible to build KDE 3 using older versions of kdesrc-build, but this is not described here.}}&lt;br /&gt;
&lt;br /&gt;
== Building KDE using the kdesrc-build tool ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction to kdesrc-build ===&lt;br /&gt;
&lt;br /&gt;
[http://kdesrc-build.kde.org/ kdesrc-build] (formerly kdesvn-build) is a tool to allow users and developers to easily download and build the latest versions of the  [http://www.kde.org/ KDE Software Compilation] (KDE SC) from the KDE source code repositories.  It automates the following tasks and more:&lt;br /&gt;
&lt;br /&gt;
* Performing the initial checkout.&lt;br /&gt;
* Handling updates for modules that are already checked out.&lt;br /&gt;
* Setting up the build system for the module.&lt;br /&gt;
* Performing the build and install.&lt;br /&gt;
* Specifying your CMake options or configure flags (so you don't have to remember them every time).&lt;br /&gt;
* Logging build errors so you can review them easier for troubleshooting.&lt;br /&gt;
&lt;br /&gt;
It is not the end-all for your troubles building KDE, [[../Troubleshooting|Troubleshooting]] still applies. Many errors that occur using other methods occur here too, you read the log files that are stored for you.&lt;br /&gt;
&lt;br /&gt;
=== Why use kdesrc-build? ===&lt;br /&gt;
&lt;br /&gt;
So why use kdesrc-build?  There are several reasons you may like to use it:&lt;br /&gt;
&lt;br /&gt;
# Less manual editing of commands.  Instead of having to remember to add the correct options to the cmake command line or configure command, you can setup the options once and then kdesrc-build will use your settings from then on, saving you from wasting time because you forgot to enable a setting.&lt;br /&gt;
# Command logging to help debug build failures.  kdesrc-build logs all command outputs to a file.  This has several advantages:&lt;br /&gt;
## When a module fails to build, you already have the error output saved to disk, ready to be viewed and compared with other error messages to aid debugging.&lt;br /&gt;
## Quieter output.  Even with CMake, the output of Qt or a KDE SC module build can be extensive.  kdesrc-build does not show the details of a module build (but will show the progress), instead an overview of the build process is displayed.&lt;br /&gt;
# It's just easier.  Instead of having to learn how to use the Subversion and git tools, and how to setup a KDE build system, you can specify what modules you want build, where to install them to, and any other options you want and then have kdesrc-build actually do it, even while you're away from the computer or busy doing other things.&lt;br /&gt;
# It's easy to step in yourself.  kdesrc-build uses a standard source and build directory layout, and calls the same commands you would.  So kdesrc-build will not interfere with you performing the build or editing the source yourself if you so choose.&lt;br /&gt;
&lt;br /&gt;
=== Setting up ===&lt;br /&gt;
&lt;br /&gt;
==== Prerequisites ====&lt;br /&gt;
kdesrc-build is fairly easy to install and setup, but you also need to have the right software installed to build KDE. The requirements to build KDE are available as follows:&lt;br /&gt;
&lt;br /&gt;
* KDE 4: [[../Requirements|KDE 4 Requirements]]&lt;br /&gt;
&lt;br /&gt;
kdesrc-build requires Perl 5.10 or higher. It is installed by default with most distributions, and is included in the link above. Check your version of Perl with:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;perl -v&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will also need [https://github.com/gisle/libwww-perl#readme libwww] (sometimes called LWP), a collection of Perl Internet-related modules, and [http://search.cpan.org/~toddr/XML-Parser/Parser.pm XML::Parser] to support the XML-based KDE Project database. Both of these modules are extremely common and should be available in your distribution's packager manager. For example for SUSE install them with&lt;br /&gt;
 yast -i perl-libwww-perl&lt;br /&gt;
&lt;br /&gt;
kdesrc-build itself may be packaged on your distribution, which allows you to easily install its dependencies as well. ([http://packages.debian.org/unstable/main/kdesrc-build Debian provides packages] and a Fedora package is pending a fix to the kdesrc-build sources).&lt;br /&gt;
&lt;br /&gt;
{{note|kdesrc-build is developed on a Linux system, but it should work on the various BSD distributions as well (although GNU tools may be required).}}&lt;br /&gt;
&lt;br /&gt;
==== Download and install kdesrc-build ====&lt;br /&gt;
Download kdesrc from git like this:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone git://anongit.kde.org/kdesrc-build.git ~/kdesrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Setup the configuration ====&lt;br /&gt;
Now you should [[Getting Started/Build/kdesrc-build-config|setup your configuration]]. For the most part the defaults in the included kdesrc-buildrc-sample should be sufficient.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cp ~/kdesrc-build/kdesrc-buildrc-sample ~/.kdesrc-buildrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can start kdesrc-build using the commands&lt;br /&gt;
 cd&lt;br /&gt;
 ./kdesrc-build/kdesrc-build&lt;br /&gt;
&lt;br /&gt;
Now you can edit the configuration file ~/.kdesrc-buildrc&lt;br /&gt;
&lt;br /&gt;
{{tip|Note that the config file's name begins with a leading ., making it a hidden file. You may need to show hidden files in Dolphin or Konqueror to find the configuration file to edit it. Or, you can edit the sample before copying it to ~/.kdesrc-buildrc.}}&lt;br /&gt;
&lt;br /&gt;
Also, make sure that the modules you'll want to build are included. You'll want the following at the least:&lt;br /&gt;
&lt;br /&gt;
* qt-copy, kdesupport, kdelibs, kdepimlibs, kdebase&lt;br /&gt;
&lt;br /&gt;
Modules are built in the order they appear in your ~/.kdesrc-buildrc, so the first module should be qt-copy, kdelibs should be before any other KDE SC module, and so on.&lt;br /&gt;
&lt;br /&gt;
{{note|The sample configuration file does include these modules by default, you won't need to make many changes unless you'd like to add some modules to the build by uncommenting them.}}&lt;br /&gt;
&lt;br /&gt;
You may want to enable the make-install-prefix option if you are installing KDE SC or Qt to a directory that is not in your home directory.  make-install-prefix allows you to run su or sudo during the make install process so you can install files as root, or set certain programs to execute with higher permissions (This is required for certain programs to execute properly).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;module kdelibs&lt;br /&gt;
  make-install-prefix sudo -S # sudo with no stdin&lt;br /&gt;
end module&lt;br /&gt;
&lt;br /&gt;
module kdebase&lt;br /&gt;
  make-install-prefix sudo -S&lt;br /&gt;
end module&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If a module you'd like to build isn't already present, simply add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;module &amp;amp;lt;module-name&amp;amp;gt;&lt;br /&gt;
end module&amp;lt;/pre&amp;gt; at the end of the ~/.kdesrc-buildrc. &amp;amp;lt;module-name&amp;amp;gt; would be whatever the module is called in the software repository (for instance, kdemultimedia).&lt;br /&gt;
&lt;br /&gt;
===== Git-based modules =====&lt;br /&gt;
&lt;br /&gt;
Some KDE projects use the &amp;quot;git&amp;quot; source-control software instead of Subversion (as part of an ongoing migration to git). This includes software like Amarok and Konversation.&lt;br /&gt;
&lt;br /&gt;
To build these modules in kdesrc-build, you just need to add a couple of lines to the module configuration. For example, konversation is developed in the Git repository at [https://projects.kde.org/projects/extragear/network/konversation/repository]. So you would just add a module (you can pick whatever name for the module you like, as long as it's not already used):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;module konversation&lt;br /&gt;
    repository git://anongit.kde.org/konversation&lt;br /&gt;
    branch master&lt;br /&gt;
end module&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case I selected the &amp;quot;master&amp;quot; branch since that is the default git branch.&lt;br /&gt;
&lt;br /&gt;
Now whenever you build konversation, kdesrc-build will use git instead of Subversion.&lt;br /&gt;
&lt;br /&gt;
==== Useful kdesrc-build commands ====&lt;br /&gt;
kdesrc-build is driven from the command line, so here's a guide to some of the more useful command line options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table cellpadding=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Option&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Effect&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;tt&amp;gt;&amp;lt;span style=&amp;quot;white-space:nowrap;&amp;quot;&amp;gt;[http://kdesrc-build.kde.org/documentation/cmdline.html#cmdline-pretend --pretend]&amp;lt;/span&amp;gt;&amp;lt;/tt&amp;gt; (Short&amp;amp;nbsp;form&amp;amp;nbsp;&amp;lt;tt&amp;gt;&amp;lt;span style=&amp;quot;white-space:nowrap;&amp;quot;&amp;gt;-p&amp;lt;/span&amp;gt;&amp;lt;/tt&amp;gt;)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This option is like a dry run.  kdesrc-build will process the options and its configuration like normal, and run through the build as normal, but instead of downloading or running the build will instead output what kdesrc-build would have done.  You should always run with -p before running kdesrc-build to make sure it is doing what you expect.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;tt&amp;gt;[http://kdesrc-build.kde.org/documentation/cmdline.html#cmdline-no-svn --no-svn]&amp;lt;/tt&amp;gt; (Alt. form &amp;lt;tt&amp;gt;--no-src&amp;lt;/tt&amp;gt;)&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;This option skips the source code update step.  This is useful if you're running kdesrc-build again soon after the last update and don't want to wait to find out there were no changes.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;tt&amp;gt;[http://kdesrc-build.kde.org/documentation/cmdline.html#cmdline-refresh-build --refresh-build]&amp;lt;/tt&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;This option causes kdesrc-build to delete the current build information for the given modules and start building them again from scratch.  This option takes a lot of time but gives the best chance of a successful build.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Any other non-option arguments on the command line are assumed to be modules to build (and are built in the order provided on the command line).  If no modules are specified, all of the modules listed in the ~/.kdesrc-buildrc are built in the order listed in the file.&lt;br /&gt;
&lt;br /&gt;
== Build ==&lt;br /&gt;
We're almost there.  If you're happy with your settings then it's time to test out kdesrc-build.  In theory things are as simple as running kdesrc-build and then coming back later. ;)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd ~/kdesrc&lt;br /&gt;
./kdesrc-build&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You may want to test by building qt-copy first however.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd ~/kdesrc&lt;br /&gt;
./kdesrc-build qt-copy&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{tip|If you have the [http://www.gnu.org/software/screen/ GNU screen] program available then you should definitely use it to run kdesrc-build, as you can detach your kdesrc-build session and logout while kdesrc-build is still running.}}&lt;br /&gt;
&lt;br /&gt;
If the build failed (kdesrc-build will error out with a nice bright red error message) then there are several possibilities:&lt;br /&gt;
&lt;br /&gt;
# You are missing a key piece of required software (such as a development library)&lt;br /&gt;
# The KDE SC code being compiled is broken in some fashion to where it won't build.  This is commonly due to newly committed code that worked on the developer's machine, or occasionally on Mondays (when incompatible changes are permitted to kdelibs).&lt;br /&gt;
# kdesrc-build is not setup properly.  You may be trying to install to a directory that you have no permissions to access for instance, or you may have specified a system qtdir that does not exist.&lt;br /&gt;
# The module may depend on a newer version of qt-copy or kdelibs (or other module).  In this case you'll have to run kdesrc-build to update the out-of-date module first.&lt;br /&gt;
&lt;br /&gt;
How do you find out what the error was?  The output of the failing command will be in the log directory.  By default, all log output is in the {{path|log}} subdirectory of the KDE SC source directory.  The log directory is laid out like this: {{path|log/date-run/module/output-file.log}}.  To simplify finding the appropriate file, there are a couple of symlinks created:&lt;br /&gt;
&lt;br /&gt;
{{path|log/latest}} always has the debugging output for the last time kdesrc-build was run (--pretend doesn't count toward this)&lt;br /&gt;
{{path|log/latest/&amp;amp;lt;module&amp;amp;gt;/error.log}} has the debugging output for the command that caused a module build to fail.&lt;br /&gt;
&lt;br /&gt;
For instance if qt-copy just failed to build you could read the output like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd ~/kderc&lt;br /&gt;
kwrite log/latest/qt-copy/error.log&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replace kwrite with your preferred editor.  Hopefully the output can guide you to resolving the problem.  For instance, if the failure is a cmake output saying you're missing a library, install that library and try again. ;)  For link errors you can try running a --refresh-build on the module (or if that doesn't work, required libraries like qt-copy and kdelibs).&lt;br /&gt;
&lt;br /&gt;
If you're stumped by the error you may want to wait a day and try updating again, and hope that the reason for the error has been fixed.  You can also try mailing the [http://www.kde.org/mailinglists/ kde-devel] mailing list to see if others know about the problem or have had similar issues.&lt;br /&gt;
&lt;br /&gt;
== Running KDE ==&lt;br /&gt;
&lt;br /&gt;
Assuming you got enough of the modules to build and install to have a working KDE installation, you'll still need to setup your environment correctly to run it.  kdesrc-build doesn't help you out here (yet), so you should follow the instructions [[Getting_Started/Using_an_IDE_with_KDE4|here]].&lt;br /&gt;
&lt;br /&gt;
Make sure to use the same paths as the ones you defined in .kdesrc-buildrc: for the KDEDIRS and KDEDIR variable use the setting of the &amp;quot;prefix&amp;quot; option (in the global section). For the QTDIR variable use the setting of the &amp;quot;qtdir&amp;quot; option.&lt;br /&gt;
&lt;br /&gt;
== Keeping KDE up to date ==&lt;br /&gt;
&lt;br /&gt;
Keeping your KDE installation up to date is as simple as running kdesrc-build again.  Every kdesrc-build has these phases:&lt;br /&gt;
&lt;br /&gt;
# Update the source code for all modules being built.&lt;br /&gt;
# Build and then install all the modules.&lt;br /&gt;
&lt;br /&gt;
Old build directories are not deleted by default, so the build after a small update will not normally take as long as the initial build of a module.  This is called &amp;quot;incremental make&amp;quot;.  However it may be necessary at times to perform a full rebuild due to inconsistencies between the build directory configuation and changes to the source directory.  You can use the --refresh-build option to force a full rebuild.&lt;br /&gt;
&lt;br /&gt;
For more information on how to take advantage of kdesrc-build, see the [http://kdesrc-build.kde.org/documentation online documentation] for kdesrc-build, which describes all of the module options and command line options available for kdesrc-build and gives tips on how to perform various useful tasks.&lt;br /&gt;
&lt;br /&gt;
If you have any questions that are not answered please feel free to add them under the Discussion entry for this page and hopefully someone will be able to get the answer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
* To browse the KDE Subversion repository, use [http://websvn.kde.org/trunk/KDE WebSVN].&lt;br /&gt;
* To browse any of the various KDE projects using git, you can go to [http://projects.kde.org KDE Git Projects] or to [http://gitweb.kde.org KDE Git Web].&lt;br /&gt;
* The Nokia Qt toolkit used by KDE can be browsed at [http://qt.gitorious.org/qt Nokia's Qt version on gitorious].&lt;br /&gt;
&lt;br /&gt;
[[Category:Build_KDE]]&lt;br /&gt;
[[Category:Tutorial]]&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/kdesrc-build</id>
		<title>Getting Started/Build/kdesrc-build</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/kdesrc-build"/>
				<updated>2013-01-27T09:32:28Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: /* Prerequisites */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
{{note|It is possible to build KDE 3 using older versions of kdesrc-build, but this is not described here.}}&lt;br /&gt;
&lt;br /&gt;
== Building KDE using the kdesrc-build tool ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction to kdesrc-build ===&lt;br /&gt;
&lt;br /&gt;
[http://kdesrc-build.kde.org/ kdesrc-build] (formerly kdesvn-build) is a tool to allow users and developers to easily download and build the latest versions of the  [http://www.kde.org/ KDE Software Compilation] (KDE SC) from the KDE source code repositories.  It automates the following tasks and more:&lt;br /&gt;
&lt;br /&gt;
* Performing the initial checkout.&lt;br /&gt;
* Handling updates for modules that are already checked out.&lt;br /&gt;
* Setting up the build system for the module.&lt;br /&gt;
* Performing the build and install.&lt;br /&gt;
* Specifying your CMake options or configure flags (so you don't have to remember them every time).&lt;br /&gt;
* Logging build errors so you can review them easier for troubleshooting.&lt;br /&gt;
&lt;br /&gt;
It is not the end-all for your troubles building KDE, [[../Troubleshooting|Troubleshooting]] still applies. Many errors that occur using other methods occur here too, you read the log files that are stored for you.&lt;br /&gt;
&lt;br /&gt;
=== Why use kdesrc-build? ===&lt;br /&gt;
&lt;br /&gt;
So why use kdesrc-build?  There are several reasons you may like to use it:&lt;br /&gt;
&lt;br /&gt;
# Less manual editing of commands.  Instead of having to remember to add the correct options to the cmake command line or configure command, you can setup the options once and then kdesrc-build will use your settings from then on, saving you from wasting time because you forgot to enable a setting.&lt;br /&gt;
# Command logging to help debug build failures.  kdesrc-build logs all command outputs to a file.  This has several advantages:&lt;br /&gt;
## When a module fails to build, you already have the error output saved to disk, ready to be viewed and compared with other error messages to aid debugging.&lt;br /&gt;
## Quieter output.  Even with CMake, the output of Qt or a KDE SC module build can be extensive.  kdesrc-build does not show the details of a module build (but will show the progress), instead an overview of the build process is displayed.&lt;br /&gt;
# It's just easier.  Instead of having to learn how to use the Subversion and git tools, and how to setup a KDE build system, you can specify what modules you want build, where to install them to, and any other options you want and then have kdesrc-build actually do it, even while you're away from the computer or busy doing other things.&lt;br /&gt;
# It's easy to step in yourself.  kdesrc-build uses a standard source and build directory layout, and calls the same commands you would.  So kdesrc-build will not interfere with you performing the build or editing the source yourself if you so choose.&lt;br /&gt;
&lt;br /&gt;
=== Setting up ===&lt;br /&gt;
&lt;br /&gt;
==== Prerequisites ====&lt;br /&gt;
kdesrc-build is fairly easy to install and setup, but you also need to have the right software installed to build KDE. The requirements to build KDE are available as follows:&lt;br /&gt;
&lt;br /&gt;
* KDE 4: [[../Requirements|KDE 4 Requirements]]&lt;br /&gt;
&lt;br /&gt;
kdesrc-build requires Perl 5.10 or higher. It is installed by default with most distributions, and is included in the link above. Check your version of Perl with:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;perl -v&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will also need [https://github.com/gisle/libwww-perl#readme libwww] (sometimes called LWP), a collection of Perl Internet-related modules, and [http://search.cpan.org/~toddr/XML-Parser/Parser.pm XML::Parser] to support the XML-based KDE Project database. Both of these modules are extremely common and should be available in your distribution's packager manager. For example for SUSE install them with&lt;br /&gt;
 yast -i perl-libwww-perl&lt;br /&gt;
&lt;br /&gt;
kdesrc-build itself may be packaged on your distribution, which allows you to easily install its dependencies as well. ([http://packages.debian.org/unstable/main/kdesrc-build Debian provides packages] and a Fedora package is pending a fix to the kdesrc-build sources).&lt;br /&gt;
&lt;br /&gt;
{{note|kdesrc-build is developed on a Linux system, but it should work on the various BSD distributions as well (although GNU tools may be required).}}&lt;br /&gt;
&lt;br /&gt;
==== Download and install kdesrc-build ====&lt;br /&gt;
Download kdesrc from git like this:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone git://anongit.kde.org/kdesrc-build.git ~/kdesrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Setup the configuration ====&lt;br /&gt;
Now you should [[Getting Started/Build/kdesrc-build-config|setup your configuration]]. For the most part the defaults in the included kdesrc-buildrc-sample should be sufficient.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cp ~/kdesrc-build/kdesrc-buildrc-sample ~/.kdesrc-buildrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can start kdesrc-build using the commands&lt;br /&gt;
 cd&lt;br /&gt;
 kdesrc-build/kdesrc-build&lt;br /&gt;
&lt;br /&gt;
Now you can edit the configuration file ~/.kdesrc-buildrc&lt;br /&gt;
&lt;br /&gt;
{{tip|Note that the config file's name begins with a leading ., making it a hidden file. You may need to show hidden files in Dolphin or Konqueror to find the configuration file to edit it. Or, you can edit the sample before copying it to ~/.kdesrc-buildrc.}}&lt;br /&gt;
&lt;br /&gt;
Also, make sure that the modules you'll want to build are included. You'll want the following at the least:&lt;br /&gt;
&lt;br /&gt;
* qt-copy, kdesupport, kdelibs, kdepimlibs, kdebase&lt;br /&gt;
&lt;br /&gt;
Modules are built in the order they appear in your ~/.kdesrc-buildrc, so the first module should be qt-copy, kdelibs should be before any other KDE SC module, and so on.&lt;br /&gt;
&lt;br /&gt;
{{note|The sample configuration file does include these modules by default, you won't need to make many changes unless you'd like to add some modules to the build by uncommenting them.}}&lt;br /&gt;
&lt;br /&gt;
You may want to enable the make-install-prefix option if you are installing KDE SC or Qt to a directory that is not in your home directory.  make-install-prefix allows you to run su or sudo during the make install process so you can install files as root, or set certain programs to execute with higher permissions (This is required for certain programs to execute properly).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;module kdelibs&lt;br /&gt;
  make-install-prefix sudo -S # sudo with no stdin&lt;br /&gt;
end module&lt;br /&gt;
&lt;br /&gt;
module kdebase&lt;br /&gt;
  make-install-prefix sudo -S&lt;br /&gt;
end module&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If a module you'd like to build isn't already present, simply add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;module &amp;amp;lt;module-name&amp;amp;gt;&lt;br /&gt;
end module&amp;lt;/pre&amp;gt; at the end of the ~/.kdesrc-buildrc. &amp;amp;lt;module-name&amp;amp;gt; would be whatever the module is called in the software repository (for instance, kdemultimedia).&lt;br /&gt;
&lt;br /&gt;
===== Git-based modules =====&lt;br /&gt;
&lt;br /&gt;
Some KDE projects use the &amp;quot;git&amp;quot; source-control software instead of Subversion (as part of an ongoing migration to git). This includes software like Amarok and Konversation.&lt;br /&gt;
&lt;br /&gt;
To build these modules in kdesrc-build, you just need to add a couple of lines to the module configuration. For example, konversation is developed in the Git repository at [https://projects.kde.org/projects/extragear/network/konversation/repository]. So you would just add a module (you can pick whatever name for the module you like, as long as it's not already used):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;module konversation&lt;br /&gt;
    repository git://anongit.kde.org/konversation&lt;br /&gt;
    branch master&lt;br /&gt;
end module&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case I selected the &amp;quot;master&amp;quot; branch since that is the default git branch.&lt;br /&gt;
&lt;br /&gt;
Now whenever you build konversation, kdesrc-build will use git instead of Subversion.&lt;br /&gt;
&lt;br /&gt;
==== Useful kdesrc-build commands ====&lt;br /&gt;
kdesrc-build is driven from the command line, so here's a guide to some of the more useful command line options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table cellpadding=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Option&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Effect&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;tt&amp;gt;&amp;lt;span style=&amp;quot;white-space:nowrap;&amp;quot;&amp;gt;[http://kdesrc-build.kde.org/documentation/cmdline.html#cmdline-pretend --pretend]&amp;lt;/span&amp;gt;&amp;lt;/tt&amp;gt; (Short&amp;amp;nbsp;form&amp;amp;nbsp;&amp;lt;tt&amp;gt;&amp;lt;span style=&amp;quot;white-space:nowrap;&amp;quot;&amp;gt;-p&amp;lt;/span&amp;gt;&amp;lt;/tt&amp;gt;)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This option is like a dry run.  kdesrc-build will process the options and its configuration like normal, and run through the build as normal, but instead of downloading or running the build will instead output what kdesrc-build would have done.  You should always run with -p before running kdesrc-build to make sure it is doing what you expect.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;tt&amp;gt;[http://kdesrc-build.kde.org/documentation/cmdline.html#cmdline-no-svn --no-svn]&amp;lt;/tt&amp;gt; (Alt. form &amp;lt;tt&amp;gt;--no-src&amp;lt;/tt&amp;gt;)&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;This option skips the source code update step.  This is useful if you're running kdesrc-build again soon after the last update and don't want to wait to find out there were no changes.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;tt&amp;gt;[http://kdesrc-build.kde.org/documentation/cmdline.html#cmdline-refresh-build --refresh-build]&amp;lt;/tt&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;This option causes kdesrc-build to delete the current build information for the given modules and start building them again from scratch.  This option takes a lot of time but gives the best chance of a successful build.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Any other non-option arguments on the command line are assumed to be modules to build (and are built in the order provided on the command line).  If no modules are specified, all of the modules listed in the ~/.kdesrc-buildrc are built in the order listed in the file.&lt;br /&gt;
&lt;br /&gt;
== Build ==&lt;br /&gt;
We're almost there.  If you're happy with your settings then it's time to test out kdesrc-build.  In theory things are as simple as running kdesrc-build and then coming back later. ;)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd ~/kdesrc&lt;br /&gt;
./kdesrc-build&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You may want to test by building qt-copy first however.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd ~/kdesrc&lt;br /&gt;
./kdesrc-build qt-copy&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{tip|If you have the [http://www.gnu.org/software/screen/ GNU screen] program available then you should definitely use it to run kdesrc-build, as you can detach your kdesrc-build session and logout while kdesrc-build is still running.}}&lt;br /&gt;
&lt;br /&gt;
If the build failed (kdesrc-build will error out with a nice bright red error message) then there are several possibilities:&lt;br /&gt;
&lt;br /&gt;
# You are missing a key piece of required software (such as a development library)&lt;br /&gt;
# The KDE SC code being compiled is broken in some fashion to where it won't build.  This is commonly due to newly committed code that worked on the developer's machine, or occasionally on Mondays (when incompatible changes are permitted to kdelibs).&lt;br /&gt;
# kdesrc-build is not setup properly.  You may be trying to install to a directory that you have no permissions to access for instance, or you may have specified a system qtdir that does not exist.&lt;br /&gt;
# The module may depend on a newer version of qt-copy or kdelibs (or other module).  In this case you'll have to run kdesrc-build to update the out-of-date module first.&lt;br /&gt;
&lt;br /&gt;
How do you find out what the error was?  The output of the failing command will be in the log directory.  By default, all log output is in the {{path|log}} subdirectory of the KDE SC source directory.  The log directory is laid out like this: {{path|log/date-run/module/output-file.log}}.  To simplify finding the appropriate file, there are a couple of symlinks created:&lt;br /&gt;
&lt;br /&gt;
{{path|log/latest}} always has the debugging output for the last time kdesrc-build was run (--pretend doesn't count toward this)&lt;br /&gt;
{{path|log/latest/&amp;amp;lt;module&amp;amp;gt;/error.log}} has the debugging output for the command that caused a module build to fail.&lt;br /&gt;
&lt;br /&gt;
For instance if qt-copy just failed to build you could read the output like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd ~/kderc&lt;br /&gt;
kwrite log/latest/qt-copy/error.log&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replace kwrite with your preferred editor.  Hopefully the output can guide you to resolving the problem.  For instance, if the failure is a cmake output saying you're missing a library, install that library and try again. ;)  For link errors you can try running a --refresh-build on the module (or if that doesn't work, required libraries like qt-copy and kdelibs).&lt;br /&gt;
&lt;br /&gt;
If you're stumped by the error you may want to wait a day and try updating again, and hope that the reason for the error has been fixed.  You can also try mailing the [http://www.kde.org/mailinglists/ kde-devel] mailing list to see if others know about the problem or have had similar issues.&lt;br /&gt;
&lt;br /&gt;
== Running KDE ==&lt;br /&gt;
&lt;br /&gt;
Assuming you got enough of the modules to build and install to have a working KDE installation, you'll still need to setup your environment correctly to run it.  kdesrc-build doesn't help you out here (yet), so you should follow the instructions [[Getting_Started/Using_an_IDE_with_KDE4|here]].&lt;br /&gt;
&lt;br /&gt;
Make sure to use the same paths as the ones you defined in .kdesrc-buildrc: for the KDEDIRS and KDEDIR variable use the setting of the &amp;quot;prefix&amp;quot; option (in the global section). For the QTDIR variable use the setting of the &amp;quot;qtdir&amp;quot; option.&lt;br /&gt;
&lt;br /&gt;
== Keeping KDE up to date ==&lt;br /&gt;
&lt;br /&gt;
Keeping your KDE installation up to date is as simple as running kdesrc-build again.  Every kdesrc-build has these phases:&lt;br /&gt;
&lt;br /&gt;
# Update the source code for all modules being built.&lt;br /&gt;
# Build and then install all the modules.&lt;br /&gt;
&lt;br /&gt;
Old build directories are not deleted by default, so the build after a small update will not normally take as long as the initial build of a module.  This is called &amp;quot;incremental make&amp;quot;.  However it may be necessary at times to perform a full rebuild due to inconsistencies between the build directory configuation and changes to the source directory.  You can use the --refresh-build option to force a full rebuild.&lt;br /&gt;
&lt;br /&gt;
For more information on how to take advantage of kdesrc-build, see the [http://kdesrc-build.kde.org/documentation online documentation] for kdesrc-build, which describes all of the module options and command line options available for kdesrc-build and gives tips on how to perform various useful tasks.&lt;br /&gt;
&lt;br /&gt;
If you have any questions that are not answered please feel free to add them under the Discussion entry for this page and hopefully someone will be able to get the answer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
* To browse the KDE Subversion repository, use [http://websvn.kde.org/trunk/KDE WebSVN].&lt;br /&gt;
* To browse any of the various KDE projects using git, you can go to [http://projects.kde.org KDE Git Projects] or to [http://gitweb.kde.org KDE Git Web].&lt;br /&gt;
* The Nokia Qt toolkit used by KDE can be browsed at [http://qt.gitorious.org/qt Nokia's Qt version on gitorious].&lt;br /&gt;
&lt;br /&gt;
[[Category:Build_KDE]]&lt;br /&gt;
[[Category:Tutorial]]&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Thread:Talk:Installing_third_party_softwares_in_terminal/Build/kdesrc-build/error_message_when_starting</id>
		<title>Thread:Talk:Installing third party softwares in terminal/Build/kdesrc-build/error message when starting</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Thread:Talk:Installing_third_party_softwares_in_terminal/Build/kdesrc-build/error_message_when_starting"/>
				<updated>2013-01-27T09:30:33Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: New thread: error message when starting&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I get &lt;br /&gt;
  # kdesrc-build/kdesrc-build&lt;br /&gt;
 Can't locate LWP/UserAgent.pm in @INC (@INC contains: /root/kdesrc-build/modules /root/kdesrc-build/../share/apps/kdesrc-build/modules /usr/lib/perl5/site_perl/5.16.0/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.16.0 /usr/lib/perl5/vendor_perl/5.16.0/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.16.0 /usr/lib/perl5/5.16.0/x86_64-linux-thread-multi /usr/lib/perl5/5.16.0 /usr/lib/perl5/site_perl .) at kdesrc-build/kdesrc-build line 54.&lt;br /&gt;
 BEGIN failed--compilation aborted at kdesrc-build/kdesrc-build line 54.&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/kdesrc-build</id>
		<title>Getting Started/Build/kdesrc-build</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/kdesrc-build"/>
				<updated>2013-01-27T09:28:54Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: /* Setup the configuration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
{{note|It is possible to build KDE 3 using older versions of kdesrc-build, but this is not described here.}}&lt;br /&gt;
&lt;br /&gt;
== Building KDE using the kdesrc-build tool ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction to kdesrc-build ===&lt;br /&gt;
&lt;br /&gt;
[http://kdesrc-build.kde.org/ kdesrc-build] (formerly kdesvn-build) is a tool to allow users and developers to easily download and build the latest versions of the  [http://www.kde.org/ KDE Software Compilation] (KDE SC) from the KDE source code repositories.  It automates the following tasks and more:&lt;br /&gt;
&lt;br /&gt;
* Performing the initial checkout.&lt;br /&gt;
* Handling updates for modules that are already checked out.&lt;br /&gt;
* Setting up the build system for the module.&lt;br /&gt;
* Performing the build and install.&lt;br /&gt;
* Specifying your CMake options or configure flags (so you don't have to remember them every time).&lt;br /&gt;
* Logging build errors so you can review them easier for troubleshooting.&lt;br /&gt;
&lt;br /&gt;
It is not the end-all for your troubles building KDE, [[../Troubleshooting|Troubleshooting]] still applies. Many errors that occur using other methods occur here too, you read the log files that are stored for you.&lt;br /&gt;
&lt;br /&gt;
=== Why use kdesrc-build? ===&lt;br /&gt;
&lt;br /&gt;
So why use kdesrc-build?  There are several reasons you may like to use it:&lt;br /&gt;
&lt;br /&gt;
# Less manual editing of commands.  Instead of having to remember to add the correct options to the cmake command line or configure command, you can setup the options once and then kdesrc-build will use your settings from then on, saving you from wasting time because you forgot to enable a setting.&lt;br /&gt;
# Command logging to help debug build failures.  kdesrc-build logs all command outputs to a file.  This has several advantages:&lt;br /&gt;
## When a module fails to build, you already have the error output saved to disk, ready to be viewed and compared with other error messages to aid debugging.&lt;br /&gt;
## Quieter output.  Even with CMake, the output of Qt or a KDE SC module build can be extensive.  kdesrc-build does not show the details of a module build (but will show the progress), instead an overview of the build process is displayed.&lt;br /&gt;
# It's just easier.  Instead of having to learn how to use the Subversion and git tools, and how to setup a KDE build system, you can specify what modules you want build, where to install them to, and any other options you want and then have kdesrc-build actually do it, even while you're away from the computer or busy doing other things.&lt;br /&gt;
# It's easy to step in yourself.  kdesrc-build uses a standard source and build directory layout, and calls the same commands you would.  So kdesrc-build will not interfere with you performing the build or editing the source yourself if you so choose.&lt;br /&gt;
&lt;br /&gt;
=== Setting up ===&lt;br /&gt;
&lt;br /&gt;
==== Prerequisites ====&lt;br /&gt;
kdesrc-build is fairly easy to install and setup, but you also need to have the right software installed to build KDE. The requirements to build KDE are available as follows:&lt;br /&gt;
&lt;br /&gt;
* KDE 4: [[../Requirements|KDE 4 Requirements]]&lt;br /&gt;
&lt;br /&gt;
kdesrc-build requires Perl 5.10 or higher. It is installed by default with most distributions, and is included in the link above. Check your version of Perl with:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;perl -v&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will also need [https://github.com/gisle/libwww-perl#readme libwww] (sometimes called LWP), a collection of Perl Internet-related modules, and [http://search.cpan.org/~toddr/XML-Parser/Parser.pm XML::Parser] to support the XML-based KDE Project database. Both of these modules are extremely common and should be available in your distribution's packager manager.&lt;br /&gt;
&lt;br /&gt;
kdesrc-build itself may be packaged on your distribution, which allows you to easily install its dependencies as well. ([http://packages.debian.org/unstable/main/kdesrc-build Debian provides packages] and a Fedora package is pending a fix to the kdesrc-build sources).&lt;br /&gt;
&lt;br /&gt;
{{note|kdesrc-build is developed on a Linux system, but it should work on the various BSD distributions as well (although GNU tools may be required).}}&lt;br /&gt;
&lt;br /&gt;
==== Download and install kdesrc-build ====&lt;br /&gt;
Download kdesrc from git like this:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone git://anongit.kde.org/kdesrc-build.git ~/kdesrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Setup the configuration ====&lt;br /&gt;
Now you should [[Getting Started/Build/kdesrc-build-config|setup your configuration]]. For the most part the defaults in the included kdesrc-buildrc-sample should be sufficient.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cp ~/kdesrc-build/kdesrc-buildrc-sample ~/.kdesrc-buildrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can start kdesrc-build using the commands&lt;br /&gt;
 cd&lt;br /&gt;
 kdesrc-build/kdesrc-build&lt;br /&gt;
&lt;br /&gt;
Now you can edit the configuration file ~/.kdesrc-buildrc&lt;br /&gt;
&lt;br /&gt;
{{tip|Note that the config file's name begins with a leading ., making it a hidden file. You may need to show hidden files in Dolphin or Konqueror to find the configuration file to edit it. Or, you can edit the sample before copying it to ~/.kdesrc-buildrc.}}&lt;br /&gt;
&lt;br /&gt;
Also, make sure that the modules you'll want to build are included. You'll want the following at the least:&lt;br /&gt;
&lt;br /&gt;
* qt-copy, kdesupport, kdelibs, kdepimlibs, kdebase&lt;br /&gt;
&lt;br /&gt;
Modules are built in the order they appear in your ~/.kdesrc-buildrc, so the first module should be qt-copy, kdelibs should be before any other KDE SC module, and so on.&lt;br /&gt;
&lt;br /&gt;
{{note|The sample configuration file does include these modules by default, you won't need to make many changes unless you'd like to add some modules to the build by uncommenting them.}}&lt;br /&gt;
&lt;br /&gt;
You may want to enable the make-install-prefix option if you are installing KDE SC or Qt to a directory that is not in your home directory.  make-install-prefix allows you to run su or sudo during the make install process so you can install files as root, or set certain programs to execute with higher permissions (This is required for certain programs to execute properly).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;module kdelibs&lt;br /&gt;
  make-install-prefix sudo -S # sudo with no stdin&lt;br /&gt;
end module&lt;br /&gt;
&lt;br /&gt;
module kdebase&lt;br /&gt;
  make-install-prefix sudo -S&lt;br /&gt;
end module&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If a module you'd like to build isn't already present, simply add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;module &amp;amp;lt;module-name&amp;amp;gt;&lt;br /&gt;
end module&amp;lt;/pre&amp;gt; at the end of the ~/.kdesrc-buildrc. &amp;amp;lt;module-name&amp;amp;gt; would be whatever the module is called in the software repository (for instance, kdemultimedia).&lt;br /&gt;
&lt;br /&gt;
===== Git-based modules =====&lt;br /&gt;
&lt;br /&gt;
Some KDE projects use the &amp;quot;git&amp;quot; source-control software instead of Subversion (as part of an ongoing migration to git). This includes software like Amarok and Konversation.&lt;br /&gt;
&lt;br /&gt;
To build these modules in kdesrc-build, you just need to add a couple of lines to the module configuration. For example, konversation is developed in the Git repository at [https://projects.kde.org/projects/extragear/network/konversation/repository]. So you would just add a module (you can pick whatever name for the module you like, as long as it's not already used):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;module konversation&lt;br /&gt;
    repository git://anongit.kde.org/konversation&lt;br /&gt;
    branch master&lt;br /&gt;
end module&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case I selected the &amp;quot;master&amp;quot; branch since that is the default git branch.&lt;br /&gt;
&lt;br /&gt;
Now whenever you build konversation, kdesrc-build will use git instead of Subversion.&lt;br /&gt;
&lt;br /&gt;
==== Useful kdesrc-build commands ====&lt;br /&gt;
kdesrc-build is driven from the command line, so here's a guide to some of the more useful command line options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table cellpadding=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Option&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Effect&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;tt&amp;gt;&amp;lt;span style=&amp;quot;white-space:nowrap;&amp;quot;&amp;gt;[http://kdesrc-build.kde.org/documentation/cmdline.html#cmdline-pretend --pretend]&amp;lt;/span&amp;gt;&amp;lt;/tt&amp;gt; (Short&amp;amp;nbsp;form&amp;amp;nbsp;&amp;lt;tt&amp;gt;&amp;lt;span style=&amp;quot;white-space:nowrap;&amp;quot;&amp;gt;-p&amp;lt;/span&amp;gt;&amp;lt;/tt&amp;gt;)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This option is like a dry run.  kdesrc-build will process the options and its configuration like normal, and run through the build as normal, but instead of downloading or running the build will instead output what kdesrc-build would have done.  You should always run with -p before running kdesrc-build to make sure it is doing what you expect.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;tt&amp;gt;[http://kdesrc-build.kde.org/documentation/cmdline.html#cmdline-no-svn --no-svn]&amp;lt;/tt&amp;gt; (Alt. form &amp;lt;tt&amp;gt;--no-src&amp;lt;/tt&amp;gt;)&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;This option skips the source code update step.  This is useful if you're running kdesrc-build again soon after the last update and don't want to wait to find out there were no changes.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;tt&amp;gt;[http://kdesrc-build.kde.org/documentation/cmdline.html#cmdline-refresh-build --refresh-build]&amp;lt;/tt&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;This option causes kdesrc-build to delete the current build information for the given modules and start building them again from scratch.  This option takes a lot of time but gives the best chance of a successful build.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Any other non-option arguments on the command line are assumed to be modules to build (and are built in the order provided on the command line).  If no modules are specified, all of the modules listed in the ~/.kdesrc-buildrc are built in the order listed in the file.&lt;br /&gt;
&lt;br /&gt;
== Build ==&lt;br /&gt;
We're almost there.  If you're happy with your settings then it's time to test out kdesrc-build.  In theory things are as simple as running kdesrc-build and then coming back later. ;)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd ~/kdesrc&lt;br /&gt;
./kdesrc-build&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You may want to test by building qt-copy first however.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd ~/kdesrc&lt;br /&gt;
./kdesrc-build qt-copy&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{tip|If you have the [http://www.gnu.org/software/screen/ GNU screen] program available then you should definitely use it to run kdesrc-build, as you can detach your kdesrc-build session and logout while kdesrc-build is still running.}}&lt;br /&gt;
&lt;br /&gt;
If the build failed (kdesrc-build will error out with a nice bright red error message) then there are several possibilities:&lt;br /&gt;
&lt;br /&gt;
# You are missing a key piece of required software (such as a development library)&lt;br /&gt;
# The KDE SC code being compiled is broken in some fashion to where it won't build.  This is commonly due to newly committed code that worked on the developer's machine, or occasionally on Mondays (when incompatible changes are permitted to kdelibs).&lt;br /&gt;
# kdesrc-build is not setup properly.  You may be trying to install to a directory that you have no permissions to access for instance, or you may have specified a system qtdir that does not exist.&lt;br /&gt;
# The module may depend on a newer version of qt-copy or kdelibs (or other module).  In this case you'll have to run kdesrc-build to update the out-of-date module first.&lt;br /&gt;
&lt;br /&gt;
How do you find out what the error was?  The output of the failing command will be in the log directory.  By default, all log output is in the {{path|log}} subdirectory of the KDE SC source directory.  The log directory is laid out like this: {{path|log/date-run/module/output-file.log}}.  To simplify finding the appropriate file, there are a couple of symlinks created:&lt;br /&gt;
&lt;br /&gt;
{{path|log/latest}} always has the debugging output for the last time kdesrc-build was run (--pretend doesn't count toward this)&lt;br /&gt;
{{path|log/latest/&amp;amp;lt;module&amp;amp;gt;/error.log}} has the debugging output for the command that caused a module build to fail.&lt;br /&gt;
&lt;br /&gt;
For instance if qt-copy just failed to build you could read the output like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd ~/kderc&lt;br /&gt;
kwrite log/latest/qt-copy/error.log&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replace kwrite with your preferred editor.  Hopefully the output can guide you to resolving the problem.  For instance, if the failure is a cmake output saying you're missing a library, install that library and try again. ;)  For link errors you can try running a --refresh-build on the module (or if that doesn't work, required libraries like qt-copy and kdelibs).&lt;br /&gt;
&lt;br /&gt;
If you're stumped by the error you may want to wait a day and try updating again, and hope that the reason for the error has been fixed.  You can also try mailing the [http://www.kde.org/mailinglists/ kde-devel] mailing list to see if others know about the problem or have had similar issues.&lt;br /&gt;
&lt;br /&gt;
== Running KDE ==&lt;br /&gt;
&lt;br /&gt;
Assuming you got enough of the modules to build and install to have a working KDE installation, you'll still need to setup your environment correctly to run it.  kdesrc-build doesn't help you out here (yet), so you should follow the instructions [[Getting_Started/Using_an_IDE_with_KDE4|here]].&lt;br /&gt;
&lt;br /&gt;
Make sure to use the same paths as the ones you defined in .kdesrc-buildrc: for the KDEDIRS and KDEDIR variable use the setting of the &amp;quot;prefix&amp;quot; option (in the global section). For the QTDIR variable use the setting of the &amp;quot;qtdir&amp;quot; option.&lt;br /&gt;
&lt;br /&gt;
== Keeping KDE up to date ==&lt;br /&gt;
&lt;br /&gt;
Keeping your KDE installation up to date is as simple as running kdesrc-build again.  Every kdesrc-build has these phases:&lt;br /&gt;
&lt;br /&gt;
# Update the source code for all modules being built.&lt;br /&gt;
# Build and then install all the modules.&lt;br /&gt;
&lt;br /&gt;
Old build directories are not deleted by default, so the build after a small update will not normally take as long as the initial build of a module.  This is called &amp;quot;incremental make&amp;quot;.  However it may be necessary at times to perform a full rebuild due to inconsistencies between the build directory configuation and changes to the source directory.  You can use the --refresh-build option to force a full rebuild.&lt;br /&gt;
&lt;br /&gt;
For more information on how to take advantage of kdesrc-build, see the [http://kdesrc-build.kde.org/documentation online documentation] for kdesrc-build, which describes all of the module options and command line options available for kdesrc-build and gives tips on how to perform various useful tasks.&lt;br /&gt;
&lt;br /&gt;
If you have any questions that are not answered please feel free to add them under the Discussion entry for this page and hopefully someone will be able to get the answer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
* To browse the KDE Subversion repository, use [http://websvn.kde.org/trunk/KDE WebSVN].&lt;br /&gt;
* To browse any of the various KDE projects using git, you can go to [http://projects.kde.org KDE Git Projects] or to [http://gitweb.kde.org KDE Git Web].&lt;br /&gt;
* The Nokia Qt toolkit used by KDE can be browsed at [http://qt.gitorious.org/qt Nokia's Qt version on gitorious].&lt;br /&gt;
&lt;br /&gt;
[[Category:Build_KDE]]&lt;br /&gt;
[[Category:Tutorial]]&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/kdesrc-build</id>
		<title>Getting Started/Build/kdesrc-build</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/kdesrc-build"/>
				<updated>2013-01-27T09:27:30Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: /* Setup the configuration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
{{note|It is possible to build KDE 3 using older versions of kdesrc-build, but this is not described here.}}&lt;br /&gt;
&lt;br /&gt;
== Building KDE using the kdesrc-build tool ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction to kdesrc-build ===&lt;br /&gt;
&lt;br /&gt;
[http://kdesrc-build.kde.org/ kdesrc-build] (formerly kdesvn-build) is a tool to allow users and developers to easily download and build the latest versions of the  [http://www.kde.org/ KDE Software Compilation] (KDE SC) from the KDE source code repositories.  It automates the following tasks and more:&lt;br /&gt;
&lt;br /&gt;
* Performing the initial checkout.&lt;br /&gt;
* Handling updates for modules that are already checked out.&lt;br /&gt;
* Setting up the build system for the module.&lt;br /&gt;
* Performing the build and install.&lt;br /&gt;
* Specifying your CMake options or configure flags (so you don't have to remember them every time).&lt;br /&gt;
* Logging build errors so you can review them easier for troubleshooting.&lt;br /&gt;
&lt;br /&gt;
It is not the end-all for your troubles building KDE, [[../Troubleshooting|Troubleshooting]] still applies. Many errors that occur using other methods occur here too, you read the log files that are stored for you.&lt;br /&gt;
&lt;br /&gt;
=== Why use kdesrc-build? ===&lt;br /&gt;
&lt;br /&gt;
So why use kdesrc-build?  There are several reasons you may like to use it:&lt;br /&gt;
&lt;br /&gt;
# Less manual editing of commands.  Instead of having to remember to add the correct options to the cmake command line or configure command, you can setup the options once and then kdesrc-build will use your settings from then on, saving you from wasting time because you forgot to enable a setting.&lt;br /&gt;
# Command logging to help debug build failures.  kdesrc-build logs all command outputs to a file.  This has several advantages:&lt;br /&gt;
## When a module fails to build, you already have the error output saved to disk, ready to be viewed and compared with other error messages to aid debugging.&lt;br /&gt;
## Quieter output.  Even with CMake, the output of Qt or a KDE SC module build can be extensive.  kdesrc-build does not show the details of a module build (but will show the progress), instead an overview of the build process is displayed.&lt;br /&gt;
# It's just easier.  Instead of having to learn how to use the Subversion and git tools, and how to setup a KDE build system, you can specify what modules you want build, where to install them to, and any other options you want and then have kdesrc-build actually do it, even while you're away from the computer or busy doing other things.&lt;br /&gt;
# It's easy to step in yourself.  kdesrc-build uses a standard source and build directory layout, and calls the same commands you would.  So kdesrc-build will not interfere with you performing the build or editing the source yourself if you so choose.&lt;br /&gt;
&lt;br /&gt;
=== Setting up ===&lt;br /&gt;
&lt;br /&gt;
==== Prerequisites ====&lt;br /&gt;
kdesrc-build is fairly easy to install and setup, but you also need to have the right software installed to build KDE. The requirements to build KDE are available as follows:&lt;br /&gt;
&lt;br /&gt;
* KDE 4: [[../Requirements|KDE 4 Requirements]]&lt;br /&gt;
&lt;br /&gt;
kdesrc-build requires Perl 5.10 or higher. It is installed by default with most distributions, and is included in the link above. Check your version of Perl with:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;perl -v&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will also need [https://github.com/gisle/libwww-perl#readme libwww] (sometimes called LWP), a collection of Perl Internet-related modules, and [http://search.cpan.org/~toddr/XML-Parser/Parser.pm XML::Parser] to support the XML-based KDE Project database. Both of these modules are extremely common and should be available in your distribution's packager manager.&lt;br /&gt;
&lt;br /&gt;
kdesrc-build itself may be packaged on your distribution, which allows you to easily install its dependencies as well. ([http://packages.debian.org/unstable/main/kdesrc-build Debian provides packages] and a Fedora package is pending a fix to the kdesrc-build sources).&lt;br /&gt;
&lt;br /&gt;
{{note|kdesrc-build is developed on a Linux system, but it should work on the various BSD distributions as well (although GNU tools may be required).}}&lt;br /&gt;
&lt;br /&gt;
==== Download and install kdesrc-build ====&lt;br /&gt;
Download kdesrc from git like this:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone git://anongit.kde.org/kdesrc-build.git ~/kdesrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Setup the configuration ====&lt;br /&gt;
Now you should [[Getting Started/Build/kdesrc-build-config|setup your configuration]]. For the most part the defaults in the included kdesrc-buildrc-sample should be sufficient.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cp ~/kdesrc-build/kdesrc-buildrc-sample ~/.kdesrc-buildrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can start kdesrc-build using the commands&lt;br /&gt;
 cd&lt;br /&gt;
 ./kdesrc-build&lt;br /&gt;
&lt;br /&gt;
Now you can edit the configuration file ~/.kdesrc-buildrc&lt;br /&gt;
&lt;br /&gt;
{{tip|Note that the config file's name begins with a leading ., making it a hidden file. You may need to show hidden files in Dolphin or Konqueror to find the configuration file to edit it. Or, you can edit the sample before copying it to ~/.kdesrc-buildrc.}}&lt;br /&gt;
&lt;br /&gt;
Also, make sure that the modules you'll want to build are included. You'll want the following at the least:&lt;br /&gt;
&lt;br /&gt;
* qt-copy, kdesupport, kdelibs, kdepimlibs, kdebase&lt;br /&gt;
&lt;br /&gt;
Modules are built in the order they appear in your ~/.kdesrc-buildrc, so the first module should be qt-copy, kdelibs should be before any other KDE SC module, and so on.&lt;br /&gt;
&lt;br /&gt;
{{note|The sample configuration file does include these modules by default, you won't need to make many changes unless you'd like to add some modules to the build by uncommenting them.}}&lt;br /&gt;
&lt;br /&gt;
You may want to enable the make-install-prefix option if you are installing KDE SC or Qt to a directory that is not in your home directory.  make-install-prefix allows you to run su or sudo during the make install process so you can install files as root, or set certain programs to execute with higher permissions (This is required for certain programs to execute properly).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;module kdelibs&lt;br /&gt;
  make-install-prefix sudo -S # sudo with no stdin&lt;br /&gt;
end module&lt;br /&gt;
&lt;br /&gt;
module kdebase&lt;br /&gt;
  make-install-prefix sudo -S&lt;br /&gt;
end module&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If a module you'd like to build isn't already present, simply add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;module &amp;amp;lt;module-name&amp;amp;gt;&lt;br /&gt;
end module&amp;lt;/pre&amp;gt; at the end of the ~/.kdesrc-buildrc. &amp;amp;lt;module-name&amp;amp;gt; would be whatever the module is called in the software repository (for instance, kdemultimedia).&lt;br /&gt;
&lt;br /&gt;
===== Git-based modules =====&lt;br /&gt;
&lt;br /&gt;
Some KDE projects use the &amp;quot;git&amp;quot; source-control software instead of Subversion (as part of an ongoing migration to git). This includes software like Amarok and Konversation.&lt;br /&gt;
&lt;br /&gt;
To build these modules in kdesrc-build, you just need to add a couple of lines to the module configuration. For example, konversation is developed in the Git repository at [https://projects.kde.org/projects/extragear/network/konversation/repository]. So you would just add a module (you can pick whatever name for the module you like, as long as it's not already used):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;module konversation&lt;br /&gt;
    repository git://anongit.kde.org/konversation&lt;br /&gt;
    branch master&lt;br /&gt;
end module&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case I selected the &amp;quot;master&amp;quot; branch since that is the default git branch.&lt;br /&gt;
&lt;br /&gt;
Now whenever you build konversation, kdesrc-build will use git instead of Subversion.&lt;br /&gt;
&lt;br /&gt;
==== Useful kdesrc-build commands ====&lt;br /&gt;
kdesrc-build is driven from the command line, so here's a guide to some of the more useful command line options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table cellpadding=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Option&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Effect&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;tt&amp;gt;&amp;lt;span style=&amp;quot;white-space:nowrap;&amp;quot;&amp;gt;[http://kdesrc-build.kde.org/documentation/cmdline.html#cmdline-pretend --pretend]&amp;lt;/span&amp;gt;&amp;lt;/tt&amp;gt; (Short&amp;amp;nbsp;form&amp;amp;nbsp;&amp;lt;tt&amp;gt;&amp;lt;span style=&amp;quot;white-space:nowrap;&amp;quot;&amp;gt;-p&amp;lt;/span&amp;gt;&amp;lt;/tt&amp;gt;)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This option is like a dry run.  kdesrc-build will process the options and its configuration like normal, and run through the build as normal, but instead of downloading or running the build will instead output what kdesrc-build would have done.  You should always run with -p before running kdesrc-build to make sure it is doing what you expect.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;tt&amp;gt;[http://kdesrc-build.kde.org/documentation/cmdline.html#cmdline-no-svn --no-svn]&amp;lt;/tt&amp;gt; (Alt. form &amp;lt;tt&amp;gt;--no-src&amp;lt;/tt&amp;gt;)&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;This option skips the source code update step.  This is useful if you're running kdesrc-build again soon after the last update and don't want to wait to find out there were no changes.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;tt&amp;gt;[http://kdesrc-build.kde.org/documentation/cmdline.html#cmdline-refresh-build --refresh-build]&amp;lt;/tt&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;This option causes kdesrc-build to delete the current build information for the given modules and start building them again from scratch.  This option takes a lot of time but gives the best chance of a successful build.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Any other non-option arguments on the command line are assumed to be modules to build (and are built in the order provided on the command line).  If no modules are specified, all of the modules listed in the ~/.kdesrc-buildrc are built in the order listed in the file.&lt;br /&gt;
&lt;br /&gt;
== Build ==&lt;br /&gt;
We're almost there.  If you're happy with your settings then it's time to test out kdesrc-build.  In theory things are as simple as running kdesrc-build and then coming back later. ;)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd ~/kdesrc&lt;br /&gt;
./kdesrc-build&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You may want to test by building qt-copy first however.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd ~/kdesrc&lt;br /&gt;
./kdesrc-build qt-copy&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{tip|If you have the [http://www.gnu.org/software/screen/ GNU screen] program available then you should definitely use it to run kdesrc-build, as you can detach your kdesrc-build session and logout while kdesrc-build is still running.}}&lt;br /&gt;
&lt;br /&gt;
If the build failed (kdesrc-build will error out with a nice bright red error message) then there are several possibilities:&lt;br /&gt;
&lt;br /&gt;
# You are missing a key piece of required software (such as a development library)&lt;br /&gt;
# The KDE SC code being compiled is broken in some fashion to where it won't build.  This is commonly due to newly committed code that worked on the developer's machine, or occasionally on Mondays (when incompatible changes are permitted to kdelibs).&lt;br /&gt;
# kdesrc-build is not setup properly.  You may be trying to install to a directory that you have no permissions to access for instance, or you may have specified a system qtdir that does not exist.&lt;br /&gt;
# The module may depend on a newer version of qt-copy or kdelibs (or other module).  In this case you'll have to run kdesrc-build to update the out-of-date module first.&lt;br /&gt;
&lt;br /&gt;
How do you find out what the error was?  The output of the failing command will be in the log directory.  By default, all log output is in the {{path|log}} subdirectory of the KDE SC source directory.  The log directory is laid out like this: {{path|log/date-run/module/output-file.log}}.  To simplify finding the appropriate file, there are a couple of symlinks created:&lt;br /&gt;
&lt;br /&gt;
{{path|log/latest}} always has the debugging output for the last time kdesrc-build was run (--pretend doesn't count toward this)&lt;br /&gt;
{{path|log/latest/&amp;amp;lt;module&amp;amp;gt;/error.log}} has the debugging output for the command that caused a module build to fail.&lt;br /&gt;
&lt;br /&gt;
For instance if qt-copy just failed to build you could read the output like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd ~/kderc&lt;br /&gt;
kwrite log/latest/qt-copy/error.log&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replace kwrite with your preferred editor.  Hopefully the output can guide you to resolving the problem.  For instance, if the failure is a cmake output saying you're missing a library, install that library and try again. ;)  For link errors you can try running a --refresh-build on the module (or if that doesn't work, required libraries like qt-copy and kdelibs).&lt;br /&gt;
&lt;br /&gt;
If you're stumped by the error you may want to wait a day and try updating again, and hope that the reason for the error has been fixed.  You can also try mailing the [http://www.kde.org/mailinglists/ kde-devel] mailing list to see if others know about the problem or have had similar issues.&lt;br /&gt;
&lt;br /&gt;
== Running KDE ==&lt;br /&gt;
&lt;br /&gt;
Assuming you got enough of the modules to build and install to have a working KDE installation, you'll still need to setup your environment correctly to run it.  kdesrc-build doesn't help you out here (yet), so you should follow the instructions [[Getting_Started/Using_an_IDE_with_KDE4|here]].&lt;br /&gt;
&lt;br /&gt;
Make sure to use the same paths as the ones you defined in .kdesrc-buildrc: for the KDEDIRS and KDEDIR variable use the setting of the &amp;quot;prefix&amp;quot; option (in the global section). For the QTDIR variable use the setting of the &amp;quot;qtdir&amp;quot; option.&lt;br /&gt;
&lt;br /&gt;
== Keeping KDE up to date ==&lt;br /&gt;
&lt;br /&gt;
Keeping your KDE installation up to date is as simple as running kdesrc-build again.  Every kdesrc-build has these phases:&lt;br /&gt;
&lt;br /&gt;
# Update the source code for all modules being built.&lt;br /&gt;
# Build and then install all the modules.&lt;br /&gt;
&lt;br /&gt;
Old build directories are not deleted by default, so the build after a small update will not normally take as long as the initial build of a module.  This is called &amp;quot;incremental make&amp;quot;.  However it may be necessary at times to perform a full rebuild due to inconsistencies between the build directory configuation and changes to the source directory.  You can use the --refresh-build option to force a full rebuild.&lt;br /&gt;
&lt;br /&gt;
For more information on how to take advantage of kdesrc-build, see the [http://kdesrc-build.kde.org/documentation online documentation] for kdesrc-build, which describes all of the module options and command line options available for kdesrc-build and gives tips on how to perform various useful tasks.&lt;br /&gt;
&lt;br /&gt;
If you have any questions that are not answered please feel free to add them under the Discussion entry for this page and hopefully someone will be able to get the answer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
* To browse the KDE Subversion repository, use [http://websvn.kde.org/trunk/KDE WebSVN].&lt;br /&gt;
* To browse any of the various KDE projects using git, you can go to [http://projects.kde.org KDE Git Projects] or to [http://gitweb.kde.org KDE Git Web].&lt;br /&gt;
* The Nokia Qt toolkit used by KDE can be browsed at [http://qt.gitorious.org/qt Nokia's Qt version on gitorious].&lt;br /&gt;
&lt;br /&gt;
[[Category:Build_KDE]]&lt;br /&gt;
[[Category:Tutorial]]&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/kdesrc-build</id>
		<title>Getting Started/Build/kdesrc-build</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/kdesrc-build"/>
				<updated>2013-01-27T09:25:55Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: the &amp;quot;download page&amp;quot; just says &amp;quot;get it from git&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
{{note|It is possible to build KDE 3 using older versions of kdesrc-build, but this is not described here.}}&lt;br /&gt;
&lt;br /&gt;
== Building KDE using the kdesrc-build tool ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction to kdesrc-build ===&lt;br /&gt;
&lt;br /&gt;
[http://kdesrc-build.kde.org/ kdesrc-build] (formerly kdesvn-build) is a tool to allow users and developers to easily download and build the latest versions of the  [http://www.kde.org/ KDE Software Compilation] (KDE SC) from the KDE source code repositories.  It automates the following tasks and more:&lt;br /&gt;
&lt;br /&gt;
* Performing the initial checkout.&lt;br /&gt;
* Handling updates for modules that are already checked out.&lt;br /&gt;
* Setting up the build system for the module.&lt;br /&gt;
* Performing the build and install.&lt;br /&gt;
* Specifying your CMake options or configure flags (so you don't have to remember them every time).&lt;br /&gt;
* Logging build errors so you can review them easier for troubleshooting.&lt;br /&gt;
&lt;br /&gt;
It is not the end-all for your troubles building KDE, [[../Troubleshooting|Troubleshooting]] still applies. Many errors that occur using other methods occur here too, you read the log files that are stored for you.&lt;br /&gt;
&lt;br /&gt;
=== Why use kdesrc-build? ===&lt;br /&gt;
&lt;br /&gt;
So why use kdesrc-build?  There are several reasons you may like to use it:&lt;br /&gt;
&lt;br /&gt;
# Less manual editing of commands.  Instead of having to remember to add the correct options to the cmake command line or configure command, you can setup the options once and then kdesrc-build will use your settings from then on, saving you from wasting time because you forgot to enable a setting.&lt;br /&gt;
# Command logging to help debug build failures.  kdesrc-build logs all command outputs to a file.  This has several advantages:&lt;br /&gt;
## When a module fails to build, you already have the error output saved to disk, ready to be viewed and compared with other error messages to aid debugging.&lt;br /&gt;
## Quieter output.  Even with CMake, the output of Qt or a KDE SC module build can be extensive.  kdesrc-build does not show the details of a module build (but will show the progress), instead an overview of the build process is displayed.&lt;br /&gt;
# It's just easier.  Instead of having to learn how to use the Subversion and git tools, and how to setup a KDE build system, you can specify what modules you want build, where to install them to, and any other options you want and then have kdesrc-build actually do it, even while you're away from the computer or busy doing other things.&lt;br /&gt;
# It's easy to step in yourself.  kdesrc-build uses a standard source and build directory layout, and calls the same commands you would.  So kdesrc-build will not interfere with you performing the build or editing the source yourself if you so choose.&lt;br /&gt;
&lt;br /&gt;
=== Setting up ===&lt;br /&gt;
&lt;br /&gt;
==== Prerequisites ====&lt;br /&gt;
kdesrc-build is fairly easy to install and setup, but you also need to have the right software installed to build KDE. The requirements to build KDE are available as follows:&lt;br /&gt;
&lt;br /&gt;
* KDE 4: [[../Requirements|KDE 4 Requirements]]&lt;br /&gt;
&lt;br /&gt;
kdesrc-build requires Perl 5.10 or higher. It is installed by default with most distributions, and is included in the link above. Check your version of Perl with:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;perl -v&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will also need [https://github.com/gisle/libwww-perl#readme libwww] (sometimes called LWP), a collection of Perl Internet-related modules, and [http://search.cpan.org/~toddr/XML-Parser/Parser.pm XML::Parser] to support the XML-based KDE Project database. Both of these modules are extremely common and should be available in your distribution's packager manager.&lt;br /&gt;
&lt;br /&gt;
kdesrc-build itself may be packaged on your distribution, which allows you to easily install its dependencies as well. ([http://packages.debian.org/unstable/main/kdesrc-build Debian provides packages] and a Fedora package is pending a fix to the kdesrc-build sources).&lt;br /&gt;
&lt;br /&gt;
{{note|kdesrc-build is developed on a Linux system, but it should work on the various BSD distributions as well (although GNU tools may be required).}}&lt;br /&gt;
&lt;br /&gt;
==== Download and install kdesrc-build ====&lt;br /&gt;
Download kdesrc from git like this:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone git://anongit.kde.org/kdesrc-build.git ~/kdesrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Setup the configuration ====&lt;br /&gt;
Now you should [[Getting Started/Build/kdesrc-build-config|setup your configuration]]. For the most part the defaults in the included kdesrc-buildrc-sample should be sufficient.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cp ~/kdesrc/kdesrc-build-1.14.1/kdesrc-buildrc-sample ~/.kdesrc-buildrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can start kdesrc-build using the commands&lt;br /&gt;
 cd&lt;br /&gt;
 ./kdesrc-build&lt;br /&gt;
&lt;br /&gt;
Now you can edit the configuration file ~/.kdesrc-buildrc&lt;br /&gt;
&lt;br /&gt;
{{tip|Note that the config file's name begins with a leading ., making it a hidden file. You may need to show hidden files in Dolphin or Konqueror to find the configuration file to edit it. Or, you can edit the sample before copying it to ~/.kdesrc-buildrc.}}&lt;br /&gt;
&lt;br /&gt;
Also, make sure that the modules you'll want to build are included. You'll want the following at the least:&lt;br /&gt;
&lt;br /&gt;
* qt-copy, kdesupport, kdelibs, kdepimlibs, kdebase&lt;br /&gt;
&lt;br /&gt;
Modules are built in the order they appear in your ~/.kdesrc-buildrc, so the first module should be qt-copy, kdelibs should be before any other KDE SC module, and so on.&lt;br /&gt;
&lt;br /&gt;
{{note|The sample configuration file does include these modules by default, you won't need to make many changes unless you'd like to add some modules to the build by uncommenting them.}}&lt;br /&gt;
&lt;br /&gt;
You may want to enable the make-install-prefix option if you are installing KDE SC or Qt to a directory that is not in your home directory.  make-install-prefix allows you to run su or sudo during the make install process so you can install files as root, or set certain programs to execute with higher permissions (This is required for certain programs to execute properly).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;module kdelibs&lt;br /&gt;
  make-install-prefix sudo -S # sudo with no stdin&lt;br /&gt;
end module&lt;br /&gt;
&lt;br /&gt;
module kdebase&lt;br /&gt;
  make-install-prefix sudo -S&lt;br /&gt;
end module&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If a module you'd like to build isn't already present, simply add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;module &amp;amp;lt;module-name&amp;amp;gt;&lt;br /&gt;
end module&amp;lt;/pre&amp;gt; at the end of the ~/.kdesrc-buildrc. &amp;amp;lt;module-name&amp;amp;gt; would be whatever the module is called in the software repository (for instance, kdemultimedia).&lt;br /&gt;
&lt;br /&gt;
===== Git-based modules =====&lt;br /&gt;
&lt;br /&gt;
Some KDE projects use the &amp;quot;git&amp;quot; source-control software instead of Subversion (as part of an ongoing migration to git). This includes software like Amarok and Konversation.&lt;br /&gt;
&lt;br /&gt;
To build these modules in kdesrc-build, you just need to add a couple of lines to the module configuration. For example, konversation is developed in the Git repository at [https://projects.kde.org/projects/extragear/network/konversation/repository]. So you would just add a module (you can pick whatever name for the module you like, as long as it's not already used):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;module konversation&lt;br /&gt;
    repository git://anongit.kde.org/konversation&lt;br /&gt;
    branch master&lt;br /&gt;
end module&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case I selected the &amp;quot;master&amp;quot; branch since that is the default git branch.&lt;br /&gt;
&lt;br /&gt;
Now whenever you build konversation, kdesrc-build will use git instead of Subversion.&lt;br /&gt;
&lt;br /&gt;
==== Useful kdesrc-build commands ====&lt;br /&gt;
kdesrc-build is driven from the command line, so here's a guide to some of the more useful command line options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table cellpadding=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Option&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Effect&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;tt&amp;gt;&amp;lt;span style=&amp;quot;white-space:nowrap;&amp;quot;&amp;gt;[http://kdesrc-build.kde.org/documentation/cmdline.html#cmdline-pretend --pretend]&amp;lt;/span&amp;gt;&amp;lt;/tt&amp;gt; (Short&amp;amp;nbsp;form&amp;amp;nbsp;&amp;lt;tt&amp;gt;&amp;lt;span style=&amp;quot;white-space:nowrap;&amp;quot;&amp;gt;-p&amp;lt;/span&amp;gt;&amp;lt;/tt&amp;gt;)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This option is like a dry run.  kdesrc-build will process the options and its configuration like normal, and run through the build as normal, but instead of downloading or running the build will instead output what kdesrc-build would have done.  You should always run with -p before running kdesrc-build to make sure it is doing what you expect.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;tt&amp;gt;[http://kdesrc-build.kde.org/documentation/cmdline.html#cmdline-no-svn --no-svn]&amp;lt;/tt&amp;gt; (Alt. form &amp;lt;tt&amp;gt;--no-src&amp;lt;/tt&amp;gt;)&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;This option skips the source code update step.  This is useful if you're running kdesrc-build again soon after the last update and don't want to wait to find out there were no changes.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;tt&amp;gt;[http://kdesrc-build.kde.org/documentation/cmdline.html#cmdline-refresh-build --refresh-build]&amp;lt;/tt&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;This option causes kdesrc-build to delete the current build information for the given modules and start building them again from scratch.  This option takes a lot of time but gives the best chance of a successful build.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Any other non-option arguments on the command line are assumed to be modules to build (and are built in the order provided on the command line).  If no modules are specified, all of the modules listed in the ~/.kdesrc-buildrc are built in the order listed in the file.&lt;br /&gt;
&lt;br /&gt;
== Build ==&lt;br /&gt;
We're almost there.  If you're happy with your settings then it's time to test out kdesrc-build.  In theory things are as simple as running kdesrc-build and then coming back later. ;)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd ~/kdesrc&lt;br /&gt;
./kdesrc-build&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You may want to test by building qt-copy first however.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd ~/kdesrc&lt;br /&gt;
./kdesrc-build qt-copy&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{tip|If you have the [http://www.gnu.org/software/screen/ GNU screen] program available then you should definitely use it to run kdesrc-build, as you can detach your kdesrc-build session and logout while kdesrc-build is still running.}}&lt;br /&gt;
&lt;br /&gt;
If the build failed (kdesrc-build will error out with a nice bright red error message) then there are several possibilities:&lt;br /&gt;
&lt;br /&gt;
# You are missing a key piece of required software (such as a development library)&lt;br /&gt;
# The KDE SC code being compiled is broken in some fashion to where it won't build.  This is commonly due to newly committed code that worked on the developer's machine, or occasionally on Mondays (when incompatible changes are permitted to kdelibs).&lt;br /&gt;
# kdesrc-build is not setup properly.  You may be trying to install to a directory that you have no permissions to access for instance, or you may have specified a system qtdir that does not exist.&lt;br /&gt;
# The module may depend on a newer version of qt-copy or kdelibs (or other module).  In this case you'll have to run kdesrc-build to update the out-of-date module first.&lt;br /&gt;
&lt;br /&gt;
How do you find out what the error was?  The output of the failing command will be in the log directory.  By default, all log output is in the {{path|log}} subdirectory of the KDE SC source directory.  The log directory is laid out like this: {{path|log/date-run/module/output-file.log}}.  To simplify finding the appropriate file, there are a couple of symlinks created:&lt;br /&gt;
&lt;br /&gt;
{{path|log/latest}} always has the debugging output for the last time kdesrc-build was run (--pretend doesn't count toward this)&lt;br /&gt;
{{path|log/latest/&amp;amp;lt;module&amp;amp;gt;/error.log}} has the debugging output for the command that caused a module build to fail.&lt;br /&gt;
&lt;br /&gt;
For instance if qt-copy just failed to build you could read the output like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd ~/kderc&lt;br /&gt;
kwrite log/latest/qt-copy/error.log&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replace kwrite with your preferred editor.  Hopefully the output can guide you to resolving the problem.  For instance, if the failure is a cmake output saying you're missing a library, install that library and try again. ;)  For link errors you can try running a --refresh-build on the module (or if that doesn't work, required libraries like qt-copy and kdelibs).&lt;br /&gt;
&lt;br /&gt;
If you're stumped by the error you may want to wait a day and try updating again, and hope that the reason for the error has been fixed.  You can also try mailing the [http://www.kde.org/mailinglists/ kde-devel] mailing list to see if others know about the problem or have had similar issues.&lt;br /&gt;
&lt;br /&gt;
== Running KDE ==&lt;br /&gt;
&lt;br /&gt;
Assuming you got enough of the modules to build and install to have a working KDE installation, you'll still need to setup your environment correctly to run it.  kdesrc-build doesn't help you out here (yet), so you should follow the instructions [[Getting_Started/Using_an_IDE_with_KDE4|here]].&lt;br /&gt;
&lt;br /&gt;
Make sure to use the same paths as the ones you defined in .kdesrc-buildrc: for the KDEDIRS and KDEDIR variable use the setting of the &amp;quot;prefix&amp;quot; option (in the global section). For the QTDIR variable use the setting of the &amp;quot;qtdir&amp;quot; option.&lt;br /&gt;
&lt;br /&gt;
== Keeping KDE up to date ==&lt;br /&gt;
&lt;br /&gt;
Keeping your KDE installation up to date is as simple as running kdesrc-build again.  Every kdesrc-build has these phases:&lt;br /&gt;
&lt;br /&gt;
# Update the source code for all modules being built.&lt;br /&gt;
# Build and then install all the modules.&lt;br /&gt;
&lt;br /&gt;
Old build directories are not deleted by default, so the build after a small update will not normally take as long as the initial build of a module.  This is called &amp;quot;incremental make&amp;quot;.  However it may be necessary at times to perform a full rebuild due to inconsistencies between the build directory configuation and changes to the source directory.  You can use the --refresh-build option to force a full rebuild.&lt;br /&gt;
&lt;br /&gt;
For more information on how to take advantage of kdesrc-build, see the [http://kdesrc-build.kde.org/documentation online documentation] for kdesrc-build, which describes all of the module options and command line options available for kdesrc-build and gives tips on how to perform various useful tasks.&lt;br /&gt;
&lt;br /&gt;
If you have any questions that are not answered please feel free to add them under the Discussion entry for this page and hopefully someone will be able to get the answer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
* To browse the KDE Subversion repository, use [http://websvn.kde.org/trunk/KDE WebSVN].&lt;br /&gt;
* To browse any of the various KDE projects using git, you can go to [http://projects.kde.org KDE Git Projects] or to [http://gitweb.kde.org KDE Git Web].&lt;br /&gt;
* The Nokia Qt toolkit used by KDE can be browsed at [http://qt.gitorious.org/qt Nokia's Qt version on gitorious].&lt;br /&gt;
&lt;br /&gt;
[[Category:Build_KDE]]&lt;br /&gt;
[[Category:Tutorial]]&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Development/Tutorials/Using_Qt_Creator</id>
		<title>Development/Tutorials/Using Qt Creator</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Development/Tutorials/Using_Qt_Creator"/>
				<updated>2013-01-27T08:47:47Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: If the checkout fails with the message &amp;quot;remote host hung up unexpectedly&amp;quot; do a checkout from konsole. You may have to accept git.kde.org's fingerprint&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages /&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:2--&amp;gt;&lt;br /&gt;
QtCreator is an IDE from Nokia for Qt. It contains QtDesigner for UI design. This article describes:&lt;br /&gt;
* why to use Qt Creator&lt;br /&gt;
* how to create a new application&lt;br /&gt;
* how to load an existing application&lt;br /&gt;
&lt;br /&gt;
== Why use Qt Creator == &amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
{|align=&amp;quot;right&amp;quot; &lt;br /&gt;
|[[image:Snapshot-qtcreator.png|right|thumb|200px|KDE4's ktimetracker loaded as QtCreator project]]&lt;br /&gt;
|}&lt;br /&gt;
To create your C++ applications you can use any text editor. But life will be much easier if you gain QtCreator's features. That means&lt;br /&gt;
* you can get your source code saved, built and run with one click&lt;br /&gt;
* you get code-completion&lt;br /&gt;
* you can find all places in your source code where you call a function (e.g. &amp;quot;where do I call refresh()&amp;quot;)&lt;br /&gt;
* you can go back to a more recent cursor position with your editor, even if this is in another file&lt;br /&gt;
* you can checkout and commit to Subversion or Git repositories without leaving your workflow&lt;br /&gt;
&lt;br /&gt;
== Creating a new program == &amp;lt;!--T:5--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
Here is a short example of how you can create a &amp;quot;hello world&amp;quot; application. For more information read the [http://qt.nokia.com/doc/designer-manual.html user documentation].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:7--&amp;gt;&lt;br /&gt;
;Step 0:&lt;br /&gt;
Call QtCreator&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
qtcreator&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Then select New File or Project -&amp;gt; Qt C++ Project -&amp;gt; Qt Gui Application -&amp;gt; name = helloworld -&amp;gt; Next -&amp;gt; Next -&amp;gt; Finish&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:8--&amp;gt;&lt;br /&gt;
;Step 1:&lt;br /&gt;
Select Edit -&amp;gt; Forms -&amp;gt; mainwindow.ui. Add the widgets you want by drag-and-drop:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:9--&amp;gt;&lt;br /&gt;
[[File:Designer-step1.png|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:10--&amp;gt;&lt;br /&gt;
;Step 2: &lt;br /&gt;
Select the mainwindow. This is the one un-intuitive step. To lay out the objects in the mainwindow, you do not select the objects in the mainwindow, but the mainwindow itself.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:11--&amp;gt;&lt;br /&gt;
[[File:Designer-step2.png|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:12--&amp;gt;&lt;br /&gt;
;Step 3:&lt;br /&gt;
Select Form -&amp;gt; Lay Out in a &amp;lt;u&amp;gt;G&amp;lt;/u&amp;gt;rid&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:13--&amp;gt;&lt;br /&gt;
[[File:Designer-step3.png|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:14--&amp;gt;&lt;br /&gt;
;Result:&lt;br /&gt;
You get a decent look, and if you resize the window, the widgets resize as well.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:15--&amp;gt;&lt;br /&gt;
[[File:Designer-result.png|200px]]&lt;br /&gt;
&lt;br /&gt;
=== Using KDE libraries === &amp;lt;!--T:16--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:17--&amp;gt;&lt;br /&gt;
To use KDE classes like KMessageBox, you need to tell QtCreator to use the KDE libraries when building. Go to your home directory, change into ''yourproject'' and modify ''yourproject.pro''. Add the line&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;make&amp;quot;&amp;gt;&lt;br /&gt;
LIBS += -lkdeui&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Then you can start using KDE classes in your code.&lt;br /&gt;
&lt;br /&gt;
=== Adding a toolbar === &amp;lt;!--T:18--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:19--&amp;gt;&lt;br /&gt;
To add a toolbar, right-click on the UI and choose &amp;quot;Add Toolbar&amp;quot;. Then you can set icons and text in your mainwindow's constructor with code like this:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp-qt&amp;quot;&amp;gt;&lt;br /&gt;
ui-&amp;gt;toolBar-&amp;gt;addAction(QIcon(&amp;quot;/usr/share/icons/oxygen/22x22/apps/ktip.png&amp;quot;),&amp;quot;hello world&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Development/Tutorials/Using_Qt_Designer|More Info...]]&lt;br /&gt;
&lt;br /&gt;
== Load an existing project == &amp;lt;!--T:20--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:21--&amp;gt;&lt;br /&gt;
This describes how to use QtCreator to integrate existing KDE 4 applications. It has been tested with QtCreator 1.2.80 and SUSE Linux 11.1 but should work same or similar with every combination. As an example KDE application we use [http://userbase.kde.org/ktimetracker ktimetracker] from the kdepim module, other applications should work likewise.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:22--&amp;gt;&lt;br /&gt;
You can either work with code on your disk or have QtCreator do the repository checkout.&lt;br /&gt;
&lt;br /&gt;
=== use code from your disk === &amp;lt;!--T:23--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:24--&amp;gt;&lt;br /&gt;
* import the CMakeLists.txt file (File -&amp;gt; Open -&amp;gt; kdepim/CMakeLists.txt)&lt;br /&gt;
* as build directory choose kdepim&lt;br /&gt;
* you will automatically come to a screen where you can run CMake&lt;br /&gt;
* continue with the step &amp;quot;Run cmake&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== have QtCreator do the git checkout === &amp;lt;!--T:27--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:28--&amp;gt;&lt;br /&gt;
* choose File -&amp;gt; New File or Project -&amp;gt; Project from Version Control -&amp;gt; Git Repository Clone.&lt;br /&gt;
* enter a Git URL like git@git.kde.org:/kdepim&lt;br /&gt;
* accept kdepim as checkout directory&lt;br /&gt;
* type finish, see how the checkout starts&lt;br /&gt;
;Note: If the checkout fails with the message &amp;quot;remote host hung up unexpectedly&amp;quot; do a checkout from konsole. You may have to accept git.kde.org's fingerprint.&lt;br /&gt;
* you will automatically come to a screen where you can run CMake&lt;br /&gt;
* continue with the step &amp;quot;Run cmake&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== have QtCreator do the subversion checkout === &amp;lt;!--T:25--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:26--&amp;gt;&lt;br /&gt;
* choose File -&amp;gt; New File or Project -&amp;gt; Version Control -&amp;gt; Subversion Checkout.&lt;br /&gt;
* enter a Subversion URL like svn://anonsvn.kde.org/home/kde/trunk/KDE/kdepim&lt;br /&gt;
* enter a checkout directory, i.e. the local directory where the code will be checked-out to&lt;br /&gt;
* type finish, see how the checkout starts&lt;br /&gt;
* you will automatically come to a screen where you can run CMake&lt;br /&gt;
* continue with the step &amp;quot;Run cmake&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Run cmake === &amp;lt;!--T:29--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:30--&amp;gt;&lt;br /&gt;
* enter arguments for CMake like &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
/root/kdepim -DCMAKE_INSTALL_PREFIX=/usr/local -DLIB_SUFFIX=64 -DCMAKE_BUILD_TYPE=debugfull&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;DLIB_SUFFIX=64&amp;lt;/tt&amp;gt; means that you want to install your libraries into directories named &amp;lt;tt&amp;gt;lib64&amp;lt;/tt&amp;gt;, not &amp;lt;tt&amp;gt;lib&amp;lt;/tt&amp;gt;. ''/root/kdepim'' is where your source code is.&lt;br /&gt;
* click &amp;quot;Run cmake&amp;quot;&lt;br /&gt;
* note: a .cbp file is created containing many information about the build&lt;br /&gt;
* click &amp;quot;Finish&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Build it === &amp;lt;!--T:31--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:32--&amp;gt;&lt;br /&gt;
* configure QtCreator to build only ktimetracker:&lt;br /&gt;
Projects -&amp;gt; Active run configuration=ktimetracker -&amp;gt; build settings -&amp;gt; build steps -&amp;gt; make -&amp;gt; show details -&amp;gt; activate ktimetracker.&lt;br /&gt;
* configure QtCreator to use 8 logical processors:&lt;br /&gt;
Projects -&amp;gt; Active run configuration=ktimetracker -&amp;gt; build settings -&amp;gt; build steps -&amp;gt; make -&amp;gt; show details -&amp;gt; addtional Arguments = -j8&lt;br /&gt;
* choose Build -&amp;gt; Build All&lt;br /&gt;
&lt;br /&gt;
== See also == &amp;lt;!--T:33--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:34--&amp;gt;&lt;br /&gt;
* [[Development/Tutorials/Using Qt Designer]]&lt;br /&gt;
* [[Getting_Started/Using_an_IDE_with_KDE4#QtCreator]]&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
[[Category:KDE4]]&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Development/Tutorials/Using_Qt_Creator</id>
		<title>Development/Tutorials/Using Qt Creator</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Development/Tutorials/Using_Qt_Creator"/>
				<updated>2013-01-27T08:37:30Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages /&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:2--&amp;gt;&lt;br /&gt;
QtCreator is an IDE from Nokia for Qt. It contains QtDesigner for UI design. This article describes:&lt;br /&gt;
* why to use Qt Creator&lt;br /&gt;
* how to create a new application&lt;br /&gt;
* how to load an existing application&lt;br /&gt;
&lt;br /&gt;
== Why use Qt Creator == &amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
{|align=&amp;quot;right&amp;quot; &lt;br /&gt;
|[[image:Snapshot-qtcreator.png|right|thumb|200px|KDE4's ktimetracker loaded as QtCreator project]]&lt;br /&gt;
|}&lt;br /&gt;
To create your C++ applications you can use any text editor. But life will be much easier if you gain QtCreator's features. That means&lt;br /&gt;
* you can get your source code saved, built and run with one click&lt;br /&gt;
* you get code-completion&lt;br /&gt;
* you can find all places in your source code where you call a function (e.g. &amp;quot;where do I call refresh()&amp;quot;)&lt;br /&gt;
* you can go back to a more recent cursor position with your editor, even if this is in another file&lt;br /&gt;
* you can checkout and commit to Subversion or Git repositories without leaving your workflow&lt;br /&gt;
&lt;br /&gt;
== Creating a new program == &amp;lt;!--T:5--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
Here is a short example of how you can create a &amp;quot;hello world&amp;quot; application. For more information read the [http://qt.nokia.com/doc/designer-manual.html user documentation].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:7--&amp;gt;&lt;br /&gt;
;Step 0:&lt;br /&gt;
Call QtCreator&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
qtcreator&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Then select New File or Project -&amp;gt; Qt C++ Project -&amp;gt; Qt Gui Application -&amp;gt; name = helloworld -&amp;gt; Next -&amp;gt; Next -&amp;gt; Finish&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:8--&amp;gt;&lt;br /&gt;
;Step 1:&lt;br /&gt;
Select Edit -&amp;gt; Forms -&amp;gt; mainwindow.ui. Add the widgets you want by drag-and-drop:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:9--&amp;gt;&lt;br /&gt;
[[File:Designer-step1.png|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:10--&amp;gt;&lt;br /&gt;
;Step 2: &lt;br /&gt;
Select the mainwindow. This is the one un-intuitive step. To lay out the objects in the mainwindow, you do not select the objects in the mainwindow, but the mainwindow itself.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:11--&amp;gt;&lt;br /&gt;
[[File:Designer-step2.png|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:12--&amp;gt;&lt;br /&gt;
;Step 3:&lt;br /&gt;
Select Form -&amp;gt; Lay Out in a &amp;lt;u&amp;gt;G&amp;lt;/u&amp;gt;rid&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:13--&amp;gt;&lt;br /&gt;
[[File:Designer-step3.png|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:14--&amp;gt;&lt;br /&gt;
;Result:&lt;br /&gt;
You get a decent look, and if you resize the window, the widgets resize as well.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:15--&amp;gt;&lt;br /&gt;
[[File:Designer-result.png|200px]]&lt;br /&gt;
&lt;br /&gt;
=== Using KDE libraries === &amp;lt;!--T:16--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:17--&amp;gt;&lt;br /&gt;
To use KDE classes like KMessageBox, you need to tell QtCreator to use the KDE libraries when building. Go to your home directory, change into ''yourproject'' and modify ''yourproject.pro''. Add the line&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;make&amp;quot;&amp;gt;&lt;br /&gt;
LIBS += -lkdeui&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Then you can start using KDE classes in your code.&lt;br /&gt;
&lt;br /&gt;
=== Adding a toolbar === &amp;lt;!--T:18--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:19--&amp;gt;&lt;br /&gt;
To add a toolbar, right-click on the UI and choose &amp;quot;Add Toolbar&amp;quot;. Then you can set icons and text in your mainwindow's constructor with code like this:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp-qt&amp;quot;&amp;gt;&lt;br /&gt;
ui-&amp;gt;toolBar-&amp;gt;addAction(QIcon(&amp;quot;/usr/share/icons/oxygen/22x22/apps/ktip.png&amp;quot;),&amp;quot;hello world&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Development/Tutorials/Using_Qt_Designer|More Info...]]&lt;br /&gt;
&lt;br /&gt;
== Load an existing project == &amp;lt;!--T:20--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:21--&amp;gt;&lt;br /&gt;
This describes how to use QtCreator to integrate existing KDE 4 applications. It has been tested with QtCreator 1.2.80 and SUSE Linux 11.1 but should work same or similar with every combination. As an example KDE application we use [http://userbase.kde.org/ktimetracker ktimetracker] from the kdepim module, other applications should work likewise.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:22--&amp;gt;&lt;br /&gt;
You can either work with code on your disk or have QtCreator do the repository checkout.&lt;br /&gt;
&lt;br /&gt;
=== use code from your disk === &amp;lt;!--T:23--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:24--&amp;gt;&lt;br /&gt;
* import the CMakeLists.txt file (File -&amp;gt; Open -&amp;gt; kdepim/CMakeLists.txt)&lt;br /&gt;
* as build directory choose kdepim&lt;br /&gt;
* you will automatically come to a screen where you can run CMake&lt;br /&gt;
* continue with the step &amp;quot;Run cmake&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== have QtCreator do the git checkout === &amp;lt;!--T:27--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:28--&amp;gt;&lt;br /&gt;
* choose File -&amp;gt; New File or Project -&amp;gt; Project from Version Control -&amp;gt; Git Repository Clone.&lt;br /&gt;
* enter a Git URL like git@git.kde.org:/kdepim&lt;br /&gt;
* accept kdepim as checkout directory&lt;br /&gt;
* type finish, see how the checkout starts&lt;br /&gt;
* you will automatically come to a screen where you can run CMake&lt;br /&gt;
* continue with the step &amp;quot;Run cmake&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== have QtCreator do the subversion checkout === &amp;lt;!--T:25--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:26--&amp;gt;&lt;br /&gt;
* choose File -&amp;gt; New File or Project -&amp;gt; Version Control -&amp;gt; Subversion Checkout.&lt;br /&gt;
* enter a Subversion URL like svn://anonsvn.kde.org/home/kde/trunk/KDE/kdepim&lt;br /&gt;
* enter a checkout directory, i.e. the local directory where the code will be checked-out to&lt;br /&gt;
* type finish, see how the checkout starts&lt;br /&gt;
* you will automatically come to a screen where you can run CMake&lt;br /&gt;
* continue with the step &amp;quot;Run cmake&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Run cmake === &amp;lt;!--T:29--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:30--&amp;gt;&lt;br /&gt;
* enter arguments for CMake like &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
/root/kdepim -DCMAKE_INSTALL_PREFIX=/usr/local -DLIB_SUFFIX=64 -DCMAKE_BUILD_TYPE=debugfull&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;DLIB_SUFFIX=64&amp;lt;/tt&amp;gt; means that you want to install your libraries into directories named &amp;lt;tt&amp;gt;lib64&amp;lt;/tt&amp;gt;, not &amp;lt;tt&amp;gt;lib&amp;lt;/tt&amp;gt;. ''/root/kdepim'' is where your source code is.&lt;br /&gt;
* click &amp;quot;Run cmake&amp;quot;&lt;br /&gt;
* note: a .cbp file is created containing many information about the build&lt;br /&gt;
* click &amp;quot;Finish&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Build it === &amp;lt;!--T:31--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:32--&amp;gt;&lt;br /&gt;
* configure QtCreator to build only ktimetracker:&lt;br /&gt;
Projects -&amp;gt; Active run configuration=ktimetracker -&amp;gt; build settings -&amp;gt; build steps -&amp;gt; make -&amp;gt; show details -&amp;gt; activate ktimetracker.&lt;br /&gt;
* configure QtCreator to use 8 logical processors:&lt;br /&gt;
Projects -&amp;gt; Active run configuration=ktimetracker -&amp;gt; build settings -&amp;gt; build steps -&amp;gt; make -&amp;gt; show details -&amp;gt; addtional Arguments = -j8&lt;br /&gt;
* choose Build -&amp;gt; Build All&lt;br /&gt;
&lt;br /&gt;
== See also == &amp;lt;!--T:33--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:34--&amp;gt;&lt;br /&gt;
* [[Development/Tutorials/Using Qt Designer]]&lt;br /&gt;
* [[Getting_Started/Using_an_IDE_with_KDE4#QtCreator]]&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
[[Category:KDE4]]&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Development/Tutorials/Using_Qt_Creator</id>
		<title>Development/Tutorials/Using Qt Creator</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Development/Tutorials/Using_Qt_Creator"/>
				<updated>2013-01-27T08:36:36Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: subversion -&amp;gt; git&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages /&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:2--&amp;gt;&lt;br /&gt;
QtCreator is an IDE from Nokia for Qt. It contains QtDesigner for UI design. This article describes:&lt;br /&gt;
* why to use Qt Creator&lt;br /&gt;
* how to create a new application&lt;br /&gt;
* how to load an existing application&lt;br /&gt;
&lt;br /&gt;
== Why use Qt Creator == &amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
{|align=&amp;quot;right&amp;quot; &lt;br /&gt;
|[[image:Snapshot-qtcreator.png|right|thumb|200px|KDE4's ktimetracker loaded as QtCreator project]]&lt;br /&gt;
|}&lt;br /&gt;
To create your C++ applications you can use any text editor. But life will be much easier if you gain QtCreator's features. That means&lt;br /&gt;
* you can get your source code saved, built and run with one click&lt;br /&gt;
* you get code-completion&lt;br /&gt;
* you can find all places in your source code where you call a function (e.g. &amp;quot;where do I call refresh()&amp;quot;)&lt;br /&gt;
* you can go back to a more recent cursor position with your editor, even if this is in another file&lt;br /&gt;
* you can checkout and commit to Subversion or Git repositories without leaving your workflow&lt;br /&gt;
&lt;br /&gt;
== Creating a new program == &amp;lt;!--T:5--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
Here is a short example of how you can create a &amp;quot;hello world&amp;quot; application. For more information read the [http://qt.nokia.com/doc/designer-manual.html user documentation].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:7--&amp;gt;&lt;br /&gt;
;Step 0:&lt;br /&gt;
Call QtCreator&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
qtcreator&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Then select New File or Project -&amp;gt; Qt C++ Project -&amp;gt; Qt Gui Application -&amp;gt; name = helloworld -&amp;gt; Next -&amp;gt; Next -&amp;gt; Finish&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:8--&amp;gt;&lt;br /&gt;
;Step 1:&lt;br /&gt;
Select Edit -&amp;gt; Forms -&amp;gt; mainwindow.ui. Add the widgets you want by drag-and-drop:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:9--&amp;gt;&lt;br /&gt;
[[File:Designer-step1.png|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:10--&amp;gt;&lt;br /&gt;
;Step 2: &lt;br /&gt;
Select the mainwindow. This is the one un-intuitive step. To lay out the objects in the mainwindow, you do not select the objects in the mainwindow, but the mainwindow itself.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:11--&amp;gt;&lt;br /&gt;
[[File:Designer-step2.png|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:12--&amp;gt;&lt;br /&gt;
;Step 3:&lt;br /&gt;
Select Form -&amp;gt; Lay Out in a &amp;lt;u&amp;gt;G&amp;lt;/u&amp;gt;rid&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:13--&amp;gt;&lt;br /&gt;
[[File:Designer-step3.png|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:14--&amp;gt;&lt;br /&gt;
;Result:&lt;br /&gt;
You get a decent look, and if you resize the window, the widgets resize as well.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:15--&amp;gt;&lt;br /&gt;
[[File:Designer-result.png|200px]]&lt;br /&gt;
&lt;br /&gt;
=== Using KDE libraries === &amp;lt;!--T:16--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:17--&amp;gt;&lt;br /&gt;
To use KDE classes like KMessageBox, you need to tell QtCreator to use the KDE libraries when building. Go to your home directory, change into ''yourproject'' and modify ''yourproject.pro''. Add the line&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;make&amp;quot;&amp;gt;&lt;br /&gt;
LIBS += -lkdeui&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Then you can start using KDE classes in your code.&lt;br /&gt;
&lt;br /&gt;
=== Adding a toolbar === &amp;lt;!--T:18--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:19--&amp;gt;&lt;br /&gt;
To add a toolbar, right-click on the UI and choose &amp;quot;Add Toolbar&amp;quot;. Then you can set icons and text in your mainwindow's constructor with code like this:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp-qt&amp;quot;&amp;gt;&lt;br /&gt;
ui-&amp;gt;toolBar-&amp;gt;addAction(QIcon(&amp;quot;/usr/share/icons/oxygen/22x22/apps/ktip.png&amp;quot;),&amp;quot;hello world&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Development/Tutorials/Using_Qt_Designer|More Info...]]&lt;br /&gt;
&lt;br /&gt;
== Load an existing project == &amp;lt;!--T:20--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:21--&amp;gt;&lt;br /&gt;
This describes how to use QtCreator to integrate existing KDE 4 applications. It has been tested with QtCreator 1.2.80 and SUSE Linux 11.1 but should work same or similar with every combination. As an example KDE application we use [http://userbase.kde.org/ktimetracker ktimetracker] from the kdepim module, other applications should work likewise.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:22--&amp;gt;&lt;br /&gt;
You can either work with code on your disk or have QtCreator do the repository checkout.&lt;br /&gt;
&lt;br /&gt;
=== use code from your disk === &amp;lt;!--T:23--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:24--&amp;gt;&lt;br /&gt;
* import the CMakeLists.txt file (File -&amp;gt; Open -&amp;gt; kdepim/CMakeLists.txt)&lt;br /&gt;
* as build directory choose kdepim&lt;br /&gt;
* you will automatically come to a screen where you can run CMake&lt;br /&gt;
* continue with the step &amp;quot;Run cmake&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== have QtCreator do the subversion checkout === &amp;lt;!--T:25--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:26--&amp;gt;&lt;br /&gt;
* choose File -&amp;gt; New File or Project -&amp;gt; Version Control -&amp;gt; Subversion Checkout.&lt;br /&gt;
* enter a Subversion URL like svn://anonsvn.kde.org/home/kde/trunk/KDE/kdepim&lt;br /&gt;
* enter a checkout directory, i.e. the local directory where the code will be checked-out to&lt;br /&gt;
* type finish, see how the checkout starts&lt;br /&gt;
* you will automatically come to a screen where you can run CMake&lt;br /&gt;
* continue with the step &amp;quot;Run cmake&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== have QtCreator do the git checkout === &amp;lt;!--T:27--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:28--&amp;gt;&lt;br /&gt;
* choose File -&amp;gt; New File or Project -&amp;gt; Project from Version Control -&amp;gt; Git Repository Clone.&lt;br /&gt;
* enter a Git URL like git@git.kde.org:/kdepim&lt;br /&gt;
* accept kdepim as checkout directory&lt;br /&gt;
* type finish, see how the checkout starts&lt;br /&gt;
* you will automatically come to a screen where you can run CMake&lt;br /&gt;
* continue with the step &amp;quot;Run cmake&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Run cmake === &amp;lt;!--T:29--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:30--&amp;gt;&lt;br /&gt;
* enter arguments for CMake like &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
/root/kdepim -DCMAKE_INSTALL_PREFIX=/usr/local -DLIB_SUFFIX=64 -DCMAKE_BUILD_TYPE=debugfull&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;DLIB_SUFFIX=64&amp;lt;/tt&amp;gt; means that you want to install your libraries into directories named &amp;lt;tt&amp;gt;lib64&amp;lt;/tt&amp;gt;, not &amp;lt;tt&amp;gt;lib&amp;lt;/tt&amp;gt;. ''/root/kdepim'' is where your source code is.&lt;br /&gt;
* click &amp;quot;Run cmake&amp;quot;&lt;br /&gt;
* note: a .cbp file is created containing many information about the build&lt;br /&gt;
* click &amp;quot;Finish&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Build it === &amp;lt;!--T:31--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:32--&amp;gt;&lt;br /&gt;
* configure QtCreator to build only ktimetracker:&lt;br /&gt;
Projects -&amp;gt; Active run configuration=ktimetracker -&amp;gt; build settings -&amp;gt; build steps -&amp;gt; make -&amp;gt; show details -&amp;gt; activate ktimetracker.&lt;br /&gt;
* configure QtCreator to use 8 logical processors:&lt;br /&gt;
Projects -&amp;gt; Active run configuration=ktimetracker -&amp;gt; build settings -&amp;gt; build steps -&amp;gt; make -&amp;gt; show details -&amp;gt; addtional Arguments = -j8&lt;br /&gt;
* choose Build -&amp;gt; Build All&lt;br /&gt;
&lt;br /&gt;
== See also == &amp;lt;!--T:33--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:34--&amp;gt;&lt;br /&gt;
* [[Development/Tutorials/Using Qt Designer]]&lt;br /&gt;
* [[Getting_Started/Using_an_IDE_with_KDE4#QtCreator]]&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
[[Category:KDE4]]&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/KDE4/on_virtual_machines</id>
		<title>Getting Started/Build/KDE4/on virtual machines</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/KDE4/on_virtual_machines"/>
				<updated>2013-01-27T08:34:53Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: qtcreatOr&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox tutorial|time=3 hours|type=HowTo|distribution=SUSE Linux 12.2|happyreaders=2|unhappyreaders=0}}&lt;br /&gt;
&lt;br /&gt;
This describes how to use a virtual machine for building the latest KDE from sources.&lt;br /&gt;
&lt;br /&gt;
= Virtual Machine Setup =&lt;br /&gt;
Create a virtual machine, e.g. using [http://www.linuxintro.org/wiki/VirtualbOx VirtualBox]. Regarding harddisk: KDE 4 fits into 10 GB, however [[User:Tstaerk|I]] recommend 40GB, one partition. Regarding RAM: You will need at least 1GB ram for the virtual machine, of course more is better.&lt;br /&gt;
&lt;br /&gt;
;You will need to set your SUSE CD as your virtual machine's cdrom. &lt;br /&gt;
&lt;br /&gt;
== setup for SSH ==&lt;br /&gt;
To be able to log in to your VM using ssh, stop and disable the firewall:&lt;br /&gt;
 rcSuSEfirewall2 stop&lt;br /&gt;
 chkconfig SuSEfirewall2_setup off&lt;br /&gt;
 chkconfig SuSEfirewall2_init off&lt;br /&gt;
 /etc/init.d/sshd start&lt;br /&gt;
 chkconfig sshd on&lt;br /&gt;
Inside the VM, install some needed packages:&lt;br /&gt;
 yast -i libqt4-devel pcre-devel libxslt-devel libxml2-devel docbook-xsl-stylesheets git cyrus-sasl-devel libiodbc-devel \&lt;br /&gt;
 libdbusmenu-qt-devel giflib-devel strigi-devel libQtWebKit-devel libqimageblitz-devel libical-devel libgpgme-devel \&lt;br /&gt;
 boost-devel libqjson-devel libredland-devel xcb-util-image-devel&lt;br /&gt;
&lt;br /&gt;
;Now it is time to do a snapshot or clone from your VM.&lt;br /&gt;
You will be able to return to this machine state whenever you want.&lt;br /&gt;
&lt;br /&gt;
== a few more steps ==&lt;br /&gt;
[http://www.linuxintro.org/wiki/open_a_console Open a console] as root&lt;br /&gt;
 su -&lt;br /&gt;
&lt;br /&gt;
== on an x64 distribution ==&lt;br /&gt;
If and only if you have a /lib64 path, you are on an x64 distribution.&lt;br /&gt;
Make sure you have the needed environment variables and alias set by having a file /root/.bashrc.&lt;br /&gt;
 cd&lt;br /&gt;
 cat &amp;gt;.bashrc&amp;lt;&amp;lt;EOF &lt;br /&gt;
 export KDEDIR=/usr/local         &lt;br /&gt;
 alias cmakekde=&amp;quot;cmake . -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DLIB_SUFFIX=64 -D[[Development/CMake/Addons_for_KDE#Buildtypes|CMAKE_BUILD_TYPE]]=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias cmakekdelibs=&amp;quot;cmake ../kdelibs -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DLIB_SUFFIX=64 -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias makeqt=&amp;quot;./configure -dbus -openssl -plugin-sql-mysql -libdir /usr/lib64 -prefix /usr &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 export QTDIR=/usr&lt;br /&gt;
 EOF&lt;br /&gt;
 cat &amp;gt;.gitconfig&amp;lt;&amp;lt;EOF&lt;br /&gt;
 [url &amp;quot;git://anongit.kde.org/&amp;quot;]&lt;br /&gt;
     insteadOf = kde:&lt;br /&gt;
 [url &amp;quot;ssh://git@git.kde.org/&amp;quot;]&lt;br /&gt;
     pushInsteadOf = kde:&lt;br /&gt;
 EOF&lt;br /&gt;
Now activate this file&lt;br /&gt;
 . /root/.bashrc&lt;br /&gt;
&lt;br /&gt;
== on another distribution (incl 32bit)==&lt;br /&gt;
Make sure you have the needed environment variables and alias set by having a file /root/.bashrc. &lt;br /&gt;
 cd&lt;br /&gt;
 cat &amp;gt;.bashrc&amp;lt;&amp;lt;EOF&lt;br /&gt;
 export KDEDIR=/usr/local         &lt;br /&gt;
 alias cmakekde=&amp;quot;cmake . -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias cmakekdelibs=&amp;quot;cmake ../kdelibs -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias makeqt=&amp;quot;./configure -dbus -openssl -plugin-sql-mysql -prefix /usr &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 export QTDIR=/usr&lt;br /&gt;
 EOF&lt;br /&gt;
 cat &amp;gt;.gitconfig&amp;lt;&amp;lt;EOF&lt;br /&gt;
 [url &amp;quot;git://anongit.kde.org/&amp;quot;]&lt;br /&gt;
     insteadOf = kde:&lt;br /&gt;
 [url &amp;quot;ssh://git@git.kde.org/&amp;quot;]&lt;br /&gt;
     pushInsteadOf = kde:&lt;br /&gt;
 EOF&lt;br /&gt;
Now activate this file&lt;br /&gt;
 . /root/.bashrc&lt;br /&gt;
&lt;br /&gt;
= Aquire and Build KDE as root =&lt;br /&gt;
If something fails you may need to make clean and rm CMakeCache.&lt;br /&gt;
&lt;br /&gt;
== cmake ==&lt;br /&gt;
Install the latest version of cmake:&lt;br /&gt;
 cd&lt;br /&gt;
 wget http://www.cmake.org/files/v2.8/cmake-2.8.10.2.tar.gz&lt;br /&gt;
 tar xvzf cmake-2.8.10.2.tar.gz&lt;br /&gt;
 cd cmake-2.8.10.2&lt;br /&gt;
 ./configure &amp;amp;&amp;amp; make -j4 &amp;amp;&amp;amp; make install&lt;br /&gt;
&lt;br /&gt;
== automoc ==&lt;br /&gt;
automoc is needed for akonadi.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:automoc&lt;br /&gt;
 cd automoc&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== libattica ==&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:attica&lt;br /&gt;
 cd attica&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== shared desktop ontologies ==&lt;br /&gt;
shared desktop ontologies is needed by kdepimlibs in order to build Nepomuk (which is a part of kdelibs)&lt;br /&gt;
 cd&lt;br /&gt;
 wget http://downloads.sourceforge.net/project/oscaf/shared-desktop-ontologies/0.10.0/shared-desktop-ontologies-0.10.0.tar.bz2&lt;br /&gt;
 tar xvjf shared-desktop-ontologies-0.10.0.tar.bz2&lt;br /&gt;
 cd shared-desktop-ontologies-0.10.0/&lt;br /&gt;
 cmake . &amp;amp;&amp;amp; make &amp;amp;&amp;amp; make install&lt;br /&gt;
&lt;br /&gt;
== soprano ==&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:soprano&lt;br /&gt;
 cd soprano&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== phonon ==&lt;br /&gt;
Phonon is needed for kdebase-runtime&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:phonon&lt;br /&gt;
 cd phonon&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== akonadi ==&lt;br /&gt;
Akonadi keeps personal information management data in a mysql database. It is needed for KDEPIMLIBS.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:akonadi&lt;br /&gt;
 cd akonadi&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kdelibs ==&lt;br /&gt;
KDELIBS requires an out-of-source build, that is why it is more complicated to build:&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kdelibs&lt;br /&gt;
 mkdir kdelibs-build&lt;br /&gt;
 cd kdelibs-build&lt;br /&gt;
 cmakekdelibs&lt;br /&gt;
Verify it has been correctly installed - the following must be possible:&lt;br /&gt;
 kde4-config --prefix&lt;br /&gt;
 /usr/local&lt;br /&gt;
&lt;br /&gt;
== nepomuk-core ==&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:nepomuk-core&lt;br /&gt;
 cd nepomuk-core&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kdepimlibs ==&lt;br /&gt;
kdepimlibs is needed for kde-runtime.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kdepimlibs&lt;br /&gt;
 cd kdepimlibs&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kactivities ==&lt;br /&gt;
kactivities is needed for kde-workspace.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kactivities&lt;br /&gt;
 cd kactivities&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kdebase ==&lt;br /&gt;
 cd &lt;br /&gt;
 git clone kde:kde-baseapps&lt;br /&gt;
 git clone kde:konsole&lt;br /&gt;
 git clone kde:kde-workspace&lt;br /&gt;
 git clone kde:kde-runtime &lt;br /&gt;
 cd kde-baseapps&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd konsole&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd kde-workspace&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd kde-runtime&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
= Next step =&lt;br /&gt;
Now you can start developing. Best, install QtCreator:&lt;br /&gt;
 yast -i qt-creator&lt;br /&gt;
And learn how to create a new KDE project or import an existing one by reading [[qtcreator]].&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/KDE4/on_virtual_machines</id>
		<title>Getting Started/Build/KDE4/on virtual machines</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/KDE4/on_virtual_machines"/>
				<updated>2013-01-27T08:14:46Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: xcb-util-image-devel is needed for kde-workspace&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox tutorial|time=3 hours|type=HowTo|distribution=SUSE Linux 12.2|happyreaders=2|unhappyreaders=0}}&lt;br /&gt;
&lt;br /&gt;
This describes how to use a virtual machine for building the latest KDE from sources.&lt;br /&gt;
&lt;br /&gt;
= Virtual Machine Setup =&lt;br /&gt;
Create a virtual machine, e.g. using [http://www.linuxintro.org/wiki/VirtualbOx VirtualBox]. Regarding harddisk: KDE 4 fits into 10 GB, however [[User:Tstaerk|I]] recommend 40GB, one partition. Regarding RAM: You will need at least 1GB ram for the virtual machine, of course more is better.&lt;br /&gt;
&lt;br /&gt;
;You will need to set your SUSE CD as your virtual machine's cdrom. &lt;br /&gt;
&lt;br /&gt;
== setup for SSH ==&lt;br /&gt;
To be able to log in to your VM using ssh, stop and disable the firewall:&lt;br /&gt;
 rcSuSEfirewall2 stop&lt;br /&gt;
 chkconfig SuSEfirewall2_setup off&lt;br /&gt;
 chkconfig SuSEfirewall2_init off&lt;br /&gt;
 /etc/init.d/sshd start&lt;br /&gt;
 chkconfig sshd on&lt;br /&gt;
Inside the VM, install some needed packages:&lt;br /&gt;
 yast -i libqt4-devel pcre-devel libxslt-devel libxml2-devel docbook-xsl-stylesheets git cyrus-sasl-devel libiodbc-devel \&lt;br /&gt;
 libdbusmenu-qt-devel giflib-devel strigi-devel libQtWebKit-devel libqimageblitz-devel libical-devel libgpgme-devel \&lt;br /&gt;
 boost-devel libqjson-devel libredland-devel xcb-util-image-devel&lt;br /&gt;
&lt;br /&gt;
;Now it is time to do a snapshot or clone from your VM.&lt;br /&gt;
You will be able to return to this machine state whenever you want.&lt;br /&gt;
&lt;br /&gt;
== a few more steps ==&lt;br /&gt;
[http://www.linuxintro.org/wiki/open_a_console Open a console] as root&lt;br /&gt;
 su -&lt;br /&gt;
&lt;br /&gt;
== on an x64 distribution ==&lt;br /&gt;
If and only if you have a /lib64 path, you are on an x64 distribution.&lt;br /&gt;
Make sure you have the needed environment variables and alias set by having a file /root/.bashrc.&lt;br /&gt;
 cd&lt;br /&gt;
 cat &amp;gt;.bashrc&amp;lt;&amp;lt;EOF &lt;br /&gt;
 export KDEDIR=/usr/local         &lt;br /&gt;
 alias cmakekde=&amp;quot;cmake . -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DLIB_SUFFIX=64 -D[[Development/CMake/Addons_for_KDE#Buildtypes|CMAKE_BUILD_TYPE]]=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias cmakekdelibs=&amp;quot;cmake ../kdelibs -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DLIB_SUFFIX=64 -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias makeqt=&amp;quot;./configure -dbus -openssl -plugin-sql-mysql -libdir /usr/lib64 -prefix /usr &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 export QTDIR=/usr&lt;br /&gt;
 EOF&lt;br /&gt;
 cat &amp;gt;.gitconfig&amp;lt;&amp;lt;EOF&lt;br /&gt;
 [url &amp;quot;git://anongit.kde.org/&amp;quot;]&lt;br /&gt;
     insteadOf = kde:&lt;br /&gt;
 [url &amp;quot;ssh://git@git.kde.org/&amp;quot;]&lt;br /&gt;
     pushInsteadOf = kde:&lt;br /&gt;
 EOF&lt;br /&gt;
Now activate this file&lt;br /&gt;
 . /root/.bashrc&lt;br /&gt;
&lt;br /&gt;
== on another distribution (incl 32bit)==&lt;br /&gt;
Make sure you have the needed environment variables and alias set by having a file /root/.bashrc. &lt;br /&gt;
 cd&lt;br /&gt;
 cat &amp;gt;.bashrc&amp;lt;&amp;lt;EOF&lt;br /&gt;
 export KDEDIR=/usr/local         &lt;br /&gt;
 alias cmakekde=&amp;quot;cmake . -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias cmakekdelibs=&amp;quot;cmake ../kdelibs -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias makeqt=&amp;quot;./configure -dbus -openssl -plugin-sql-mysql -prefix /usr &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 export QTDIR=/usr&lt;br /&gt;
 EOF&lt;br /&gt;
 cat &amp;gt;.gitconfig&amp;lt;&amp;lt;EOF&lt;br /&gt;
 [url &amp;quot;git://anongit.kde.org/&amp;quot;]&lt;br /&gt;
     insteadOf = kde:&lt;br /&gt;
 [url &amp;quot;ssh://git@git.kde.org/&amp;quot;]&lt;br /&gt;
     pushInsteadOf = kde:&lt;br /&gt;
 EOF&lt;br /&gt;
Now activate this file&lt;br /&gt;
 . /root/.bashrc&lt;br /&gt;
&lt;br /&gt;
= Aquire and Build KDE as root =&lt;br /&gt;
If something fails you may need to make clean and rm CMakeCache.&lt;br /&gt;
&lt;br /&gt;
== cmake ==&lt;br /&gt;
Install the latest version of cmake:&lt;br /&gt;
 cd&lt;br /&gt;
 wget http://www.cmake.org/files/v2.8/cmake-2.8.10.2.tar.gz&lt;br /&gt;
 tar xvzf cmake-2.8.10.2.tar.gz&lt;br /&gt;
 cd cmake-2.8.10.2&lt;br /&gt;
 ./configure &amp;amp;&amp;amp; make -j4 &amp;amp;&amp;amp; make install&lt;br /&gt;
&lt;br /&gt;
== automoc ==&lt;br /&gt;
automoc is needed for akonadi.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:automoc&lt;br /&gt;
 cd automoc&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== libattica ==&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:attica&lt;br /&gt;
 cd attica&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== shared desktop ontologies ==&lt;br /&gt;
shared desktop ontologies is needed by kdepimlibs in order to build Nepomuk (which is a part of kdelibs)&lt;br /&gt;
 cd&lt;br /&gt;
 wget http://downloads.sourceforge.net/project/oscaf/shared-desktop-ontologies/0.10.0/shared-desktop-ontologies-0.10.0.tar.bz2&lt;br /&gt;
 tar xvjf shared-desktop-ontologies-0.10.0.tar.bz2&lt;br /&gt;
 cd shared-desktop-ontologies-0.10.0/&lt;br /&gt;
 cmake . &amp;amp;&amp;amp; make &amp;amp;&amp;amp; make install&lt;br /&gt;
&lt;br /&gt;
== soprano ==&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:soprano&lt;br /&gt;
 cd soprano&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== phonon ==&lt;br /&gt;
Phonon is needed for kdebase-runtime&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:phonon&lt;br /&gt;
 cd phonon&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== akonadi ==&lt;br /&gt;
Akonadi keeps personal information management data in a mysql database. It is needed for KDEPIMLIBS.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:akonadi&lt;br /&gt;
 cd akonadi&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kdelibs ==&lt;br /&gt;
KDELIBS requires an out-of-source build, that is why it is more complicated to build:&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kdelibs&lt;br /&gt;
 mkdir kdelibs-build&lt;br /&gt;
 cd kdelibs-build&lt;br /&gt;
 cmakekdelibs&lt;br /&gt;
Verify it has been correctly installed - the following must be possible:&lt;br /&gt;
 kde4-config --prefix&lt;br /&gt;
 /usr/local&lt;br /&gt;
&lt;br /&gt;
== nepomuk-core ==&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:nepomuk-core&lt;br /&gt;
 cd nepomuk-core&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kdepimlibs ==&lt;br /&gt;
kdepimlibs is needed for kde-runtime.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kdepimlibs&lt;br /&gt;
 cd kdepimlibs&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kactivities ==&lt;br /&gt;
kactivities is needed for kde-workspace.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kactivities&lt;br /&gt;
 cd kactivities&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kdebase ==&lt;br /&gt;
 cd &lt;br /&gt;
 git clone kde:kde-baseapps&lt;br /&gt;
 git clone kde:konsole&lt;br /&gt;
 git clone kde:kde-workspace&lt;br /&gt;
 git clone kde:kde-runtime &lt;br /&gt;
 cd kde-baseapps&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd konsole&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd kde-workspace&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd kde-runtime&lt;br /&gt;
 cmakekde&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/KDE4/on_virtual_machines</id>
		<title>Getting Started/Build/KDE4/on virtual machines</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/KDE4/on_virtual_machines"/>
				<updated>2013-01-26T22:06:16Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: /* Aquire and Build KDE as root */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox tutorial|time=3 hours|type=HowTo|distribution=SUSE Linux 12.2|happyreaders=2|unhappyreaders=0}}&lt;br /&gt;
&lt;br /&gt;
This describes how to use a virtual machine for building the latest KDE from sources.&lt;br /&gt;
&lt;br /&gt;
= Virtual Machine Setup =&lt;br /&gt;
Create a virtual machine, e.g. using [http://www.linuxintro.org/wiki/VirtualbOx VirtualBox]. Regarding harddisk: KDE 4 fits into 10 GB, however [[User:Tstaerk|I]] recommend 40GB, one partition. Regarding RAM: You will need at least 1GB ram for the virtual machine, of course more is better.&lt;br /&gt;
&lt;br /&gt;
;You will need to set your SUSE CD as your virtual machine's cdrom. &lt;br /&gt;
&lt;br /&gt;
== setup for SSH ==&lt;br /&gt;
To be able to log in to your VM using ssh, stop and disable the firewall:&lt;br /&gt;
 rcSuSEfirewall2 stop&lt;br /&gt;
 chkconfig SuSEfirewall2_setup off&lt;br /&gt;
 chkconfig SuSEfirewall2_init off&lt;br /&gt;
 /etc/init.d/sshd start&lt;br /&gt;
 chkconfig sshd on&lt;br /&gt;
Inside the VM, install some needed packages:&lt;br /&gt;
 yast -i libqt4-devel pcre-devel libxslt-devel libxml2-devel docbook-xsl-stylesheets git cyrus-sasl-devel libiodbc-devel \&lt;br /&gt;
 libdbusmenu-qt-devel giflib-devel strigi-devel libQtWebKit-devel libqimageblitz-devel libical-devel libgpgme-devel \&lt;br /&gt;
 boost-devel libqjson-devel libredland-devel&lt;br /&gt;
&lt;br /&gt;
;Now it is time to do a snapshot or clone from your VM.&lt;br /&gt;
You will be able to return to this machine state whenever you want.&lt;br /&gt;
&lt;br /&gt;
== a few more steps ==&lt;br /&gt;
[http://www.linuxintro.org/wiki/open_a_console Open a console] as root&lt;br /&gt;
 su -&lt;br /&gt;
&lt;br /&gt;
== on an x64 distribution ==&lt;br /&gt;
If and only if you have a /lib64 path, you are on an x64 distribution.&lt;br /&gt;
Make sure you have the needed environment variables and alias set by having a file /root/.bashrc.&lt;br /&gt;
 cd&lt;br /&gt;
 cat &amp;gt;.bashrc&amp;lt;&amp;lt;EOF &lt;br /&gt;
 export KDEDIR=/usr/local         &lt;br /&gt;
 alias cmakekde=&amp;quot;cmake . -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DLIB_SUFFIX=64 -D[[Development/CMake/Addons_for_KDE#Buildtypes|CMAKE_BUILD_TYPE]]=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias cmakekdelibs=&amp;quot;cmake ../kdelibs -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DLIB_SUFFIX=64 -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias makeqt=&amp;quot;./configure -dbus -openssl -plugin-sql-mysql -libdir /usr/lib64 -prefix /usr &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 export QTDIR=/usr&lt;br /&gt;
 EOF&lt;br /&gt;
 cat &amp;gt;.gitconfig&amp;lt;&amp;lt;EOF&lt;br /&gt;
 [url &amp;quot;git://anongit.kde.org/&amp;quot;]&lt;br /&gt;
     insteadOf = kde:&lt;br /&gt;
 [url &amp;quot;ssh://git@git.kde.org/&amp;quot;]&lt;br /&gt;
     pushInsteadOf = kde:&lt;br /&gt;
 EOF&lt;br /&gt;
Now activate this file&lt;br /&gt;
 . /root/.bashrc&lt;br /&gt;
&lt;br /&gt;
== on another distribution (incl 32bit)==&lt;br /&gt;
Make sure you have the needed environment variables and alias set by having a file /root/.bashrc. &lt;br /&gt;
 cd&lt;br /&gt;
 cat &amp;gt;.bashrc&amp;lt;&amp;lt;EOF&lt;br /&gt;
 export KDEDIR=/usr/local         &lt;br /&gt;
 alias cmakekde=&amp;quot;cmake . -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias cmakekdelibs=&amp;quot;cmake ../kdelibs -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias makeqt=&amp;quot;./configure -dbus -openssl -plugin-sql-mysql -prefix /usr &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 export QTDIR=/usr&lt;br /&gt;
 EOF&lt;br /&gt;
 cat &amp;gt;.gitconfig&amp;lt;&amp;lt;EOF&lt;br /&gt;
 [url &amp;quot;git://anongit.kde.org/&amp;quot;]&lt;br /&gt;
     insteadOf = kde:&lt;br /&gt;
 [url &amp;quot;ssh://git@git.kde.org/&amp;quot;]&lt;br /&gt;
     pushInsteadOf = kde:&lt;br /&gt;
 EOF&lt;br /&gt;
Now activate this file&lt;br /&gt;
 . /root/.bashrc&lt;br /&gt;
&lt;br /&gt;
= Aquire and Build KDE as root =&lt;br /&gt;
If something fails you may need to make clean and rm CMakeCache.&lt;br /&gt;
&lt;br /&gt;
== cmake ==&lt;br /&gt;
Install the latest version of cmake:&lt;br /&gt;
 cd&lt;br /&gt;
 wget http://www.cmake.org/files/v2.8/cmake-2.8.10.2.tar.gz&lt;br /&gt;
 tar xvzf cmake-2.8.10.2.tar.gz&lt;br /&gt;
 cd cmake-2.8.10.2&lt;br /&gt;
 ./configure &amp;amp;&amp;amp; make -j4 &amp;amp;&amp;amp; make install&lt;br /&gt;
&lt;br /&gt;
== automoc ==&lt;br /&gt;
automoc is needed for akonadi.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:automoc&lt;br /&gt;
 cd automoc&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== libattica ==&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:attica&lt;br /&gt;
 cd attica&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== shared desktop ontologies ==&lt;br /&gt;
shared desktop ontologies is needed by kdepimlibs in order to build Nepomuk (which is a part of kdelibs)&lt;br /&gt;
 cd&lt;br /&gt;
 wget http://downloads.sourceforge.net/project/oscaf/shared-desktop-ontologies/0.10.0/shared-desktop-ontologies-0.10.0.tar.bz2&lt;br /&gt;
 tar xvjf shared-desktop-ontologies-0.10.0.tar.bz2&lt;br /&gt;
 cd shared-desktop-ontologies-0.10.0/&lt;br /&gt;
 cmake . &amp;amp;&amp;amp; make &amp;amp;&amp;amp; make install&lt;br /&gt;
&lt;br /&gt;
== soprano ==&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:soprano&lt;br /&gt;
 cd soprano&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== phonon ==&lt;br /&gt;
Phonon is needed for kdebase-runtime&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:phonon&lt;br /&gt;
 cd phonon&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== akonadi ==&lt;br /&gt;
Akonadi keeps personal information management data in a mysql database. It is needed for KDEPIMLIBS.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:akonadi&lt;br /&gt;
 cd akonadi&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kdelibs ==&lt;br /&gt;
KDELIBS requires an out-of-source build, that is why it is more complicated to build:&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kdelibs&lt;br /&gt;
 mkdir kdelibs-build&lt;br /&gt;
 cd kdelibs-build&lt;br /&gt;
 cmakekdelibs&lt;br /&gt;
Verify it has been correctly installed - the following must be possible:&lt;br /&gt;
 kde4-config --prefix&lt;br /&gt;
 /usr/local&lt;br /&gt;
&lt;br /&gt;
== nepomuk-core ==&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:nepomuk-core&lt;br /&gt;
 cd nepomuk-core&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kdepimlibs ==&lt;br /&gt;
kdepimlibs is needed for kde-runtime.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kdepimlibs&lt;br /&gt;
 cd kdepimlibs&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kactivities ==&lt;br /&gt;
kactivities is needed for kde-workspace.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kactivities&lt;br /&gt;
 cd kactivities&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kdebase ==&lt;br /&gt;
 cd &lt;br /&gt;
 git clone kde:kde-baseapps&lt;br /&gt;
 git clone kde:konsole&lt;br /&gt;
 git clone kde:kde-workspace&lt;br /&gt;
 git clone kde:kde-runtime &lt;br /&gt;
 cd kde-baseapps&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd konsole&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd kde-workspace&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd kde-runtime&lt;br /&gt;
 cmakekde&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/KDE4/on_virtual_machines</id>
		<title>Getting Started/Build/KDE4/on virtual machines</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/KDE4/on_virtual_machines"/>
				<updated>2013-01-26T21:32:05Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: /* setup for SSH */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox tutorial|time=3 hours|type=HowTo|distribution=SUSE Linux 12.2|happyreaders=2|unhappyreaders=0}}&lt;br /&gt;
&lt;br /&gt;
This describes how to use a virtual machine for building the latest KDE from sources.&lt;br /&gt;
&lt;br /&gt;
= Virtual Machine Setup =&lt;br /&gt;
Create a virtual machine, e.g. using [http://www.linuxintro.org/wiki/VirtualbOx VirtualBox]. Regarding harddisk: KDE 4 fits into 10 GB, however [[User:Tstaerk|I]] recommend 40GB, one partition. Regarding RAM: You will need at least 1GB ram for the virtual machine, of course more is better.&lt;br /&gt;
&lt;br /&gt;
;You will need to set your SUSE CD as your virtual machine's cdrom. &lt;br /&gt;
&lt;br /&gt;
== setup for SSH ==&lt;br /&gt;
To be able to log in to your VM using ssh, stop and disable the firewall:&lt;br /&gt;
 rcSuSEfirewall2 stop&lt;br /&gt;
 chkconfig SuSEfirewall2_setup off&lt;br /&gt;
 chkconfig SuSEfirewall2_init off&lt;br /&gt;
 /etc/init.d/sshd start&lt;br /&gt;
 chkconfig sshd on&lt;br /&gt;
Inside the VM, install some needed packages:&lt;br /&gt;
 yast -i libqt4-devel pcre-devel libxslt-devel libxml2-devel docbook-xsl-stylesheets git cyrus-sasl-devel libiodbc-devel \&lt;br /&gt;
 libdbusmenu-qt-devel giflib-devel strigi-devel libQtWebKit-devel libqimageblitz-devel libical-devel libgpgme-devel \&lt;br /&gt;
 boost-devel libqjson-devel libredland-devel&lt;br /&gt;
&lt;br /&gt;
;Now it is time to do a snapshot or clone from your VM.&lt;br /&gt;
You will be able to return to this machine state whenever you want.&lt;br /&gt;
&lt;br /&gt;
== a few more steps ==&lt;br /&gt;
[http://www.linuxintro.org/wiki/open_a_console Open a console] as root&lt;br /&gt;
 su -&lt;br /&gt;
&lt;br /&gt;
== on an x64 distribution ==&lt;br /&gt;
If and only if you have a /lib64 path, you are on an x64 distribution.&lt;br /&gt;
Make sure you have the needed environment variables and alias set by having a file /root/.bashrc.&lt;br /&gt;
 cd&lt;br /&gt;
 cat &amp;gt;.bashrc&amp;lt;&amp;lt;EOF &lt;br /&gt;
 export KDEDIR=/usr/local         &lt;br /&gt;
 alias cmakekde=&amp;quot;cmake . -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DLIB_SUFFIX=64 -D[[Development/CMake/Addons_for_KDE#Buildtypes|CMAKE_BUILD_TYPE]]=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias cmakekdelibs=&amp;quot;cmake ../kdelibs -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DLIB_SUFFIX=64 -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias makeqt=&amp;quot;./configure -dbus -openssl -plugin-sql-mysql -libdir /usr/lib64 -prefix /usr &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 export QTDIR=/usr&lt;br /&gt;
 EOF&lt;br /&gt;
 cat &amp;gt;.gitconfig&amp;lt;&amp;lt;EOF&lt;br /&gt;
 [url &amp;quot;git://anongit.kde.org/&amp;quot;]&lt;br /&gt;
     insteadOf = kde:&lt;br /&gt;
 [url &amp;quot;ssh://git@git.kde.org/&amp;quot;]&lt;br /&gt;
     pushInsteadOf = kde:&lt;br /&gt;
 EOF&lt;br /&gt;
Now activate this file&lt;br /&gt;
 . /root/.bashrc&lt;br /&gt;
&lt;br /&gt;
== on another distribution (incl 32bit)==&lt;br /&gt;
Make sure you have the needed environment variables and alias set by having a file /root/.bashrc. &lt;br /&gt;
 cd&lt;br /&gt;
 cat &amp;gt;.bashrc&amp;lt;&amp;lt;EOF&lt;br /&gt;
 export KDEDIR=/usr/local         &lt;br /&gt;
 alias cmakekde=&amp;quot;cmake . -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias cmakekdelibs=&amp;quot;cmake ../kdelibs -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias makeqt=&amp;quot;./configure -dbus -openssl -plugin-sql-mysql -prefix /usr &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 export QTDIR=/usr&lt;br /&gt;
 EOF&lt;br /&gt;
 cat &amp;gt;.gitconfig&amp;lt;&amp;lt;EOF&lt;br /&gt;
 [url &amp;quot;git://anongit.kde.org/&amp;quot;]&lt;br /&gt;
     insteadOf = kde:&lt;br /&gt;
 [url &amp;quot;ssh://git@git.kde.org/&amp;quot;]&lt;br /&gt;
     pushInsteadOf = kde:&lt;br /&gt;
 EOF&lt;br /&gt;
Now activate this file&lt;br /&gt;
 . /root/.bashrc&lt;br /&gt;
&lt;br /&gt;
= Aquire and Build KDE as root =&lt;br /&gt;
If something fails you may need to make clean.&lt;br /&gt;
&lt;br /&gt;
== cmake ==&lt;br /&gt;
Install the latest version of cmake:&lt;br /&gt;
 cd&lt;br /&gt;
 wget http://www.cmake.org/files/v2.8/cmake-2.8.10.2.tar.gz&lt;br /&gt;
 tar xvzf cmake-2.8.10.2.tar.gz&lt;br /&gt;
 cd cmake-2.8.10.2&lt;br /&gt;
 ./configure &amp;amp;&amp;amp; make -j4 &amp;amp;&amp;amp; make install&lt;br /&gt;
&lt;br /&gt;
== automoc ==&lt;br /&gt;
automoc is needed for akonadi.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:automoc&lt;br /&gt;
 cd automoc&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== akonadi ==&lt;br /&gt;
Akonadi keeps personal information management data in a mysql database. It is needed for KDEPIMLIBS.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:akonadi&lt;br /&gt;
 cd akonadi&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== libattica ==&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:attica&lt;br /&gt;
 cd attica&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== shared desktop ontologies ==&lt;br /&gt;
shared desktop ontologies is needed by kdepimlibs in order to build Nepomuk (which is a part of kdelibs)&lt;br /&gt;
 cd&lt;br /&gt;
 wget http://downloads.sourceforge.net/project/oscaf/shared-desktop-ontologies/0.10.0/shared-desktop-ontologies-0.10.0.tar.bz2&lt;br /&gt;
 tar xvjf shared-desktop-ontologies-0.10.0.tar.bz2&lt;br /&gt;
 cd shared-desktop-ontologies-0.10.0/&lt;br /&gt;
 cmake . &amp;amp;&amp;amp; make &amp;amp;&amp;amp; make install&lt;br /&gt;
&lt;br /&gt;
== soprano ==&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:soprano&lt;br /&gt;
 cd soprano&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== phonon ==&lt;br /&gt;
Phonon is needed for kdebase-runtime&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:phonon&lt;br /&gt;
 cd phonon&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kdelibs ==&lt;br /&gt;
KDELIBS requires an out-of-source build, that is why it is more complicated to build:&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kdelibs&lt;br /&gt;
 mkdir kdelibs-build&lt;br /&gt;
 cd kdelibs-build&lt;br /&gt;
 cmakekdelibs&lt;br /&gt;
Verify it has been correctly installed - the following must be possible:&lt;br /&gt;
 kde4-config --prefix&lt;br /&gt;
 /usr/local&lt;br /&gt;
&lt;br /&gt;
== nepomuk-core ==&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:nepomuk-core&lt;br /&gt;
 cd nepomuk-core&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kdepimlibs ==&lt;br /&gt;
kdepimlibs is needed for kde-runtime.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kdepimlibs&lt;br /&gt;
 cd kdepimlibs&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kactivities ==&lt;br /&gt;
kactivities is needed for kde-workspace.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kactivities&lt;br /&gt;
 cd kactivities&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kdebase ==&lt;br /&gt;
 cd &lt;br /&gt;
 git clone kde:kde-baseapps&lt;br /&gt;
 git clone kde:konsole&lt;br /&gt;
 git clone kde:kde-workspace&lt;br /&gt;
 git clone kde:kde-runtime &lt;br /&gt;
 cd kde-baseapps&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd konsole&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd kde-workspace&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd kde-runtime&lt;br /&gt;
 cmakekde&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/KDE4/on_virtual_machines</id>
		<title>Getting Started/Build/KDE4/on virtual machines</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/KDE4/on_virtual_machines"/>
				<updated>2013-01-26T19:38:09Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: /* setup for SSH */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox tutorial|time=3 hours|type=HowTo|distribution=SUSE Linux 12.2|happyreaders=2|unhappyreaders=0}}&lt;br /&gt;
&lt;br /&gt;
This describes how to use a virtual machine for building the latest KDE from sources.&lt;br /&gt;
&lt;br /&gt;
= Virtual Machine Setup =&lt;br /&gt;
Create a virtual machine, e.g. using [http://www.linuxintro.org/wiki/VirtualbOx VirtualBox]. Regarding harddisk: KDE 4 fits into 10 GB, however [[User:Tstaerk|I]] recommend 40GB, one partition. Regarding RAM: You will need at least 1GB ram for the virtual machine, of course more is better.&lt;br /&gt;
&lt;br /&gt;
;You will need to set your SUSE CD as your virtual machine's cdrom. &lt;br /&gt;
&lt;br /&gt;
== setup for SSH ==&lt;br /&gt;
To be able to log in to your VM using ssh, stop and disable the firewall:&lt;br /&gt;
 rcSuSEfirewall2 stop&lt;br /&gt;
 chkconfig SuSEfirewall2_setup off&lt;br /&gt;
 chkconfig SuSEfirewall2_init off&lt;br /&gt;
 /etc/init.d/sshd start&lt;br /&gt;
 chkconfig sshd on&lt;br /&gt;
Inside the VM, install some needed packages:&lt;br /&gt;
 yast -i libqt4-devel pcre-devel libxslt-devel libxml2-devel docbook-xsl-stylesheets git cyrus-sasl-devel libiodbc-devel \&lt;br /&gt;
 libdbusmenu-qt-devel giflib-devel strigi-devel libQtWebKit-devel libqimageblitz-devel libical-devel libgpgme-devel \&lt;br /&gt;
 boost-devel libqjson-devel&lt;br /&gt;
&lt;br /&gt;
;Now it is time to do a snapshot or clone from your VM.&lt;br /&gt;
You will be able to return to this machine state whenever you want.&lt;br /&gt;
&lt;br /&gt;
== a few more steps ==&lt;br /&gt;
[http://www.linuxintro.org/wiki/open_a_console Open a console] as root&lt;br /&gt;
 su -&lt;br /&gt;
&lt;br /&gt;
== on an x64 distribution ==&lt;br /&gt;
If and only if you have a /lib64 path, you are on an x64 distribution.&lt;br /&gt;
Make sure you have the needed environment variables and alias set by having a file /root/.bashrc.&lt;br /&gt;
 cd&lt;br /&gt;
 cat &amp;gt;.bashrc&amp;lt;&amp;lt;EOF &lt;br /&gt;
 export KDEDIR=/usr/local         &lt;br /&gt;
 alias cmakekde=&amp;quot;cmake . -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DLIB_SUFFIX=64 -D[[Development/CMake/Addons_for_KDE#Buildtypes|CMAKE_BUILD_TYPE]]=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias cmakekdelibs=&amp;quot;cmake ../kdelibs -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DLIB_SUFFIX=64 -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias makeqt=&amp;quot;./configure -dbus -openssl -plugin-sql-mysql -libdir /usr/lib64 -prefix /usr &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 export QTDIR=/usr&lt;br /&gt;
 EOF&lt;br /&gt;
 cat &amp;gt;.gitconfig&amp;lt;&amp;lt;EOF&lt;br /&gt;
 [url &amp;quot;git://anongit.kde.org/&amp;quot;]&lt;br /&gt;
     insteadOf = kde:&lt;br /&gt;
 [url &amp;quot;ssh://git@git.kde.org/&amp;quot;]&lt;br /&gt;
     pushInsteadOf = kde:&lt;br /&gt;
 EOF&lt;br /&gt;
Now activate this file&lt;br /&gt;
 . /root/.bashrc&lt;br /&gt;
&lt;br /&gt;
== on another distribution (incl 32bit)==&lt;br /&gt;
Make sure you have the needed environment variables and alias set by having a file /root/.bashrc. &lt;br /&gt;
 cd&lt;br /&gt;
 cat &amp;gt;.bashrc&amp;lt;&amp;lt;EOF&lt;br /&gt;
 export KDEDIR=/usr/local         &lt;br /&gt;
 alias cmakekde=&amp;quot;cmake . -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias cmakekdelibs=&amp;quot;cmake ../kdelibs -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias makeqt=&amp;quot;./configure -dbus -openssl -plugin-sql-mysql -prefix /usr &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 export QTDIR=/usr&lt;br /&gt;
 EOF&lt;br /&gt;
 cat &amp;gt;.gitconfig&amp;lt;&amp;lt;EOF&lt;br /&gt;
 [url &amp;quot;git://anongit.kde.org/&amp;quot;]&lt;br /&gt;
     insteadOf = kde:&lt;br /&gt;
 [url &amp;quot;ssh://git@git.kde.org/&amp;quot;]&lt;br /&gt;
     pushInsteadOf = kde:&lt;br /&gt;
 EOF&lt;br /&gt;
Now activate this file&lt;br /&gt;
 . /root/.bashrc&lt;br /&gt;
&lt;br /&gt;
= Aquire and Build KDE as root =&lt;br /&gt;
If something fails you may need to make clean.&lt;br /&gt;
&lt;br /&gt;
== cmake ==&lt;br /&gt;
Install the latest version of cmake:&lt;br /&gt;
 cd&lt;br /&gt;
 wget http://www.cmake.org/files/v2.8/cmake-2.8.10.2.tar.gz&lt;br /&gt;
 tar xvzf cmake-2.8.10.2.tar.gz&lt;br /&gt;
 cd cmake-2.8.10.2&lt;br /&gt;
 ./configure &amp;amp;&amp;amp; make -j4 &amp;amp;&amp;amp; make install&lt;br /&gt;
&lt;br /&gt;
== automoc ==&lt;br /&gt;
automoc is needed for akonadi.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:automoc&lt;br /&gt;
 cd automoc&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== akonadi ==&lt;br /&gt;
Akonadi keeps personal information management data in a mysql database. It is needed for KDEPIMLIBS.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:akonadi&lt;br /&gt;
 cd akonadi&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== libattica ==&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:attica&lt;br /&gt;
 cd attica&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== shared desktop ontologies ==&lt;br /&gt;
shared desktop ontologies is needed by kdepimlibs in order to build Nepomuk (which is a part of kdelibs)&lt;br /&gt;
 cd&lt;br /&gt;
 wget http://downloads.sourceforge.net/project/oscaf/shared-desktop-ontologies/0.10.0/shared-desktop-ontologies-0.10.0.tar.bz2&lt;br /&gt;
 tar xvjf shared-desktop-ontologies-0.10.0.tar.bz2&lt;br /&gt;
 cd shared-desktop-ontologies-0.10.0/&lt;br /&gt;
 cmake . &amp;amp;&amp;amp; make &amp;amp;&amp;amp; make install&lt;br /&gt;
&lt;br /&gt;
== soprano ==&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:soprano&lt;br /&gt;
 cd soprano&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== phonon ==&lt;br /&gt;
Phonon is needed for kdebase-runtime&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:phonon&lt;br /&gt;
 cd phonon&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kdelibs ==&lt;br /&gt;
KDELIBS requires an out-of-source build, that is why it is more complicated to build:&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kdelibs&lt;br /&gt;
 mkdir kdelibs-build&lt;br /&gt;
 cd kdelibs-build&lt;br /&gt;
 cmakekdelibs&lt;br /&gt;
Verify it has been correctly installed - the following must be possible:&lt;br /&gt;
 kde4-config --prefix&lt;br /&gt;
 /usr/local&lt;br /&gt;
&lt;br /&gt;
== nepomuk-core ==&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:nepomuk-core&lt;br /&gt;
 cd nepomuk-core&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kdepimlibs ==&lt;br /&gt;
kdepimlibs is needed for kde-runtime.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kdepimlibs&lt;br /&gt;
 cd kdepimlibs&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kactivities ==&lt;br /&gt;
kactivities is needed for kde-workspace.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kactivities&lt;br /&gt;
 cd kactivities&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kdebase ==&lt;br /&gt;
 cd &lt;br /&gt;
 git clone kde:kde-baseapps&lt;br /&gt;
 git clone kde:konsole&lt;br /&gt;
 git clone kde:kde-workspace&lt;br /&gt;
 git clone kde:kde-runtime &lt;br /&gt;
 cd kde-baseapps&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd konsole&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd kde-workspace&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd kde-runtime&lt;br /&gt;
 cmakekde&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build</id>
		<title>Getting Started/Build</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build"/>
				<updated>2013-01-26T19:21:26Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: working example does not work&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{warning|These pages are currently being completely re-written to reflect the new KDE infrastructure and may not be in a consistent state.  Information and commands on some page may no longer be valid and should be used with care.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This page provides an overview of the KDE build process.  Once you complete the steps described here you will have a complete KDE development system customized to your needs.&lt;br /&gt;
&lt;br /&gt;
== Build Steps ==&lt;br /&gt;
&lt;br /&gt;
This section will briefly explain the concepts and steps involved in building software so you are not being asked to blindly follow some recipes you do not understand.&lt;br /&gt;
&lt;br /&gt;
It is assumed you are at least familiar with the basics of using the command line.&lt;br /&gt;
&lt;br /&gt;
Once you have read the summary you can see a [[Getting_Started/Build/KDE4/on_virtual_machines|working example on a virtual machine here]].&lt;br /&gt;
&lt;br /&gt;
=== Source ===&lt;br /&gt;
&lt;br /&gt;
The ''Source'' step is obtaining a local copy of the source code that you want to build.  For a detailed explanation of where to obtain the source code and how KDE stores and organizes our source code please read the [[Getting_Started/Sources|KDE Sources section]].&lt;br /&gt;
&lt;br /&gt;
The two main options here are to either download a snapshot tarball of the code, or to directly access the source code repository.  For developing on the unstable branch of the KDE SC it is recommended you directly access the required repositories.&lt;br /&gt;
&lt;br /&gt;
=== Configure ===&lt;br /&gt;
&lt;br /&gt;
The ''Configure'' step is setting up how the source code is to be built and installed.&lt;br /&gt;
&lt;br /&gt;
=== Build ===&lt;br /&gt;
&lt;br /&gt;
The ''Build'' step is compiling the source code and linking it to other libraries to create the new executables and libraries.&lt;br /&gt;
&lt;br /&gt;
=== Install ===&lt;br /&gt;
&lt;br /&gt;
The ''Install'' step is copy the new executables and libraries somewhere that they can be found and run from.&lt;br /&gt;
&lt;br /&gt;
=== Update ===&lt;br /&gt;
&lt;br /&gt;
The ''Update'' step is updating an existing build to use the latest version of the source code and then re-building and re-installing it.&lt;br /&gt;
&lt;br /&gt;
== Scripted Builds ==&lt;br /&gt;
&lt;br /&gt;
The easiest way to build the KDE SC from scratch is to use one of the build scripts that are available.  This approach is highly recommended for those new to building KDE SC as it takes care of the Source, Configure, Build, Install and Update steps for you.  The builds remain compatible with the manual methods of building KDE SC so you can change later if you want.&lt;br /&gt;
&lt;br /&gt;
Even KDE Core Developers use build scripts like these as opposed to doing everything manually, as there's just no point otherwise.&lt;br /&gt;
&lt;br /&gt;
If you run into any issues, be sure to ask either on the kde-devel mailing list, or the #kde-devel IRC channel (which many developers reside in and are willing to ask any questions or address any problems encountered).&lt;br /&gt;
&lt;br /&gt;
=== kdesrc-build ===&lt;br /&gt;
[[/kdesrc-build|kdesrc-build]] (formerly kdesvn-build) is a tool to allow users and developers to easily download and build the latest versions of the KDE Software Compilation (KDE SC) from the KDE source code repositories. &lt;br /&gt;
&lt;br /&gt;
=== build-tool ===&lt;br /&gt;
The [http://michael-jansen.biz/build-tool build-tool] is a ruby program script which is meant not for just building KDE, but also can easily be expanded to compile any other applications. It also has some neat features like progress bars and eta for compile time. It can also automatically generate a ~/.xsessionrc which can be used by KDM when you select to boot into a &amp;quot;Custom&amp;quot; session type. That will enable you to easily get into a KDE session which was built from source, without even having to modify any of your scripts like ~/.bashrc, ~/.zshrc, etc.&lt;br /&gt;
&lt;br /&gt;
Install rubygems through your package manager. Run &amp;lt;tt&amp;gt;sudo gem install build-tool&amp;lt;/tt&amp;gt;. Now that build-tool is installed, we need to install the KDE recipes to have it build KDE from source. Run &amp;lt;tt&amp;gt;build-tool recipe add git://gitorious.org/build-tool/kde-trunk-recipe.git kde&amp;lt;/tt&amp;gt; to add the KDE recipe to the program. Then &amp;lt;tt&amp;gt;build-tool recipes install kde&amp;lt;/tt&amp;gt;. From there, you can run &amp;lt;tt&amp;gt;kde-build help&amp;lt;/tt&amp;gt; to see the commands available for the KDE recipe, as well as compile and update the git repositories. &lt;br /&gt;
&lt;br /&gt;
For more detailed information, visit: http://michael-jansen.biz/build-tool&lt;br /&gt;
&lt;br /&gt;
== Platform Specific Information ==&lt;br /&gt;
&lt;br /&gt;
The build process described in these pages is kept as simple and generic as possible, but it is generally assumed you are building KDE4 on Linux.  Extra information about building KDE Software on specific distributions or platforms, or under certain conditions can be found at the following links:&lt;br /&gt;
&lt;br /&gt;
* [[/Distributions|Linux, BSD and other *nix based distributions]]&lt;br /&gt;
* [[/Windows|Microsoft Windows]]&lt;br /&gt;
* [[/Mac_OS_X|Apple Mac OS X]]&lt;br /&gt;
* [[/KDE4/on_virtual_machines|On a Virtual Machine]].&lt;br /&gt;
* [[/Historic|Building historic versions of KDE Software (KDE3 and KDE2)]]&lt;br /&gt;
&lt;br /&gt;
== Stable versus Unstable ==&lt;br /&gt;
&lt;br /&gt;
A stable build is a released and supported version of KDE Software, such as KDE SC 4.6.  This software is guaranteed to remain unchanged other than bug-fixes.  You will want a Stable build if you want to use the KDE Software for normal use or to develop bug fixes.&lt;br /&gt;
&lt;br /&gt;
An unstable build is the latest development version of KDE Software and is not guaranteed to build or run properly at any given time.  You will want an Unstable build if you want to develop new features for KDE Software.&lt;br /&gt;
&lt;br /&gt;
In Git, the Unstable branch is called Master while in Subversion it is called Trunk.&lt;br /&gt;
&lt;br /&gt;
== Build and Install ==&lt;br /&gt;
&lt;br /&gt;
You need to complete each of the following steps to build and/or install a working KDE development system. Manually building KDE Software requires that you first set up the build environment and install the required development tools and libraries.&lt;br /&gt;
&lt;br /&gt;
* Choose the appropriate [[/Methods|Build Method]] for your requirements&lt;br /&gt;
* Set up your [[/Environment|Build Environment]]&lt;br /&gt;
* Choose the appropriate [[/Recipes|Build Recipes]] for your requirements and environment&lt;br /&gt;
* Install the [[/Requirements|Build Requirements]]&lt;br /&gt;
* Install or build [[/Qt|Qt]]&lt;br /&gt;
* Install or build [[/KDE_Support|KDE Support]]&lt;br /&gt;
* Install or build [[/KDE_Development_Platform|KDE Development Platform]]&lt;br /&gt;
* Install or build [[/KDE_Workspace|KDE Workspace]]&lt;br /&gt;
* [[/KDE_Applications|Build KDE Applications]]&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting The Build ==&lt;br /&gt;
&lt;br /&gt;
Compile and Linking errors are frequent sources of discouragement. Make careful note of the first occurrence of an error in your build process. It could be as simple as a bad environment variable, an unexpected version of a library or missing prerequisite.  Please read the instructions carefully.&lt;br /&gt;
&lt;br /&gt;
Please review your logs and do searches for fixes. If you cannot find a solution, try the [[/Troubleshooting|Troubleshooting]] page.  If you still cannot resolve the problem then please [[Development/Getting_Help|ask for help]] on IRC or a Mailing List.&lt;br /&gt;
&lt;br /&gt;
== Starting KDE ==&lt;br /&gt;
&lt;br /&gt;
Having built and installed KDE, you will probably want to start it. Launching a full session requires some preparations, depending on whether you want to run the self-compiled KDE within another desktop environment or as a full-blow session:&lt;br /&gt;
&lt;br /&gt;
* [[Getting_Started/Run/Nested_Session|How to Run a nested session of KDE]]&lt;br /&gt;
* [[Getting_Started/Run/Full_Session|How to Run a full session of KDE]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Build KDE]]&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/KDE4/on_virtual_machines</id>
		<title>Getting Started/Build/KDE4/on virtual machines</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/KDE4/on_virtual_machines"/>
				<updated>2013-01-26T19:13:49Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: you will need libiodbc-devel for sesame which you need for soprano which you need for nepomukcore which you need for kdepimlibs which you need for kdebase&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox tutorial|time=3 hours|type=HowTo|distribution=SUSE Linux 12.2|happyreaders=2|unhappyreaders=0}}&lt;br /&gt;
&lt;br /&gt;
This describes how to use a virtual machine for building the latest KDE from sources.&lt;br /&gt;
&lt;br /&gt;
= Virtual Machine Setup =&lt;br /&gt;
Create a virtual machine, e.g. using [http://www.linuxintro.org/wiki/VirtualbOx VirtualBox]. Regarding harddisk: KDE 4 fits into 10 GB, however [[User:Tstaerk|I]] recommend 40GB, one partition. Regarding RAM: You will need at least 1GB ram for the virtual machine, of course more is better.&lt;br /&gt;
&lt;br /&gt;
;You will need to set your SUSE CD as your virtual machine's cdrom. &lt;br /&gt;
&lt;br /&gt;
== setup for SSH ==&lt;br /&gt;
To be able to log in to your VM using ssh, stop and disable the firewall:&lt;br /&gt;
 rcSuSEfirewall2 stop&lt;br /&gt;
 chkconfig SuSEfirewall2_setup off&lt;br /&gt;
 chkconfig SuSEfirewall2_init off&lt;br /&gt;
 /etc/init.d/sshd start&lt;br /&gt;
 chkconfig sshd on&lt;br /&gt;
Inside the VM, install some needed packages:&lt;br /&gt;
 yast -i libqt4-devel pcre-devel libxslt-devel libxml2-devel docbook-xsl-stylesheets git cmake \&lt;br /&gt;
 libdbusmenu-qt-devel giflib-devel strigi-devel libQtWebKit-devel libqimageblitz-devel libical-devel libgpgme-devel \&lt;br /&gt;
 boost-devel libqjson-devel cyrus-sasl-devel libiodbc-devel&lt;br /&gt;
&lt;br /&gt;
;Now it is time to do a snapshot or clone from your VM.&lt;br /&gt;
You will be able to return to this machine state whenever you want.&lt;br /&gt;
&lt;br /&gt;
== a few more steps ==&lt;br /&gt;
[http://www.linuxintro.org/wiki/open_a_console Open a console] as root&lt;br /&gt;
 su -&lt;br /&gt;
&lt;br /&gt;
== on an x64 distribution ==&lt;br /&gt;
If and only if you have a /lib64 path, you are on an x64 distribution.&lt;br /&gt;
Make sure you have the needed environment variables and alias set by having a file /root/.bashrc.&lt;br /&gt;
 cd&lt;br /&gt;
 cat &amp;gt;.bashrc&amp;lt;&amp;lt;EOF &lt;br /&gt;
 export KDEDIR=/usr/local         &lt;br /&gt;
 alias cmakekde=&amp;quot;cmake . -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DLIB_SUFFIX=64 -D[[Development/CMake/Addons_for_KDE#Buildtypes|CMAKE_BUILD_TYPE]]=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias cmakekdelibs=&amp;quot;cmake ../kdelibs -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DLIB_SUFFIX=64 -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias makeqt=&amp;quot;./configure -dbus -openssl -plugin-sql-mysql -libdir /usr/lib64 -prefix /usr &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 export QTDIR=/usr&lt;br /&gt;
 EOF&lt;br /&gt;
 cat &amp;gt;.gitconfig&amp;lt;&amp;lt;EOF&lt;br /&gt;
 [url &amp;quot;git://anongit.kde.org/&amp;quot;]&lt;br /&gt;
     insteadOf = kde:&lt;br /&gt;
 [url &amp;quot;ssh://git@git.kde.org/&amp;quot;]&lt;br /&gt;
     pushInsteadOf = kde:&lt;br /&gt;
 EOF&lt;br /&gt;
Now activate this file&lt;br /&gt;
 . /root/.bashrc&lt;br /&gt;
&lt;br /&gt;
== on another distribution (incl 32bit)==&lt;br /&gt;
Make sure you have the needed environment variables and alias set by having a file /root/.bashrc. &lt;br /&gt;
 cd&lt;br /&gt;
 cat &amp;gt;.bashrc&amp;lt;&amp;lt;EOF&lt;br /&gt;
 export KDEDIR=/usr/local         &lt;br /&gt;
 alias cmakekde=&amp;quot;cmake . -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias cmakekdelibs=&amp;quot;cmake ../kdelibs -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias makeqt=&amp;quot;./configure -dbus -openssl -plugin-sql-mysql -prefix /usr &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 export QTDIR=/usr&lt;br /&gt;
 EOF&lt;br /&gt;
 cat &amp;gt;.gitconfig&amp;lt;&amp;lt;EOF&lt;br /&gt;
 [url &amp;quot;git://anongit.kde.org/&amp;quot;]&lt;br /&gt;
     insteadOf = kde:&lt;br /&gt;
 [url &amp;quot;ssh://git@git.kde.org/&amp;quot;]&lt;br /&gt;
     pushInsteadOf = kde:&lt;br /&gt;
 EOF&lt;br /&gt;
Now activate this file&lt;br /&gt;
 . /root/.bashrc&lt;br /&gt;
&lt;br /&gt;
= Aquire and Build KDE as root =&lt;br /&gt;
If something fails you may need to make clean.&lt;br /&gt;
&lt;br /&gt;
== cmake ==&lt;br /&gt;
Install the latest version of cmake:&lt;br /&gt;
 cd&lt;br /&gt;
 wget http://www.cmake.org/files/v2.8/cmake-2.8.10.2.tar.gz&lt;br /&gt;
 tar xvzf cmake-2.8.10.2.tar.gz&lt;br /&gt;
 cd cmake-2.8.10.2&lt;br /&gt;
 ./configure &amp;amp;&amp;amp; make -j4 &amp;amp;&amp;amp; make install&lt;br /&gt;
&lt;br /&gt;
== automoc ==&lt;br /&gt;
automoc is needed for akonadi.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:automoc&lt;br /&gt;
 cd automoc&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== akonadi ==&lt;br /&gt;
Akonadi keeps personal information management data in a mysql database. It is needed for KDEPIMLIBS.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:akonadi&lt;br /&gt;
 cd akonadi&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== libattica ==&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:attica&lt;br /&gt;
 cd attica&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== shared desktop ontologies ==&lt;br /&gt;
shared desktop ontologies is needed by kdepimlibs in order to build Nepomuk (which is a part of kdelibs)&lt;br /&gt;
 cd&lt;br /&gt;
 wget http://downloads.sourceforge.net/project/oscaf/shared-desktop-ontologies/0.10.0/shared-desktop-ontologies-0.10.0.tar.bz2&lt;br /&gt;
 tar xvjf shared-desktop-ontologies-0.10.0.tar.bz2&lt;br /&gt;
 cd shared-desktop-ontologies-0.10.0/&lt;br /&gt;
 cmake . &amp;amp;&amp;amp; make &amp;amp;&amp;amp; make install&lt;br /&gt;
&lt;br /&gt;
== soprano ==&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:soprano&lt;br /&gt;
 cd soprano&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== phonon ==&lt;br /&gt;
Phonon is needed for kdebase-runtime&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:phonon&lt;br /&gt;
 cd phonon&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kdelibs ==&lt;br /&gt;
KDELIBS requires an out-of-source build, that is why it is more complicated to build:&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kdelibs&lt;br /&gt;
 mkdir kdelibs-build&lt;br /&gt;
 cd kdelibs-build&lt;br /&gt;
 cmakekdelibs&lt;br /&gt;
Verify it has been correctly installed - the following must be possible:&lt;br /&gt;
 kde4-config --prefix&lt;br /&gt;
 /usr/local&lt;br /&gt;
&lt;br /&gt;
== nepomuk-core ==&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:nepomuk-core&lt;br /&gt;
 cd nepomuk-core&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kdepimlibs ==&lt;br /&gt;
kdepimlibs is needed for kde-runtime.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kdepimlibs&lt;br /&gt;
 cd kdepimlibs&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kactivities ==&lt;br /&gt;
kactivities is needed for kde-workspace.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kactivities&lt;br /&gt;
 cd kactivities&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kdebase ==&lt;br /&gt;
 cd &lt;br /&gt;
 git clone kde:kde-baseapps&lt;br /&gt;
 git clone kde:konsole&lt;br /&gt;
 git clone kde:kde-workspace&lt;br /&gt;
 git clone kde:kde-runtime &lt;br /&gt;
 cd kde-baseapps&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd konsole&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd kde-workspace&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd kde-runtime&lt;br /&gt;
 cmakekde&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/KDE4/on_virtual_machines</id>
		<title>Getting Started/Build/KDE4/on virtual machines</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/KDE4/on_virtual_machines"/>
				<updated>2013-01-26T18:44:01Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: /* kdepimlibs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox tutorial|time=3 hours|type=HowTo|distribution=SUSE Linux 12.2|happyreaders=2|unhappyreaders=0}}&lt;br /&gt;
&lt;br /&gt;
This describes how to use a virtual machine for building the latest KDE from sources.&lt;br /&gt;
&lt;br /&gt;
= Virtual Machine Setup =&lt;br /&gt;
Create a virtual machine, e.g. using [http://www.linuxintro.org/wiki/VirtualbOx VirtualBox]. Regarding harddisk: KDE 4 fits into 10 GB, however [[User:Tstaerk|I]] recommend 40GB, one partition. Regarding RAM: You will need at least 1GB ram for the virtual machine, of course more is better.&lt;br /&gt;
&lt;br /&gt;
;You will need to set your SUSE CD as your virtual machine's cdrom. &lt;br /&gt;
&lt;br /&gt;
== setup for SSH ==&lt;br /&gt;
To be able to log in to your VM using ssh, stop and disable the firewall:&lt;br /&gt;
 rcSuSEfirewall2 stop&lt;br /&gt;
 chkconfig SuSEfirewall2_setup off&lt;br /&gt;
 chkconfig SuSEfirewall2_init off&lt;br /&gt;
 /etc/init.d/sshd start&lt;br /&gt;
 chkconfig sshd on&lt;br /&gt;
Inside the VM, install some needed packages:&lt;br /&gt;
 yast -i libqt4-devel pcre-devel libxslt-devel libxml2-devel docbook-xsl-stylesheets git cmake \&lt;br /&gt;
 libdbusmenu-qt-devel giflib-devel strigi-devel libQtWebKit-devel libqimageblitz-devel libical-devel libgpgme-devel \&lt;br /&gt;
 boost-devel libqjson-devel cyrus-sasl-devel&lt;br /&gt;
&lt;br /&gt;
;Now it is time to do a snapshot or clone from your VM.&lt;br /&gt;
You will be able to return to this machine state whenever you want.&lt;br /&gt;
&lt;br /&gt;
== a few more steps ==&lt;br /&gt;
[http://www.linuxintro.org/wiki/open_a_console Open a console] as root&lt;br /&gt;
 su -&lt;br /&gt;
&lt;br /&gt;
== on an x64 distribution ==&lt;br /&gt;
If and only if you have a /lib64 path, you are on an x64 distribution.&lt;br /&gt;
Make sure you have the needed environment variables and alias set by having a file /root/.bashrc.&lt;br /&gt;
 cd&lt;br /&gt;
 cat &amp;gt;.bashrc&amp;lt;&amp;lt;EOF &lt;br /&gt;
 export KDEDIR=/usr/local         &lt;br /&gt;
 alias cmakekde=&amp;quot;cmake . -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DLIB_SUFFIX=64 -D[[Development/CMake/Addons_for_KDE#Buildtypes|CMAKE_BUILD_TYPE]]=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias cmakekdelibs=&amp;quot;cmake ../kdelibs -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DLIB_SUFFIX=64 -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias makeqt=&amp;quot;./configure -dbus -openssl -plugin-sql-mysql -libdir /usr/lib64 -prefix /usr &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 export QTDIR=/usr&lt;br /&gt;
 EOF&lt;br /&gt;
 cat &amp;gt;.gitconfig&amp;lt;&amp;lt;EOF&lt;br /&gt;
 [url &amp;quot;git://anongit.kde.org/&amp;quot;]&lt;br /&gt;
     insteadOf = kde:&lt;br /&gt;
 [url &amp;quot;ssh://git@git.kde.org/&amp;quot;]&lt;br /&gt;
     pushInsteadOf = kde:&lt;br /&gt;
 EOF&lt;br /&gt;
Now activate this file&lt;br /&gt;
 . /root/.bashrc&lt;br /&gt;
&lt;br /&gt;
== on another distribution (incl 32bit)==&lt;br /&gt;
Make sure you have the needed environment variables and alias set by having a file /root/.bashrc. &lt;br /&gt;
 cd&lt;br /&gt;
 cat &amp;gt;.bashrc&amp;lt;&amp;lt;EOF&lt;br /&gt;
 export KDEDIR=/usr/local         &lt;br /&gt;
 alias cmakekde=&amp;quot;cmake . -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias cmakekdelibs=&amp;quot;cmake ../kdelibs -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias makeqt=&amp;quot;./configure -dbus -openssl -plugin-sql-mysql -prefix /usr &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 export QTDIR=/usr&lt;br /&gt;
 EOF&lt;br /&gt;
 cat &amp;gt;.gitconfig&amp;lt;&amp;lt;EOF&lt;br /&gt;
 [url &amp;quot;git://anongit.kde.org/&amp;quot;]&lt;br /&gt;
     insteadOf = kde:&lt;br /&gt;
 [url &amp;quot;ssh://git@git.kde.org/&amp;quot;]&lt;br /&gt;
     pushInsteadOf = kde:&lt;br /&gt;
 EOF&lt;br /&gt;
Now activate this file&lt;br /&gt;
 . /root/.bashrc&lt;br /&gt;
&lt;br /&gt;
= Aquire and Build KDE as root =&lt;br /&gt;
If something fails you may need to make clean.&lt;br /&gt;
&lt;br /&gt;
== cmake ==&lt;br /&gt;
Install the latest version of cmake:&lt;br /&gt;
 cd&lt;br /&gt;
 wget http://www.cmake.org/files/v2.8/cmake-2.8.10.2.tar.gz&lt;br /&gt;
 tar xvzf cmake-2.8.10.2.tar.gz&lt;br /&gt;
 cd cmake-2.8.10.2&lt;br /&gt;
 ./configure &amp;amp;&amp;amp; make -j4 &amp;amp;&amp;amp; make install&lt;br /&gt;
&lt;br /&gt;
== automoc ==&lt;br /&gt;
automoc is needed for akonadi.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:automoc&lt;br /&gt;
 cd automoc&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== akonadi ==&lt;br /&gt;
Akonadi keeps personal information management data in a mysql database. It is needed for KDEPIMLIBS.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:akonadi&lt;br /&gt;
 cd akonadi&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== libattica ==&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:attica&lt;br /&gt;
 cd attica&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== shared desktop ontologies ==&lt;br /&gt;
shared desktop ontologies is needed by kdepimlibs in order to build Nepomuk (which is a part of kdelibs)&lt;br /&gt;
 cd&lt;br /&gt;
 wget http://downloads.sourceforge.net/project/oscaf/shared-desktop-ontologies/0.10.0/shared-desktop-ontologies-0.10.0.tar.bz2&lt;br /&gt;
 tar xvjf shared-desktop-ontologies-0.10.0.tar.bz2&lt;br /&gt;
 cd shared-desktop-ontologies-0.10.0/&lt;br /&gt;
 cmake . &amp;amp;&amp;amp; make &amp;amp;&amp;amp; make install&lt;br /&gt;
&lt;br /&gt;
== soprano ==&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:soprano&lt;br /&gt;
 cd soprano&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== phonon ==&lt;br /&gt;
Phonon is needed for kdebase-runtime&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:phonon&lt;br /&gt;
 cd phonon&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kdelibs ==&lt;br /&gt;
KDELIBS requires an out-of-source build, that is why it is more complicated to build:&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kdelibs&lt;br /&gt;
 mkdir kdelibs-build&lt;br /&gt;
 cd kdelibs-build&lt;br /&gt;
 cmakekdelibs&lt;br /&gt;
Verify it has been correctly installed - the following must be possible:&lt;br /&gt;
 kde4-config --prefix&lt;br /&gt;
 /usr/local&lt;br /&gt;
&lt;br /&gt;
== nepomuk-core ==&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:nepomuk-core&lt;br /&gt;
 cd nepomuk-core&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kdepimlibs ==&lt;br /&gt;
kdepimlibs is needed for kde-runtime.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kdepimlibs&lt;br /&gt;
 cd kdepimlibs&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kactivities ==&lt;br /&gt;
kactivities is needed for kde-workspace.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kactivities&lt;br /&gt;
 cd kactivities&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kdebase ==&lt;br /&gt;
 cd &lt;br /&gt;
 git clone kde:kde-baseapps&lt;br /&gt;
 git clone kde:konsole&lt;br /&gt;
 git clone kde:kde-workspace&lt;br /&gt;
 git clone kde:kde-runtime &lt;br /&gt;
 cd kde-baseapps&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd konsole&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd kde-workspace&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd kde-runtime&lt;br /&gt;
 cmakekde&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/KDE4/on_virtual_machines</id>
		<title>Getting Started/Build/KDE4/on virtual machines</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/KDE4/on_virtual_machines"/>
				<updated>2013-01-26T17:58:37Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: /* setup for SSH */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox tutorial|time=3 hours|type=HowTo|distribution=SUSE Linux 12.2|happyreaders=2|unhappyreaders=0}}&lt;br /&gt;
&lt;br /&gt;
This describes how to use a virtual machine for building the latest KDE from sources.&lt;br /&gt;
&lt;br /&gt;
= Virtual Machine Setup =&lt;br /&gt;
Create a virtual machine, e.g. using [http://www.linuxintro.org/wiki/VirtualbOx VirtualBox]. Regarding harddisk: KDE 4 fits into 10 GB, however [[User:Tstaerk|I]] recommend 40GB, one partition. Regarding RAM: You will need at least 1GB ram for the virtual machine, of course more is better.&lt;br /&gt;
&lt;br /&gt;
;You will need to set your SUSE CD as your virtual machine's cdrom. &lt;br /&gt;
&lt;br /&gt;
== setup for SSH ==&lt;br /&gt;
To be able to log in to your VM using ssh, stop and disable the firewall:&lt;br /&gt;
 rcSuSEfirewall2 stop&lt;br /&gt;
 chkconfig SuSEfirewall2_setup off&lt;br /&gt;
 chkconfig SuSEfirewall2_init off&lt;br /&gt;
 /etc/init.d/sshd start&lt;br /&gt;
 chkconfig sshd on&lt;br /&gt;
Inside the VM, install some needed packages:&lt;br /&gt;
 yast -i libqt4-devel pcre-devel libxslt-devel libxml2-devel docbook-xsl-stylesheets git cmake \&lt;br /&gt;
 libdbusmenu-qt-devel giflib-devel strigi-devel libQtWebKit-devel libqimageblitz-devel libical-devel libgpgme-devel \&lt;br /&gt;
 boost-devel libqjson-devel cyrus-sasl-devel&lt;br /&gt;
&lt;br /&gt;
;Now it is time to do a snapshot or clone from your VM.&lt;br /&gt;
You will be able to return to this machine state whenever you want.&lt;br /&gt;
&lt;br /&gt;
== a few more steps ==&lt;br /&gt;
[http://www.linuxintro.org/wiki/open_a_console Open a console] as root&lt;br /&gt;
 su -&lt;br /&gt;
&lt;br /&gt;
== on an x64 distribution ==&lt;br /&gt;
If and only if you have a /lib64 path, you are on an x64 distribution.&lt;br /&gt;
Make sure you have the needed environment variables and alias set by having a file /root/.bashrc.&lt;br /&gt;
 cd&lt;br /&gt;
 cat &amp;gt;.bashrc&amp;lt;&amp;lt;EOF &lt;br /&gt;
 export KDEDIR=/usr/local         &lt;br /&gt;
 alias cmakekde=&amp;quot;cmake . -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DLIB_SUFFIX=64 -D[[Development/CMake/Addons_for_KDE#Buildtypes|CMAKE_BUILD_TYPE]]=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias cmakekdelibs=&amp;quot;cmake ../kdelibs -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DLIB_SUFFIX=64 -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias makeqt=&amp;quot;./configure -dbus -openssl -plugin-sql-mysql -libdir /usr/lib64 -prefix /usr &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 export QTDIR=/usr&lt;br /&gt;
 EOF&lt;br /&gt;
 cat &amp;gt;.gitconfig&amp;lt;&amp;lt;EOF&lt;br /&gt;
 [url &amp;quot;git://anongit.kde.org/&amp;quot;]&lt;br /&gt;
     insteadOf = kde:&lt;br /&gt;
 [url &amp;quot;ssh://git@git.kde.org/&amp;quot;]&lt;br /&gt;
     pushInsteadOf = kde:&lt;br /&gt;
 EOF&lt;br /&gt;
Now activate this file&lt;br /&gt;
 . /root/.bashrc&lt;br /&gt;
&lt;br /&gt;
== on another distribution (incl 32bit)==&lt;br /&gt;
Make sure you have the needed environment variables and alias set by having a file /root/.bashrc. &lt;br /&gt;
 cd&lt;br /&gt;
 cat &amp;gt;.bashrc&amp;lt;&amp;lt;EOF&lt;br /&gt;
 export KDEDIR=/usr/local         &lt;br /&gt;
 alias cmakekde=&amp;quot;cmake . -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias cmakekdelibs=&amp;quot;cmake ../kdelibs -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias makeqt=&amp;quot;./configure -dbus -openssl -plugin-sql-mysql -prefix /usr &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 export QTDIR=/usr&lt;br /&gt;
 EOF&lt;br /&gt;
 cat &amp;gt;.gitconfig&amp;lt;&amp;lt;EOF&lt;br /&gt;
 [url &amp;quot;git://anongit.kde.org/&amp;quot;]&lt;br /&gt;
     insteadOf = kde:&lt;br /&gt;
 [url &amp;quot;ssh://git@git.kde.org/&amp;quot;]&lt;br /&gt;
     pushInsteadOf = kde:&lt;br /&gt;
 EOF&lt;br /&gt;
Now activate this file&lt;br /&gt;
 . /root/.bashrc&lt;br /&gt;
&lt;br /&gt;
= Aquire and Build KDE as root =&lt;br /&gt;
If something fails you may need to make clean.&lt;br /&gt;
&lt;br /&gt;
== cmake ==&lt;br /&gt;
Install the latest version of cmake:&lt;br /&gt;
 cd&lt;br /&gt;
 wget http://www.cmake.org/files/v2.8/cmake-2.8.10.2.tar.gz&lt;br /&gt;
 tar xvzf cmake-2.8.10.2.tar.gz&lt;br /&gt;
 cd cmake-2.8.10.2&lt;br /&gt;
 ./configure &amp;amp;&amp;amp; make -j4 &amp;amp;&amp;amp; make install&lt;br /&gt;
&lt;br /&gt;
== automoc ==&lt;br /&gt;
automoc is needed for akonadi.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:automoc&lt;br /&gt;
 cd automoc&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== akonadi ==&lt;br /&gt;
Akonadi keeps personal information management data in a mysql database. It is needed for KDEPIMLIBS.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:akonadi&lt;br /&gt;
 cd akonadi&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== libattica ==&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:attica&lt;br /&gt;
 cd attica&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== shared desktop ontologies ==&lt;br /&gt;
shared desktop ontologies is needed by kdepimlibs in order to build Nepomuk (which is a part of kdelibs)&lt;br /&gt;
 cd&lt;br /&gt;
 wget http://downloads.sourceforge.net/project/oscaf/shared-desktop-ontologies/0.10.0/shared-desktop-ontologies-0.10.0.tar.bz2&lt;br /&gt;
 tar xvjf shared-desktop-ontologies-0.10.0.tar.bz2&lt;br /&gt;
 cd shared-desktop-ontologies-0.10.0/&lt;br /&gt;
 cmake . &amp;amp;&amp;amp; make &amp;amp;&amp;amp; make install&lt;br /&gt;
&lt;br /&gt;
== soprano ==&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:soprano&lt;br /&gt;
 cd soprano&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== phonon ==&lt;br /&gt;
Phonon is needed for kdebase-runtime&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:phonon&lt;br /&gt;
 cd phonon&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kdelibs ==&lt;br /&gt;
KDELIBS requires an out-of-source build, that is why it is more complicated to build:&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kdelibs&lt;br /&gt;
 mkdir kdelibs-build&lt;br /&gt;
 cd kdelibs-build&lt;br /&gt;
 cmakekdelibs&lt;br /&gt;
Verify it has been correctly installed - the following must be possible:&lt;br /&gt;
 kde4-config --prefix&lt;br /&gt;
 /usr/local&lt;br /&gt;
&lt;br /&gt;
== kdepimlibs ==&lt;br /&gt;
kdepimlibs is needed for kde-runtime.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kdepimlibs&lt;br /&gt;
 cd kdepimlibs&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kactivities ==&lt;br /&gt;
kactivities is needed for kde-workspace.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kactivities&lt;br /&gt;
 cd kactivities&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kdebase ==&lt;br /&gt;
 cd &lt;br /&gt;
 git clone kde:kde-baseapps&lt;br /&gt;
 git clone kde:konsole&lt;br /&gt;
 git clone kde:kde-workspace&lt;br /&gt;
 git clone kde:kde-runtime &lt;br /&gt;
 cd kde-baseapps&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd konsole&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd kde-workspace&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd kde-runtime&lt;br /&gt;
 cmakekde&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/KDE4/on_virtual_machines</id>
		<title>Getting Started/Build/KDE4/on virtual machines</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/KDE4/on_virtual_machines"/>
				<updated>2013-01-26T17:52:30Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: /* phonon */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox tutorial|time=3 hours|type=HowTo|distribution=SUSE Linux 12.2|happyreaders=2|unhappyreaders=0}}&lt;br /&gt;
&lt;br /&gt;
This describes how to use a virtual machine for building the latest KDE from sources.&lt;br /&gt;
&lt;br /&gt;
= Virtual Machine Setup =&lt;br /&gt;
Create a virtual machine, e.g. using [http://www.linuxintro.org/wiki/VirtualbOx VirtualBox]. Regarding harddisk: KDE 4 fits into 10 GB, however [[User:Tstaerk|I]] recommend 40GB, one partition. Regarding RAM: You will need at least 1GB ram for the virtual machine, of course more is better.&lt;br /&gt;
&lt;br /&gt;
;You will need to set your SUSE CD as your virtual machine's cdrom. &lt;br /&gt;
&lt;br /&gt;
== setup for SSH ==&lt;br /&gt;
To be able to log in to your VM using ssh, stop and disable the firewall:&lt;br /&gt;
 rcSuSEfirewall2 stop&lt;br /&gt;
 chkconfig SuSEfirewall2_setup off&lt;br /&gt;
 chkconfig SuSEfirewall2_init off&lt;br /&gt;
 /etc/init.d/sshd start&lt;br /&gt;
 chkconfig sshd on&lt;br /&gt;
Inside the VM, install some needed packages:&lt;br /&gt;
 yast -i libqt4-devel libsoprano-devel pcre-devel libxslt-devel libxml2-devel docbook-xsl-stylesheets git cmake \&lt;br /&gt;
 libdbusmenu-qt-devel giflib-devel strigi-devel libQtWebKit-devel libqimageblitz-devel libical-devel libgpgme-devel \&lt;br /&gt;
 boost-devel libqjson-devel cyrus-sasl-devel&lt;br /&gt;
&lt;br /&gt;
;Now it is time to do a snapshot or clone from your VM.&lt;br /&gt;
You will be able to return to this machine state whenever you want.&lt;br /&gt;
&lt;br /&gt;
== a few more steps ==&lt;br /&gt;
[http://www.linuxintro.org/wiki/open_a_console Open a console] as root&lt;br /&gt;
 su -&lt;br /&gt;
&lt;br /&gt;
== on an x64 distribution ==&lt;br /&gt;
If and only if you have a /lib64 path, you are on an x64 distribution.&lt;br /&gt;
Make sure you have the needed environment variables and alias set by having a file /root/.bashrc.&lt;br /&gt;
 cd&lt;br /&gt;
 cat &amp;gt;.bashrc&amp;lt;&amp;lt;EOF &lt;br /&gt;
 export KDEDIR=/usr/local         &lt;br /&gt;
 alias cmakekde=&amp;quot;cmake . -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DLIB_SUFFIX=64 -D[[Development/CMake/Addons_for_KDE#Buildtypes|CMAKE_BUILD_TYPE]]=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias cmakekdelibs=&amp;quot;cmake ../kdelibs -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DLIB_SUFFIX=64 -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias makeqt=&amp;quot;./configure -dbus -openssl -plugin-sql-mysql -libdir /usr/lib64 -prefix /usr &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 export QTDIR=/usr&lt;br /&gt;
 EOF&lt;br /&gt;
 cat &amp;gt;.gitconfig&amp;lt;&amp;lt;EOF&lt;br /&gt;
 [url &amp;quot;git://anongit.kde.org/&amp;quot;]&lt;br /&gt;
     insteadOf = kde:&lt;br /&gt;
 [url &amp;quot;ssh://git@git.kde.org/&amp;quot;]&lt;br /&gt;
     pushInsteadOf = kde:&lt;br /&gt;
 EOF&lt;br /&gt;
Now activate this file&lt;br /&gt;
 . /root/.bashrc&lt;br /&gt;
&lt;br /&gt;
== on another distribution (incl 32bit)==&lt;br /&gt;
Make sure you have the needed environment variables and alias set by having a file /root/.bashrc. &lt;br /&gt;
 cd&lt;br /&gt;
 cat &amp;gt;.bashrc&amp;lt;&amp;lt;EOF&lt;br /&gt;
 export KDEDIR=/usr/local         &lt;br /&gt;
 alias cmakekde=&amp;quot;cmake . -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias cmakekdelibs=&amp;quot;cmake ../kdelibs -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias makeqt=&amp;quot;./configure -dbus -openssl -plugin-sql-mysql -prefix /usr &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 export QTDIR=/usr&lt;br /&gt;
 EOF&lt;br /&gt;
 cat &amp;gt;.gitconfig&amp;lt;&amp;lt;EOF&lt;br /&gt;
 [url &amp;quot;git://anongit.kde.org/&amp;quot;]&lt;br /&gt;
     insteadOf = kde:&lt;br /&gt;
 [url &amp;quot;ssh://git@git.kde.org/&amp;quot;]&lt;br /&gt;
     pushInsteadOf = kde:&lt;br /&gt;
 EOF&lt;br /&gt;
Now activate this file&lt;br /&gt;
 . /root/.bashrc&lt;br /&gt;
&lt;br /&gt;
= Aquire and Build KDE as root =&lt;br /&gt;
If something fails you may need to make clean.&lt;br /&gt;
&lt;br /&gt;
== cmake ==&lt;br /&gt;
Install the latest version of cmake:&lt;br /&gt;
 cd&lt;br /&gt;
 wget http://www.cmake.org/files/v2.8/cmake-2.8.10.2.tar.gz&lt;br /&gt;
 tar xvzf cmake-2.8.10.2.tar.gz&lt;br /&gt;
 cd cmake-2.8.10.2&lt;br /&gt;
 ./configure &amp;amp;&amp;amp; make -j4 &amp;amp;&amp;amp; make install&lt;br /&gt;
&lt;br /&gt;
== automoc ==&lt;br /&gt;
automoc is needed for akonadi.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:automoc&lt;br /&gt;
 cd automoc&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== akonadi ==&lt;br /&gt;
Akonadi keeps personal information management data in a mysql database. It is needed for KDEPIMLIBS.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:akonadi&lt;br /&gt;
 cd akonadi&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== libattica ==&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:attica&lt;br /&gt;
 cd attica&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== shared desktop ontologies ==&lt;br /&gt;
shared desktop ontologies is needed by kdepimlibs in order to build Nepomuk (which is a part of kdelibs)&lt;br /&gt;
 cd&lt;br /&gt;
 wget http://downloads.sourceforge.net/project/oscaf/shared-desktop-ontologies/0.10.0/shared-desktop-ontologies-0.10.0.tar.bz2&lt;br /&gt;
 tar xvjf shared-desktop-ontologies-0.10.0.tar.bz2&lt;br /&gt;
 cd shared-desktop-ontologies-0.10.0/&lt;br /&gt;
 cmake . &amp;amp;&amp;amp; make &amp;amp;&amp;amp; make install&lt;br /&gt;
&lt;br /&gt;
== soprano ==&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:soprano&lt;br /&gt;
 cd soprano&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== phonon ==&lt;br /&gt;
Phonon is needed for kdebase-runtime&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:phonon&lt;br /&gt;
 cd phonon&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kdelibs ==&lt;br /&gt;
KDELIBS requires an out-of-source build, that is why it is more complicated to build:&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kdelibs&lt;br /&gt;
 mkdir kdelibs-build&lt;br /&gt;
 cd kdelibs-build&lt;br /&gt;
 cmakekdelibs&lt;br /&gt;
Verify it has been correctly installed - the following must be possible:&lt;br /&gt;
 kde4-config --prefix&lt;br /&gt;
 /usr/local&lt;br /&gt;
&lt;br /&gt;
== kdepimlibs ==&lt;br /&gt;
kdepimlibs is needed for kde-runtime.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kdepimlibs&lt;br /&gt;
 cd kdepimlibs&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kactivities ==&lt;br /&gt;
kactivities is needed for kde-workspace.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kactivities&lt;br /&gt;
 cd kactivities&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kdebase ==&lt;br /&gt;
 cd &lt;br /&gt;
 git clone kde:kde-baseapps&lt;br /&gt;
 git clone kde:konsole&lt;br /&gt;
 git clone kde:kde-workspace&lt;br /&gt;
 git clone kde:kde-runtime &lt;br /&gt;
 cd kde-baseapps&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd konsole&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd kde-workspace&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd kde-runtime&lt;br /&gt;
 cmakekde&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/KDE4/on_virtual_machines</id>
		<title>Getting Started/Build/KDE4/on virtual machines</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/KDE4/on_virtual_machines"/>
				<updated>2013-01-26T17:50:48Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: /* shared desktop ontologies */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox tutorial|time=3 hours|type=HowTo|distribution=SUSE Linux 12.2|happyreaders=2|unhappyreaders=0}}&lt;br /&gt;
&lt;br /&gt;
This describes how to use a virtual machine for building the latest KDE from sources.&lt;br /&gt;
&lt;br /&gt;
= Virtual Machine Setup =&lt;br /&gt;
Create a virtual machine, e.g. using [http://www.linuxintro.org/wiki/VirtualbOx VirtualBox]. Regarding harddisk: KDE 4 fits into 10 GB, however [[User:Tstaerk|I]] recommend 40GB, one partition. Regarding RAM: You will need at least 1GB ram for the virtual machine, of course more is better.&lt;br /&gt;
&lt;br /&gt;
;You will need to set your SUSE CD as your virtual machine's cdrom. &lt;br /&gt;
&lt;br /&gt;
== setup for SSH ==&lt;br /&gt;
To be able to log in to your VM using ssh, stop and disable the firewall:&lt;br /&gt;
 rcSuSEfirewall2 stop&lt;br /&gt;
 chkconfig SuSEfirewall2_setup off&lt;br /&gt;
 chkconfig SuSEfirewall2_init off&lt;br /&gt;
 /etc/init.d/sshd start&lt;br /&gt;
 chkconfig sshd on&lt;br /&gt;
Inside the VM, install some needed packages:&lt;br /&gt;
 yast -i libqt4-devel libsoprano-devel pcre-devel libxslt-devel libxml2-devel docbook-xsl-stylesheets git cmake \&lt;br /&gt;
 libdbusmenu-qt-devel giflib-devel strigi-devel libQtWebKit-devel libqimageblitz-devel libical-devel libgpgme-devel \&lt;br /&gt;
 boost-devel libqjson-devel cyrus-sasl-devel&lt;br /&gt;
&lt;br /&gt;
;Now it is time to do a snapshot or clone from your VM.&lt;br /&gt;
You will be able to return to this machine state whenever you want.&lt;br /&gt;
&lt;br /&gt;
== a few more steps ==&lt;br /&gt;
[http://www.linuxintro.org/wiki/open_a_console Open a console] as root&lt;br /&gt;
 su -&lt;br /&gt;
&lt;br /&gt;
== on an x64 distribution ==&lt;br /&gt;
If and only if you have a /lib64 path, you are on an x64 distribution.&lt;br /&gt;
Make sure you have the needed environment variables and alias set by having a file /root/.bashrc.&lt;br /&gt;
 cd&lt;br /&gt;
 cat &amp;gt;.bashrc&amp;lt;&amp;lt;EOF &lt;br /&gt;
 export KDEDIR=/usr/local         &lt;br /&gt;
 alias cmakekde=&amp;quot;cmake . -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DLIB_SUFFIX=64 -D[[Development/CMake/Addons_for_KDE#Buildtypes|CMAKE_BUILD_TYPE]]=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias cmakekdelibs=&amp;quot;cmake ../kdelibs -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DLIB_SUFFIX=64 -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias makeqt=&amp;quot;./configure -dbus -openssl -plugin-sql-mysql -libdir /usr/lib64 -prefix /usr &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 export QTDIR=/usr&lt;br /&gt;
 EOF&lt;br /&gt;
 cat &amp;gt;.gitconfig&amp;lt;&amp;lt;EOF&lt;br /&gt;
 [url &amp;quot;git://anongit.kde.org/&amp;quot;]&lt;br /&gt;
     insteadOf = kde:&lt;br /&gt;
 [url &amp;quot;ssh://git@git.kde.org/&amp;quot;]&lt;br /&gt;
     pushInsteadOf = kde:&lt;br /&gt;
 EOF&lt;br /&gt;
Now activate this file&lt;br /&gt;
 . /root/.bashrc&lt;br /&gt;
&lt;br /&gt;
== on another distribution (incl 32bit)==&lt;br /&gt;
Make sure you have the needed environment variables and alias set by having a file /root/.bashrc. &lt;br /&gt;
 cd&lt;br /&gt;
 cat &amp;gt;.bashrc&amp;lt;&amp;lt;EOF&lt;br /&gt;
 export KDEDIR=/usr/local         &lt;br /&gt;
 alias cmakekde=&amp;quot;cmake . -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias cmakekdelibs=&amp;quot;cmake ../kdelibs -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias makeqt=&amp;quot;./configure -dbus -openssl -plugin-sql-mysql -prefix /usr &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 export QTDIR=/usr&lt;br /&gt;
 EOF&lt;br /&gt;
 cat &amp;gt;.gitconfig&amp;lt;&amp;lt;EOF&lt;br /&gt;
 [url &amp;quot;git://anongit.kde.org/&amp;quot;]&lt;br /&gt;
     insteadOf = kde:&lt;br /&gt;
 [url &amp;quot;ssh://git@git.kde.org/&amp;quot;]&lt;br /&gt;
     pushInsteadOf = kde:&lt;br /&gt;
 EOF&lt;br /&gt;
Now activate this file&lt;br /&gt;
 . /root/.bashrc&lt;br /&gt;
&lt;br /&gt;
= Aquire and Build KDE as root =&lt;br /&gt;
If something fails you may need to make clean.&lt;br /&gt;
&lt;br /&gt;
== cmake ==&lt;br /&gt;
Install the latest version of cmake:&lt;br /&gt;
 cd&lt;br /&gt;
 wget http://www.cmake.org/files/v2.8/cmake-2.8.10.2.tar.gz&lt;br /&gt;
 tar xvzf cmake-2.8.10.2.tar.gz&lt;br /&gt;
 cd cmake-2.8.10.2&lt;br /&gt;
 ./configure &amp;amp;&amp;amp; make -j4 &amp;amp;&amp;amp; make install&lt;br /&gt;
&lt;br /&gt;
== automoc ==&lt;br /&gt;
automoc is needed for akonadi.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:automoc&lt;br /&gt;
 cd automoc&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== akonadi ==&lt;br /&gt;
Akonadi keeps personal information management data in a mysql database. It is needed for KDEPIMLIBS.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:akonadi&lt;br /&gt;
 cd akonadi&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== libattica ==&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:attica&lt;br /&gt;
 cd attica&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== shared desktop ontologies ==&lt;br /&gt;
shared desktop ontologies is needed by kdepimlibs in order to build Nepomuk (which is a part of kdelibs)&lt;br /&gt;
 cd&lt;br /&gt;
 wget http://downloads.sourceforge.net/project/oscaf/shared-desktop-ontologies/0.10.0/shared-desktop-ontologies-0.10.0.tar.bz2&lt;br /&gt;
 tar xvjf shared-desktop-ontologies-0.10.0.tar.bz2&lt;br /&gt;
 cd shared-desktop-ontologies-0.10.0/&lt;br /&gt;
 cmake . &amp;amp;&amp;amp; make &amp;amp;&amp;amp; make install&lt;br /&gt;
&lt;br /&gt;
== soprano ==&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:soprano&lt;br /&gt;
 cd soprano&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== phonon ==&lt;br /&gt;
Phonon is needed for kdebase-runtime&lt;br /&gt;
 cd&lt;br /&gt;
 git clone git://anongit.kde.org/phonon&lt;br /&gt;
 cd phonon&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kdelibs ==&lt;br /&gt;
KDELIBS requires an out-of-source build, that is why it is more complicated to build:&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kdelibs&lt;br /&gt;
 mkdir kdelibs-build&lt;br /&gt;
 cd kdelibs-build&lt;br /&gt;
 cmakekdelibs&lt;br /&gt;
Verify it has been correctly installed - the following must be possible:&lt;br /&gt;
 kde4-config --prefix&lt;br /&gt;
 /usr/local&lt;br /&gt;
&lt;br /&gt;
== kdepimlibs ==&lt;br /&gt;
kdepimlibs is needed for kde-runtime.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kdepimlibs&lt;br /&gt;
 cd kdepimlibs&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kactivities ==&lt;br /&gt;
kactivities is needed for kde-workspace.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kactivities&lt;br /&gt;
 cd kactivities&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kdebase ==&lt;br /&gt;
 cd &lt;br /&gt;
 git clone kde:kde-baseapps&lt;br /&gt;
 git clone kde:konsole&lt;br /&gt;
 git clone kde:kde-workspace&lt;br /&gt;
 git clone kde:kde-runtime &lt;br /&gt;
 cd kde-baseapps&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd konsole&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd kde-workspace&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd kde-runtime&lt;br /&gt;
 cmakekde&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/KDE4/on_virtual_machines</id>
		<title>Getting Started/Build/KDE4/on virtual machines</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/KDE4/on_virtual_machines"/>
				<updated>2013-01-26T17:49:11Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: /* setup for SSH */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox tutorial|time=3 hours|type=HowTo|distribution=SUSE Linux 12.2|happyreaders=2|unhappyreaders=0}}&lt;br /&gt;
&lt;br /&gt;
This describes how to use a virtual machine for building the latest KDE from sources.&lt;br /&gt;
&lt;br /&gt;
= Virtual Machine Setup =&lt;br /&gt;
Create a virtual machine, e.g. using [http://www.linuxintro.org/wiki/VirtualbOx VirtualBox]. Regarding harddisk: KDE 4 fits into 10 GB, however [[User:Tstaerk|I]] recommend 40GB, one partition. Regarding RAM: You will need at least 1GB ram for the virtual machine, of course more is better.&lt;br /&gt;
&lt;br /&gt;
;You will need to set your SUSE CD as your virtual machine's cdrom. &lt;br /&gt;
&lt;br /&gt;
== setup for SSH ==&lt;br /&gt;
To be able to log in to your VM using ssh, stop and disable the firewall:&lt;br /&gt;
 rcSuSEfirewall2 stop&lt;br /&gt;
 chkconfig SuSEfirewall2_setup off&lt;br /&gt;
 chkconfig SuSEfirewall2_init off&lt;br /&gt;
 /etc/init.d/sshd start&lt;br /&gt;
 chkconfig sshd on&lt;br /&gt;
Inside the VM, install some needed packages:&lt;br /&gt;
 yast -i libqt4-devel libsoprano-devel pcre-devel libxslt-devel libxml2-devel docbook-xsl-stylesheets git cmake \&lt;br /&gt;
 libdbusmenu-qt-devel giflib-devel strigi-devel libQtWebKit-devel libqimageblitz-devel libical-devel libgpgme-devel \&lt;br /&gt;
 boost-devel libqjson-devel cyrus-sasl-devel&lt;br /&gt;
&lt;br /&gt;
;Now it is time to do a snapshot or clone from your VM.&lt;br /&gt;
You will be able to return to this machine state whenever you want.&lt;br /&gt;
&lt;br /&gt;
== a few more steps ==&lt;br /&gt;
[http://www.linuxintro.org/wiki/open_a_console Open a console] as root&lt;br /&gt;
 su -&lt;br /&gt;
&lt;br /&gt;
== on an x64 distribution ==&lt;br /&gt;
If and only if you have a /lib64 path, you are on an x64 distribution.&lt;br /&gt;
Make sure you have the needed environment variables and alias set by having a file /root/.bashrc.&lt;br /&gt;
 cd&lt;br /&gt;
 cat &amp;gt;.bashrc&amp;lt;&amp;lt;EOF &lt;br /&gt;
 export KDEDIR=/usr/local         &lt;br /&gt;
 alias cmakekde=&amp;quot;cmake . -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DLIB_SUFFIX=64 -D[[Development/CMake/Addons_for_KDE#Buildtypes|CMAKE_BUILD_TYPE]]=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias cmakekdelibs=&amp;quot;cmake ../kdelibs -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DLIB_SUFFIX=64 -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias makeqt=&amp;quot;./configure -dbus -openssl -plugin-sql-mysql -libdir /usr/lib64 -prefix /usr &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 export QTDIR=/usr&lt;br /&gt;
 EOF&lt;br /&gt;
 cat &amp;gt;.gitconfig&amp;lt;&amp;lt;EOF&lt;br /&gt;
 [url &amp;quot;git://anongit.kde.org/&amp;quot;]&lt;br /&gt;
     insteadOf = kde:&lt;br /&gt;
 [url &amp;quot;ssh://git@git.kde.org/&amp;quot;]&lt;br /&gt;
     pushInsteadOf = kde:&lt;br /&gt;
 EOF&lt;br /&gt;
Now activate this file&lt;br /&gt;
 . /root/.bashrc&lt;br /&gt;
&lt;br /&gt;
== on another distribution (incl 32bit)==&lt;br /&gt;
Make sure you have the needed environment variables and alias set by having a file /root/.bashrc. &lt;br /&gt;
 cd&lt;br /&gt;
 cat &amp;gt;.bashrc&amp;lt;&amp;lt;EOF&lt;br /&gt;
 export KDEDIR=/usr/local         &lt;br /&gt;
 alias cmakekde=&amp;quot;cmake . -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias cmakekdelibs=&amp;quot;cmake ../kdelibs -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias makeqt=&amp;quot;./configure -dbus -openssl -plugin-sql-mysql -prefix /usr &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 export QTDIR=/usr&lt;br /&gt;
 EOF&lt;br /&gt;
 cat &amp;gt;.gitconfig&amp;lt;&amp;lt;EOF&lt;br /&gt;
 [url &amp;quot;git://anongit.kde.org/&amp;quot;]&lt;br /&gt;
     insteadOf = kde:&lt;br /&gt;
 [url &amp;quot;ssh://git@git.kde.org/&amp;quot;]&lt;br /&gt;
     pushInsteadOf = kde:&lt;br /&gt;
 EOF&lt;br /&gt;
Now activate this file&lt;br /&gt;
 . /root/.bashrc&lt;br /&gt;
&lt;br /&gt;
= Aquire and Build KDE as root =&lt;br /&gt;
If something fails you may need to make clean.&lt;br /&gt;
&lt;br /&gt;
== cmake ==&lt;br /&gt;
Install the latest version of cmake:&lt;br /&gt;
 cd&lt;br /&gt;
 wget http://www.cmake.org/files/v2.8/cmake-2.8.10.2.tar.gz&lt;br /&gt;
 tar xvzf cmake-2.8.10.2.tar.gz&lt;br /&gt;
 cd cmake-2.8.10.2&lt;br /&gt;
 ./configure &amp;amp;&amp;amp; make -j4 &amp;amp;&amp;amp; make install&lt;br /&gt;
&lt;br /&gt;
== automoc ==&lt;br /&gt;
automoc is needed for akonadi.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:automoc&lt;br /&gt;
 cd automoc&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== akonadi ==&lt;br /&gt;
Akonadi keeps personal information management data in a mysql database. It is needed for KDEPIMLIBS.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:akonadi&lt;br /&gt;
 cd akonadi&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== libattica ==&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:attica&lt;br /&gt;
 cd attica&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== shared desktop ontologies ==&lt;br /&gt;
shared desktop ontologies is needed by kdepimlibs in order to build Nepomuk (which is a part of kdelibs)&lt;br /&gt;
 cd&lt;br /&gt;
 wget http://downloads.sourceforge.net/project/oscaf/shared-desktop-ontologies/0.10.0/shared-desktop-ontologies-0.10.0.tar.bz2&lt;br /&gt;
 tar xvjf shared-desktop-ontologies-0.10.0.tar.bz2&lt;br /&gt;
 cd shared-desktop-ontologies-0.10.0/&lt;br /&gt;
 cmake . &amp;amp;&amp;amp; make &amp;amp;&amp;amp; make install&lt;br /&gt;
&lt;br /&gt;
== phonon ==&lt;br /&gt;
Phonon is needed for kdebase-runtime&lt;br /&gt;
 cd&lt;br /&gt;
 git clone git://anongit.kde.org/phonon&lt;br /&gt;
 cd phonon&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kdelibs ==&lt;br /&gt;
KDELIBS requires an out-of-source build, that is why it is more complicated to build:&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kdelibs&lt;br /&gt;
 mkdir kdelibs-build&lt;br /&gt;
 cd kdelibs-build&lt;br /&gt;
 cmakekdelibs&lt;br /&gt;
Verify it has been correctly installed - the following must be possible:&lt;br /&gt;
 kde4-config --prefix&lt;br /&gt;
 /usr/local&lt;br /&gt;
&lt;br /&gt;
== kdepimlibs ==&lt;br /&gt;
kdepimlibs is needed for kde-runtime.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kdepimlibs&lt;br /&gt;
 cd kdepimlibs&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kactivities ==&lt;br /&gt;
kactivities is needed for kde-workspace.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kactivities&lt;br /&gt;
 cd kactivities&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kdebase ==&lt;br /&gt;
 cd &lt;br /&gt;
 git clone kde:kde-baseapps&lt;br /&gt;
 git clone kde:konsole&lt;br /&gt;
 git clone kde:kde-workspace&lt;br /&gt;
 git clone kde:kde-runtime &lt;br /&gt;
 cd kde-baseapps&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd konsole&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd kde-workspace&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd kde-runtime&lt;br /&gt;
 cmakekde&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/KDE4/on_virtual_machines</id>
		<title>Getting Started/Build/KDE4/on virtual machines</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/KDE4/on_virtual_machines"/>
				<updated>2013-01-26T17:47:10Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: /* setup for SSH */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox tutorial|time=3 hours|type=HowTo|distribution=SUSE Linux 12.2|happyreaders=2|unhappyreaders=0}}&lt;br /&gt;
&lt;br /&gt;
This describes how to use a virtual machine for building the latest KDE from sources.&lt;br /&gt;
&lt;br /&gt;
= Virtual Machine Setup =&lt;br /&gt;
Create a virtual machine, e.g. using [http://www.linuxintro.org/wiki/VirtualbOx VirtualBox]. Regarding harddisk: KDE 4 fits into 10 GB, however [[User:Tstaerk|I]] recommend 40GB, one partition. Regarding RAM: You will need at least 1GB ram for the virtual machine, of course more is better.&lt;br /&gt;
&lt;br /&gt;
;You will need to set your SUSE CD as your virtual machine's cdrom. &lt;br /&gt;
&lt;br /&gt;
== setup for SSH ==&lt;br /&gt;
To be able to log in to your VM using ssh, stop and disable the firewall:&lt;br /&gt;
 rcSuSEfirewall2 stop&lt;br /&gt;
 chkconfig SuSEfirewall2_setup off&lt;br /&gt;
 chkconfig SuSEfirewall2_init off&lt;br /&gt;
 /etc/init.d/sshd start&lt;br /&gt;
 chkconfig sshd on&lt;br /&gt;
Inside the VM, install some needed packages:&lt;br /&gt;
 yast -i libqt4-devel libsoprano-devel pcre-devel libxslt-devel libxml2-devel docbook-xsl-stylesheets git cmake \&lt;br /&gt;
 libdbusmenu-qt-devel giflib-devel strigi-devel libQtWebKit-devel libqimageblitz-devel libical-devel libgpgme-devel \&lt;br /&gt;
 boost-devel libqjson-devel&lt;br /&gt;
&lt;br /&gt;
;Now it is time to do a snapshot or clone from your VM.&lt;br /&gt;
You will be able to return to this machine state whenever you want.&lt;br /&gt;
&lt;br /&gt;
== a few more steps ==&lt;br /&gt;
[http://www.linuxintro.org/wiki/open_a_console Open a console] as root&lt;br /&gt;
 su -&lt;br /&gt;
&lt;br /&gt;
== on an x64 distribution ==&lt;br /&gt;
If and only if you have a /lib64 path, you are on an x64 distribution.&lt;br /&gt;
Make sure you have the needed environment variables and alias set by having a file /root/.bashrc.&lt;br /&gt;
 cd&lt;br /&gt;
 cat &amp;gt;.bashrc&amp;lt;&amp;lt;EOF &lt;br /&gt;
 export KDEDIR=/usr/local         &lt;br /&gt;
 alias cmakekde=&amp;quot;cmake . -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DLIB_SUFFIX=64 -D[[Development/CMake/Addons_for_KDE#Buildtypes|CMAKE_BUILD_TYPE]]=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias cmakekdelibs=&amp;quot;cmake ../kdelibs -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DLIB_SUFFIX=64 -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias makeqt=&amp;quot;./configure -dbus -openssl -plugin-sql-mysql -libdir /usr/lib64 -prefix /usr &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 export QTDIR=/usr&lt;br /&gt;
 EOF&lt;br /&gt;
 cat &amp;gt;.gitconfig&amp;lt;&amp;lt;EOF&lt;br /&gt;
 [url &amp;quot;git://anongit.kde.org/&amp;quot;]&lt;br /&gt;
     insteadOf = kde:&lt;br /&gt;
 [url &amp;quot;ssh://git@git.kde.org/&amp;quot;]&lt;br /&gt;
     pushInsteadOf = kde:&lt;br /&gt;
 EOF&lt;br /&gt;
Now activate this file&lt;br /&gt;
 . /root/.bashrc&lt;br /&gt;
&lt;br /&gt;
== on another distribution (incl 32bit)==&lt;br /&gt;
Make sure you have the needed environment variables and alias set by having a file /root/.bashrc. &lt;br /&gt;
 cd&lt;br /&gt;
 cat &amp;gt;.bashrc&amp;lt;&amp;lt;EOF&lt;br /&gt;
 export KDEDIR=/usr/local         &lt;br /&gt;
 alias cmakekde=&amp;quot;cmake . -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias cmakekdelibs=&amp;quot;cmake ../kdelibs -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias makeqt=&amp;quot;./configure -dbus -openssl -plugin-sql-mysql -prefix /usr &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 export QTDIR=/usr&lt;br /&gt;
 EOF&lt;br /&gt;
 cat &amp;gt;.gitconfig&amp;lt;&amp;lt;EOF&lt;br /&gt;
 [url &amp;quot;git://anongit.kde.org/&amp;quot;]&lt;br /&gt;
     insteadOf = kde:&lt;br /&gt;
 [url &amp;quot;ssh://git@git.kde.org/&amp;quot;]&lt;br /&gt;
     pushInsteadOf = kde:&lt;br /&gt;
 EOF&lt;br /&gt;
Now activate this file&lt;br /&gt;
 . /root/.bashrc&lt;br /&gt;
&lt;br /&gt;
= Aquire and Build KDE as root =&lt;br /&gt;
If something fails you may need to make clean.&lt;br /&gt;
&lt;br /&gt;
== cmake ==&lt;br /&gt;
Install the latest version of cmake:&lt;br /&gt;
 cd&lt;br /&gt;
 wget http://www.cmake.org/files/v2.8/cmake-2.8.10.2.tar.gz&lt;br /&gt;
 tar xvzf cmake-2.8.10.2.tar.gz&lt;br /&gt;
 cd cmake-2.8.10.2&lt;br /&gt;
 ./configure &amp;amp;&amp;amp; make -j4 &amp;amp;&amp;amp; make install&lt;br /&gt;
&lt;br /&gt;
== automoc ==&lt;br /&gt;
automoc is needed for akonadi.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:automoc&lt;br /&gt;
 cd automoc&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== akonadi ==&lt;br /&gt;
Akonadi keeps personal information management data in a mysql database. It is needed for KDEPIMLIBS.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:akonadi&lt;br /&gt;
 cd akonadi&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== libattica ==&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:attica&lt;br /&gt;
 cd attica&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== shared desktop ontologies ==&lt;br /&gt;
shared desktop ontologies is needed by kdepimlibs in order to build Nepomuk (which is a part of kdelibs)&lt;br /&gt;
 cd&lt;br /&gt;
 wget http://downloads.sourceforge.net/project/oscaf/shared-desktop-ontologies/0.10.0/shared-desktop-ontologies-0.10.0.tar.bz2&lt;br /&gt;
 tar xvjf shared-desktop-ontologies-0.10.0.tar.bz2&lt;br /&gt;
 cd shared-desktop-ontologies-0.10.0/&lt;br /&gt;
 cmake . &amp;amp;&amp;amp; make &amp;amp;&amp;amp; make install&lt;br /&gt;
&lt;br /&gt;
== phonon ==&lt;br /&gt;
Phonon is needed for kdebase-runtime&lt;br /&gt;
 cd&lt;br /&gt;
 git clone git://anongit.kde.org/phonon&lt;br /&gt;
 cd phonon&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kdelibs ==&lt;br /&gt;
KDELIBS requires an out-of-source build, that is why it is more complicated to build:&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kdelibs&lt;br /&gt;
 mkdir kdelibs-build&lt;br /&gt;
 cd kdelibs-build&lt;br /&gt;
 cmakekdelibs&lt;br /&gt;
Verify it has been correctly installed - the following must be possible:&lt;br /&gt;
 kde4-config --prefix&lt;br /&gt;
 /usr/local&lt;br /&gt;
&lt;br /&gt;
== kdepimlibs ==&lt;br /&gt;
kdepimlibs is needed for kde-runtime.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kdepimlibs&lt;br /&gt;
 cd kdepimlibs&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kactivities ==&lt;br /&gt;
kactivities is needed for kde-workspace.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kactivities&lt;br /&gt;
 cd kactivities&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kdebase ==&lt;br /&gt;
 cd &lt;br /&gt;
 git clone kde:kde-baseapps&lt;br /&gt;
 git clone kde:konsole&lt;br /&gt;
 git clone kde:kde-workspace&lt;br /&gt;
 git clone kde:kde-runtime &lt;br /&gt;
 cd kde-baseapps&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd konsole&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd kde-workspace&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd kde-runtime&lt;br /&gt;
 cmakekde&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/KDE4/on_virtual_machines</id>
		<title>Getting Started/Build/KDE4/on virtual machines</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/KDE4/on_virtual_machines"/>
				<updated>2013-01-26T17:40:01Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: /* shared desktop ontologies */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox tutorial|time=3 hours|type=HowTo|distribution=SUSE Linux 12.2|happyreaders=2|unhappyreaders=0}}&lt;br /&gt;
&lt;br /&gt;
This describes how to use a virtual machine for building the latest KDE from sources.&lt;br /&gt;
&lt;br /&gt;
= Virtual Machine Setup =&lt;br /&gt;
Create a virtual machine, e.g. using [http://www.linuxintro.org/wiki/VirtualbOx VirtualBox]. Regarding harddisk: KDE 4 fits into 10 GB, however [[User:Tstaerk|I]] recommend 40GB, one partition. Regarding RAM: You will need at least 1GB ram for the virtual machine, of course more is better.&lt;br /&gt;
&lt;br /&gt;
;You will need to set your SUSE CD as your virtual machine's cdrom. &lt;br /&gt;
&lt;br /&gt;
== setup for SSH ==&lt;br /&gt;
To be able to log in to your VM using ssh, stop and disable the firewall:&lt;br /&gt;
 rcSuSEfirewall2 stop&lt;br /&gt;
 chkconfig SuSEfirewall2_setup off&lt;br /&gt;
 chkconfig SuSEfirewall2_init off&lt;br /&gt;
 /etc/init.d/sshd start&lt;br /&gt;
 chkconfig sshd on&lt;br /&gt;
Inside the VM, install some needed packages:&lt;br /&gt;
 yast -i libqt4-devel libsoprano-devel pcre-devel libxslt-devel libxml2-devel docbook-xsl-stylesheets git cmake \&lt;br /&gt;
 libdbusmenu-qt-devel giflib-devel strigi-devel libQtWebKit-devel libqimageblitz-devel libical-devel libgpgme-devel \&lt;br /&gt;
 boost-devel&lt;br /&gt;
&lt;br /&gt;
;Now it is time to do a snapshot or clone from your VM.&lt;br /&gt;
You will be able to return to this machine state whenever you want.&lt;br /&gt;
&lt;br /&gt;
== a few more steps ==&lt;br /&gt;
[http://www.linuxintro.org/wiki/open_a_console Open a console] as root&lt;br /&gt;
 su -&lt;br /&gt;
&lt;br /&gt;
== on an x64 distribution ==&lt;br /&gt;
If and only if you have a /lib64 path, you are on an x64 distribution.&lt;br /&gt;
Make sure you have the needed environment variables and alias set by having a file /root/.bashrc.&lt;br /&gt;
 cd&lt;br /&gt;
 cat &amp;gt;.bashrc&amp;lt;&amp;lt;EOF &lt;br /&gt;
 export KDEDIR=/usr/local         &lt;br /&gt;
 alias cmakekde=&amp;quot;cmake . -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DLIB_SUFFIX=64 -D[[Development/CMake/Addons_for_KDE#Buildtypes|CMAKE_BUILD_TYPE]]=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias cmakekdelibs=&amp;quot;cmake ../kdelibs -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DLIB_SUFFIX=64 -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias makeqt=&amp;quot;./configure -dbus -openssl -plugin-sql-mysql -libdir /usr/lib64 -prefix /usr &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 export QTDIR=/usr&lt;br /&gt;
 EOF&lt;br /&gt;
 cat &amp;gt;.gitconfig&amp;lt;&amp;lt;EOF&lt;br /&gt;
 [url &amp;quot;git://anongit.kde.org/&amp;quot;]&lt;br /&gt;
     insteadOf = kde:&lt;br /&gt;
 [url &amp;quot;ssh://git@git.kde.org/&amp;quot;]&lt;br /&gt;
     pushInsteadOf = kde:&lt;br /&gt;
 EOF&lt;br /&gt;
Now activate this file&lt;br /&gt;
 . /root/.bashrc&lt;br /&gt;
&lt;br /&gt;
== on another distribution (incl 32bit)==&lt;br /&gt;
Make sure you have the needed environment variables and alias set by having a file /root/.bashrc. &lt;br /&gt;
 cd&lt;br /&gt;
 cat &amp;gt;.bashrc&amp;lt;&amp;lt;EOF&lt;br /&gt;
 export KDEDIR=/usr/local         &lt;br /&gt;
 alias cmakekde=&amp;quot;cmake . -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias cmakekdelibs=&amp;quot;cmake ../kdelibs -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias makeqt=&amp;quot;./configure -dbus -openssl -plugin-sql-mysql -prefix /usr &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 export QTDIR=/usr&lt;br /&gt;
 EOF&lt;br /&gt;
 cat &amp;gt;.gitconfig&amp;lt;&amp;lt;EOF&lt;br /&gt;
 [url &amp;quot;git://anongit.kde.org/&amp;quot;]&lt;br /&gt;
     insteadOf = kde:&lt;br /&gt;
 [url &amp;quot;ssh://git@git.kde.org/&amp;quot;]&lt;br /&gt;
     pushInsteadOf = kde:&lt;br /&gt;
 EOF&lt;br /&gt;
Now activate this file&lt;br /&gt;
 . /root/.bashrc&lt;br /&gt;
&lt;br /&gt;
= Aquire and Build KDE as root =&lt;br /&gt;
If something fails you may need to make clean.&lt;br /&gt;
&lt;br /&gt;
== cmake ==&lt;br /&gt;
Install the latest version of cmake:&lt;br /&gt;
 cd&lt;br /&gt;
 wget http://www.cmake.org/files/v2.8/cmake-2.8.10.2.tar.gz&lt;br /&gt;
 tar xvzf cmake-2.8.10.2.tar.gz&lt;br /&gt;
 cd cmake-2.8.10.2&lt;br /&gt;
 ./configure &amp;amp;&amp;amp; make -j4 &amp;amp;&amp;amp; make install&lt;br /&gt;
&lt;br /&gt;
== automoc ==&lt;br /&gt;
automoc is needed for akonadi.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:automoc&lt;br /&gt;
 cd automoc&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== akonadi ==&lt;br /&gt;
Akonadi keeps personal information management data in a mysql database. It is needed for KDEPIMLIBS.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:akonadi&lt;br /&gt;
 cd akonadi&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== libattica ==&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:attica&lt;br /&gt;
 cd attica&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== shared desktop ontologies ==&lt;br /&gt;
shared desktop ontologies is needed by kdepimlibs in order to build Nepomuk (which is a part of kdelibs)&lt;br /&gt;
 cd&lt;br /&gt;
 wget http://downloads.sourceforge.net/project/oscaf/shared-desktop-ontologies/0.10.0/shared-desktop-ontologies-0.10.0.tar.bz2&lt;br /&gt;
 tar xvjf shared-desktop-ontologies-0.10.0.tar.bz2&lt;br /&gt;
 cd shared-desktop-ontologies-0.10.0/&lt;br /&gt;
 cmake . &amp;amp;&amp;amp; make &amp;amp;&amp;amp; make install&lt;br /&gt;
&lt;br /&gt;
== phonon ==&lt;br /&gt;
Phonon is needed for kdebase-runtime&lt;br /&gt;
 cd&lt;br /&gt;
 git clone git://anongit.kde.org/phonon&lt;br /&gt;
 cd phonon&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kdelibs ==&lt;br /&gt;
KDELIBS requires an out-of-source build, that is why it is more complicated to build:&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kdelibs&lt;br /&gt;
 mkdir kdelibs-build&lt;br /&gt;
 cd kdelibs-build&lt;br /&gt;
 cmakekdelibs&lt;br /&gt;
Verify it has been correctly installed - the following must be possible:&lt;br /&gt;
 kde4-config --prefix&lt;br /&gt;
 /usr/local&lt;br /&gt;
&lt;br /&gt;
== kdepimlibs ==&lt;br /&gt;
kdepimlibs is needed for kde-runtime.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kdepimlibs&lt;br /&gt;
 cd kdepimlibs&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kactivities ==&lt;br /&gt;
kactivities is needed for kde-workspace.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kactivities&lt;br /&gt;
 cd kactivities&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kdebase ==&lt;br /&gt;
 cd &lt;br /&gt;
 git clone kde:kde-baseapps&lt;br /&gt;
 git clone kde:konsole&lt;br /&gt;
 git clone kde:kde-workspace&lt;br /&gt;
 git clone kde:kde-runtime &lt;br /&gt;
 cd kde-baseapps&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd konsole&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd kde-workspace&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd kde-runtime&lt;br /&gt;
 cmakekde&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/KDE4/on_virtual_machines</id>
		<title>Getting Started/Build/KDE4/on virtual machines</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/KDE4/on_virtual_machines"/>
				<updated>2013-01-26T17:39:10Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: /* shared desktop ontologies */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox tutorial|time=3 hours|type=HowTo|distribution=SUSE Linux 12.2|happyreaders=2|unhappyreaders=0}}&lt;br /&gt;
&lt;br /&gt;
This describes how to use a virtual machine for building the latest KDE from sources.&lt;br /&gt;
&lt;br /&gt;
= Virtual Machine Setup =&lt;br /&gt;
Create a virtual machine, e.g. using [http://www.linuxintro.org/wiki/VirtualbOx VirtualBox]. Regarding harddisk: KDE 4 fits into 10 GB, however [[User:Tstaerk|I]] recommend 40GB, one partition. Regarding RAM: You will need at least 1GB ram for the virtual machine, of course more is better.&lt;br /&gt;
&lt;br /&gt;
;You will need to set your SUSE CD as your virtual machine's cdrom. &lt;br /&gt;
&lt;br /&gt;
== setup for SSH ==&lt;br /&gt;
To be able to log in to your VM using ssh, stop and disable the firewall:&lt;br /&gt;
 rcSuSEfirewall2 stop&lt;br /&gt;
 chkconfig SuSEfirewall2_setup off&lt;br /&gt;
 chkconfig SuSEfirewall2_init off&lt;br /&gt;
 /etc/init.d/sshd start&lt;br /&gt;
 chkconfig sshd on&lt;br /&gt;
Inside the VM, install some needed packages:&lt;br /&gt;
 yast -i libqt4-devel libsoprano-devel pcre-devel libxslt-devel libxml2-devel docbook-xsl-stylesheets git cmake \&lt;br /&gt;
 libdbusmenu-qt-devel giflib-devel strigi-devel libQtWebKit-devel libqimageblitz-devel libical-devel libgpgme-devel \&lt;br /&gt;
 boost-devel&lt;br /&gt;
&lt;br /&gt;
;Now it is time to do a snapshot or clone from your VM.&lt;br /&gt;
You will be able to return to this machine state whenever you want.&lt;br /&gt;
&lt;br /&gt;
== a few more steps ==&lt;br /&gt;
[http://www.linuxintro.org/wiki/open_a_console Open a console] as root&lt;br /&gt;
 su -&lt;br /&gt;
&lt;br /&gt;
== on an x64 distribution ==&lt;br /&gt;
If and only if you have a /lib64 path, you are on an x64 distribution.&lt;br /&gt;
Make sure you have the needed environment variables and alias set by having a file /root/.bashrc.&lt;br /&gt;
 cd&lt;br /&gt;
 cat &amp;gt;.bashrc&amp;lt;&amp;lt;EOF &lt;br /&gt;
 export KDEDIR=/usr/local         &lt;br /&gt;
 alias cmakekde=&amp;quot;cmake . -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DLIB_SUFFIX=64 -D[[Development/CMake/Addons_for_KDE#Buildtypes|CMAKE_BUILD_TYPE]]=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias cmakekdelibs=&amp;quot;cmake ../kdelibs -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DLIB_SUFFIX=64 -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias makeqt=&amp;quot;./configure -dbus -openssl -plugin-sql-mysql -libdir /usr/lib64 -prefix /usr &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 export QTDIR=/usr&lt;br /&gt;
 EOF&lt;br /&gt;
 cat &amp;gt;.gitconfig&amp;lt;&amp;lt;EOF&lt;br /&gt;
 [url &amp;quot;git://anongit.kde.org/&amp;quot;]&lt;br /&gt;
     insteadOf = kde:&lt;br /&gt;
 [url &amp;quot;ssh://git@git.kde.org/&amp;quot;]&lt;br /&gt;
     pushInsteadOf = kde:&lt;br /&gt;
 EOF&lt;br /&gt;
Now activate this file&lt;br /&gt;
 . /root/.bashrc&lt;br /&gt;
&lt;br /&gt;
== on another distribution (incl 32bit)==&lt;br /&gt;
Make sure you have the needed environment variables and alias set by having a file /root/.bashrc. &lt;br /&gt;
 cd&lt;br /&gt;
 cat &amp;gt;.bashrc&amp;lt;&amp;lt;EOF&lt;br /&gt;
 export KDEDIR=/usr/local         &lt;br /&gt;
 alias cmakekde=&amp;quot;cmake . -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias cmakekdelibs=&amp;quot;cmake ../kdelibs -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias makeqt=&amp;quot;./configure -dbus -openssl -plugin-sql-mysql -prefix /usr &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 export QTDIR=/usr&lt;br /&gt;
 EOF&lt;br /&gt;
 cat &amp;gt;.gitconfig&amp;lt;&amp;lt;EOF&lt;br /&gt;
 [url &amp;quot;git://anongit.kde.org/&amp;quot;]&lt;br /&gt;
     insteadOf = kde:&lt;br /&gt;
 [url &amp;quot;ssh://git@git.kde.org/&amp;quot;]&lt;br /&gt;
     pushInsteadOf = kde:&lt;br /&gt;
 EOF&lt;br /&gt;
Now activate this file&lt;br /&gt;
 . /root/.bashrc&lt;br /&gt;
&lt;br /&gt;
= Aquire and Build KDE as root =&lt;br /&gt;
If something fails you may need to make clean.&lt;br /&gt;
&lt;br /&gt;
== cmake ==&lt;br /&gt;
Install the latest version of cmake:&lt;br /&gt;
 cd&lt;br /&gt;
 wget http://www.cmake.org/files/v2.8/cmake-2.8.10.2.tar.gz&lt;br /&gt;
 tar xvzf cmake-2.8.10.2.tar.gz&lt;br /&gt;
 cd cmake-2.8.10.2&lt;br /&gt;
 ./configure &amp;amp;&amp;amp; make -j4 &amp;amp;&amp;amp; make install&lt;br /&gt;
&lt;br /&gt;
== automoc ==&lt;br /&gt;
automoc is needed for akonadi.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:automoc&lt;br /&gt;
 cd automoc&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== akonadi ==&lt;br /&gt;
Akonadi keeps personal information management data in a mysql database. It is needed for KDEPIMLIBS.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:akonadi&lt;br /&gt;
 cd akonadi&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== libattica ==&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:attica&lt;br /&gt;
 cd attica&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== shared desktop ontologies ==&lt;br /&gt;
shared desktop ontologies is needed by kdepimlibs in order to build Nepomuk (which is a part of kdelibs)&lt;br /&gt;
 cd&lt;br /&gt;
 wget http://downloads.sourceforge.net/project/oscaf/shared-desktop-ontologies/0.10.0/shared-desktop-ontologies-0.10.0.tar.bz2&lt;br /&gt;
 bunzip2 shared-desktop-ontologies-0.10.0.tar.bz2&lt;br /&gt;
 tar xvf shared-desktop-ontologies-0.10.0.tar&lt;br /&gt;
 cd shared-desktop-ontologies-0.10.0/&lt;br /&gt;
 cmake . &amp;amp;&amp;amp; make &amp;amp;&amp;amp; make install&lt;br /&gt;
&lt;br /&gt;
== phonon ==&lt;br /&gt;
Phonon is needed for kdebase-runtime&lt;br /&gt;
 cd&lt;br /&gt;
 git clone git://anongit.kde.org/phonon&lt;br /&gt;
 cd phonon&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kdelibs ==&lt;br /&gt;
KDELIBS requires an out-of-source build, that is why it is more complicated to build:&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kdelibs&lt;br /&gt;
 mkdir kdelibs-build&lt;br /&gt;
 cd kdelibs-build&lt;br /&gt;
 cmakekdelibs&lt;br /&gt;
Verify it has been correctly installed - the following must be possible:&lt;br /&gt;
 kde4-config --prefix&lt;br /&gt;
 /usr/local&lt;br /&gt;
&lt;br /&gt;
== kdepimlibs ==&lt;br /&gt;
kdepimlibs is needed for kde-runtime.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kdepimlibs&lt;br /&gt;
 cd kdepimlibs&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kactivities ==&lt;br /&gt;
kactivities is needed for kde-workspace.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kactivities&lt;br /&gt;
 cd kactivities&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kdebase ==&lt;br /&gt;
 cd &lt;br /&gt;
 git clone kde:kde-baseapps&lt;br /&gt;
 git clone kde:konsole&lt;br /&gt;
 git clone kde:kde-workspace&lt;br /&gt;
 git clone kde:kde-runtime &lt;br /&gt;
 cd kde-baseapps&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd konsole&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd kde-workspace&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd kde-runtime&lt;br /&gt;
 cmakekde&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/KDE4/on_virtual_machines</id>
		<title>Getting Started/Build/KDE4/on virtual machines</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/KDE4/on_virtual_machines"/>
				<updated>2013-01-26T15:24:58Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: cMake&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox tutorial|time=3 hours|type=HowTo|distribution=SUSE Linux 12.2|happyreaders=2|unhappyreaders=0}}&lt;br /&gt;
&lt;br /&gt;
This describes how to use a virtual machine for building the latest KDE from sources.&lt;br /&gt;
&lt;br /&gt;
= Virtual Machine Setup =&lt;br /&gt;
Create a virtual machine, e.g. using [http://www.linuxintro.org/wiki/VirtualbOx VirtualBox]. Regarding harddisk: KDE 4 fits into 10 GB, however [[User:Tstaerk|I]] recommend 40GB, one partition. Regarding RAM: You will need at least 1GB ram for the virtual machine, of course more is better.&lt;br /&gt;
&lt;br /&gt;
;You will need to set your SUSE CD as your virtual machine's cdrom. &lt;br /&gt;
&lt;br /&gt;
== setup for SSH ==&lt;br /&gt;
To be able to log in to your VM using ssh, stop and disable the firewall:&lt;br /&gt;
 rcSuSEfirewall2 stop&lt;br /&gt;
 chkconfig SuSEfirewall2_setup off&lt;br /&gt;
 chkconfig SuSEfirewall2_init off&lt;br /&gt;
 /etc/init.d/sshd start&lt;br /&gt;
 chkconfig sshd on&lt;br /&gt;
Inside the VM, install some needed packages:&lt;br /&gt;
 yast -i libqt4-devel libsoprano-devel pcre-devel libxslt-devel libxml2-devel docbook-xsl-stylesheets git cmake \&lt;br /&gt;
 libdbusmenu-qt-devel giflib-devel strigi-devel libQtWebKit-devel libqimageblitz-devel libical-devel libgpgme-devel \&lt;br /&gt;
 boost-devel&lt;br /&gt;
&lt;br /&gt;
;Now it is time to do a snapshot or clone from your VM.&lt;br /&gt;
You will be able to return to this machine state whenever you want.&lt;br /&gt;
&lt;br /&gt;
== a few more steps ==&lt;br /&gt;
[http://www.linuxintro.org/wiki/open_a_console Open a console] as root&lt;br /&gt;
 su -&lt;br /&gt;
&lt;br /&gt;
== on an x64 distribution ==&lt;br /&gt;
If and only if you have a /lib64 path, you are on an x64 distribution.&lt;br /&gt;
Make sure you have the needed environment variables and alias set by having a file /root/.bashrc.&lt;br /&gt;
 cd&lt;br /&gt;
 cat &amp;gt;.bashrc&amp;lt;&amp;lt;EOF &lt;br /&gt;
 export KDEDIR=/usr/local         &lt;br /&gt;
 alias cmakekde=&amp;quot;cmake . -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DLIB_SUFFIX=64 -D[[Development/CMake/Addons_for_KDE#Buildtypes|CMAKE_BUILD_TYPE]]=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias cmakekdelibs=&amp;quot;cmake ../kdelibs -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DLIB_SUFFIX=64 -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias makeqt=&amp;quot;./configure -dbus -openssl -plugin-sql-mysql -libdir /usr/lib64 -prefix /usr &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 export QTDIR=/usr&lt;br /&gt;
 EOF&lt;br /&gt;
 cat &amp;gt;.gitconfig&amp;lt;&amp;lt;EOF&lt;br /&gt;
 [url &amp;quot;git://anongit.kde.org/&amp;quot;]&lt;br /&gt;
     insteadOf = kde:&lt;br /&gt;
 [url &amp;quot;ssh://git@git.kde.org/&amp;quot;]&lt;br /&gt;
     pushInsteadOf = kde:&lt;br /&gt;
 EOF&lt;br /&gt;
Now activate this file&lt;br /&gt;
 . /root/.bashrc&lt;br /&gt;
&lt;br /&gt;
== on another distribution (incl 32bit)==&lt;br /&gt;
Make sure you have the needed environment variables and alias set by having a file /root/.bashrc. &lt;br /&gt;
 cd&lt;br /&gt;
 cat &amp;gt;.bashrc&amp;lt;&amp;lt;EOF&lt;br /&gt;
 export KDEDIR=/usr/local         &lt;br /&gt;
 alias cmakekde=&amp;quot;cmake . -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias cmakekdelibs=&amp;quot;cmake ../kdelibs -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias makeqt=&amp;quot;./configure -dbus -openssl -plugin-sql-mysql -prefix /usr &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 export QTDIR=/usr&lt;br /&gt;
 EOF&lt;br /&gt;
 cat &amp;gt;.gitconfig&amp;lt;&amp;lt;EOF&lt;br /&gt;
 [url &amp;quot;git://anongit.kde.org/&amp;quot;]&lt;br /&gt;
     insteadOf = kde:&lt;br /&gt;
 [url &amp;quot;ssh://git@git.kde.org/&amp;quot;]&lt;br /&gt;
     pushInsteadOf = kde:&lt;br /&gt;
 EOF&lt;br /&gt;
Now activate this file&lt;br /&gt;
 . /root/.bashrc&lt;br /&gt;
&lt;br /&gt;
= Aquire and Build KDE as root =&lt;br /&gt;
If something fails you may need to make clean.&lt;br /&gt;
&lt;br /&gt;
== cmake ==&lt;br /&gt;
Install the latest version of cmake:&lt;br /&gt;
 cd&lt;br /&gt;
 wget http://www.cmake.org/files/v2.8/cmake-2.8.10.2.tar.gz&lt;br /&gt;
 tar xvzf cmake-2.8.10.2.tar.gz&lt;br /&gt;
 cd cmake-2.8.10.2&lt;br /&gt;
 ./configure &amp;amp;&amp;amp; make -j4 &amp;amp;&amp;amp; make install&lt;br /&gt;
&lt;br /&gt;
== automoc ==&lt;br /&gt;
automoc is needed for akonadi.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:automoc&lt;br /&gt;
 cd automoc&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== akonadi ==&lt;br /&gt;
Akonadi keeps personal information management data in a mysql database. It is needed for KDEPIMLIBS.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:akonadi&lt;br /&gt;
 cd akonadi&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== libattica ==&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:attica&lt;br /&gt;
 cd attica&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== shared desktop ontologies ==&lt;br /&gt;
shared desktop ontologies is needed by kdepimlibs in order to build Nepomuk (which is a part of kdelibs)&lt;br /&gt;
 cd&lt;br /&gt;
 wget http://downloads.sourceforge.net/project/oscaf/shared-desktop-ontologies/0.9/shared-desktop-ontologies-0.9.0.tar.bz2&lt;br /&gt;
 bunzip2 shared-desktop-ontologies-0.9.0.tar.bz2&lt;br /&gt;
 tar xvf shared-desktop-ontologies-0.9.0.tar&lt;br /&gt;
 cd shared-desktop-ontologies-0.9.0/&lt;br /&gt;
 cmake . &amp;amp;&amp;amp; make &amp;amp;&amp;amp; make install&lt;br /&gt;
&lt;br /&gt;
== phonon ==&lt;br /&gt;
Phonon is needed for kdebase-runtime&lt;br /&gt;
 cd&lt;br /&gt;
 git clone git://anongit.kde.org/phonon&lt;br /&gt;
 cd phonon&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kdelibs ==&lt;br /&gt;
KDELIBS requires an out-of-source build, that is why it is more complicated to build:&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kdelibs&lt;br /&gt;
 mkdir kdelibs-build&lt;br /&gt;
 cd kdelibs-build&lt;br /&gt;
 cmakekdelibs&lt;br /&gt;
Verify it has been correctly installed - the following must be possible:&lt;br /&gt;
 kde4-config --prefix&lt;br /&gt;
 /usr/local&lt;br /&gt;
&lt;br /&gt;
== kdepimlibs ==&lt;br /&gt;
kdepimlibs is needed for kde-runtime.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kdepimlibs&lt;br /&gt;
 cd kdepimlibs&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kactivities ==&lt;br /&gt;
kactivities is needed for kde-workspace.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kactivities&lt;br /&gt;
 cd kactivities&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kdebase ==&lt;br /&gt;
 cd &lt;br /&gt;
 git clone kde:kde-baseapps&lt;br /&gt;
 git clone kde:konsole&lt;br /&gt;
 git clone kde:kde-workspace&lt;br /&gt;
 git clone kde:kde-runtime &lt;br /&gt;
 cd kde-baseapps&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd konsole&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd kde-workspace&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd kde-runtime&lt;br /&gt;
 cmakekde&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/KDE4/on_virtual_machines</id>
		<title>Getting Started/Build/KDE4/on virtual machines</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/KDE4/on_virtual_machines"/>
				<updated>2013-01-26T15:23:36Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox tutorial|time=3 hours|type=HowTo|distribution=SUSE Linux 12.2|happyreaders=2|unhappyreaders=0}}&lt;br /&gt;
&lt;br /&gt;
This describes how to use a virtual machine for building the latest KDE from sources.&lt;br /&gt;
&lt;br /&gt;
= Virtual Machine Setup =&lt;br /&gt;
Create a virtual machine, e.g. using [http://www.linuxintro.org/wiki/VirtualbOx VirtualBox]. Regarding harddisk: KDE 4 fits into 10 GB, however [[User:Tstaerk|I]] recommend 40GB, one partition. Regarding RAM: You will need at least 1GB ram for the virtual machine, of course more is better.&lt;br /&gt;
&lt;br /&gt;
;You will need to set your SUSE CD as your virtual machine's cdrom. &lt;br /&gt;
&lt;br /&gt;
== setup for SSH ==&lt;br /&gt;
To be able to log in to your VM using ssh, stop and disable the firewall:&lt;br /&gt;
 rcSuSEfirewall2 stop&lt;br /&gt;
 chkconfig SuSEfirewall2_setup off&lt;br /&gt;
 chkconfig SuSEfirewall2_init off&lt;br /&gt;
 /etc/init.d/sshd start&lt;br /&gt;
 chkconfig sshd on&lt;br /&gt;
Inside the VM, install some needed packages:&lt;br /&gt;
 yast -i libqt4-devel libsoprano-devel pcre-devel libxslt-devel libxml2-devel docbook-xsl-stylesheets git cmake \&lt;br /&gt;
 libdbusmenu-qt-devel giflib-devel strigi-devel libQtWebKit-devel libqimageblitz-devel libical-devel libgpgme-devel \&lt;br /&gt;
 boost-devel&lt;br /&gt;
&lt;br /&gt;
;Now it is time to do a snapshot or clone from your VM.&lt;br /&gt;
You will be able to return to this machine state whenever you want.&lt;br /&gt;
&lt;br /&gt;
== a few more steps ==&lt;br /&gt;
[http://www.linuxintro.org/wiki/open_a_console Open a console] as root&lt;br /&gt;
 su -&lt;br /&gt;
&lt;br /&gt;
== on an x64 distribution ==&lt;br /&gt;
If and only if you have a /lib64 path, you are on an x64 distribution.&lt;br /&gt;
Make sure you have the needed environment variables and alias set by having a file /root/.bashrc.&lt;br /&gt;
 cd&lt;br /&gt;
 cat &amp;gt;.bashrc&amp;lt;&amp;lt;EOF &lt;br /&gt;
 export KDEDIR=/usr/local         &lt;br /&gt;
 alias cmakekde=&amp;quot;cmake . -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DLIB_SUFFIX=64 -D[[Development/CMake/Addons_for_KDE#Buildtypes|CMAKE_BUILD_TYPE]]=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias cmakekdelibs=&amp;quot;cmake ../kdelibs -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DLIB_SUFFIX=64 -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias makeqt=&amp;quot;./configure -dbus -openssl -plugin-sql-mysql -libdir /usr/lib64 -prefix /usr &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 export QTDIR=/usr&lt;br /&gt;
 EOF&lt;br /&gt;
 cat &amp;gt;.gitconfig&amp;lt;&amp;lt;EOF&lt;br /&gt;
 [url &amp;quot;git://anongit.kde.org/&amp;quot;]&lt;br /&gt;
     insteadOf = kde:&lt;br /&gt;
 [url &amp;quot;ssh://git@git.kde.org/&amp;quot;]&lt;br /&gt;
     pushInsteadOf = kde:&lt;br /&gt;
 EOF&lt;br /&gt;
Now activate this file&lt;br /&gt;
 . /root/.bashrc&lt;br /&gt;
&lt;br /&gt;
== on another distribution (incl 32bit)==&lt;br /&gt;
Make sure you have the needed environment variables and alias set by having a file /root/.bashrc. &lt;br /&gt;
 cd&lt;br /&gt;
 cat &amp;gt;.bashrc&amp;lt;&amp;lt;EOF&lt;br /&gt;
 export KDEDIR=/usr/local         &lt;br /&gt;
 alias cmakekde=&amp;quot;cmake . -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias cmakekdelibs=&amp;quot;cmake ../kdelibs -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias makeqt=&amp;quot;./configure -dbus -openssl -plugin-sql-mysql -prefix /usr &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 export QTDIR=/usr&lt;br /&gt;
 EOF&lt;br /&gt;
 cat &amp;gt;.gitconfig&amp;lt;&amp;lt;EOF&lt;br /&gt;
 [url &amp;quot;git://anongit.kde.org/&amp;quot;]&lt;br /&gt;
     insteadOf = kde:&lt;br /&gt;
 [url &amp;quot;ssh://git@git.kde.org/&amp;quot;]&lt;br /&gt;
     pushInsteadOf = kde:&lt;br /&gt;
 EOF&lt;br /&gt;
Now activate this file&lt;br /&gt;
 . /root/.bashrc&lt;br /&gt;
&lt;br /&gt;
= Aquire and Build KDE as root =&lt;br /&gt;
If something fails you may need to make clean.&lt;br /&gt;
&lt;br /&gt;
== automoc ==&lt;br /&gt;
automoc is needed for akonadi.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:automoc&lt;br /&gt;
 cd automoc&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== akonadi ==&lt;br /&gt;
Akonadi keeps personal information management data in a mysql database. It is needed for KDEPIMLIBS.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:akonadi&lt;br /&gt;
 cd akonadi&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== libattica ==&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:attica&lt;br /&gt;
 cd attica&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== shared desktop ontologies ==&lt;br /&gt;
shared desktop ontologies is needed by kdepimlibs in order to build Nepomuk (which is a part of kdelibs)&lt;br /&gt;
 cd&lt;br /&gt;
 wget http://downloads.sourceforge.net/project/oscaf/shared-desktop-ontologies/0.9/shared-desktop-ontologies-0.9.0.tar.bz2&lt;br /&gt;
 bunzip2 shared-desktop-ontologies-0.9.0.tar.bz2&lt;br /&gt;
 tar xvf shared-desktop-ontologies-0.9.0.tar&lt;br /&gt;
 cd shared-desktop-ontologies-0.9.0/&lt;br /&gt;
 cmake . &amp;amp;&amp;amp; make &amp;amp;&amp;amp; make install&lt;br /&gt;
&lt;br /&gt;
== phonon ==&lt;br /&gt;
Phonon is needed for kdebase-runtime&lt;br /&gt;
 cd&lt;br /&gt;
 git clone git://anongit.kde.org/phonon&lt;br /&gt;
 cd phonon&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kdelibs ==&lt;br /&gt;
KDELIBS requires an out-of-source build, that is why it is more complicated to build:&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kdelibs&lt;br /&gt;
 mkdir kdelibs-build&lt;br /&gt;
 cd kdelibs-build&lt;br /&gt;
 cmakekdelibs&lt;br /&gt;
Verify it has been correctly installed - the following must be possible:&lt;br /&gt;
 kde4-config --prefix&lt;br /&gt;
 /usr/local&lt;br /&gt;
&lt;br /&gt;
== kdepimlibs ==&lt;br /&gt;
kdepimlibs is needed for kde-runtime.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kdepimlibs&lt;br /&gt;
 cd kdepimlibs&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kactivities ==&lt;br /&gt;
kactivities is needed for kde-workspace.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kactivities&lt;br /&gt;
 cd kactivities&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kdebase ==&lt;br /&gt;
 cd &lt;br /&gt;
 git clone kde:kde-baseapps&lt;br /&gt;
 git clone kde:konsole&lt;br /&gt;
 git clone kde:kde-workspace&lt;br /&gt;
 git clone kde:kde-runtime &lt;br /&gt;
 cd kde-baseapps&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd konsole&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd kde-workspace&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd kde-runtime&lt;br /&gt;
 cmakekde&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/KDE4/on_virtual_machines</id>
		<title>Getting Started/Build/KDE4/on virtual machines</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/KDE4/on_virtual_machines"/>
				<updated>2013-01-26T15:23:22Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: /* Virtual Machine Setup */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox tutorial|time=3 hours|type=HowTo|distribution=SUSE Linux 12.1|happyreaders=2|unhappyreaders=0}}&lt;br /&gt;
&lt;br /&gt;
This describes how to use a virtual machine for building the latest KDE from sources.&lt;br /&gt;
&lt;br /&gt;
= Virtual Machine Setup =&lt;br /&gt;
Create a virtual machine, e.g. using [http://www.linuxintro.org/wiki/VirtualbOx VirtualBox]. Regarding harddisk: KDE 4 fits into 10 GB, however [[User:Tstaerk|I]] recommend 40GB, one partition. Regarding RAM: You will need at least 1GB ram for the virtual machine, of course more is better.&lt;br /&gt;
&lt;br /&gt;
;You will need to set your SUSE CD as your virtual machine's cdrom. &lt;br /&gt;
&lt;br /&gt;
== setup for SSH ==&lt;br /&gt;
To be able to log in to your VM using ssh, stop and disable the firewall:&lt;br /&gt;
 rcSuSEfirewall2 stop&lt;br /&gt;
 chkconfig SuSEfirewall2_setup off&lt;br /&gt;
 chkconfig SuSEfirewall2_init off&lt;br /&gt;
 /etc/init.d/sshd start&lt;br /&gt;
 chkconfig sshd on&lt;br /&gt;
Inside the VM, install some needed packages:&lt;br /&gt;
 yast -i libqt4-devel libsoprano-devel pcre-devel libxslt-devel libxml2-devel docbook-xsl-stylesheets git cmake \&lt;br /&gt;
 libdbusmenu-qt-devel giflib-devel strigi-devel libQtWebKit-devel libqimageblitz-devel libical-devel libgpgme-devel \&lt;br /&gt;
 boost-devel&lt;br /&gt;
&lt;br /&gt;
;Now it is time to do a snapshot or clone from your VM.&lt;br /&gt;
You will be able to return to this machine state whenever you want.&lt;br /&gt;
&lt;br /&gt;
== a few more steps ==&lt;br /&gt;
[http://www.linuxintro.org/wiki/open_a_console Open a console] as root&lt;br /&gt;
 su -&lt;br /&gt;
&lt;br /&gt;
== on an x64 distribution ==&lt;br /&gt;
If and only if you have a /lib64 path, you are on an x64 distribution.&lt;br /&gt;
Make sure you have the needed environment variables and alias set by having a file /root/.bashrc.&lt;br /&gt;
 cd&lt;br /&gt;
 cat &amp;gt;.bashrc&amp;lt;&amp;lt;EOF &lt;br /&gt;
 export KDEDIR=/usr/local         &lt;br /&gt;
 alias cmakekde=&amp;quot;cmake . -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DLIB_SUFFIX=64 -D[[Development/CMake/Addons_for_KDE#Buildtypes|CMAKE_BUILD_TYPE]]=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias cmakekdelibs=&amp;quot;cmake ../kdelibs -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DLIB_SUFFIX=64 -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias makeqt=&amp;quot;./configure -dbus -openssl -plugin-sql-mysql -libdir /usr/lib64 -prefix /usr &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 export QTDIR=/usr&lt;br /&gt;
 EOF&lt;br /&gt;
 cat &amp;gt;.gitconfig&amp;lt;&amp;lt;EOF&lt;br /&gt;
 [url &amp;quot;git://anongit.kde.org/&amp;quot;]&lt;br /&gt;
     insteadOf = kde:&lt;br /&gt;
 [url &amp;quot;ssh://git@git.kde.org/&amp;quot;]&lt;br /&gt;
     pushInsteadOf = kde:&lt;br /&gt;
 EOF&lt;br /&gt;
Now activate this file&lt;br /&gt;
 . /root/.bashrc&lt;br /&gt;
&lt;br /&gt;
== on another distribution (incl 32bit)==&lt;br /&gt;
Make sure you have the needed environment variables and alias set by having a file /root/.bashrc. &lt;br /&gt;
 cd&lt;br /&gt;
 cat &amp;gt;.bashrc&amp;lt;&amp;lt;EOF&lt;br /&gt;
 export KDEDIR=/usr/local         &lt;br /&gt;
 alias cmakekde=&amp;quot;cmake . -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias cmakekdelibs=&amp;quot;cmake ../kdelibs -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias makeqt=&amp;quot;./configure -dbus -openssl -plugin-sql-mysql -prefix /usr &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 export QTDIR=/usr&lt;br /&gt;
 EOF&lt;br /&gt;
 cat &amp;gt;.gitconfig&amp;lt;&amp;lt;EOF&lt;br /&gt;
 [url &amp;quot;git://anongit.kde.org/&amp;quot;]&lt;br /&gt;
     insteadOf = kde:&lt;br /&gt;
 [url &amp;quot;ssh://git@git.kde.org/&amp;quot;]&lt;br /&gt;
     pushInsteadOf = kde:&lt;br /&gt;
 EOF&lt;br /&gt;
Now activate this file&lt;br /&gt;
 . /root/.bashrc&lt;br /&gt;
&lt;br /&gt;
= Aquire and Build KDE as root =&lt;br /&gt;
If something fails you may need to make clean.&lt;br /&gt;
&lt;br /&gt;
== automoc ==&lt;br /&gt;
automoc is needed for akonadi.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:automoc&lt;br /&gt;
 cd automoc&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== akonadi ==&lt;br /&gt;
Akonadi keeps personal information management data in a mysql database. It is needed for KDEPIMLIBS.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:akonadi&lt;br /&gt;
 cd akonadi&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== libattica ==&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:attica&lt;br /&gt;
 cd attica&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== shared desktop ontologies ==&lt;br /&gt;
shared desktop ontologies is needed by kdepimlibs in order to build Nepomuk (which is a part of kdelibs)&lt;br /&gt;
 cd&lt;br /&gt;
 wget http://downloads.sourceforge.net/project/oscaf/shared-desktop-ontologies/0.9/shared-desktop-ontologies-0.9.0.tar.bz2&lt;br /&gt;
 bunzip2 shared-desktop-ontologies-0.9.0.tar.bz2&lt;br /&gt;
 tar xvf shared-desktop-ontologies-0.9.0.tar&lt;br /&gt;
 cd shared-desktop-ontologies-0.9.0/&lt;br /&gt;
 cmake . &amp;amp;&amp;amp; make &amp;amp;&amp;amp; make install&lt;br /&gt;
&lt;br /&gt;
== phonon ==&lt;br /&gt;
Phonon is needed for kdebase-runtime&lt;br /&gt;
 cd&lt;br /&gt;
 git clone git://anongit.kde.org/phonon&lt;br /&gt;
 cd phonon&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kdelibs ==&lt;br /&gt;
KDELIBS requires an out-of-source build, that is why it is more complicated to build:&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kdelibs&lt;br /&gt;
 mkdir kdelibs-build&lt;br /&gt;
 cd kdelibs-build&lt;br /&gt;
 cmakekdelibs&lt;br /&gt;
Verify it has been correctly installed - the following must be possible:&lt;br /&gt;
 kde4-config --prefix&lt;br /&gt;
 /usr/local&lt;br /&gt;
&lt;br /&gt;
== kdepimlibs ==&lt;br /&gt;
kdepimlibs is needed for kde-runtime.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kdepimlibs&lt;br /&gt;
 cd kdepimlibs&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kactivities ==&lt;br /&gt;
kactivities is needed for kde-workspace.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kactivities&lt;br /&gt;
 cd kactivities&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kdebase ==&lt;br /&gt;
 cd &lt;br /&gt;
 git clone kde:kde-baseapps&lt;br /&gt;
 git clone kde:konsole&lt;br /&gt;
 git clone kde:kde-workspace&lt;br /&gt;
 git clone kde:kde-runtime &lt;br /&gt;
 cd kde-baseapps&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd konsole&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd kde-workspace&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd kde-runtime&lt;br /&gt;
 cmakekde&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/KDE4/on_virtual_machines</id>
		<title>Getting Started/Build/KDE4/on virtual machines</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/KDE4/on_virtual_machines"/>
				<updated>2013-01-26T15:08:13Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: /* setup for SSH */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox tutorial|time=3 hours|type=HowTo|distribution=SUSE Linux 12.1|happyreaders=2|unhappyreaders=0}}&lt;br /&gt;
&lt;br /&gt;
This describes how to use a virtual machine for building the latest KDE from sources.&lt;br /&gt;
&lt;br /&gt;
= Virtual Machine Setup =&lt;br /&gt;
Create a virtual machine, e.g. using [http://www.linuxintro.org/wiki/VMWare VMware Player]. Regarding harddisk: KDE 4 fits into 10 GB, however [[User:Tstaerk|I]] recommend 40GB, one partition. Regarding RAM: You will need at least 1GB ram for the virtual machine, of course more is better.&lt;br /&gt;
&lt;br /&gt;
;You will need to set your SUSE CD as your virtual machine's cdrom. &lt;br /&gt;
&lt;br /&gt;
== setup for SSH ==&lt;br /&gt;
To be able to log in to your VM using ssh, stop and disable the firewall:&lt;br /&gt;
 rcSuSEfirewall2 stop&lt;br /&gt;
 chkconfig SuSEfirewall2_setup off&lt;br /&gt;
 chkconfig SuSEfirewall2_init off&lt;br /&gt;
 /etc/init.d/sshd start&lt;br /&gt;
 chkconfig sshd on&lt;br /&gt;
Inside the VM, install some needed packages:&lt;br /&gt;
 yast -i libqt4-devel libsoprano-devel pcre-devel libxslt-devel libxml2-devel docbook-xsl-stylesheets git cmake \&lt;br /&gt;
 libdbusmenu-qt-devel giflib-devel strigi-devel libQtWebKit-devel libqimageblitz-devel libical-devel libgpgme-devel \&lt;br /&gt;
 boost-devel&lt;br /&gt;
&lt;br /&gt;
;Now it is time to do a snapshot or clone from your VM.&lt;br /&gt;
You will be able to return to this machine state whenever you want.&lt;br /&gt;
&lt;br /&gt;
== a few more steps ==&lt;br /&gt;
[http://www.linuxintro.org/wiki/open_a_console Open a console] as root&lt;br /&gt;
 su -&lt;br /&gt;
&lt;br /&gt;
== on an x64 distribution ==&lt;br /&gt;
If and only if you have a /lib64 path, you are on an x64 distribution.&lt;br /&gt;
Make sure you have the needed environment variables and alias set by having a file /root/.bashrc.&lt;br /&gt;
 cd&lt;br /&gt;
 cat &amp;gt;.bashrc&amp;lt;&amp;lt;EOF &lt;br /&gt;
 export KDEDIR=/usr/local         &lt;br /&gt;
 alias cmakekde=&amp;quot;cmake . -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DLIB_SUFFIX=64 -D[[Development/CMake/Addons_for_KDE#Buildtypes|CMAKE_BUILD_TYPE]]=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias cmakekdelibs=&amp;quot;cmake ../kdelibs -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DLIB_SUFFIX=64 -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias makeqt=&amp;quot;./configure -dbus -openssl -plugin-sql-mysql -libdir /usr/lib64 -prefix /usr &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 export QTDIR=/usr&lt;br /&gt;
 EOF&lt;br /&gt;
 cat &amp;gt;.gitconfig&amp;lt;&amp;lt;EOF&lt;br /&gt;
 [url &amp;quot;git://anongit.kde.org/&amp;quot;]&lt;br /&gt;
     insteadOf = kde:&lt;br /&gt;
 [url &amp;quot;ssh://git@git.kde.org/&amp;quot;]&lt;br /&gt;
     pushInsteadOf = kde:&lt;br /&gt;
 EOF&lt;br /&gt;
Now activate this file&lt;br /&gt;
 . /root/.bashrc&lt;br /&gt;
&lt;br /&gt;
== on another distribution (incl 32bit)==&lt;br /&gt;
Make sure you have the needed environment variables and alias set by having a file /root/.bashrc. &lt;br /&gt;
 cd&lt;br /&gt;
 cat &amp;gt;.bashrc&amp;lt;&amp;lt;EOF&lt;br /&gt;
 export KDEDIR=/usr/local         &lt;br /&gt;
 alias cmakekde=&amp;quot;cmake . -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias cmakekdelibs=&amp;quot;cmake ../kdelibs -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias makeqt=&amp;quot;./configure -dbus -openssl -plugin-sql-mysql -prefix /usr &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 export QTDIR=/usr&lt;br /&gt;
 EOF&lt;br /&gt;
 cat &amp;gt;.gitconfig&amp;lt;&amp;lt;EOF&lt;br /&gt;
 [url &amp;quot;git://anongit.kde.org/&amp;quot;]&lt;br /&gt;
     insteadOf = kde:&lt;br /&gt;
 [url &amp;quot;ssh://git@git.kde.org/&amp;quot;]&lt;br /&gt;
     pushInsteadOf = kde:&lt;br /&gt;
 EOF&lt;br /&gt;
Now activate this file&lt;br /&gt;
 . /root/.bashrc&lt;br /&gt;
&lt;br /&gt;
= Aquire and Build KDE as root =&lt;br /&gt;
If something fails you may need to make clean.&lt;br /&gt;
&lt;br /&gt;
== automoc ==&lt;br /&gt;
automoc is needed for akonadi.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:automoc&lt;br /&gt;
 cd automoc&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== akonadi ==&lt;br /&gt;
Akonadi keeps personal information management data in a mysql database. It is needed for KDEPIMLIBS.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:akonadi&lt;br /&gt;
 cd akonadi&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== libattica ==&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:attica&lt;br /&gt;
 cd attica&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== shared desktop ontologies ==&lt;br /&gt;
shared desktop ontologies is needed by kdepimlibs in order to build Nepomuk (which is a part of kdelibs)&lt;br /&gt;
 cd&lt;br /&gt;
 wget http://downloads.sourceforge.net/project/oscaf/shared-desktop-ontologies/0.9/shared-desktop-ontologies-0.9.0.tar.bz2&lt;br /&gt;
 bunzip2 shared-desktop-ontologies-0.9.0.tar.bz2&lt;br /&gt;
 tar xvf shared-desktop-ontologies-0.9.0.tar&lt;br /&gt;
 cd shared-desktop-ontologies-0.9.0/&lt;br /&gt;
 cmake . &amp;amp;&amp;amp; make &amp;amp;&amp;amp; make install&lt;br /&gt;
&lt;br /&gt;
== phonon ==&lt;br /&gt;
Phonon is needed for kdebase-runtime&lt;br /&gt;
 cd&lt;br /&gt;
 git clone git://anongit.kde.org/phonon&lt;br /&gt;
 cd phonon&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kdelibs ==&lt;br /&gt;
KDELIBS requires an out-of-source build, that is why it is more complicated to build:&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kdelibs&lt;br /&gt;
 mkdir kdelibs-build&lt;br /&gt;
 cd kdelibs-build&lt;br /&gt;
 cmakekdelibs&lt;br /&gt;
Verify it has been correctly installed - the following must be possible:&lt;br /&gt;
 kde4-config --prefix&lt;br /&gt;
 /usr/local&lt;br /&gt;
&lt;br /&gt;
== kdepimlibs ==&lt;br /&gt;
kdepimlibs is needed for kde-runtime.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kdepimlibs&lt;br /&gt;
 cd kdepimlibs&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kactivities ==&lt;br /&gt;
kactivities is needed for kde-workspace.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kactivities&lt;br /&gt;
 cd kactivities&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kdebase ==&lt;br /&gt;
 cd &lt;br /&gt;
 git clone kde:kde-baseapps&lt;br /&gt;
 git clone kde:konsole&lt;br /&gt;
 git clone kde:kde-workspace&lt;br /&gt;
 git clone kde:kde-runtime &lt;br /&gt;
 cd kde-baseapps&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd konsole&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd kde-workspace&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd kde-runtime&lt;br /&gt;
 cmakekde&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/KDE4/on_virtual_machines</id>
		<title>Getting Started/Build/KDE4/on virtual machines</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/KDE4/on_virtual_machines"/>
				<updated>2013-01-26T13:57:11Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: /* a few more steps */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox tutorial|time=3 hours|type=HowTo|distribution=SUSE Linux 12.1|happyreaders=2|unhappyreaders=0}}&lt;br /&gt;
&lt;br /&gt;
This describes how to use a virtual machine for building the latest KDE from sources.&lt;br /&gt;
&lt;br /&gt;
= Virtual Machine Setup =&lt;br /&gt;
Create a virtual machine, e.g. using [http://www.linuxintro.org/wiki/VMWare VMware Player]. Regarding harddisk: KDE 4 fits into 10 GB, however [[User:Tstaerk|I]] recommend 40GB, one partition. Regarding RAM: You will need at least 1GB ram for the virtual machine, of course more is better.&lt;br /&gt;
&lt;br /&gt;
;You will need to set your SUSE CD as your virtual machine's cdrom. &lt;br /&gt;
&lt;br /&gt;
== setup for SSH ==&lt;br /&gt;
To be able to log in to your VM using ssh, stop and disable the firewall:&lt;br /&gt;
 rcSuSEfirewall2 stop&lt;br /&gt;
 chkconfig SuSEfirewall2_setup off&lt;br /&gt;
 chkconfig SuSEfirewall2_init off&lt;br /&gt;
 /etc/init.d/sshd start&lt;br /&gt;
 chkconfig sshd on&lt;br /&gt;
Inside the VM, install some needed packages:&lt;br /&gt;
 yast -i libqt4-devel libsoprano-devel pcre-devel libxslt-devel libxml2-devel docbook-xsl-stylesheets git cmake \&lt;br /&gt;
 libdbusmenu-qt-devel giflib-devel strigi-devel libQtWebKit-devel libqimageblitz-devel libical-devel libgpgme-devel&lt;br /&gt;
&lt;br /&gt;
;Now it is time to do a snapshot or clone from your VM.&lt;br /&gt;
You will be able to return to this machine state whenever you want.&lt;br /&gt;
&lt;br /&gt;
== a few more steps ==&lt;br /&gt;
[http://www.linuxintro.org/wiki/open_a_console Open a console] as root&lt;br /&gt;
 su -&lt;br /&gt;
&lt;br /&gt;
== on an x64 distribution ==&lt;br /&gt;
If and only if you have a /lib64 path, you are on an x64 distribution.&lt;br /&gt;
Make sure you have the needed environment variables and alias set by having a file /root/.bashrc.&lt;br /&gt;
 cd&lt;br /&gt;
 cat &amp;gt;.bashrc&amp;lt;&amp;lt;EOF &lt;br /&gt;
 export KDEDIR=/usr/local         &lt;br /&gt;
 alias cmakekde=&amp;quot;cmake . -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DLIB_SUFFIX=64 -D[[Development/CMake/Addons_for_KDE#Buildtypes|CMAKE_BUILD_TYPE]]=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias cmakekdelibs=&amp;quot;cmake ../kdelibs -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DLIB_SUFFIX=64 -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias makeqt=&amp;quot;./configure -dbus -openssl -plugin-sql-mysql -libdir /usr/lib64 -prefix /usr &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 export QTDIR=/usr&lt;br /&gt;
 EOF&lt;br /&gt;
 cat &amp;gt;.gitconfig&amp;lt;&amp;lt;EOF&lt;br /&gt;
 [url &amp;quot;git://anongit.kde.org/&amp;quot;]&lt;br /&gt;
     insteadOf = kde:&lt;br /&gt;
 [url &amp;quot;ssh://git@git.kde.org/&amp;quot;]&lt;br /&gt;
     pushInsteadOf = kde:&lt;br /&gt;
 EOF&lt;br /&gt;
Now activate this file&lt;br /&gt;
 . /root/.bashrc&lt;br /&gt;
&lt;br /&gt;
== on another distribution (incl 32bit)==&lt;br /&gt;
Make sure you have the needed environment variables and alias set by having a file /root/.bashrc. &lt;br /&gt;
 cd&lt;br /&gt;
 cat &amp;gt;.bashrc&amp;lt;&amp;lt;EOF&lt;br /&gt;
 export KDEDIR=/usr/local         &lt;br /&gt;
 alias cmakekde=&amp;quot;cmake . -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias cmakekdelibs=&amp;quot;cmake ../kdelibs -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias makeqt=&amp;quot;./configure -dbus -openssl -plugin-sql-mysql -prefix /usr &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 export QTDIR=/usr&lt;br /&gt;
 EOF&lt;br /&gt;
 cat &amp;gt;.gitconfig&amp;lt;&amp;lt;EOF&lt;br /&gt;
 [url &amp;quot;git://anongit.kde.org/&amp;quot;]&lt;br /&gt;
     insteadOf = kde:&lt;br /&gt;
 [url &amp;quot;ssh://git@git.kde.org/&amp;quot;]&lt;br /&gt;
     pushInsteadOf = kde:&lt;br /&gt;
 EOF&lt;br /&gt;
Now activate this file&lt;br /&gt;
 . /root/.bashrc&lt;br /&gt;
&lt;br /&gt;
= Aquire and Build KDE as root =&lt;br /&gt;
If something fails you may need to make clean.&lt;br /&gt;
&lt;br /&gt;
== automoc ==&lt;br /&gt;
automoc is needed for akonadi.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:automoc&lt;br /&gt;
 cd automoc&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== akonadi ==&lt;br /&gt;
Akonadi keeps personal information management data in a mysql database. It is needed for KDEPIMLIBS.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:akonadi&lt;br /&gt;
 cd akonadi&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== libattica ==&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:attica&lt;br /&gt;
 cd attica&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== shared desktop ontologies ==&lt;br /&gt;
shared desktop ontologies is needed by kdepimlibs in order to build Nepomuk (which is a part of kdelibs)&lt;br /&gt;
 cd&lt;br /&gt;
 wget http://downloads.sourceforge.net/project/oscaf/shared-desktop-ontologies/0.9/shared-desktop-ontologies-0.9.0.tar.bz2&lt;br /&gt;
 bunzip2 shared-desktop-ontologies-0.9.0.tar.bz2&lt;br /&gt;
 tar xvf shared-desktop-ontologies-0.9.0.tar&lt;br /&gt;
 cd shared-desktop-ontologies-0.9.0/&lt;br /&gt;
 cmake . &amp;amp;&amp;amp; make &amp;amp;&amp;amp; make install&lt;br /&gt;
&lt;br /&gt;
== phonon ==&lt;br /&gt;
Phonon is needed for kdebase-runtime&lt;br /&gt;
 cd&lt;br /&gt;
 git clone git://anongit.kde.org/phonon&lt;br /&gt;
 cd phonon&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kdelibs ==&lt;br /&gt;
KDELIBS requires an out-of-source build, that is why it is more complicated to build:&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kdelibs&lt;br /&gt;
 mkdir kdelibs-build&lt;br /&gt;
 cd kdelibs-build&lt;br /&gt;
 cmakekdelibs&lt;br /&gt;
Verify it has been correctly installed - the following must be possible:&lt;br /&gt;
 kde4-config --prefix&lt;br /&gt;
 /usr/local&lt;br /&gt;
&lt;br /&gt;
== kdepimlibs ==&lt;br /&gt;
kdepimlibs is needed for kde-runtime.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kdepimlibs&lt;br /&gt;
 cd kdepimlibs&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kactivities ==&lt;br /&gt;
kactivities is needed for kde-workspace.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kactivities&lt;br /&gt;
 cd kactivities&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kdebase ==&lt;br /&gt;
 cd &lt;br /&gt;
 git clone kde:kde-baseapps&lt;br /&gt;
 git clone kde:konsole&lt;br /&gt;
 git clone kde:kde-workspace&lt;br /&gt;
 git clone kde:kde-runtime &lt;br /&gt;
 cd kde-baseapps&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd konsole&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd kde-workspace&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd kde-runtime&lt;br /&gt;
 cmakekde&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/User:Tstaerk</id>
		<title>User:Tstaerk</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/User:Tstaerk"/>
				<updated>2012-11-03T08:05:07Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= My sites =&lt;br /&gt;
* http://www.staerk.de/thorsten&lt;br /&gt;
* http://www.linuxintro.org&lt;br /&gt;
&lt;br /&gt;
= My bookmarks =&lt;br /&gt;
* [[Talk:Development/Tutorials/D-Bus/Introduction]]&lt;br /&gt;
* http://cia.vc/stats/author/tstaerk&lt;br /&gt;
&lt;br /&gt;
= open a new repo =&lt;br /&gt;
http://sysadmin.kde.org/svnaccount/repo-request.php&lt;br /&gt;
&lt;br /&gt;
= legacy svn =&lt;br /&gt;
I need to use&lt;br /&gt;
 svn co svn+ssh://tstaerk@svn.kde.org/home/kde/trunk/&lt;br /&gt;
&lt;br /&gt;
= What I have done =&lt;br /&gt;
* [[Getting Started/Build/KDE4]]&lt;br /&gt;
* http://wiki.kde.org/tiki-index.php?page=ProgrammingTutorial%2Fdbus&lt;br /&gt;
&lt;br /&gt;
= KnowHow =&lt;br /&gt;
make a non-debug-release =&amp;gt; cmake -DCMAKE_BUILD_TYPE=Release . &amp;amp;&amp;amp; make &amp;amp;&amp;amp; make install&lt;br /&gt;
&lt;br /&gt;
On suse, install into /usr/lib64 instead of /usr/lib =&amp;gt; libsuffix, see http://bugs.scribus.net/view.php?id=6010&lt;br /&gt;
&lt;br /&gt;
= Wiki2mindMap =&lt;br /&gt;
Here's how I draw a mindmap of this wiki:&lt;br /&gt;
== Download all pages ==&lt;br /&gt;
 wget http://developernew.kde.org/Special:Allpages&lt;br /&gt;
 cat &amp;gt;spider&amp;lt;&amp;lt;EOF&lt;br /&gt;
 #!/usr/bin/perl&lt;br /&gt;
 require HTML::LinkExtor;&lt;br /&gt;
 \$p = HTML::LinkExtor-&amp;gt;new(\&amp;amp;parse, &amp;quot;&amp;quot;);&lt;br /&gt;
 sub parse {&lt;br /&gt;
     my(\$tag, %links) = @_;&lt;br /&gt;
     my (\$att, \$url) = @{[%links]};&lt;br /&gt;
     print &amp;quot;\$url\n&amp;quot;;&lt;br /&gt;
 }&lt;br /&gt;
 \$p-&amp;gt;parse_file(\$ARGV[0]);&lt;br /&gt;
 EOF&lt;br /&gt;
 chmod 777 spider&lt;br /&gt;
&lt;br /&gt;
 ./spider Special\:Allpages | \&lt;br /&gt;
 grep &amp;quot;^/&amp;quot; | \&lt;br /&gt;
 grep -v &amp;quot;:&amp;quot; | \&lt;br /&gt;
 grep -v &amp;quot;?&amp;quot; | \&lt;br /&gt;
 while read a&lt;br /&gt;
   do wget &amp;quot;http://developernew.kde.org$a&amp;quot;&lt;br /&gt;
 done&lt;br /&gt;
&lt;br /&gt;
 for file in $(ls --ignore=&amp;quot;*:*&amp;quot;)&lt;br /&gt;
 do ./spider $file | \&lt;br /&gt;
   grep &amp;quot;^/&amp;quot; | \&lt;br /&gt;
   grep -v &amp;quot;:&amp;quot; | \&lt;br /&gt;
   grep -v &amp;quot;?&amp;quot; | \&lt;br /&gt;
   grep -v &amp;quot;Main_Page&amp;quot; | \&lt;br /&gt;
   grep -v &amp;quot;Getting_Started$&amp;quot; | \&lt;br /&gt;
   grep -v &amp;quot;/Contribute$&amp;quot; | \&lt;br /&gt;
   grep -v &amp;quot;^/Projects$&amp;quot; | \&lt;br /&gt;
   grep -v &amp;quot;^/Development$&amp;quot; | \&lt;br /&gt;
   grep -v &amp;quot;^/Policies$&amp;quot; | \&lt;br /&gt;
   grep -v &amp;quot;^/Projects$&amp;quot; | \&lt;br /&gt;
   grep -v &amp;quot;^/Projects/NamingTheWiki$&amp;quot; | \&lt;br /&gt;
   grep -v &amp;quot;^/Schedules$&amp;quot; | \&lt;br /&gt;
   grep -v &amp;quot;^/favicon.ico$&amp;quot; | \&lt;br /&gt;
   grep -v &amp;quot;/opensearch_desc.php$&amp;quot; | \&lt;br /&gt;
   grep -v &amp;quot;^/$&amp;quot; | \&lt;br /&gt;
   grep -v &amp;quot;.png$&amp;quot; | \&lt;br /&gt;
   grep -v &amp;quot;^/Development/Tutorials$&amp;quot; | \&lt;br /&gt;
   sed &amp;quot;s;^/.*/;;&amp;quot; | \&lt;br /&gt;
   while read file2&lt;br /&gt;
   do echo &amp;quot;\&amp;quot;$file\&amp;quot; -&amp;gt; \&amp;quot;$file2\&amp;quot;&amp;quot; &lt;br /&gt;
   done&lt;br /&gt;
 done &amp;gt;datei&lt;br /&gt;
&lt;br /&gt;
 echo &amp;quot;# to create a ps file use 'dot -Tps -o graph.ps graph.dot' (dot it part of the graphviz package)&amp;quot; &amp;gt; graph.dot&lt;br /&gt;
 echo &amp;quot;digraph \&amp;quot;Wikimap\&amp;quot; { &amp;quot; &amp;gt;&amp;gt; graph.dot&lt;br /&gt;
 cat datei &amp;gt;&amp;gt;graph.dot&lt;br /&gt;
 echo &amp;quot;}&amp;quot; &amp;gt;&amp;gt; graph.dot&lt;br /&gt;
 &lt;br /&gt;
 dot -Tps -o graph.ps graph.dot&lt;br /&gt;
&lt;br /&gt;
= Eclipse as IDE =&lt;br /&gt;
* http://javathreads.de/2008/07/subversion-unter-eclipse-ganymede-konfigurieren/&lt;br /&gt;
* http://nienhueser.de/blog/?p=19&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Development/Tutorials/Using_Qt_Creator</id>
		<title>Development/Tutorials/Using Qt Creator</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Development/Tutorials/Using_Qt_Creator"/>
				<updated>2012-06-10T15:14:33Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: /* have QtCreator do the git checkout */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages /&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:2--&amp;gt;&lt;br /&gt;
QtCreator is an IDE from Nokia for Qt. It contains QtDesigner for UI design. This article describes:&lt;br /&gt;
* why to use Qt Creator&lt;br /&gt;
* how to create a new application&lt;br /&gt;
* how to load an existing application&lt;br /&gt;
&lt;br /&gt;
== Why use Qt Creator == &amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
{|align=&amp;quot;right&amp;quot; &lt;br /&gt;
|[[image:Snapshot-qtcreator.png|right|thumb|200px|KDE4's ktimetracker loaded as QtCreator project]]&lt;br /&gt;
|}&lt;br /&gt;
To create your C++ applications you can use any text editor. But life will be much easier if you gain QtCreator's features. That means&lt;br /&gt;
* you can get your source code saved, built and run with one click&lt;br /&gt;
* you get code-completion&lt;br /&gt;
* you can find all places in your source code where you call a function (e.g. &amp;quot;where do I call refresh()&amp;quot;)&lt;br /&gt;
* you can go back to a more recent cursor position with your editor, even if this is in another file&lt;br /&gt;
* you can checkout and commit to Subversion or Git repositories without leaving your workflow&lt;br /&gt;
&lt;br /&gt;
== Creating a new program == &amp;lt;!--T:5--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
Here is a short example of how you can create a &amp;quot;hello world&amp;quot; application. For more information read the [http://qt.nokia.com/doc/designer-manual.html user documentation].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:7--&amp;gt;&lt;br /&gt;
;Step 0:&lt;br /&gt;
Call QtCreator&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
qtcreator&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Then select New File or Project -&amp;gt; Qt C++ Project -&amp;gt; Qt Gui Application -&amp;gt; name = helloworld -&amp;gt; Next -&amp;gt; Next -&amp;gt; Finish&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:8--&amp;gt;&lt;br /&gt;
;Step 1:&lt;br /&gt;
Select Edit -&amp;gt; Forms -&amp;gt; mainwindow.ui. Add the widgets you want by drag-and-drop:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:9--&amp;gt;&lt;br /&gt;
[[File:Designer-step1.png|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:10--&amp;gt;&lt;br /&gt;
;Step 2: &lt;br /&gt;
Select the mainwindow. This is the one un-intuitive step. To lay out the objects in the mainwindow, you do not select the objects in the mainwindow, but the mainwindow itself.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:11--&amp;gt;&lt;br /&gt;
[[File:Designer-step2.png|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:12--&amp;gt;&lt;br /&gt;
;Step 3:&lt;br /&gt;
Select Form -&amp;gt; Lay Out in a &amp;lt;u&amp;gt;G&amp;lt;/u&amp;gt;rid&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:13--&amp;gt;&lt;br /&gt;
[[File:Designer-step3.png|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:14--&amp;gt;&lt;br /&gt;
;Result:&lt;br /&gt;
You get a decent look, and if you resize the window, the widgets resize as well.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:15--&amp;gt;&lt;br /&gt;
[[File:Designer-result.png|200px]]&lt;br /&gt;
&lt;br /&gt;
=== Using KDE libraries === &amp;lt;!--T:16--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:17--&amp;gt;&lt;br /&gt;
To use KDE classes like KMessageBox, you need to tell QtCreator to use the KDE libraries when building. Go to your home directory, change into ''yourproject'' and modify ''yourproject.pro''. Add the line&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;make&amp;quot;&amp;gt;&lt;br /&gt;
LIBS += -lkdeui&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Then you can start using KDE classes in your code.&lt;br /&gt;
&lt;br /&gt;
=== Adding a toolbar === &amp;lt;!--T:18--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:19--&amp;gt;&lt;br /&gt;
To add a toolbar, right-click on the UI and choose &amp;quot;Add Toolbar&amp;quot;. Then you can set icons and text in your mainwindow's constructor with code like this:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp-qt&amp;quot;&amp;gt;&lt;br /&gt;
ui-&amp;gt;toolBar-&amp;gt;addAction(QIcon(&amp;quot;/usr/share/icons/oxygen/22x22/apps/ktip.png&amp;quot;),&amp;quot;hello world&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Development/Tutorials/Using_Qt_Designer|More Info...]]&lt;br /&gt;
&lt;br /&gt;
== Load an existing project == &amp;lt;!--T:20--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:21--&amp;gt;&lt;br /&gt;
This describes how to use QtCreator to integrate existing KDE 4 applications. It has been tested with QtCreator 1.2.80 and SUSE Linux 11.1 but should work same or similar with every combination. As an example KDE application we use [http://userbase.kde.org/ktimetracker ktimetracker] from the kdepim module, other applications should work likewise.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:22--&amp;gt;&lt;br /&gt;
You can either work with code on your disk or have QtCreator do the Subversion checkout.&lt;br /&gt;
&lt;br /&gt;
=== use code from your disk === &amp;lt;!--T:23--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:24--&amp;gt;&lt;br /&gt;
* import the CMakeLists.txt file (File -&amp;gt; Open -&amp;gt; kdepim/CMakeLists.txt)&lt;br /&gt;
* as build directory choose kdepim&lt;br /&gt;
* you will automatically come to a screen where you can run CMake&lt;br /&gt;
* continue with the step &amp;quot;Run cmake&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== have QtCreator do the subversion checkout === &amp;lt;!--T:25--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:26--&amp;gt;&lt;br /&gt;
* choose File -&amp;gt; New File or Project -&amp;gt; Version Control -&amp;gt; Subversion Checkout.&lt;br /&gt;
* enter a Subversion URL like svn://anonsvn.kde.org/home/kde/trunk/KDE/kdepim&lt;br /&gt;
* enter a checkout directory, i.e. the local directory where the code will be checked-out to&lt;br /&gt;
* type finish, see how the checkout starts&lt;br /&gt;
* you will automatically come to a screen where you can run CMake&lt;br /&gt;
* continue with the step &amp;quot;Run cmake&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== have QtCreator do the git checkout === &amp;lt;!--T:27--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:28--&amp;gt;&lt;br /&gt;
* choose File -&amp;gt; New File or Project -&amp;gt; Project from Version Control -&amp;gt; Git Repository Clone.&lt;br /&gt;
* enter a Git URL like git@git.kde.org:/kdepim&lt;br /&gt;
* accept kdepim as checkout directory&lt;br /&gt;
* type finish, see how the checkout starts&lt;br /&gt;
* you will automatically come to a screen where you can run CMake&lt;br /&gt;
* continue with the step &amp;quot;Run cmake&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Run cmake === &amp;lt;!--T:29--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:30--&amp;gt;&lt;br /&gt;
* enter arguments for CMake like &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
/root/kdepim -DCMAKE_INSTALL_PREFIX=/usr/local -DLIB_SUFFIX=64 -DCMAKE_BUILD_TYPE=debugfull&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;DLIB_SUFFIX=64&amp;lt;/tt&amp;gt; means that you want to install your libraries into directories named &amp;lt;tt&amp;gt;lib64&amp;lt;/tt&amp;gt;, not &amp;lt;tt&amp;gt;lib&amp;lt;/tt&amp;gt;. ''/root/kdepim'' is where your source code is.&lt;br /&gt;
* click &amp;quot;Run cmake&amp;quot;&lt;br /&gt;
* note: a .cbp file is created containing many information about the build&lt;br /&gt;
* click &amp;quot;Finish&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Build it === &amp;lt;!--T:31--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:32--&amp;gt;&lt;br /&gt;
* configure QtCreator to build only ktimetracker:&lt;br /&gt;
Projects -&amp;gt; Active run configuration=ktimetracker -&amp;gt; build settings -&amp;gt; build steps -&amp;gt; make -&amp;gt; show details -&amp;gt; activate ktimetracker.&lt;br /&gt;
* configure QtCreator to use 8 logical processors:&lt;br /&gt;
Projects -&amp;gt; Active run configuration=ktimetracker -&amp;gt; build settings -&amp;gt; build steps -&amp;gt; make -&amp;gt; show details -&amp;gt; addtional Arguments = -j8&lt;br /&gt;
* choose Build -&amp;gt; Build All&lt;br /&gt;
&lt;br /&gt;
== See also == &amp;lt;!--T:33--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:34--&amp;gt;&lt;br /&gt;
* [[Development/Tutorials/Using Qt Designer]]&lt;br /&gt;
* [[Getting_Started/Using_an_IDE_with_KDE4#QtCreator]]&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
[[Category:KDE4]]&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/KDE4/on_virtual_machines</id>
		<title>Getting Started/Build/KDE4/on virtual machines</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/KDE4/on_virtual_machines"/>
				<updated>2012-06-10T14:52:25Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: kdepimlibs is again needed :(&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox tutorial|time=3 hours|type=HowTo|distribution=SUSE Linux 12.1|happyreaders=2|unhappyreaders=0}}&lt;br /&gt;
&lt;br /&gt;
This describes how to use a virtual machine for building the latest KDE from sources.&lt;br /&gt;
&lt;br /&gt;
= Virtual Machine Setup =&lt;br /&gt;
Create a virtual machine, e.g. using [http://www.linuxintro.org/wiki/VMWare VMware Player]. Regarding harddisk: KDE 4 fits into 10 GB, however [[User:Tstaerk|I]] recommend 40GB, one partition. Regarding RAM: You will need at least 1GB ram for the virtual machine, of course more is better.&lt;br /&gt;
&lt;br /&gt;
;You will need to set your SUSE CD as your virtual machine's cdrom. &lt;br /&gt;
&lt;br /&gt;
== setup for SSH ==&lt;br /&gt;
To be able to log in to your VM using ssh, stop and disable the firewall:&lt;br /&gt;
 rcSuSEfirewall2 stop&lt;br /&gt;
 chkconfig SuSEfirewall2_setup off&lt;br /&gt;
 chkconfig SuSEfirewall2_init off&lt;br /&gt;
 /etc/init.d/sshd start&lt;br /&gt;
 chkconfig sshd on&lt;br /&gt;
Inside the VM, install some needed packages:&lt;br /&gt;
 yast -i libqt4-devel libsoprano-devel pcre-devel libxslt-devel libxml2-devel docbook-xsl-stylesheets git cmake \&lt;br /&gt;
 libdbusmenu-qt-devel giflib-devel strigi-devel libQtWebKit-devel libqimageblitz-devel libical-devel libgpgme-devel&lt;br /&gt;
&lt;br /&gt;
;Now it is time to do a snapshot or clone from your VM.&lt;br /&gt;
You will be able to return to this machine state whenever you want.&lt;br /&gt;
&lt;br /&gt;
== a few more steps ==&lt;br /&gt;
Open a console as root&lt;br /&gt;
 su -&lt;br /&gt;
&lt;br /&gt;
== on an x64 distribution ==&lt;br /&gt;
If and only if you have a /lib64 path, you are on an x64 distribution.&lt;br /&gt;
Make sure you have the needed environment variables and alias set by having a file /root/.bashrc.&lt;br /&gt;
 cd&lt;br /&gt;
 cat &amp;gt;.bashrc&amp;lt;&amp;lt;EOF &lt;br /&gt;
 export KDEDIR=/usr/local         &lt;br /&gt;
 alias cmakekde=&amp;quot;cmake . -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DLIB_SUFFIX=64 -D[[Development/CMake/Addons_for_KDE#Buildtypes|CMAKE_BUILD_TYPE]]=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias cmakekdelibs=&amp;quot;cmake ../kdelibs -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DLIB_SUFFIX=64 -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias makeqt=&amp;quot;./configure -dbus -openssl -plugin-sql-mysql -libdir /usr/lib64 -prefix /usr &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 export QTDIR=/usr&lt;br /&gt;
 EOF&lt;br /&gt;
 cat &amp;gt;.gitconfig&amp;lt;&amp;lt;EOF&lt;br /&gt;
 [url &amp;quot;git://anongit.kde.org/&amp;quot;]&lt;br /&gt;
     insteadOf = kde:&lt;br /&gt;
 [url &amp;quot;ssh://git@git.kde.org/&amp;quot;]&lt;br /&gt;
     pushInsteadOf = kde:&lt;br /&gt;
 EOF&lt;br /&gt;
Now activate this file&lt;br /&gt;
 . /root/.bashrc&lt;br /&gt;
&lt;br /&gt;
== on another distribution (incl 32bit)==&lt;br /&gt;
Make sure you have the needed environment variables and alias set by having a file /root/.bashrc. &lt;br /&gt;
 cd&lt;br /&gt;
 cat &amp;gt;.bashrc&amp;lt;&amp;lt;EOF&lt;br /&gt;
 export KDEDIR=/usr/local         &lt;br /&gt;
 alias cmakekde=&amp;quot;cmake . -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias cmakekdelibs=&amp;quot;cmake ../kdelibs -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias makeqt=&amp;quot;./configure -dbus -openssl -plugin-sql-mysql -prefix /usr &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 export QTDIR=/usr&lt;br /&gt;
 EOF&lt;br /&gt;
 cat &amp;gt;.gitconfig&amp;lt;&amp;lt;EOF&lt;br /&gt;
 [url &amp;quot;git://anongit.kde.org/&amp;quot;]&lt;br /&gt;
     insteadOf = kde:&lt;br /&gt;
 [url &amp;quot;ssh://git@git.kde.org/&amp;quot;]&lt;br /&gt;
     pushInsteadOf = kde:&lt;br /&gt;
 EOF&lt;br /&gt;
Now activate this file&lt;br /&gt;
 . /root/.bashrc&lt;br /&gt;
&lt;br /&gt;
= Aquire and Build KDE as root =&lt;br /&gt;
If something fails you may need to make clean.&lt;br /&gt;
&lt;br /&gt;
== automoc ==&lt;br /&gt;
automoc is needed for akonadi.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:automoc&lt;br /&gt;
 cd automoc&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== akonadi ==&lt;br /&gt;
Akonadi keeps personal information management data in a mysql database. It is needed for KDEPIMLIBS.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:akonadi&lt;br /&gt;
 cd akonadi&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== libattica ==&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:attica&lt;br /&gt;
 cd attica&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== shared desktop ontologies ==&lt;br /&gt;
shared desktop ontologies is needed by kdepimlibs in order to build Nepomuk (which is a part of kdelibs)&lt;br /&gt;
 cd&lt;br /&gt;
 wget http://downloads.sourceforge.net/project/oscaf/shared-desktop-ontologies/0.9/shared-desktop-ontologies-0.9.0.tar.bz2&lt;br /&gt;
 bunzip2 shared-desktop-ontologies-0.9.0.tar.bz2&lt;br /&gt;
 tar xvf shared-desktop-ontologies-0.9.0.tar&lt;br /&gt;
 cd shared-desktop-ontologies-0.9.0/&lt;br /&gt;
 cmake . &amp;amp;&amp;amp; make &amp;amp;&amp;amp; make install&lt;br /&gt;
&lt;br /&gt;
== phonon ==&lt;br /&gt;
Phonon is needed for kdebase-runtime&lt;br /&gt;
 cd&lt;br /&gt;
 git clone git://anongit.kde.org/phonon&lt;br /&gt;
 cd phonon&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kdelibs ==&lt;br /&gt;
KDELIBS requires an out-of-source build, that is why it is more complicated to build:&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kdelibs&lt;br /&gt;
 mkdir kdelibs-build&lt;br /&gt;
 cd kdelibs-build&lt;br /&gt;
 cmakekdelibs&lt;br /&gt;
Verify it has been correctly installed - the following must be possible:&lt;br /&gt;
 kde4-config --prefix&lt;br /&gt;
 /usr/local&lt;br /&gt;
&lt;br /&gt;
== kdepimlibs ==&lt;br /&gt;
kdepimlibs is needed for kde-runtime.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kdepimlibs&lt;br /&gt;
 cd kdepimlibs&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kactivities ==&lt;br /&gt;
kactivities is needed for kde-workspace.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kactivities&lt;br /&gt;
 cd kactivities&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kdebase ==&lt;br /&gt;
 cd &lt;br /&gt;
 git clone kde:kde-baseapps&lt;br /&gt;
 git clone kde:konsole&lt;br /&gt;
 git clone kde:kde-workspace&lt;br /&gt;
 git clone kde:kde-runtime &lt;br /&gt;
 cd kde-baseapps&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd konsole&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd kde-workspace&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd kde-runtime&lt;br /&gt;
 cmakekde&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/KDE4/on_virtual_machines</id>
		<title>Getting Started/Build/KDE4/on virtual machines</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/KDE4/on_virtual_machines"/>
				<updated>2012-06-10T14:36:02Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: /* setup for SSH */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox tutorial|time=3 hours|type=HowTo|distribution=SUSE Linux 12.1|happyreaders=2|unhappyreaders=0}}&lt;br /&gt;
&lt;br /&gt;
This describes how to use a virtual machine for building the latest KDE from sources.&lt;br /&gt;
&lt;br /&gt;
= Virtual Machine Setup =&lt;br /&gt;
Create a virtual machine, e.g. using [http://www.linuxintro.org/wiki/VMWare VMware Player]. Regarding harddisk: KDE 4 fits into 10 GB, however [[User:Tstaerk|I]] recommend 40GB, one partition. Regarding RAM: You will need at least 1GB ram for the virtual machine, of course more is better.&lt;br /&gt;
&lt;br /&gt;
;You will need to set your SUSE CD as your virtual machine's cdrom. &lt;br /&gt;
&lt;br /&gt;
== setup for SSH ==&lt;br /&gt;
To be able to log in to your VM using ssh, stop and disable the firewall:&lt;br /&gt;
 rcSuSEfirewall2 stop&lt;br /&gt;
 chkconfig SuSEfirewall2_setup off&lt;br /&gt;
 chkconfig SuSEfirewall2_init off&lt;br /&gt;
 /etc/init.d/sshd start&lt;br /&gt;
 chkconfig sshd on&lt;br /&gt;
Inside the VM, install some needed packages:&lt;br /&gt;
 yast -i libqt4-devel libsoprano-devel pcre-devel libxslt-devel libxml2-devel docbook-xsl-stylesheets git cmake \&lt;br /&gt;
 libdbusmenu-qt-devel giflib-devel strigi-devel libQtWebKit-devel libqimageblitz-devel&lt;br /&gt;
&lt;br /&gt;
;Now it is time to do a snapshot or clone from your VM.&lt;br /&gt;
You will be able to return to this machine state whenever you want.&lt;br /&gt;
&lt;br /&gt;
== a few more steps ==&lt;br /&gt;
Open a console as root&lt;br /&gt;
 su -&lt;br /&gt;
&lt;br /&gt;
== on an x64 distribution ==&lt;br /&gt;
If and only if you have a /lib64 path, you are on an x64 distribution.&lt;br /&gt;
Make sure you have the needed environment variables and alias set by having a file /root/.bashrc.&lt;br /&gt;
 cd&lt;br /&gt;
 cat &amp;gt;.bashrc&amp;lt;&amp;lt;EOF &lt;br /&gt;
 export KDEDIR=/usr/local         &lt;br /&gt;
 alias cmakekde=&amp;quot;cmake . -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DLIB_SUFFIX=64 -D[[Development/CMake/Addons_for_KDE#Buildtypes|CMAKE_BUILD_TYPE]]=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias cmakekdelibs=&amp;quot;cmake ../kdelibs -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DLIB_SUFFIX=64 -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias makeqt=&amp;quot;./configure -dbus -openssl -plugin-sql-mysql -libdir /usr/lib64 -prefix /usr &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 export QTDIR=/usr&lt;br /&gt;
 EOF&lt;br /&gt;
 cat &amp;gt;.gitconfig&amp;lt;&amp;lt;EOF&lt;br /&gt;
 [url &amp;quot;git://anongit.kde.org/&amp;quot;]&lt;br /&gt;
     insteadOf = kde:&lt;br /&gt;
 [url &amp;quot;ssh://git@git.kde.org/&amp;quot;]&lt;br /&gt;
     pushInsteadOf = kde:&lt;br /&gt;
 EOF&lt;br /&gt;
Now activate this file&lt;br /&gt;
 . /root/.bashrc&lt;br /&gt;
&lt;br /&gt;
== on another distribution (incl 32bit)==&lt;br /&gt;
Make sure you have the needed environment variables and alias set by having a file /root/.bashrc. &lt;br /&gt;
 cd&lt;br /&gt;
 cat &amp;gt;.bashrc&amp;lt;&amp;lt;EOF&lt;br /&gt;
 export KDEDIR=/usr/local         &lt;br /&gt;
 alias cmakekde=&amp;quot;cmake . -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias cmakekdelibs=&amp;quot;cmake ../kdelibs -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias makeqt=&amp;quot;./configure -dbus -openssl -plugin-sql-mysql -prefix /usr &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 export QTDIR=/usr&lt;br /&gt;
 EOF&lt;br /&gt;
 cat &amp;gt;.gitconfig&amp;lt;&amp;lt;EOF&lt;br /&gt;
 [url &amp;quot;git://anongit.kde.org/&amp;quot;]&lt;br /&gt;
     insteadOf = kde:&lt;br /&gt;
 [url &amp;quot;ssh://git@git.kde.org/&amp;quot;]&lt;br /&gt;
     pushInsteadOf = kde:&lt;br /&gt;
 EOF&lt;br /&gt;
Now activate this file&lt;br /&gt;
 . /root/.bashrc&lt;br /&gt;
&lt;br /&gt;
= Aquire and Build KDE as root =&lt;br /&gt;
If something fails you may need to make clean.&lt;br /&gt;
&lt;br /&gt;
== automoc ==&lt;br /&gt;
automoc is needed for akonadi.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:automoc&lt;br /&gt;
 cd automoc&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== akonadi ==&lt;br /&gt;
Akonadi keeps personal information management data in a mysql database. It is needed for KDEPIMLIBS.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:akonadi&lt;br /&gt;
 cd akonadi&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== libattica ==&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:attica&lt;br /&gt;
 cd attica&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== shared desktop ontologies ==&lt;br /&gt;
shared desktop ontologies is needed by kdepimlibs in order to build Nepomuk (which is a part of kdelibs)&lt;br /&gt;
 cd&lt;br /&gt;
 wget http://downloads.sourceforge.net/project/oscaf/shared-desktop-ontologies/0.9/shared-desktop-ontologies-0.9.0.tar.bz2&lt;br /&gt;
 bunzip2 shared-desktop-ontologies-0.9.0.tar.bz2&lt;br /&gt;
 tar xvf shared-desktop-ontologies-0.9.0.tar&lt;br /&gt;
 cd shared-desktop-ontologies-0.9.0/&lt;br /&gt;
 cmake . &amp;amp;&amp;amp; make &amp;amp;&amp;amp; make install&lt;br /&gt;
&lt;br /&gt;
== phonon ==&lt;br /&gt;
Phonon is needed for kdebase-runtime&lt;br /&gt;
 cd&lt;br /&gt;
 git clone git://anongit.kde.org/phonon&lt;br /&gt;
 cd phonon&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kdelibs ==&lt;br /&gt;
KDELIBS requires an out-of-source build, that is why it is more complicated to build:&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kdelibs&lt;br /&gt;
 mkdir kdelibs-build&lt;br /&gt;
 cd kdelibs-build&lt;br /&gt;
 cmakekdelibs&lt;br /&gt;
Verify it has been correctly installed - the following must be possible:&lt;br /&gt;
 kde4-config --prefix&lt;br /&gt;
 /usr/local&lt;br /&gt;
&lt;br /&gt;
== kactivities ==&lt;br /&gt;
kactivities is needed for kde-workspace.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kactivities&lt;br /&gt;
 cd kactivities&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kdebase ==&lt;br /&gt;
 cd &lt;br /&gt;
 git clone kde:kde-baseapps&lt;br /&gt;
 git clone kde:konsole&lt;br /&gt;
 git clone kde:kde-workspace&lt;br /&gt;
 git clone kde:kde-runtime &lt;br /&gt;
 cd kde-baseapps&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd konsole&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd kde-workspace&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd kde-runtime&lt;br /&gt;
 cmakekde&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Thread:User_talk:Icwiener/thanks</id>
		<title>Thread:User talk:Icwiener/thanks</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Thread:User_talk:Icwiener/thanks"/>
				<updated>2012-06-10T13:57:36Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: New thread: thanks&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;thanks a lot for [[http://techbase.kde.org/index.php?title=Development%2FTutorials%2FUsing_Qt_Creator&amp;amp;action=historysubmit&amp;amp;diff=66374&amp;amp;oldid=66177 this]] --[[User:Tstaerk|Tstaerk]] 14:57, 10 June 2012 (BST)&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/User_talk:Icwiener</id>
		<title>User talk:Icwiener</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/User_talk:Icwiener"/>
				<updated>2012-06-10T13:57:36Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: Talk page autocreated when first thread was posted&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/KDE4/on_virtual_machines</id>
		<title>Getting Started/Build/KDE4/on virtual machines</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/KDE4/on_virtual_machines"/>
				<updated>2012-06-10T13:28:10Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: /* shared desktop ontologies */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox tutorial|time=3 hours|type=HowTo|distribution=SUSE Linux 12.1|happyreaders=2|unhappyreaders=0}}&lt;br /&gt;
&lt;br /&gt;
This describes how to use a virtual machine for building the latest KDE from sources.&lt;br /&gt;
&lt;br /&gt;
= Virtual Machine Setup =&lt;br /&gt;
Create a virtual machine, e.g. using [http://www.linuxintro.org/wiki/VMWare VMware Player]. Regarding harddisk: KDE 4 fits into 10 GB, however [[User:Tstaerk|I]] recommend 40GB, one partition. Regarding RAM: You will need at least 1GB ram for the virtual machine, of course more is better.&lt;br /&gt;
&lt;br /&gt;
;You will need to set your SUSE CD as your virtual machine's cdrom. &lt;br /&gt;
&lt;br /&gt;
== setup for SSH ==&lt;br /&gt;
To be able to log in to your VM using ssh, stop and disable the firewall:&lt;br /&gt;
 rcSuSEfirewall2 stop&lt;br /&gt;
 chkconfig SuSEfirewall2_setup off&lt;br /&gt;
 chkconfig SuSEfirewall2_init off&lt;br /&gt;
 /etc/init.d/sshd start&lt;br /&gt;
 chkconfig sshd on&lt;br /&gt;
Inside the VM, install some needed packages:&lt;br /&gt;
 yast -i libqt4-devel libsoprano-devel pcre-devel libxslt-devel libxml2-devel docbook-xsl-stylesheets git cmake \&lt;br /&gt;
 libdbusmenu-qt-devel giflib-devel strigi-devel libQtWebKit-devel&lt;br /&gt;
&lt;br /&gt;
;Now it is time to do a snapshot or clone from your VM.&lt;br /&gt;
You will be able to return to this machine state whenever you want.&lt;br /&gt;
&lt;br /&gt;
== a few more steps ==&lt;br /&gt;
Open a console as root&lt;br /&gt;
 su -&lt;br /&gt;
&lt;br /&gt;
== on an x64 distribution ==&lt;br /&gt;
If and only if you have a /lib64 path, you are on an x64 distribution.&lt;br /&gt;
Make sure you have the needed environment variables and alias set by having a file /root/.bashrc.&lt;br /&gt;
 cd&lt;br /&gt;
 cat &amp;gt;.bashrc&amp;lt;&amp;lt;EOF &lt;br /&gt;
 export KDEDIR=/usr/local         &lt;br /&gt;
 alias cmakekde=&amp;quot;cmake . -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DLIB_SUFFIX=64 -D[[Development/CMake/Addons_for_KDE#Buildtypes|CMAKE_BUILD_TYPE]]=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias cmakekdelibs=&amp;quot;cmake ../kdelibs -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DLIB_SUFFIX=64 -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias makeqt=&amp;quot;./configure -dbus -openssl -plugin-sql-mysql -libdir /usr/lib64 -prefix /usr &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 export QTDIR=/usr&lt;br /&gt;
 EOF&lt;br /&gt;
 cat &amp;gt;.gitconfig&amp;lt;&amp;lt;EOF&lt;br /&gt;
 [url &amp;quot;git://anongit.kde.org/&amp;quot;]&lt;br /&gt;
     insteadOf = kde:&lt;br /&gt;
 [url &amp;quot;ssh://git@git.kde.org/&amp;quot;]&lt;br /&gt;
     pushInsteadOf = kde:&lt;br /&gt;
 EOF&lt;br /&gt;
Now activate this file&lt;br /&gt;
 . /root/.bashrc&lt;br /&gt;
&lt;br /&gt;
== on another distribution (incl 32bit)==&lt;br /&gt;
Make sure you have the needed environment variables and alias set by having a file /root/.bashrc. &lt;br /&gt;
 cd&lt;br /&gt;
 cat &amp;gt;.bashrc&amp;lt;&amp;lt;EOF&lt;br /&gt;
 export KDEDIR=/usr/local         &lt;br /&gt;
 alias cmakekde=&amp;quot;cmake . -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias cmakekdelibs=&amp;quot;cmake ../kdelibs -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias makeqt=&amp;quot;./configure -dbus -openssl -plugin-sql-mysql -prefix /usr &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 export QTDIR=/usr&lt;br /&gt;
 EOF&lt;br /&gt;
 cat &amp;gt;.gitconfig&amp;lt;&amp;lt;EOF&lt;br /&gt;
 [url &amp;quot;git://anongit.kde.org/&amp;quot;]&lt;br /&gt;
     insteadOf = kde:&lt;br /&gt;
 [url &amp;quot;ssh://git@git.kde.org/&amp;quot;]&lt;br /&gt;
     pushInsteadOf = kde:&lt;br /&gt;
 EOF&lt;br /&gt;
Now activate this file&lt;br /&gt;
 . /root/.bashrc&lt;br /&gt;
&lt;br /&gt;
= Aquire and Build KDE as root =&lt;br /&gt;
If something fails you may need to make clean.&lt;br /&gt;
&lt;br /&gt;
== automoc ==&lt;br /&gt;
automoc is needed for akonadi.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:automoc&lt;br /&gt;
 cd automoc&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== akonadi ==&lt;br /&gt;
Akonadi keeps personal information management data in a mysql database. It is needed for KDEPIMLIBS.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:akonadi&lt;br /&gt;
 cd akonadi&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== libattica ==&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:attica&lt;br /&gt;
 cd attica&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== shared desktop ontologies ==&lt;br /&gt;
shared desktop ontologies is needed by kdepimlibs in order to build Nepomuk (which is a part of kdelibs)&lt;br /&gt;
 cd&lt;br /&gt;
 wget http://downloads.sourceforge.net/project/oscaf/shared-desktop-ontologies/0.9/shared-desktop-ontologies-0.9.0.tar.bz2&lt;br /&gt;
 bunzip2 shared-desktop-ontologies-0.9.0.tar.bz2&lt;br /&gt;
 tar xvf shared-desktop-ontologies-0.9.0.tar&lt;br /&gt;
 cd shared-desktop-ontologies-0.9.0/&lt;br /&gt;
 cmake . &amp;amp;&amp;amp; make &amp;amp;&amp;amp; make install&lt;br /&gt;
&lt;br /&gt;
== phonon ==&lt;br /&gt;
Phonon is needed for kdebase-runtime&lt;br /&gt;
 cd&lt;br /&gt;
 git clone git://anongit.kde.org/phonon&lt;br /&gt;
 cd phonon&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kdelibs ==&lt;br /&gt;
KDELIBS requires an out-of-source build, that is why it is more complicated to build:&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kdelibs&lt;br /&gt;
 mkdir kdelibs-build&lt;br /&gt;
 cd kdelibs-build&lt;br /&gt;
 cmakekdelibs&lt;br /&gt;
Verify it has been correctly installed - the following must be possible:&lt;br /&gt;
 kde4-config --prefix&lt;br /&gt;
 /usr/local&lt;br /&gt;
&lt;br /&gt;
== kactivities ==&lt;br /&gt;
kactivities is needed for kde-workspace.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kactivities&lt;br /&gt;
 cd kactivities&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kdebase ==&lt;br /&gt;
 cd &lt;br /&gt;
 git clone kde:kde-baseapps&lt;br /&gt;
 git clone kde:konsole&lt;br /&gt;
 git clone kde:kde-workspace&lt;br /&gt;
 git clone kde:kde-runtime &lt;br /&gt;
 cd kde-baseapps&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd konsole&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd kde-workspace&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd kde-runtime&lt;br /&gt;
 cmakekde&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/KDE4/on_virtual_machines</id>
		<title>Getting Started/Build/KDE4/on virtual machines</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/KDE4/on_virtual_machines"/>
				<updated>2012-04-01T12:51:40Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: /* shared desktop ontologies */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox tutorial|time=3 hours|type=HowTo|distribution=SUSE Linux 12.1|happyreaders=2|unhappyreaders=0}}&lt;br /&gt;
&lt;br /&gt;
This describes how to use a virtual machine for building the latest KDE from sources.&lt;br /&gt;
&lt;br /&gt;
= Virtual Machine Setup =&lt;br /&gt;
Create a virtual machine, e.g. using [http://www.linuxintro.org/wiki/VMWare VMware Player]. Regarding harddisk: KDE 4 fits into 10 GB, however [[User:Tstaerk|I]] recommend 40GB, one partition. Regarding RAM: You will need at least 1GB ram for the virtual machine, of course more is better.&lt;br /&gt;
&lt;br /&gt;
;You will need to set your SUSE CD as your virtual machine's cdrom. &lt;br /&gt;
&lt;br /&gt;
== setup for SSH ==&lt;br /&gt;
To be able to log in to your VM using ssh, stop and disable the firewall:&lt;br /&gt;
 rcSuSEfirewall2 stop&lt;br /&gt;
 chkconfig SuSEfirewall2_setup off&lt;br /&gt;
 chkconfig SuSEfirewall2_init off&lt;br /&gt;
 /etc/init.d/sshd start&lt;br /&gt;
 chkconfig sshd on&lt;br /&gt;
Inside the VM, install some needed packages:&lt;br /&gt;
 yast -i libqt4-devel libsoprano-devel pcre-devel libxslt-devel libxml2-devel docbook-xsl-stylesheets git cmake \&lt;br /&gt;
 libdbusmenu-qt-devel giflib-devel strigi-devel libQtWebKit-devel&lt;br /&gt;
&lt;br /&gt;
;Now it is time to do a snapshot or clone from your VM.&lt;br /&gt;
You will be able to return to this machine state whenever you want.&lt;br /&gt;
&lt;br /&gt;
== a few more steps ==&lt;br /&gt;
Open a console as root&lt;br /&gt;
 su -&lt;br /&gt;
&lt;br /&gt;
== on an x64 distribution ==&lt;br /&gt;
If and only if you have a /lib64 path, you are on an x64 distribution.&lt;br /&gt;
Make sure you have the needed environment variables and alias set by having a file /root/.bashrc.&lt;br /&gt;
 cd&lt;br /&gt;
 cat &amp;gt;.bashrc&amp;lt;&amp;lt;EOF &lt;br /&gt;
 export KDEDIR=/usr/local         &lt;br /&gt;
 alias cmakekde=&amp;quot;cmake . -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DLIB_SUFFIX=64 -D[[Development/CMake/Addons_for_KDE#Buildtypes|CMAKE_BUILD_TYPE]]=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias cmakekdelibs=&amp;quot;cmake ../kdelibs -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DLIB_SUFFIX=64 -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias makeqt=&amp;quot;./configure -dbus -openssl -plugin-sql-mysql -libdir /usr/lib64 -prefix /usr &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 export QTDIR=/usr&lt;br /&gt;
 EOF&lt;br /&gt;
 cat &amp;gt;.gitconfig&amp;lt;&amp;lt;EOF&lt;br /&gt;
 [url &amp;quot;git://anongit.kde.org/&amp;quot;]&lt;br /&gt;
     insteadOf = kde:&lt;br /&gt;
 [url &amp;quot;ssh://git@git.kde.org/&amp;quot;]&lt;br /&gt;
     pushInsteadOf = kde:&lt;br /&gt;
 EOF&lt;br /&gt;
Now activate this file&lt;br /&gt;
 . /root/.bashrc&lt;br /&gt;
&lt;br /&gt;
== on another distribution (incl 32bit)==&lt;br /&gt;
Make sure you have the needed environment variables and alias set by having a file /root/.bashrc. &lt;br /&gt;
 cd&lt;br /&gt;
 cat &amp;gt;.bashrc&amp;lt;&amp;lt;EOF&lt;br /&gt;
 export KDEDIR=/usr/local         &lt;br /&gt;
 alias cmakekde=&amp;quot;cmake . -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias cmakekdelibs=&amp;quot;cmake ../kdelibs -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias makeqt=&amp;quot;./configure -dbus -openssl -plugin-sql-mysql -prefix /usr &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 export QTDIR=/usr&lt;br /&gt;
 EOF&lt;br /&gt;
 cat &amp;gt;.gitconfig&amp;lt;&amp;lt;EOF&lt;br /&gt;
 [url &amp;quot;git://anongit.kde.org/&amp;quot;]&lt;br /&gt;
     insteadOf = kde:&lt;br /&gt;
 [url &amp;quot;ssh://git@git.kde.org/&amp;quot;]&lt;br /&gt;
     pushInsteadOf = kde:&lt;br /&gt;
 EOF&lt;br /&gt;
Now activate this file&lt;br /&gt;
 . /root/.bashrc&lt;br /&gt;
&lt;br /&gt;
= Aquire and Build KDE as root =&lt;br /&gt;
If something fails you may need to make clean.&lt;br /&gt;
&lt;br /&gt;
== automoc ==&lt;br /&gt;
automoc is needed for akonadi.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:automoc&lt;br /&gt;
 cd automoc&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== akonadi ==&lt;br /&gt;
Akonadi keeps personal information management data in a mysql database. It is needed for KDEPIMLIBS.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:akonadi&lt;br /&gt;
 cd akonadi&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== libattica ==&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:attica&lt;br /&gt;
 cd attica&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== shared desktop ontologies ==&lt;br /&gt;
shared desktop ontologies is needed by kdepimlibs in order to build Nepomuk (which is a part of kdelibs)&lt;br /&gt;
 cd&lt;br /&gt;
 wget http://downloads.sourceforge.net/project/oscaf/shared-desktop-ontologies/0.8/shared-desktop-ontologies-0.9.0.tar.bz2&lt;br /&gt;
 bunzip2 shared-desktop-ontologies-0.9.0.tar.bz2&lt;br /&gt;
 tar xvf shared-desktop-ontologies-0.9.0.tar&lt;br /&gt;
 cd shared-desktop-ontologies-0.9.0/&lt;br /&gt;
 cmake . &amp;amp;&amp;amp; make &amp;amp;&amp;amp; make install&lt;br /&gt;
&lt;br /&gt;
== phonon ==&lt;br /&gt;
Phonon is needed for kdebase-runtime&lt;br /&gt;
 cd&lt;br /&gt;
 git clone git://anongit.kde.org/phonon&lt;br /&gt;
 cd phonon&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kdelibs ==&lt;br /&gt;
KDELIBS requires an out-of-source build, that is why it is more complicated to build:&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kdelibs&lt;br /&gt;
 mkdir kdelibs-build&lt;br /&gt;
 cd kdelibs-build&lt;br /&gt;
 cmakekdelibs&lt;br /&gt;
Verify it has been correctly installed - the following must be possible:&lt;br /&gt;
 kde4-config --prefix&lt;br /&gt;
 /usr/local&lt;br /&gt;
&lt;br /&gt;
== kactivities ==&lt;br /&gt;
kactivities is needed for kde-workspace.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kactivities&lt;br /&gt;
 cd kactivities&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kdebase ==&lt;br /&gt;
 cd &lt;br /&gt;
 git clone kde:kde-baseapps&lt;br /&gt;
 git clone kde:konsole&lt;br /&gt;
 git clone kde:kde-workspace&lt;br /&gt;
 git clone kde:kde-runtime &lt;br /&gt;
 cd kde-baseapps&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd konsole&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd kde-workspace&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd kde-runtime&lt;br /&gt;
 cmakekde&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/KDE4/on_virtual_machines</id>
		<title>Getting Started/Build/KDE4/on virtual machines</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/KDE4/on_virtual_machines"/>
				<updated>2012-04-01T12:26:15Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: no longer needed with SUSE 12.1.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox tutorial|time=3 hours|type=HowTo|distribution=SUSE Linux 12.1|happyreaders=2|unhappyreaders=0}}&lt;br /&gt;
&lt;br /&gt;
This describes how to use a virtual machine for building the latest KDE from sources.&lt;br /&gt;
&lt;br /&gt;
= Virtual Machine Setup =&lt;br /&gt;
Create a virtual machine, e.g. using [http://www.linuxintro.org/wiki/VMWare VMware Player]. Regarding harddisk: KDE 4 fits into 10 GB, however [[User:Tstaerk|I]] recommend 40GB, one partition. Regarding RAM: You will need at least 1GB ram for the virtual machine, of course more is better.&lt;br /&gt;
&lt;br /&gt;
;You will need to set your SUSE CD as your virtual machine's cdrom. &lt;br /&gt;
&lt;br /&gt;
== setup for SSH ==&lt;br /&gt;
To be able to log in to your VM using ssh, stop and disable the firewall:&lt;br /&gt;
 rcSuSEfirewall2 stop&lt;br /&gt;
 chkconfig SuSEfirewall2_setup off&lt;br /&gt;
 chkconfig SuSEfirewall2_init off&lt;br /&gt;
 /etc/init.d/sshd start&lt;br /&gt;
 chkconfig sshd on&lt;br /&gt;
Inside the VM, install some needed packages:&lt;br /&gt;
 yast -i libqt4-devel libsoprano-devel pcre-devel libxslt-devel libxml2-devel docbook-xsl-stylesheets git cmake \&lt;br /&gt;
 libdbusmenu-qt-devel giflib-devel strigi-devel libQtWebKit-devel&lt;br /&gt;
&lt;br /&gt;
;Now it is time to do a snapshot or clone from your VM.&lt;br /&gt;
You will be able to return to this machine state whenever you want.&lt;br /&gt;
&lt;br /&gt;
== a few more steps ==&lt;br /&gt;
Open a console as root&lt;br /&gt;
 su -&lt;br /&gt;
&lt;br /&gt;
== on an x64 distribution ==&lt;br /&gt;
If and only if you have a /lib64 path, you are on an x64 distribution.&lt;br /&gt;
Make sure you have the needed environment variables and alias set by having a file /root/.bashrc.&lt;br /&gt;
 cd&lt;br /&gt;
 cat &amp;gt;.bashrc&amp;lt;&amp;lt;EOF &lt;br /&gt;
 export KDEDIR=/usr/local         &lt;br /&gt;
 alias cmakekde=&amp;quot;cmake . -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DLIB_SUFFIX=64 -D[[Development/CMake/Addons_for_KDE#Buildtypes|CMAKE_BUILD_TYPE]]=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias cmakekdelibs=&amp;quot;cmake ../kdelibs -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DLIB_SUFFIX=64 -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias makeqt=&amp;quot;./configure -dbus -openssl -plugin-sql-mysql -libdir /usr/lib64 -prefix /usr &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 export QTDIR=/usr&lt;br /&gt;
 EOF&lt;br /&gt;
 cat &amp;gt;.gitconfig&amp;lt;&amp;lt;EOF&lt;br /&gt;
 [url &amp;quot;git://anongit.kde.org/&amp;quot;]&lt;br /&gt;
     insteadOf = kde:&lt;br /&gt;
 [url &amp;quot;ssh://git@git.kde.org/&amp;quot;]&lt;br /&gt;
     pushInsteadOf = kde:&lt;br /&gt;
 EOF&lt;br /&gt;
Now activate this file&lt;br /&gt;
 . /root/.bashrc&lt;br /&gt;
&lt;br /&gt;
== on another distribution (incl 32bit)==&lt;br /&gt;
Make sure you have the needed environment variables and alias set by having a file /root/.bashrc. &lt;br /&gt;
 cd&lt;br /&gt;
 cat &amp;gt;.bashrc&amp;lt;&amp;lt;EOF&lt;br /&gt;
 export KDEDIR=/usr/local         &lt;br /&gt;
 alias cmakekde=&amp;quot;cmake . -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias cmakekdelibs=&amp;quot;cmake ../kdelibs -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias makeqt=&amp;quot;./configure -dbus -openssl -plugin-sql-mysql -prefix /usr &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 export QTDIR=/usr&lt;br /&gt;
 EOF&lt;br /&gt;
 cat &amp;gt;.gitconfig&amp;lt;&amp;lt;EOF&lt;br /&gt;
 [url &amp;quot;git://anongit.kde.org/&amp;quot;]&lt;br /&gt;
     insteadOf = kde:&lt;br /&gt;
 [url &amp;quot;ssh://git@git.kde.org/&amp;quot;]&lt;br /&gt;
     pushInsteadOf = kde:&lt;br /&gt;
 EOF&lt;br /&gt;
Now activate this file&lt;br /&gt;
 . /root/.bashrc&lt;br /&gt;
&lt;br /&gt;
= Aquire and Build KDE as root =&lt;br /&gt;
If something fails you may need to make clean.&lt;br /&gt;
&lt;br /&gt;
== automoc ==&lt;br /&gt;
automoc is needed for akonadi.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:automoc&lt;br /&gt;
 cd automoc&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== akonadi ==&lt;br /&gt;
Akonadi keeps personal information management data in a mysql database. It is needed for KDEPIMLIBS.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:akonadi&lt;br /&gt;
 cd akonadi&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== libattica ==&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:attica&lt;br /&gt;
 cd attica&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== shared desktop ontologies ==&lt;br /&gt;
shared desktop ontologies is needed by kdepimlibs in order to build Nepomuk (which is a part of kdelibs)&lt;br /&gt;
 cd&lt;br /&gt;
 wget http://downloads.sourceforge.net/project/oscaf/shared-desktop-ontologies/0.8/shared-desktop-ontologies-0.8.0.tar.bz2&lt;br /&gt;
 bunzip2 shared-desktop-ontologies-0.8.0.tar.bz2&lt;br /&gt;
 tar xvf shared-desktop-ontologies-0.8.0.tar&lt;br /&gt;
 cd shared-desktop-ontologies-0.8.0/&lt;br /&gt;
 cmake . &amp;amp;&amp;amp; make &amp;amp;&amp;amp; make install&lt;br /&gt;
&lt;br /&gt;
== phonon ==&lt;br /&gt;
Phonon is needed for kdebase-runtime&lt;br /&gt;
 cd&lt;br /&gt;
 git clone git://anongit.kde.org/phonon&lt;br /&gt;
 cd phonon&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kdelibs ==&lt;br /&gt;
KDELIBS requires an out-of-source build, that is why it is more complicated to build:&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kdelibs&lt;br /&gt;
 mkdir kdelibs-build&lt;br /&gt;
 cd kdelibs-build&lt;br /&gt;
 cmakekdelibs&lt;br /&gt;
Verify it has been correctly installed - the following must be possible:&lt;br /&gt;
 kde4-config --prefix&lt;br /&gt;
 /usr/local&lt;br /&gt;
&lt;br /&gt;
== kactivities ==&lt;br /&gt;
kactivities is needed for kde-workspace.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kactivities&lt;br /&gt;
 cd kactivities&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kdebase ==&lt;br /&gt;
 cd &lt;br /&gt;
 git clone kde:kde-baseapps&lt;br /&gt;
 git clone kde:konsole&lt;br /&gt;
 git clone kde:kde-workspace&lt;br /&gt;
 git clone kde:kde-runtime &lt;br /&gt;
 cd kde-baseapps&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd konsole&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd kde-workspace&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd kde-runtime&lt;br /&gt;
 cmakekde&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/KDE4/on_virtual_machines</id>
		<title>Getting Started/Build/KDE4/on virtual machines</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/KDE4/on_virtual_machines"/>
				<updated>2012-02-12T13:44:48Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: /* setup for SSH */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox tutorial|time=3 hours|type=HowTo|distribution=SUSE Linux 12.1|happyreaders=2|unhappyreaders=0}}&lt;br /&gt;
&lt;br /&gt;
This describes how to use a virtual machine for building the latest KDE from sources.&lt;br /&gt;
&lt;br /&gt;
= Virtual Machine Setup =&lt;br /&gt;
Create a virtual machine, e.g. using [http://www.linuxintro.org/wiki/VMWare VMware Player]. Regarding harddisk: KDE 4 fits into 10 GB, however [[User:Tstaerk|I]] recommend 40GB, one partition. Regarding RAM: You will need at least 1GB ram for the virtual machine, of course more is better.&lt;br /&gt;
&lt;br /&gt;
;You will need to set your SUSE CD as your virtual machine's cdrom. &lt;br /&gt;
&lt;br /&gt;
== setup for SSH ==&lt;br /&gt;
To be able to log in to your VM using ssh, stop and disable the firewall:&lt;br /&gt;
 rcSuSEfirewall2 stop&lt;br /&gt;
 chkconfig SuSEfirewall2_setup off&lt;br /&gt;
 chkconfig SuSEfirewall2_init off&lt;br /&gt;
 /etc/init.d/sshd start&lt;br /&gt;
 chkconfig sshd on&lt;br /&gt;
Inside the VM, install some needed packages:&lt;br /&gt;
 yast -i libqt4-devel libsoprano-devel pcre-devel libxslt-devel libxml2-devel docbook-xsl-stylesheets git cmake \&lt;br /&gt;
 libdbusmenu-qt-devel giflib-devel strigi-devel libQtWebKit-devel&lt;br /&gt;
&lt;br /&gt;
;Now it is time to do a snapshot or clone from your VM.&lt;br /&gt;
You will be able to return to this machine state whenever you want.&lt;br /&gt;
&lt;br /&gt;
== a few more steps ==&lt;br /&gt;
Open a console as root&lt;br /&gt;
 su -&lt;br /&gt;
&lt;br /&gt;
== on an x64 distribution ==&lt;br /&gt;
If and only if you have a /lib64 path, you are on an x64 distribution.&lt;br /&gt;
Make sure you have the needed environment variables and alias set by having a file /root/.bashrc.&lt;br /&gt;
 cd&lt;br /&gt;
 cat &amp;gt;.bashrc&amp;lt;&amp;lt;EOF &lt;br /&gt;
 export KDEDIR=/usr/local         &lt;br /&gt;
 alias cmakekde=&amp;quot;cmake . -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DLIB_SUFFIX=64 -D[[Development/CMake/Addons_for_KDE#Buildtypes|CMAKE_BUILD_TYPE]]=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias cmakekdelibs=&amp;quot;cmake ../kdelibs -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DLIB_SUFFIX=64 -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias makeqt=&amp;quot;./configure -dbus -openssl -plugin-sql-mysql -libdir /usr/lib64 -prefix /usr &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 export QTDIR=/usr&lt;br /&gt;
 EOF&lt;br /&gt;
 cat &amp;gt;.gitconfig&amp;lt;&amp;lt;EOF&lt;br /&gt;
 [url &amp;quot;git://anongit.kde.org/&amp;quot;]&lt;br /&gt;
     insteadOf = kde:&lt;br /&gt;
 [url &amp;quot;ssh://git@git.kde.org/&amp;quot;]&lt;br /&gt;
     pushInsteadOf = kde:&lt;br /&gt;
 EOF&lt;br /&gt;
Now activate this file&lt;br /&gt;
 . /root/.bashrc&lt;br /&gt;
&lt;br /&gt;
== on another distribution (incl 32bit)==&lt;br /&gt;
Make sure you have the needed environment variables and alias set by having a file /root/.bashrc. &lt;br /&gt;
 cd&lt;br /&gt;
 cat &amp;gt;.bashrc&amp;lt;&amp;lt;EOF&lt;br /&gt;
 export KDEDIR=/usr/local         &lt;br /&gt;
 alias cmakekde=&amp;quot;cmake . -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias cmakekdelibs=&amp;quot;cmake ../kdelibs -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias makeqt=&amp;quot;./configure -dbus -openssl -plugin-sql-mysql -prefix /usr &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 export QTDIR=/usr&lt;br /&gt;
 EOF&lt;br /&gt;
 cat &amp;gt;.gitconfig&amp;lt;&amp;lt;EOF&lt;br /&gt;
 [url &amp;quot;git://anongit.kde.org/&amp;quot;]&lt;br /&gt;
     insteadOf = kde:&lt;br /&gt;
 [url &amp;quot;ssh://git@git.kde.org/&amp;quot;]&lt;br /&gt;
     pushInsteadOf = kde:&lt;br /&gt;
 EOF&lt;br /&gt;
Now activate this file&lt;br /&gt;
 . /root/.bashrc&lt;br /&gt;
&lt;br /&gt;
= Aquire and Build KDE as root =&lt;br /&gt;
If something fails you may need to make clean.&lt;br /&gt;
&lt;br /&gt;
== automoc ==&lt;br /&gt;
automoc is needed for akonadi.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:automoc&lt;br /&gt;
 cd automoc&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== akonadi ==&lt;br /&gt;
Akonadi keeps personal information management data in a mysql database. It is needed for KDEPIMLIBS.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:akonadi&lt;br /&gt;
 cd akonadi&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== libattica ==&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:attica&lt;br /&gt;
 cd attica&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== shared desktop ontologies ==&lt;br /&gt;
shared desktop ontologies is needed by kdepimlibs in order to build Nepomuk (which is a part of kdelibs)&lt;br /&gt;
 cd&lt;br /&gt;
 wget http://downloads.sourceforge.net/project/oscaf/shared-desktop-ontologies/0.8/shared-desktop-ontologies-0.8.0.tar.bz2&lt;br /&gt;
 bunzip2 shared-desktop-ontologies-0.8.0.tar.bz2&lt;br /&gt;
 tar xvf shared-desktop-ontologies-0.8.0.tar&lt;br /&gt;
 cd shared-desktop-ontologies-0.8.0/&lt;br /&gt;
 cmake . &amp;amp;&amp;amp; make &amp;amp;&amp;amp; make install&lt;br /&gt;
&lt;br /&gt;
== phonon ==&lt;br /&gt;
Phonon is needed for kdebase-runtime&lt;br /&gt;
 cd&lt;br /&gt;
 git clone git://anongit.kde.org/phonon&lt;br /&gt;
 cd phonon&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kdelibs ==&lt;br /&gt;
KDELIBS requires an out-of-source build, that is why it is more complicated to build:&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kdelibs&lt;br /&gt;
 mkdir kdelibs-build&lt;br /&gt;
 cd kdelibs-build&lt;br /&gt;
 cmakekdelibs&lt;br /&gt;
Verify it has been correctly installed - the following must be possible:&lt;br /&gt;
 kde4-config --prefix&lt;br /&gt;
 /usr/local&lt;br /&gt;
&lt;br /&gt;
== kactivities ==&lt;br /&gt;
kactivities is needed for kde-workspace.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kactivities&lt;br /&gt;
 cd kactivities&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kdebase ==&lt;br /&gt;
 cd &lt;br /&gt;
 git clone kde:kde-baseapps&lt;br /&gt;
 git clone kde:konsole&lt;br /&gt;
 git clone kde:kde-workspace&lt;br /&gt;
 git clone kde:kde-runtime &lt;br /&gt;
 cd kde-baseapps&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd konsole&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd kde-workspace&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd kde-runtime&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
= Config =&lt;br /&gt;
First allow root login. You will need it as you do not have another login:&lt;br /&gt;
 sed -i &amp;quot;s/AllowRootLogin.*/AllowRootLogin=true/g&amp;quot; /usr/local/share/config/kdm/kdmrc&lt;br /&gt;
Now stop your running display manager:&lt;br /&gt;
 /etc/init.d/xdm stop&lt;br /&gt;
And start your self-compiled display manager:&lt;br /&gt;
 kdm&lt;br /&gt;
To enable automated startup of your kdm, you need to change a SUSE-specific path in /etc/init.d/xdm:&lt;br /&gt;
 KDM4_BIN=/usr/local/bin/kdm&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/KDE4/on_virtual_machines</id>
		<title>Getting Started/Build/KDE4/on virtual machines</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/KDE4/on_virtual_machines"/>
				<updated>2012-02-12T13:29:55Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: /* setup for SSH */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox tutorial|time=3 hours|type=HowTo|distribution=SUSE Linux 12.1|happyreaders=2|unhappyreaders=0}}&lt;br /&gt;
&lt;br /&gt;
This describes how to use a virtual machine for building the latest KDE from sources.&lt;br /&gt;
&lt;br /&gt;
= Virtual Machine Setup =&lt;br /&gt;
Create a virtual machine, e.g. using [http://www.linuxintro.org/wiki/VMWare VMware Player]. Regarding harddisk: KDE 4 fits into 10 GB, however [[User:Tstaerk|I]] recommend 40GB, one partition. Regarding RAM: You will need at least 1GB ram for the virtual machine, of course more is better.&lt;br /&gt;
&lt;br /&gt;
;You will need to set your SUSE CD as your virtual machine's cdrom. &lt;br /&gt;
&lt;br /&gt;
== setup for SSH ==&lt;br /&gt;
To be able to log in to your VM using ssh, stop and disable the firewall:&lt;br /&gt;
 rcSuSEfirewall2 stop&lt;br /&gt;
 chkconfig SuSEfirewall2_setup off&lt;br /&gt;
 chkconfig SuSEfirewall2_init off&lt;br /&gt;
 /etc/init.d/sshd start&lt;br /&gt;
 chkconfig sshd on&lt;br /&gt;
Inside the VM, install some needed packages:&lt;br /&gt;
 yast -i libqt4-devel libsoprano-devel pcre-devel libxslt-devel libxml2-devel docbook-xsl-stylesheets git cmake \&lt;br /&gt;
 libdbusmenu-qt-devel giflib-devel strigi-devel&lt;br /&gt;
&lt;br /&gt;
;Now it is time to do a snapshot or clone from your VM.&lt;br /&gt;
You will be able to return to this machine state whenever you want.&lt;br /&gt;
&lt;br /&gt;
== a few more steps ==&lt;br /&gt;
Open a console as root&lt;br /&gt;
 su -&lt;br /&gt;
&lt;br /&gt;
== on an x64 distribution ==&lt;br /&gt;
If and only if you have a /lib64 path, you are on an x64 distribution.&lt;br /&gt;
Make sure you have the needed environment variables and alias set by having a file /root/.bashrc.&lt;br /&gt;
 cd&lt;br /&gt;
 cat &amp;gt;.bashrc&amp;lt;&amp;lt;EOF &lt;br /&gt;
 export KDEDIR=/usr/local         &lt;br /&gt;
 alias cmakekde=&amp;quot;cmake . -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DLIB_SUFFIX=64 -D[[Development/CMake/Addons_for_KDE#Buildtypes|CMAKE_BUILD_TYPE]]=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias cmakekdelibs=&amp;quot;cmake ../kdelibs -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DLIB_SUFFIX=64 -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias makeqt=&amp;quot;./configure -dbus -openssl -plugin-sql-mysql -libdir /usr/lib64 -prefix /usr &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 export QTDIR=/usr&lt;br /&gt;
 EOF&lt;br /&gt;
 cat &amp;gt;.gitconfig&amp;lt;&amp;lt;EOF&lt;br /&gt;
 [url &amp;quot;git://anongit.kde.org/&amp;quot;]&lt;br /&gt;
     insteadOf = kde:&lt;br /&gt;
 [url &amp;quot;ssh://git@git.kde.org/&amp;quot;]&lt;br /&gt;
     pushInsteadOf = kde:&lt;br /&gt;
 EOF&lt;br /&gt;
Now activate this file&lt;br /&gt;
 . /root/.bashrc&lt;br /&gt;
&lt;br /&gt;
== on another distribution (incl 32bit)==&lt;br /&gt;
Make sure you have the needed environment variables and alias set by having a file /root/.bashrc. &lt;br /&gt;
 cd&lt;br /&gt;
 cat &amp;gt;.bashrc&amp;lt;&amp;lt;EOF&lt;br /&gt;
 export KDEDIR=/usr/local         &lt;br /&gt;
 alias cmakekde=&amp;quot;cmake . -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias cmakekdelibs=&amp;quot;cmake ../kdelibs -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias makeqt=&amp;quot;./configure -dbus -openssl -plugin-sql-mysql -prefix /usr &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 export QTDIR=/usr&lt;br /&gt;
 EOF&lt;br /&gt;
 cat &amp;gt;.gitconfig&amp;lt;&amp;lt;EOF&lt;br /&gt;
 [url &amp;quot;git://anongit.kde.org/&amp;quot;]&lt;br /&gt;
     insteadOf = kde:&lt;br /&gt;
 [url &amp;quot;ssh://git@git.kde.org/&amp;quot;]&lt;br /&gt;
     pushInsteadOf = kde:&lt;br /&gt;
 EOF&lt;br /&gt;
Now activate this file&lt;br /&gt;
 . /root/.bashrc&lt;br /&gt;
&lt;br /&gt;
= Aquire and Build KDE as root =&lt;br /&gt;
If something fails you may need to make clean.&lt;br /&gt;
&lt;br /&gt;
== automoc ==&lt;br /&gt;
automoc is needed for akonadi.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:automoc&lt;br /&gt;
 cd automoc&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== akonadi ==&lt;br /&gt;
Akonadi keeps personal information management data in a mysql database. It is needed for KDEPIMLIBS.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:akonadi&lt;br /&gt;
 cd akonadi&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== libattica ==&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:attica&lt;br /&gt;
 cd attica&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== shared desktop ontologies ==&lt;br /&gt;
shared desktop ontologies is needed by kdepimlibs in order to build Nepomuk (which is a part of kdelibs)&lt;br /&gt;
 cd&lt;br /&gt;
 wget http://downloads.sourceforge.net/project/oscaf/shared-desktop-ontologies/0.8/shared-desktop-ontologies-0.8.0.tar.bz2&lt;br /&gt;
 bunzip2 shared-desktop-ontologies-0.8.0.tar.bz2&lt;br /&gt;
 tar xvf shared-desktop-ontologies-0.8.0.tar&lt;br /&gt;
 cd shared-desktop-ontologies-0.8.0/&lt;br /&gt;
 cmake . &amp;amp;&amp;amp; make &amp;amp;&amp;amp; make install&lt;br /&gt;
&lt;br /&gt;
== phonon ==&lt;br /&gt;
Phonon is needed for kdebase-runtime&lt;br /&gt;
 cd&lt;br /&gt;
 git clone git://anongit.kde.org/phonon&lt;br /&gt;
 cd phonon&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kdelibs ==&lt;br /&gt;
KDELIBS requires an out-of-source build, that is why it is more complicated to build:&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kdelibs&lt;br /&gt;
 mkdir kdelibs-build&lt;br /&gt;
 cd kdelibs-build&lt;br /&gt;
 cmakekdelibs&lt;br /&gt;
Verify it has been correctly installed - the following must be possible:&lt;br /&gt;
 kde4-config --prefix&lt;br /&gt;
 /usr/local&lt;br /&gt;
&lt;br /&gt;
== kactivities ==&lt;br /&gt;
kactivities is needed for kde-workspace.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kactivities&lt;br /&gt;
 cd kactivities&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kdebase ==&lt;br /&gt;
 cd &lt;br /&gt;
 git clone kde:kde-baseapps&lt;br /&gt;
 git clone kde:konsole&lt;br /&gt;
 git clone kde:kde-workspace&lt;br /&gt;
 git clone kde:kde-runtime &lt;br /&gt;
 cd kde-baseapps&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd konsole&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd kde-workspace&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd kde-runtime&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
= Config =&lt;br /&gt;
First allow root login. You will need it as you do not have another login:&lt;br /&gt;
 sed -i &amp;quot;s/AllowRootLogin.*/AllowRootLogin=true/g&amp;quot; /usr/local/share/config/kdm/kdmrc&lt;br /&gt;
Now stop your running display manager:&lt;br /&gt;
 /etc/init.d/xdm stop&lt;br /&gt;
And start your self-compiled display manager:&lt;br /&gt;
 kdm&lt;br /&gt;
To enable automated startup of your kdm, you need to change a SUSE-specific path in /etc/init.d/xdm:&lt;br /&gt;
 KDM4_BIN=/usr/local/bin/kdm&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/KDE4/on_virtual_machines</id>
		<title>Getting Started/Build/KDE4/on virtual machines</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/KDE4/on_virtual_machines"/>
				<updated>2012-02-12T13:28:51Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: better use dbusmenu-qt-devel&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox tutorial|time=3 hours|type=HowTo|distribution=SUSE Linux 12.1|happyreaders=2|unhappyreaders=0}}&lt;br /&gt;
&lt;br /&gt;
This describes how to use a virtual machine for building the latest KDE from sources.&lt;br /&gt;
&lt;br /&gt;
= Virtual Machine Setup =&lt;br /&gt;
Create a virtual machine, e.g. using [http://www.linuxintro.org/wiki/VMWare VMware Player]. Regarding harddisk: KDE 4 fits into 10 GB, however [[User:Tstaerk|I]] recommend 40GB, one partition. Regarding RAM: You will need at least 1GB ram for the virtual machine, of course more is better.&lt;br /&gt;
&lt;br /&gt;
;You will need to set your SUSE CD as your virtual machine's cdrom. &lt;br /&gt;
&lt;br /&gt;
== setup for SSH ==&lt;br /&gt;
To be able to log in to your VM using ssh, stop and disable the firewall:&lt;br /&gt;
 rcSuSEfirewall2 stop&lt;br /&gt;
 chkconfig SuSEfirewall2_setup off&lt;br /&gt;
 chkconfig SuSEfirewall2_init off&lt;br /&gt;
 /etc/init.d/sshd start&lt;br /&gt;
 chkconfig sshd on&lt;br /&gt;
Inside the VM, install some needed packages:&lt;br /&gt;
 yast -i libqt4-devel libsoprano-devel pcre-devel libxslt-devel libxml2-devel docbook-xsl-stylesheets git cmake&lt;br /&gt;
&lt;br /&gt;
;Now it is time to do a snapshot or clone from your VM.&lt;br /&gt;
You will be able to return to this machine state whenever you want.&lt;br /&gt;
&lt;br /&gt;
== a few more steps ==&lt;br /&gt;
Open a console as root&lt;br /&gt;
 su -&lt;br /&gt;
&lt;br /&gt;
== on an x64 distribution ==&lt;br /&gt;
If and only if you have a /lib64 path, you are on an x64 distribution.&lt;br /&gt;
Make sure you have the needed environment variables and alias set by having a file /root/.bashrc.&lt;br /&gt;
 cd&lt;br /&gt;
 cat &amp;gt;.bashrc&amp;lt;&amp;lt;EOF &lt;br /&gt;
 export KDEDIR=/usr/local         &lt;br /&gt;
 alias cmakekde=&amp;quot;cmake . -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DLIB_SUFFIX=64 -D[[Development/CMake/Addons_for_KDE#Buildtypes|CMAKE_BUILD_TYPE]]=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias cmakekdelibs=&amp;quot;cmake ../kdelibs -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DLIB_SUFFIX=64 -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias makeqt=&amp;quot;./configure -dbus -openssl -plugin-sql-mysql -libdir /usr/lib64 -prefix /usr &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 export QTDIR=/usr&lt;br /&gt;
 EOF&lt;br /&gt;
 cat &amp;gt;.gitconfig&amp;lt;&amp;lt;EOF&lt;br /&gt;
 [url &amp;quot;git://anongit.kde.org/&amp;quot;]&lt;br /&gt;
     insteadOf = kde:&lt;br /&gt;
 [url &amp;quot;ssh://git@git.kde.org/&amp;quot;]&lt;br /&gt;
     pushInsteadOf = kde:&lt;br /&gt;
 EOF&lt;br /&gt;
Now activate this file&lt;br /&gt;
 . /root/.bashrc&lt;br /&gt;
&lt;br /&gt;
== on another distribution (incl 32bit)==&lt;br /&gt;
Make sure you have the needed environment variables and alias set by having a file /root/.bashrc. &lt;br /&gt;
 cd&lt;br /&gt;
 cat &amp;gt;.bashrc&amp;lt;&amp;lt;EOF&lt;br /&gt;
 export KDEDIR=/usr/local         &lt;br /&gt;
 alias cmakekde=&amp;quot;cmake . -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias cmakekdelibs=&amp;quot;cmake ../kdelibs -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias makeqt=&amp;quot;./configure -dbus -openssl -plugin-sql-mysql -prefix /usr &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 export QTDIR=/usr&lt;br /&gt;
 EOF&lt;br /&gt;
 cat &amp;gt;.gitconfig&amp;lt;&amp;lt;EOF&lt;br /&gt;
 [url &amp;quot;git://anongit.kde.org/&amp;quot;]&lt;br /&gt;
     insteadOf = kde:&lt;br /&gt;
 [url &amp;quot;ssh://git@git.kde.org/&amp;quot;]&lt;br /&gt;
     pushInsteadOf = kde:&lt;br /&gt;
 EOF&lt;br /&gt;
Now activate this file&lt;br /&gt;
 . /root/.bashrc&lt;br /&gt;
&lt;br /&gt;
= Aquire and Build KDE as root =&lt;br /&gt;
If something fails you may need to make clean.&lt;br /&gt;
&lt;br /&gt;
== automoc ==&lt;br /&gt;
automoc is needed for akonadi.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:automoc&lt;br /&gt;
 cd automoc&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== akonadi ==&lt;br /&gt;
Akonadi keeps personal information management data in a mysql database. It is needed for KDEPIMLIBS.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:akonadi&lt;br /&gt;
 cd akonadi&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== libattica ==&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:attica&lt;br /&gt;
 cd attica&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== shared desktop ontologies ==&lt;br /&gt;
shared desktop ontologies is needed by kdepimlibs in order to build Nepomuk (which is a part of kdelibs)&lt;br /&gt;
 cd&lt;br /&gt;
 wget http://downloads.sourceforge.net/project/oscaf/shared-desktop-ontologies/0.8/shared-desktop-ontologies-0.8.0.tar.bz2&lt;br /&gt;
 bunzip2 shared-desktop-ontologies-0.8.0.tar.bz2&lt;br /&gt;
 tar xvf shared-desktop-ontologies-0.8.0.tar&lt;br /&gt;
 cd shared-desktop-ontologies-0.8.0/&lt;br /&gt;
 cmake . &amp;amp;&amp;amp; make &amp;amp;&amp;amp; make install&lt;br /&gt;
&lt;br /&gt;
== phonon ==&lt;br /&gt;
Phonon is needed for kdebase-runtime&lt;br /&gt;
 cd&lt;br /&gt;
 git clone git://anongit.kde.org/phonon&lt;br /&gt;
 cd phonon&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kdelibs ==&lt;br /&gt;
KDELIBS requires an out-of-source build, that is why it is more complicated to build:&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kdelibs&lt;br /&gt;
 mkdir kdelibs-build&lt;br /&gt;
 cd kdelibs-build&lt;br /&gt;
 cmakekdelibs&lt;br /&gt;
Verify it has been correctly installed - the following must be possible:&lt;br /&gt;
 kde4-config --prefix&lt;br /&gt;
 /usr/local&lt;br /&gt;
&lt;br /&gt;
== kactivities ==&lt;br /&gt;
kactivities is needed for kde-workspace.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kactivities&lt;br /&gt;
 cd kactivities&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kdebase ==&lt;br /&gt;
 cd &lt;br /&gt;
 git clone kde:kde-baseapps&lt;br /&gt;
 git clone kde:konsole&lt;br /&gt;
 git clone kde:kde-workspace&lt;br /&gt;
 git clone kde:kde-runtime &lt;br /&gt;
 cd kde-baseapps&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd konsole&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd kde-workspace&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd kde-runtime&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
= Config =&lt;br /&gt;
First allow root login. You will need it as you do not have another login:&lt;br /&gt;
 sed -i &amp;quot;s/AllowRootLogin.*/AllowRootLogin=true/g&amp;quot; /usr/local/share/config/kdm/kdmrc&lt;br /&gt;
Now stop your running display manager:&lt;br /&gt;
 /etc/init.d/xdm stop&lt;br /&gt;
And start your self-compiled display manager:&lt;br /&gt;
 kdm&lt;br /&gt;
To enable automated startup of your kdm, you need to change a SUSE-specific path in /etc/init.d/xdm:&lt;br /&gt;
 KDM4_BIN=/usr/local/bin/kdm&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/KDE4/on_virtual_machines</id>
		<title>Getting Started/Build/KDE4/on virtual machines</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/KDE4/on_virtual_machines"/>
				<updated>2012-02-12T13:15:41Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: /* setup for SSH */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox tutorial|time=3 hours|type=HowTo|distribution=SUSE Linux 12.1|happyreaders=2|unhappyreaders=0}}&lt;br /&gt;
&lt;br /&gt;
This describes how to use a virtual machine for building the latest KDE from sources.&lt;br /&gt;
&lt;br /&gt;
= Virtual Machine Setup =&lt;br /&gt;
Create a virtual machine, e.g. using [http://www.linuxintro.org/wiki/VMWare VMware Player]. Regarding harddisk: KDE 4 fits into 10 GB, however [[User:Tstaerk|I]] recommend 40GB, one partition. Regarding RAM: You will need at least 1GB ram for the virtual machine, of course more is better.&lt;br /&gt;
&lt;br /&gt;
;You will need to set your SUSE CD as your virtual machine's cdrom. &lt;br /&gt;
&lt;br /&gt;
== setup for SSH ==&lt;br /&gt;
To be able to log in to your VM using ssh, stop and disable the firewall:&lt;br /&gt;
 rcSuSEfirewall2 stop&lt;br /&gt;
 chkconfig SuSEfirewall2_setup off&lt;br /&gt;
 chkconfig SuSEfirewall2_init off&lt;br /&gt;
 /etc/init.d/sshd start&lt;br /&gt;
 chkconfig sshd on&lt;br /&gt;
Inside the VM, install some needed packages:&lt;br /&gt;
 yast -i libqt4-devel libsoprano-devel pcre-devel libxslt-devel libxml2-devel docbook-xsl-stylesheets git cmake&lt;br /&gt;
&lt;br /&gt;
;Now it is time to do a snapshot or clone from your VM.&lt;br /&gt;
You will be able to return to this machine state whenever you want.&lt;br /&gt;
&lt;br /&gt;
== a few more steps ==&lt;br /&gt;
Open a console as root&lt;br /&gt;
 su -&lt;br /&gt;
&lt;br /&gt;
== on an x64 distribution ==&lt;br /&gt;
If and only if you have a /lib64 path, you are on an x64 distribution.&lt;br /&gt;
Make sure you have the needed environment variables and alias set by having a file /root/.bashrc.&lt;br /&gt;
 cd&lt;br /&gt;
 cat &amp;gt;.bashrc&amp;lt;&amp;lt;EOF &lt;br /&gt;
 export KDEDIR=/usr/local         &lt;br /&gt;
 alias cmakekde=&amp;quot;cmake . -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DLIB_SUFFIX=64 -D[[Development/CMake/Addons_for_KDE#Buildtypes|CMAKE_BUILD_TYPE]]=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias cmakekdelibs=&amp;quot;cmake ../kdelibs -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DLIB_SUFFIX=64 -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias makeqt=&amp;quot;./configure -dbus -openssl -plugin-sql-mysql -libdir /usr/lib64 -prefix /usr &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 export QTDIR=/usr&lt;br /&gt;
 EOF&lt;br /&gt;
 cat &amp;gt;.gitconfig&amp;lt;&amp;lt;EOF&lt;br /&gt;
 [url &amp;quot;git://anongit.kde.org/&amp;quot;]&lt;br /&gt;
     insteadOf = kde:&lt;br /&gt;
 [url &amp;quot;ssh://git@git.kde.org/&amp;quot;]&lt;br /&gt;
     pushInsteadOf = kde:&lt;br /&gt;
 EOF&lt;br /&gt;
Now activate this file&lt;br /&gt;
 . /root/.bashrc&lt;br /&gt;
&lt;br /&gt;
== on another distribution (incl 32bit)==&lt;br /&gt;
Make sure you have the needed environment variables and alias set by having a file /root/.bashrc. &lt;br /&gt;
 cd&lt;br /&gt;
 cat &amp;gt;.bashrc&amp;lt;&amp;lt;EOF&lt;br /&gt;
 export KDEDIR=/usr/local         &lt;br /&gt;
 alias cmakekde=&amp;quot;cmake . -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias cmakekdelibs=&amp;quot;cmake ../kdelibs -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias makeqt=&amp;quot;./configure -dbus -openssl -plugin-sql-mysql -prefix /usr &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 export QTDIR=/usr&lt;br /&gt;
 EOF&lt;br /&gt;
 cat &amp;gt;.gitconfig&amp;lt;&amp;lt;EOF&lt;br /&gt;
 [url &amp;quot;git://anongit.kde.org/&amp;quot;]&lt;br /&gt;
     insteadOf = kde:&lt;br /&gt;
 [url &amp;quot;ssh://git@git.kde.org/&amp;quot;]&lt;br /&gt;
     pushInsteadOf = kde:&lt;br /&gt;
 EOF&lt;br /&gt;
Now activate this file&lt;br /&gt;
 . /root/.bashrc&lt;br /&gt;
&lt;br /&gt;
= Aquire and Build KDE as root =&lt;br /&gt;
If something fails you may need to make clean.&lt;br /&gt;
&lt;br /&gt;
== automoc ==&lt;br /&gt;
automoc is needed for akonadi.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:automoc&lt;br /&gt;
 cd automoc&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== akonadi ==&lt;br /&gt;
Akonadi keeps personal information management data in a mysql database. It is needed for KDEPIMLIBS.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:akonadi&lt;br /&gt;
 cd akonadi&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== libattica ==&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:attica&lt;br /&gt;
 cd attica&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== dbusmenuqt ==&lt;br /&gt;
 cd&lt;br /&gt;
 git clone git://gitorious.org/dbusmenu/dbusmenu-qt.git&lt;br /&gt;
 cd dbusmenu-qt&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== shared desktop ontologies ==&lt;br /&gt;
shared desktop ontologies is needed by kdepimlibs in order to build Nepomuk (which is a part of kdelibs)&lt;br /&gt;
 cd&lt;br /&gt;
 wget http://downloads.sourceforge.net/project/oscaf/shared-desktop-ontologies/0.8/shared-desktop-ontologies-0.8.0.tar.bz2&lt;br /&gt;
 bunzip2 shared-desktop-ontologies-0.8.0.tar.bz2&lt;br /&gt;
 tar xvf shared-desktop-ontologies-0.8.0.tar&lt;br /&gt;
 cd shared-desktop-ontologies-0.8.0/&lt;br /&gt;
 cmake . &amp;amp;&amp;amp; make &amp;amp;&amp;amp; make install&lt;br /&gt;
&lt;br /&gt;
== phonon ==&lt;br /&gt;
Phonon is needed for kdebase-runtime&lt;br /&gt;
 cd&lt;br /&gt;
 git clone git://anongit.kde.org/phonon&lt;br /&gt;
 cd phonon&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kdelibs ==&lt;br /&gt;
KDELIBS requires an out-of-source build, that is why it is more complicated to build:&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kdelibs&lt;br /&gt;
 mkdir kdelibs-build&lt;br /&gt;
 cd kdelibs-build&lt;br /&gt;
 cmakekdelibs&lt;br /&gt;
Verify it has been correctly installed - the following must be possible:&lt;br /&gt;
 kde4-config --prefix&lt;br /&gt;
 /usr/local&lt;br /&gt;
&lt;br /&gt;
== kactivities ==&lt;br /&gt;
kactivities is needed for kde-workspace.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kactivities&lt;br /&gt;
 cd kactivities&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kdebase ==&lt;br /&gt;
 cd &lt;br /&gt;
 git clone kde:kde-baseapps&lt;br /&gt;
 git clone kde:konsole&lt;br /&gt;
 git clone kde:kde-workspace&lt;br /&gt;
 git clone kde:kde-runtime &lt;br /&gt;
 cd kde-baseapps&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd konsole&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd kde-workspace&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd kde-runtime&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
= Config =&lt;br /&gt;
First allow root login. You will need it as you do not have another login:&lt;br /&gt;
 sed -i &amp;quot;s/AllowRootLogin.*/AllowRootLogin=true/g&amp;quot; /usr/local/share/config/kdm/kdmrc&lt;br /&gt;
Now stop your running display manager:&lt;br /&gt;
 /etc/init.d/xdm stop&lt;br /&gt;
And start your self-compiled display manager:&lt;br /&gt;
 kdm&lt;br /&gt;
To enable automated startup of your kdm, you need to change a SUSE-specific path in /etc/init.d/xdm:&lt;br /&gt;
 KDM4_BIN=/usr/local/bin/kdm&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/KDE4/on_virtual_machines</id>
		<title>Getting Started/Build/KDE4/on virtual machines</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/KDE4/on_virtual_machines"/>
				<updated>2012-02-12T13:13:24Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: /* setup for SSH */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox tutorial|time=3 hours|type=HowTo|distribution=SUSE Linux 12.1|happyreaders=2|unhappyreaders=0}}&lt;br /&gt;
&lt;br /&gt;
This describes how to use a virtual machine for building the latest KDE from sources.&lt;br /&gt;
&lt;br /&gt;
= Virtual Machine Setup =&lt;br /&gt;
Create a virtual machine, e.g. using [http://www.linuxintro.org/wiki/VMWare VMware Player]. Regarding harddisk: KDE 4 fits into 10 GB, however [[User:Tstaerk|I]] recommend 40GB, one partition. Regarding RAM: You will need at least 1GB ram for the virtual machine, of course more is better.&lt;br /&gt;
&lt;br /&gt;
;You will need to set your SUSE CD as your virtual machine's cdrom. &lt;br /&gt;
&lt;br /&gt;
== setup for SSH ==&lt;br /&gt;
To be able to log in to your VM using ssh, stop and disable the firewall:&lt;br /&gt;
 rcSuSEfirewall2 stop&lt;br /&gt;
 chkconfig SuSEfirewall2_setup off&lt;br /&gt;
 chkconfig SuSEfirewall2_init off&lt;br /&gt;
 /etc/init.d/sshd start&lt;br /&gt;
 chkconfig sshd on&lt;br /&gt;
Inside the VM, install some needed packages:&lt;br /&gt;
 yast -i libqt4-devel libsoprano-devel pcre-devel libxslt-devel libxml2-devel docbook-xsl-stylesheets git&lt;br /&gt;
&lt;br /&gt;
;Now it is time to do a snapshot or clone from your VM.&lt;br /&gt;
You will be able to return to this machine state whenever you want.&lt;br /&gt;
&lt;br /&gt;
== a few more steps ==&lt;br /&gt;
Open a console as root&lt;br /&gt;
 su -&lt;br /&gt;
&lt;br /&gt;
== on an x64 distribution ==&lt;br /&gt;
If and only if you have a /lib64 path, you are on an x64 distribution.&lt;br /&gt;
Make sure you have the needed environment variables and alias set by having a file /root/.bashrc.&lt;br /&gt;
 cd&lt;br /&gt;
 cat &amp;gt;.bashrc&amp;lt;&amp;lt;EOF &lt;br /&gt;
 export KDEDIR=/usr/local         &lt;br /&gt;
 alias cmakekde=&amp;quot;cmake . -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DLIB_SUFFIX=64 -D[[Development/CMake/Addons_for_KDE#Buildtypes|CMAKE_BUILD_TYPE]]=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias cmakekdelibs=&amp;quot;cmake ../kdelibs -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DLIB_SUFFIX=64 -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias makeqt=&amp;quot;./configure -dbus -openssl -plugin-sql-mysql -libdir /usr/lib64 -prefix /usr &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 export QTDIR=/usr&lt;br /&gt;
 EOF&lt;br /&gt;
 cat &amp;gt;.gitconfig&amp;lt;&amp;lt;EOF&lt;br /&gt;
 [url &amp;quot;git://anongit.kde.org/&amp;quot;]&lt;br /&gt;
     insteadOf = kde:&lt;br /&gt;
 [url &amp;quot;ssh://git@git.kde.org/&amp;quot;]&lt;br /&gt;
     pushInsteadOf = kde:&lt;br /&gt;
 EOF&lt;br /&gt;
Now activate this file&lt;br /&gt;
 . /root/.bashrc&lt;br /&gt;
&lt;br /&gt;
== on another distribution (incl 32bit)==&lt;br /&gt;
Make sure you have the needed environment variables and alias set by having a file /root/.bashrc. &lt;br /&gt;
 cd&lt;br /&gt;
 cat &amp;gt;.bashrc&amp;lt;&amp;lt;EOF&lt;br /&gt;
 export KDEDIR=/usr/local         &lt;br /&gt;
 alias cmakekde=&amp;quot;cmake . -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias cmakekdelibs=&amp;quot;cmake ../kdelibs -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias makeqt=&amp;quot;./configure -dbus -openssl -plugin-sql-mysql -prefix /usr &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 export QTDIR=/usr&lt;br /&gt;
 EOF&lt;br /&gt;
 cat &amp;gt;.gitconfig&amp;lt;&amp;lt;EOF&lt;br /&gt;
 [url &amp;quot;git://anongit.kde.org/&amp;quot;]&lt;br /&gt;
     insteadOf = kde:&lt;br /&gt;
 [url &amp;quot;ssh://git@git.kde.org/&amp;quot;]&lt;br /&gt;
     pushInsteadOf = kde:&lt;br /&gt;
 EOF&lt;br /&gt;
Now activate this file&lt;br /&gt;
 . /root/.bashrc&lt;br /&gt;
&lt;br /&gt;
= Aquire and Build KDE as root =&lt;br /&gt;
If something fails you may need to make clean.&lt;br /&gt;
&lt;br /&gt;
== automoc ==&lt;br /&gt;
automoc is needed for akonadi.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:automoc&lt;br /&gt;
 cd automoc&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== akonadi ==&lt;br /&gt;
Akonadi keeps personal information management data in a mysql database. It is needed for KDEPIMLIBS.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:akonadi&lt;br /&gt;
 cd akonadi&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== libattica ==&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:attica&lt;br /&gt;
 cd attica&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== dbusmenuqt ==&lt;br /&gt;
 cd&lt;br /&gt;
 git clone git://gitorious.org/dbusmenu/dbusmenu-qt.git&lt;br /&gt;
 cd dbusmenu-qt&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== shared desktop ontologies ==&lt;br /&gt;
shared desktop ontologies is needed by kdepimlibs in order to build Nepomuk (which is a part of kdelibs)&lt;br /&gt;
 cd&lt;br /&gt;
 wget http://downloads.sourceforge.net/project/oscaf/shared-desktop-ontologies/0.8/shared-desktop-ontologies-0.8.0.tar.bz2&lt;br /&gt;
 bunzip2 shared-desktop-ontologies-0.8.0.tar.bz2&lt;br /&gt;
 tar xvf shared-desktop-ontologies-0.8.0.tar&lt;br /&gt;
 cd shared-desktop-ontologies-0.8.0/&lt;br /&gt;
 cmake . &amp;amp;&amp;amp; make &amp;amp;&amp;amp; make install&lt;br /&gt;
&lt;br /&gt;
== phonon ==&lt;br /&gt;
Phonon is needed for kdebase-runtime&lt;br /&gt;
 cd&lt;br /&gt;
 git clone git://anongit.kde.org/phonon&lt;br /&gt;
 cd phonon&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kdelibs ==&lt;br /&gt;
KDELIBS requires an out-of-source build, that is why it is more complicated to build:&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kdelibs&lt;br /&gt;
 mkdir kdelibs-build&lt;br /&gt;
 cd kdelibs-build&lt;br /&gt;
 cmakekdelibs&lt;br /&gt;
Verify it has been correctly installed - the following must be possible:&lt;br /&gt;
 kde4-config --prefix&lt;br /&gt;
 /usr/local&lt;br /&gt;
&lt;br /&gt;
== kactivities ==&lt;br /&gt;
kactivities is needed for kde-workspace.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kactivities&lt;br /&gt;
 cd kactivities&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kdebase ==&lt;br /&gt;
 cd &lt;br /&gt;
 git clone kde:kde-baseapps&lt;br /&gt;
 git clone kde:konsole&lt;br /&gt;
 git clone kde:kde-workspace&lt;br /&gt;
 git clone kde:kde-runtime &lt;br /&gt;
 cd kde-baseapps&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd konsole&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd kde-workspace&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd kde-runtime&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
= Config =&lt;br /&gt;
First allow root login. You will need it as you do not have another login:&lt;br /&gt;
 sed -i &amp;quot;s/AllowRootLogin.*/AllowRootLogin=true/g&amp;quot; /usr/local/share/config/kdm/kdmrc&lt;br /&gt;
Now stop your running display manager:&lt;br /&gt;
 /etc/init.d/xdm stop&lt;br /&gt;
And start your self-compiled display manager:&lt;br /&gt;
 kdm&lt;br /&gt;
To enable automated startup of your kdm, you need to change a SUSE-specific path in /etc/init.d/xdm:&lt;br /&gt;
 KDM4_BIN=/usr/local/bin/kdm&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/KDE4/on_virtual_machines</id>
		<title>Getting Started/Build/KDE4/on virtual machines</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/KDE4/on_virtual_machines"/>
				<updated>2012-02-12T12:16:36Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: /* setup for SSH */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox tutorial|time=3 hours|type=HowTo|distribution=SUSE Linux 12.1|happyreaders=2|unhappyreaders=0}}&lt;br /&gt;
&lt;br /&gt;
This describes how to use a virtual machine for building the latest KDE from sources.&lt;br /&gt;
&lt;br /&gt;
= Virtual Machine Setup =&lt;br /&gt;
Create a virtual machine, e.g. using [http://www.linuxintro.org/wiki/VMWare VMware Player]. Regarding harddisk: KDE 4 fits into 10 GB, however [[User:Tstaerk|I]] recommend 40GB, one partition. Regarding RAM: You will need at least 1GB ram for the virtual machine, of course more is better.&lt;br /&gt;
&lt;br /&gt;
;You will need to set your SUSE CD as your virtual machine's cdrom. &lt;br /&gt;
&lt;br /&gt;
== setup for SSH ==&lt;br /&gt;
To be able to log in to your VM using ssh, stop and disable the firewall:&lt;br /&gt;
 rcSuSEfirewall2 stop&lt;br /&gt;
 chkconfig SuSEfirewall2_setup off&lt;br /&gt;
 chkconfig SuSEfirewall2_init off&lt;br /&gt;
 /etc/init.d/sshd start&lt;br /&gt;
 chkconfig sshd on&lt;br /&gt;
Inside the VM, install some needed packages:&lt;br /&gt;
 yast -i libqt4-devel libsoprano-devel pcre-devel libxslt-devel libxml2-devel docbook-xsl-stylesheets&lt;br /&gt;
&lt;br /&gt;
;Now it is time to do a snapshot or clone from your VM.&lt;br /&gt;
You will be able to return to this machine state whenever you want.&lt;br /&gt;
&lt;br /&gt;
== a few more steps ==&lt;br /&gt;
Open a console as root&lt;br /&gt;
 su -&lt;br /&gt;
&lt;br /&gt;
== on an x64 distribution ==&lt;br /&gt;
If and only if you have a /lib64 path, you are on an x64 distribution.&lt;br /&gt;
Make sure you have the needed environment variables and alias set by having a file /root/.bashrc.&lt;br /&gt;
 cd&lt;br /&gt;
 cat &amp;gt;.bashrc&amp;lt;&amp;lt;EOF &lt;br /&gt;
 export KDEDIR=/usr/local         &lt;br /&gt;
 alias cmakekde=&amp;quot;cmake . -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DLIB_SUFFIX=64 -D[[Development/CMake/Addons_for_KDE#Buildtypes|CMAKE_BUILD_TYPE]]=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias cmakekdelibs=&amp;quot;cmake ../kdelibs -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DLIB_SUFFIX=64 -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias makeqt=&amp;quot;./configure -dbus -openssl -plugin-sql-mysql -libdir /usr/lib64 -prefix /usr &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 export QTDIR=/usr&lt;br /&gt;
 EOF&lt;br /&gt;
 cat &amp;gt;.gitconfig&amp;lt;&amp;lt;EOF&lt;br /&gt;
 [url &amp;quot;git://anongit.kde.org/&amp;quot;]&lt;br /&gt;
     insteadOf = kde:&lt;br /&gt;
 [url &amp;quot;ssh://git@git.kde.org/&amp;quot;]&lt;br /&gt;
     pushInsteadOf = kde:&lt;br /&gt;
 EOF&lt;br /&gt;
Now activate this file&lt;br /&gt;
 . /root/.bashrc&lt;br /&gt;
&lt;br /&gt;
== on another distribution (incl 32bit)==&lt;br /&gt;
Make sure you have the needed environment variables and alias set by having a file /root/.bashrc. &lt;br /&gt;
 cd&lt;br /&gt;
 cat &amp;gt;.bashrc&amp;lt;&amp;lt;EOF&lt;br /&gt;
 export KDEDIR=/usr/local         &lt;br /&gt;
 alias cmakekde=&amp;quot;cmake . -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias cmakekdelibs=&amp;quot;cmake ../kdelibs -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias makeqt=&amp;quot;./configure -dbus -openssl -plugin-sql-mysql -prefix /usr &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 export QTDIR=/usr&lt;br /&gt;
 EOF&lt;br /&gt;
 cat &amp;gt;.gitconfig&amp;lt;&amp;lt;EOF&lt;br /&gt;
 [url &amp;quot;git://anongit.kde.org/&amp;quot;]&lt;br /&gt;
     insteadOf = kde:&lt;br /&gt;
 [url &amp;quot;ssh://git@git.kde.org/&amp;quot;]&lt;br /&gt;
     pushInsteadOf = kde:&lt;br /&gt;
 EOF&lt;br /&gt;
Now activate this file&lt;br /&gt;
 . /root/.bashrc&lt;br /&gt;
&lt;br /&gt;
= Aquire and Build KDE as root =&lt;br /&gt;
If something fails you may need to make clean.&lt;br /&gt;
&lt;br /&gt;
== automoc ==&lt;br /&gt;
automoc is needed for akonadi.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:automoc&lt;br /&gt;
 cd automoc&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== akonadi ==&lt;br /&gt;
Akonadi keeps personal information management data in a mysql database. It is needed for KDEPIMLIBS.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:akonadi&lt;br /&gt;
 cd akonadi&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== libattica ==&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:attica&lt;br /&gt;
 cd attica&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== dbusmenuqt ==&lt;br /&gt;
 cd&lt;br /&gt;
 git clone git://gitorious.org/dbusmenu/dbusmenu-qt.git&lt;br /&gt;
 cd dbusmenu-qt&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== shared desktop ontologies ==&lt;br /&gt;
shared desktop ontologies is needed by kdepimlibs in order to build Nepomuk (which is a part of kdelibs)&lt;br /&gt;
 cd&lt;br /&gt;
 wget http://downloads.sourceforge.net/project/oscaf/shared-desktop-ontologies/0.8/shared-desktop-ontologies-0.8.0.tar.bz2&lt;br /&gt;
 bunzip2 shared-desktop-ontologies-0.8.0.tar.bz2&lt;br /&gt;
 tar xvf shared-desktop-ontologies-0.8.0.tar&lt;br /&gt;
 cd shared-desktop-ontologies-0.8.0/&lt;br /&gt;
 cmake . &amp;amp;&amp;amp; make &amp;amp;&amp;amp; make install&lt;br /&gt;
&lt;br /&gt;
== phonon ==&lt;br /&gt;
Phonon is needed for kdebase-runtime&lt;br /&gt;
 cd&lt;br /&gt;
 git clone git://anongit.kde.org/phonon&lt;br /&gt;
 cd phonon&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kdelibs ==&lt;br /&gt;
KDELIBS requires an out-of-source build, that is why it is more complicated to build:&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kdelibs&lt;br /&gt;
 mkdir kdelibs-build&lt;br /&gt;
 cd kdelibs-build&lt;br /&gt;
 cmakekdelibs&lt;br /&gt;
Verify it has been correctly installed - the following must be possible:&lt;br /&gt;
 kde4-config --prefix&lt;br /&gt;
 /usr/local&lt;br /&gt;
&lt;br /&gt;
== kactivities ==&lt;br /&gt;
kactivities is needed for kde-workspace.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kactivities&lt;br /&gt;
 cd kactivities&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kdebase ==&lt;br /&gt;
 cd &lt;br /&gt;
 git clone kde:kde-baseapps&lt;br /&gt;
 git clone kde:konsole&lt;br /&gt;
 git clone kde:kde-workspace&lt;br /&gt;
 git clone kde:kde-runtime &lt;br /&gt;
 cd kde-baseapps&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd konsole&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd kde-workspace&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd kde-runtime&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
= Config =&lt;br /&gt;
First allow root login. You will need it as you do not have another login:&lt;br /&gt;
 sed -i &amp;quot;s/AllowRootLogin.*/AllowRootLogin=true/g&amp;quot; /usr/local/share/config/kdm/kdmrc&lt;br /&gt;
Now stop your running display manager:&lt;br /&gt;
 /etc/init.d/xdm stop&lt;br /&gt;
And start your self-compiled display manager:&lt;br /&gt;
 kdm&lt;br /&gt;
To enable automated startup of your kdm, you need to change a SUSE-specific path in /etc/init.d/xdm:&lt;br /&gt;
 KDM4_BIN=/usr/local/bin/kdm&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/KDE4/on_virtual_machines</id>
		<title>Getting Started/Build/KDE4/on virtual machines</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/KDE4/on_virtual_machines"/>
				<updated>2012-02-12T12:11:56Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: /* setup for SSH */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox tutorial|time=3 hours|type=HowTo|distribution=SUSE Linux 12.1|happyreaders=2|unhappyreaders=0}}&lt;br /&gt;
&lt;br /&gt;
This describes how to use a virtual machine for building the latest KDE from sources.&lt;br /&gt;
&lt;br /&gt;
= Virtual Machine Setup =&lt;br /&gt;
Create a virtual machine, e.g. using [http://www.linuxintro.org/wiki/VMWare VMware Player]. Regarding harddisk: KDE 4 fits into 10 GB, however [[User:Tstaerk|I]] recommend 40GB, one partition. Regarding RAM: You will need at least 1GB ram for the virtual machine, of course more is better.&lt;br /&gt;
&lt;br /&gt;
;You will need to set your SUSE CD as your virtual machine's cdrom. &lt;br /&gt;
&lt;br /&gt;
== setup for SSH ==&lt;br /&gt;
To be able to log in to your VM using ssh, stop and disable the firewall:&lt;br /&gt;
 rcSuSEfirewall2 stop&lt;br /&gt;
 chkconfig SuSEfirewall2_setup off&lt;br /&gt;
 chkconfig SuSEfirewall2_init off&lt;br /&gt;
 /etc/init.d/sshd start&lt;br /&gt;
 chkconfig sshd on&lt;br /&gt;
Inside the VM, install some needed packages:&lt;br /&gt;
 yast -i libqt4-devel libsoprano-devel pcre-devel libxslt-devel libxml2-devel&lt;br /&gt;
&lt;br /&gt;
;Now it is time to do a snapshot or clone from your VM.&lt;br /&gt;
You will be able to return to this machine state whenever you want.&lt;br /&gt;
&lt;br /&gt;
== a few more steps ==&lt;br /&gt;
Open a console as root&lt;br /&gt;
 su -&lt;br /&gt;
&lt;br /&gt;
== on an x64 distribution ==&lt;br /&gt;
If and only if you have a /lib64 path, you are on an x64 distribution.&lt;br /&gt;
Make sure you have the needed environment variables and alias set by having a file /root/.bashrc.&lt;br /&gt;
 cd&lt;br /&gt;
 cat &amp;gt;.bashrc&amp;lt;&amp;lt;EOF &lt;br /&gt;
 export KDEDIR=/usr/local         &lt;br /&gt;
 alias cmakekde=&amp;quot;cmake . -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DLIB_SUFFIX=64 -D[[Development/CMake/Addons_for_KDE#Buildtypes|CMAKE_BUILD_TYPE]]=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias cmakekdelibs=&amp;quot;cmake ../kdelibs -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DLIB_SUFFIX=64 -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias makeqt=&amp;quot;./configure -dbus -openssl -plugin-sql-mysql -libdir /usr/lib64 -prefix /usr &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 export QTDIR=/usr&lt;br /&gt;
 EOF&lt;br /&gt;
 cat &amp;gt;.gitconfig&amp;lt;&amp;lt;EOF&lt;br /&gt;
 [url &amp;quot;git://anongit.kde.org/&amp;quot;]&lt;br /&gt;
     insteadOf = kde:&lt;br /&gt;
 [url &amp;quot;ssh://git@git.kde.org/&amp;quot;]&lt;br /&gt;
     pushInsteadOf = kde:&lt;br /&gt;
 EOF&lt;br /&gt;
Now activate this file&lt;br /&gt;
 . /root/.bashrc&lt;br /&gt;
&lt;br /&gt;
== on another distribution (incl 32bit)==&lt;br /&gt;
Make sure you have the needed environment variables and alias set by having a file /root/.bashrc. &lt;br /&gt;
 cd&lt;br /&gt;
 cat &amp;gt;.bashrc&amp;lt;&amp;lt;EOF&lt;br /&gt;
 export KDEDIR=/usr/local         &lt;br /&gt;
 alias cmakekde=&amp;quot;cmake . -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias cmakekdelibs=&amp;quot;cmake ../kdelibs -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias makeqt=&amp;quot;./configure -dbus -openssl -plugin-sql-mysql -prefix /usr &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 export QTDIR=/usr&lt;br /&gt;
 EOF&lt;br /&gt;
 cat &amp;gt;.gitconfig&amp;lt;&amp;lt;EOF&lt;br /&gt;
 [url &amp;quot;git://anongit.kde.org/&amp;quot;]&lt;br /&gt;
     insteadOf = kde:&lt;br /&gt;
 [url &amp;quot;ssh://git@git.kde.org/&amp;quot;]&lt;br /&gt;
     pushInsteadOf = kde:&lt;br /&gt;
 EOF&lt;br /&gt;
Now activate this file&lt;br /&gt;
 . /root/.bashrc&lt;br /&gt;
&lt;br /&gt;
= Aquire and Build KDE as root =&lt;br /&gt;
If something fails you may need to make clean.&lt;br /&gt;
&lt;br /&gt;
== automoc ==&lt;br /&gt;
automoc is needed for akonadi.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:automoc&lt;br /&gt;
 cd automoc&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== akonadi ==&lt;br /&gt;
Akonadi keeps personal information management data in a mysql database. It is needed for KDEPIMLIBS.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:akonadi&lt;br /&gt;
 cd akonadi&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== libattica ==&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:attica&lt;br /&gt;
 cd attica&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== dbusmenuqt ==&lt;br /&gt;
 cd&lt;br /&gt;
 git clone git://gitorious.org/dbusmenu/dbusmenu-qt.git&lt;br /&gt;
 cd dbusmenu-qt&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== shared desktop ontologies ==&lt;br /&gt;
shared desktop ontologies is needed by kdepimlibs in order to build Nepomuk (which is a part of kdelibs)&lt;br /&gt;
 cd&lt;br /&gt;
 wget http://downloads.sourceforge.net/project/oscaf/shared-desktop-ontologies/0.8/shared-desktop-ontologies-0.8.0.tar.bz2&lt;br /&gt;
 bunzip2 shared-desktop-ontologies-0.8.0.tar.bz2&lt;br /&gt;
 tar xvf shared-desktop-ontologies-0.8.0.tar&lt;br /&gt;
 cd shared-desktop-ontologies-0.8.0/&lt;br /&gt;
 cmake . &amp;amp;&amp;amp; make &amp;amp;&amp;amp; make install&lt;br /&gt;
&lt;br /&gt;
== phonon ==&lt;br /&gt;
Phonon is needed for kdebase-runtime&lt;br /&gt;
 cd&lt;br /&gt;
 git clone git://anongit.kde.org/phonon&lt;br /&gt;
 cd phonon&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kdelibs ==&lt;br /&gt;
KDELIBS requires an out-of-source build, that is why it is more complicated to build:&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kdelibs&lt;br /&gt;
 mkdir kdelibs-build&lt;br /&gt;
 cd kdelibs-build&lt;br /&gt;
 cmakekdelibs&lt;br /&gt;
Verify it has been correctly installed - the following must be possible:&lt;br /&gt;
 kde4-config --prefix&lt;br /&gt;
 /usr/local&lt;br /&gt;
&lt;br /&gt;
== kactivities ==&lt;br /&gt;
kactivities is needed for kde-workspace.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kactivities&lt;br /&gt;
 cd kactivities&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kdebase ==&lt;br /&gt;
 cd &lt;br /&gt;
 git clone kde:kde-baseapps&lt;br /&gt;
 git clone kde:konsole&lt;br /&gt;
 git clone kde:kde-workspace&lt;br /&gt;
 git clone kde:kde-runtime &lt;br /&gt;
 cd kde-baseapps&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd konsole&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd kde-workspace&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd kde-runtime&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
= Config =&lt;br /&gt;
First allow root login. You will need it as you do not have another login:&lt;br /&gt;
 sed -i &amp;quot;s/AllowRootLogin.*/AllowRootLogin=true/g&amp;quot; /usr/local/share/config/kdm/kdmrc&lt;br /&gt;
Now stop your running display manager:&lt;br /&gt;
 /etc/init.d/xdm stop&lt;br /&gt;
And start your self-compiled display manager:&lt;br /&gt;
 kdm&lt;br /&gt;
To enable automated startup of your kdm, you need to change a SUSE-specific path in /etc/init.d/xdm:&lt;br /&gt;
 KDM4_BIN=/usr/local/bin/kdm&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/KDE4/on_virtual_machines</id>
		<title>Getting Started/Build/KDE4/on virtual machines</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/KDE4/on_virtual_machines"/>
				<updated>2012-02-12T12:10:25Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: /* setup for SSH */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox tutorial|time=3 hours|type=HowTo|distribution=SUSE Linux 12.1|happyreaders=2|unhappyreaders=0}}&lt;br /&gt;
&lt;br /&gt;
This describes how to use a virtual machine for building the latest KDE from sources.&lt;br /&gt;
&lt;br /&gt;
= Virtual Machine Setup =&lt;br /&gt;
Create a virtual machine, e.g. using [http://www.linuxintro.org/wiki/VMWare VMware Player]. Regarding harddisk: KDE 4 fits into 10 GB, however [[User:Tstaerk|I]] recommend 40GB, one partition. Regarding RAM: You will need at least 1GB ram for the virtual machine, of course more is better.&lt;br /&gt;
&lt;br /&gt;
;You will need to set your SUSE CD as your virtual machine's cdrom. &lt;br /&gt;
&lt;br /&gt;
== setup for SSH ==&lt;br /&gt;
To be able to log in to your VM using ssh, stop and disable the firewall:&lt;br /&gt;
 rcSuSEfirewall2 stop&lt;br /&gt;
 chkconfig SuSEfirewall2_setup off&lt;br /&gt;
 chkconfig SuSEfirewall2_init off&lt;br /&gt;
 /etc/init.d/sshd start&lt;br /&gt;
 chkconfig sshd on&lt;br /&gt;
Inside the VM, install some needed packages:&lt;br /&gt;
 yast -i libqt4-devel libsoprano-devel pcre-devel&lt;br /&gt;
&lt;br /&gt;
;Now it is time to do a snapshot or clone from your VM.&lt;br /&gt;
You will be able to return to this machine state whenever you want.&lt;br /&gt;
&lt;br /&gt;
== a few more steps ==&lt;br /&gt;
Open a console as root&lt;br /&gt;
 su -&lt;br /&gt;
&lt;br /&gt;
== on an x64 distribution ==&lt;br /&gt;
If and only if you have a /lib64 path, you are on an x64 distribution.&lt;br /&gt;
Make sure you have the needed environment variables and alias set by having a file /root/.bashrc.&lt;br /&gt;
 cd&lt;br /&gt;
 cat &amp;gt;.bashrc&amp;lt;&amp;lt;EOF &lt;br /&gt;
 export KDEDIR=/usr/local         &lt;br /&gt;
 alias cmakekde=&amp;quot;cmake . -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DLIB_SUFFIX=64 -D[[Development/CMake/Addons_for_KDE#Buildtypes|CMAKE_BUILD_TYPE]]=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias cmakekdelibs=&amp;quot;cmake ../kdelibs -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DLIB_SUFFIX=64 -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias makeqt=&amp;quot;./configure -dbus -openssl -plugin-sql-mysql -libdir /usr/lib64 -prefix /usr &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 export QTDIR=/usr&lt;br /&gt;
 EOF&lt;br /&gt;
 cat &amp;gt;.gitconfig&amp;lt;&amp;lt;EOF&lt;br /&gt;
 [url &amp;quot;git://anongit.kde.org/&amp;quot;]&lt;br /&gt;
     insteadOf = kde:&lt;br /&gt;
 [url &amp;quot;ssh://git@git.kde.org/&amp;quot;]&lt;br /&gt;
     pushInsteadOf = kde:&lt;br /&gt;
 EOF&lt;br /&gt;
Now activate this file&lt;br /&gt;
 . /root/.bashrc&lt;br /&gt;
&lt;br /&gt;
== on another distribution (incl 32bit)==&lt;br /&gt;
Make sure you have the needed environment variables and alias set by having a file /root/.bashrc. &lt;br /&gt;
 cd&lt;br /&gt;
 cat &amp;gt;.bashrc&amp;lt;&amp;lt;EOF&lt;br /&gt;
 export KDEDIR=/usr/local         &lt;br /&gt;
 alias cmakekde=&amp;quot;cmake . -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias cmakekdelibs=&amp;quot;cmake ../kdelibs -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias makeqt=&amp;quot;./configure -dbus -openssl -plugin-sql-mysql -prefix /usr &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 export QTDIR=/usr&lt;br /&gt;
 EOF&lt;br /&gt;
 cat &amp;gt;.gitconfig&amp;lt;&amp;lt;EOF&lt;br /&gt;
 [url &amp;quot;git://anongit.kde.org/&amp;quot;]&lt;br /&gt;
     insteadOf = kde:&lt;br /&gt;
 [url &amp;quot;ssh://git@git.kde.org/&amp;quot;]&lt;br /&gt;
     pushInsteadOf = kde:&lt;br /&gt;
 EOF&lt;br /&gt;
Now activate this file&lt;br /&gt;
 . /root/.bashrc&lt;br /&gt;
&lt;br /&gt;
= Aquire and Build KDE as root =&lt;br /&gt;
If something fails you may need to make clean.&lt;br /&gt;
&lt;br /&gt;
== automoc ==&lt;br /&gt;
automoc is needed for akonadi.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:automoc&lt;br /&gt;
 cd automoc&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== akonadi ==&lt;br /&gt;
Akonadi keeps personal information management data in a mysql database. It is needed for KDEPIMLIBS.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:akonadi&lt;br /&gt;
 cd akonadi&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== libattica ==&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:attica&lt;br /&gt;
 cd attica&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== dbusmenuqt ==&lt;br /&gt;
 cd&lt;br /&gt;
 git clone git://gitorious.org/dbusmenu/dbusmenu-qt.git&lt;br /&gt;
 cd dbusmenu-qt&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== shared desktop ontologies ==&lt;br /&gt;
shared desktop ontologies is needed by kdepimlibs in order to build Nepomuk (which is a part of kdelibs)&lt;br /&gt;
 cd&lt;br /&gt;
 wget http://downloads.sourceforge.net/project/oscaf/shared-desktop-ontologies/0.8/shared-desktop-ontologies-0.8.0.tar.bz2&lt;br /&gt;
 bunzip2 shared-desktop-ontologies-0.8.0.tar.bz2&lt;br /&gt;
 tar xvf shared-desktop-ontologies-0.8.0.tar&lt;br /&gt;
 cd shared-desktop-ontologies-0.8.0/&lt;br /&gt;
 cmake . &amp;amp;&amp;amp; make &amp;amp;&amp;amp; make install&lt;br /&gt;
&lt;br /&gt;
== phonon ==&lt;br /&gt;
Phonon is needed for kdebase-runtime&lt;br /&gt;
 cd&lt;br /&gt;
 git clone git://anongit.kde.org/phonon&lt;br /&gt;
 cd phonon&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kdelibs ==&lt;br /&gt;
KDELIBS requires an out-of-source build, that is why it is more complicated to build:&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kdelibs&lt;br /&gt;
 mkdir kdelibs-build&lt;br /&gt;
 cd kdelibs-build&lt;br /&gt;
 cmakekdelibs&lt;br /&gt;
Verify it has been correctly installed - the following must be possible:&lt;br /&gt;
 kde4-config --prefix&lt;br /&gt;
 /usr/local&lt;br /&gt;
&lt;br /&gt;
== kactivities ==&lt;br /&gt;
kactivities is needed for kde-workspace.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kactivities&lt;br /&gt;
 cd kactivities&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kdebase ==&lt;br /&gt;
 cd &lt;br /&gt;
 git clone kde:kde-baseapps&lt;br /&gt;
 git clone kde:konsole&lt;br /&gt;
 git clone kde:kde-workspace&lt;br /&gt;
 git clone kde:kde-runtime &lt;br /&gt;
 cd kde-baseapps&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd konsole&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd kde-workspace&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd kde-runtime&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
= Config =&lt;br /&gt;
First allow root login. You will need it as you do not have another login:&lt;br /&gt;
 sed -i &amp;quot;s/AllowRootLogin.*/AllowRootLogin=true/g&amp;quot; /usr/local/share/config/kdm/kdmrc&lt;br /&gt;
Now stop your running display manager:&lt;br /&gt;
 /etc/init.d/xdm stop&lt;br /&gt;
And start your self-compiled display manager:&lt;br /&gt;
 kdm&lt;br /&gt;
To enable automated startup of your kdm, you need to change a SUSE-specific path in /etc/init.d/xdm:&lt;br /&gt;
 KDM4_BIN=/usr/local/bin/kdm&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/KDE4/on_virtual_machines</id>
		<title>Getting Started/Build/KDE4/on virtual machines</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/KDE4/on_virtual_machines"/>
				<updated>2012-02-12T09:54:26Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox tutorial|time=3 hours|type=HowTo|distribution=SUSE Linux 12.1|happyreaders=2|unhappyreaders=0}}&lt;br /&gt;
&lt;br /&gt;
This describes how to use a virtual machine for building the latest KDE from sources.&lt;br /&gt;
&lt;br /&gt;
= Virtual Machine Setup =&lt;br /&gt;
Create a virtual machine, e.g. using [http://www.linuxintro.org/wiki/VMWare VMware Player]. Regarding harddisk: KDE 4 fits into 10 GB, however [[User:Tstaerk|I]] recommend 40GB, one partition. Regarding RAM: You will need at least 1GB ram for the virtual machine, of course more is better.&lt;br /&gt;
&lt;br /&gt;
;You will need to set your SUSE CD as your virtual machine's cdrom. &lt;br /&gt;
&lt;br /&gt;
== setup for SSH ==&lt;br /&gt;
To be able to log in to your VM using ssh, stop and disable the firewall:&lt;br /&gt;
 rcSuSEfirewall2 stop&lt;br /&gt;
 chkconfig SuSEfirewall2_setup off&lt;br /&gt;
 chkconfig SuSEfirewall2_init off&lt;br /&gt;
 /etc/init.d/sshd start&lt;br /&gt;
 chkconfig sshd on&lt;br /&gt;
Inside the VM, install some needed packages:&lt;br /&gt;
 yast -i libqt4-devel libsoprano-devel&lt;br /&gt;
&lt;br /&gt;
;Now it is time to do a snapshot or clone from your VM.&lt;br /&gt;
You will be able to return to this machine state whenever you want.&lt;br /&gt;
&lt;br /&gt;
== a few more steps ==&lt;br /&gt;
Open a console as root&lt;br /&gt;
 su -&lt;br /&gt;
&lt;br /&gt;
== on an x64 distribution ==&lt;br /&gt;
If and only if you have a /lib64 path, you are on an x64 distribution.&lt;br /&gt;
Make sure you have the needed environment variables and alias set by having a file /root/.bashrc.&lt;br /&gt;
 cd&lt;br /&gt;
 cat &amp;gt;.bashrc&amp;lt;&amp;lt;EOF &lt;br /&gt;
 export KDEDIR=/usr/local         &lt;br /&gt;
 alias cmakekde=&amp;quot;cmake . -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DLIB_SUFFIX=64 -D[[Development/CMake/Addons_for_KDE#Buildtypes|CMAKE_BUILD_TYPE]]=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias cmakekdelibs=&amp;quot;cmake ../kdelibs -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DLIB_SUFFIX=64 -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias makeqt=&amp;quot;./configure -dbus -openssl -plugin-sql-mysql -libdir /usr/lib64 -prefix /usr &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 export QTDIR=/usr&lt;br /&gt;
 EOF&lt;br /&gt;
 cat &amp;gt;.gitconfig&amp;lt;&amp;lt;EOF&lt;br /&gt;
 [url &amp;quot;git://anongit.kde.org/&amp;quot;]&lt;br /&gt;
     insteadOf = kde:&lt;br /&gt;
 [url &amp;quot;ssh://git@git.kde.org/&amp;quot;]&lt;br /&gt;
     pushInsteadOf = kde:&lt;br /&gt;
 EOF&lt;br /&gt;
Now activate this file&lt;br /&gt;
 . /root/.bashrc&lt;br /&gt;
&lt;br /&gt;
== on another distribution (incl 32bit)==&lt;br /&gt;
Make sure you have the needed environment variables and alias set by having a file /root/.bashrc. &lt;br /&gt;
 cd&lt;br /&gt;
 cat &amp;gt;.bashrc&amp;lt;&amp;lt;EOF&lt;br /&gt;
 export KDEDIR=/usr/local         &lt;br /&gt;
 alias cmakekde=&amp;quot;cmake . -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias cmakekdelibs=&amp;quot;cmake ../kdelibs -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DCMAKE_BUILD_TYPE=debugfull &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 alias makeqt=&amp;quot;./configure -dbus -openssl -plugin-sql-mysql -prefix /usr &amp;amp;&amp;amp; make -j8 &amp;amp;&amp;amp; make install&amp;quot;&lt;br /&gt;
 export QTDIR=/usr&lt;br /&gt;
 EOF&lt;br /&gt;
 cat &amp;gt;.gitconfig&amp;lt;&amp;lt;EOF&lt;br /&gt;
 [url &amp;quot;git://anongit.kde.org/&amp;quot;]&lt;br /&gt;
     insteadOf = kde:&lt;br /&gt;
 [url &amp;quot;ssh://git@git.kde.org/&amp;quot;]&lt;br /&gt;
     pushInsteadOf = kde:&lt;br /&gt;
 EOF&lt;br /&gt;
Now activate this file&lt;br /&gt;
 . /root/.bashrc&lt;br /&gt;
&lt;br /&gt;
= Aquire and Build KDE as root =&lt;br /&gt;
If something fails you may need to make clean.&lt;br /&gt;
&lt;br /&gt;
== automoc ==&lt;br /&gt;
automoc is needed for akonadi.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:automoc&lt;br /&gt;
 cd automoc&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== akonadi ==&lt;br /&gt;
Akonadi keeps personal information management data in a mysql database. It is needed for KDEPIMLIBS.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:akonadi&lt;br /&gt;
 cd akonadi&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== libattica ==&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:attica&lt;br /&gt;
 cd attica&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== dbusmenuqt ==&lt;br /&gt;
 cd&lt;br /&gt;
 git clone git://gitorious.org/dbusmenu/dbusmenu-qt.git&lt;br /&gt;
 cd dbusmenu-qt&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== shared desktop ontologies ==&lt;br /&gt;
shared desktop ontologies is needed by kdepimlibs in order to build Nepomuk (which is a part of kdelibs)&lt;br /&gt;
 cd&lt;br /&gt;
 wget http://downloads.sourceforge.net/project/oscaf/shared-desktop-ontologies/0.8/shared-desktop-ontologies-0.8.0.tar.bz2&lt;br /&gt;
 bunzip2 shared-desktop-ontologies-0.8.0.tar.bz2&lt;br /&gt;
 tar xvf shared-desktop-ontologies-0.8.0.tar&lt;br /&gt;
 cd shared-desktop-ontologies-0.8.0/&lt;br /&gt;
 cmake . &amp;amp;&amp;amp; make &amp;amp;&amp;amp; make install&lt;br /&gt;
&lt;br /&gt;
== phonon ==&lt;br /&gt;
Phonon is needed for kdebase-runtime&lt;br /&gt;
 cd&lt;br /&gt;
 git clone git://anongit.kde.org/phonon&lt;br /&gt;
 cd phonon&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kdelibs ==&lt;br /&gt;
KDELIBS requires an out-of-source build, that is why it is more complicated to build:&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kdelibs&lt;br /&gt;
 mkdir kdelibs-build&lt;br /&gt;
 cd kdelibs-build&lt;br /&gt;
 cmakekdelibs&lt;br /&gt;
Verify it has been correctly installed - the following must be possible:&lt;br /&gt;
 kde4-config --prefix&lt;br /&gt;
 /usr/local&lt;br /&gt;
&lt;br /&gt;
== kactivities ==&lt;br /&gt;
kactivities is needed for kde-workspace.&lt;br /&gt;
 cd&lt;br /&gt;
 git clone kde:kactivities&lt;br /&gt;
 cd kactivities&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
== kdebase ==&lt;br /&gt;
 cd &lt;br /&gt;
 git clone kde:kde-baseapps&lt;br /&gt;
 git clone kde:konsole&lt;br /&gt;
 git clone kde:kde-workspace&lt;br /&gt;
 git clone kde:kde-runtime &lt;br /&gt;
 cd kde-baseapps&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd konsole&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd kde-workspace&lt;br /&gt;
 cmakekde&lt;br /&gt;
 cd&lt;br /&gt;
 cd kde-runtime&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
= Config =&lt;br /&gt;
First allow root login. You will need it as you do not have another login:&lt;br /&gt;
 sed -i &amp;quot;s/AllowRootLogin.*/AllowRootLogin=true/g&amp;quot; /usr/local/share/config/kdm/kdmrc&lt;br /&gt;
Now stop your running display manager:&lt;br /&gt;
 /etc/init.d/xdm stop&lt;br /&gt;
And start your self-compiled display manager:&lt;br /&gt;
 kdm&lt;br /&gt;
To enable automated startup of your kdm, you need to change a SUSE-specific path in /etc/init.d/xdm:&lt;br /&gt;
 KDM4_BIN=/usr/local/bin/kdm&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/kdesrc-build</id>
		<title>Getting Started/Build/kdesrc-build</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/kdesrc-build"/>
				<updated>2012-02-11T18:09:48Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: /* Setup the configuration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:I18n/Language Navigation Bar|Getting_Started/Build/kdesrc-build}}&lt;br /&gt;
&lt;br /&gt;
{{note|It is possible to build KDE 3 using older versions of kdesrc-build, but this is not described here.}}&lt;br /&gt;
&lt;br /&gt;
== Building KDE using the kdesrc-build tool ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction to kdesrc-build ===&lt;br /&gt;
&lt;br /&gt;
[http://kdesrc-build.kde.org/ kdesrc-build] (formerly kdesvn-build) is a tool to allow users and developers to easily download and build the latest versions of the KDE Software Compilation (KDE SC) from the KDE source code repositories.  It automates the following tasks and more:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Performing the initial checkout.&lt;br /&gt;
* Handling updates for modules that are already checked out.&lt;br /&gt;
* Setting up the build system for the module.&lt;br /&gt;
* Performing the build and install.&lt;br /&gt;
* Specifying your CMake options or configure flags (so you don't have to remember them every time).&lt;br /&gt;
* Logging build errors so you can review them easier for troubleshooting.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is not the end-all for your troubles building KDE, [[../Troubleshooting|Troubleshooting]] still applies. Many errors that occur using other methods occur here too, you read the log files that are stored for you.&lt;br /&gt;
&lt;br /&gt;
=== Why use kdesrc-build? ===&lt;br /&gt;
&lt;br /&gt;
So why use kdesrc-build?  There are several reasons you may like to use it:&lt;br /&gt;
&lt;br /&gt;
# Less manual editing of commands.  Instead of having to remember to add the correct options to the cmake command line or configure command, you can setup the options once and then kdesrc-build will use your settings from then on, saving you from wasting time because you forgot to enable a setting.&lt;br /&gt;
# Command logging to help debug build failures.  kdesrc-build logs all command outputs to a file.  This has several advantages:&lt;br /&gt;
## When a module fails to build, you already have the error output saved to disk, ready to be viewed and compared with other error messages to aid debugging.&lt;br /&gt;
## Quieter output.  Even with CMake, the output of Qt or a KDE SC module build can be extensive.  kdesrc-build does not show the details of a module build (but will show the progress), instead an overview of the build process is displayed.&lt;br /&gt;
# It's just easier.  Instead of having to learn how to use the Subversion and git tools, and how to setup a KDE build system, you can specify what modules you want build, where to install them to, and any other options you want and then have kdesrc-build actually do it, even while you're away from the computer or busy doing other things.&lt;br /&gt;
# It's easy to step in yourself.  kdesrc-build uses a standard source and build directory layout, and calls the same commands you would.  So kdesrc-build will not interfere with you performing the build or editing the source yourself if you so choose.&lt;br /&gt;
&lt;br /&gt;
=== Setting up ===&lt;br /&gt;
&lt;br /&gt;
==== Prerequisites ====&lt;br /&gt;
kdesrc-build is fairly easy to install and setup, but you also need to have the right software installed to build KDE. The requirements to build KDE are available as follows:&lt;br /&gt;
&lt;br /&gt;
* KDE 4: [[../Requirements|KDE 4 Requirements]]&lt;br /&gt;
&lt;br /&gt;
kdesrc-build requires Perl 5.8 or higher. It is installed by default with most distributions, and is included in the link above. Check your version of Perl with:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;perl -v&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will also need [https://github.com/gisle/libwww-perl#readme libwww], a collection of Perl Internet-related modules.&lt;br /&gt;
&lt;br /&gt;
{{note|kdesrc-build is developed on a Linux system, but it should work on the various BSD distributions as well (although GNU tools may be required).}}&lt;br /&gt;
&lt;br /&gt;
==== Download and install kdesrc-build ====&lt;br /&gt;
Once your system is setup to be able to compile the KDE SC, you can download kdesrc-build from its website, [http://kdesrc-build.kde.org/ kdesrc-build.kde.org].  The file you download will contain (at least) the kdesrc-build script and a sample configuration file.  Installing kdesrc-build is as simple as saving the file and making it executable.  If you'd like, you can move it to a directory in your PATH, however for this example we'll put it into the KDE source directory that we use (~/kdesrc)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
mkdir -p ~/kdesrc &amp;amp;&amp;amp;&lt;br /&gt;
cd ~/kdesrc &amp;amp;&amp;amp;&lt;br /&gt;
tar xjvf ~/path/to/kdesrc-build-1.14.1.tar.bz2 &amp;amp;&amp;amp;&lt;br /&gt;
cp kdesrc-build-1.14.1/kdesrc-build .&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively, the newest kdesrc-build script (and sample config file) can be pulled directly from git:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone git://anongit.kde.org/kdesrc-build.git ~/kdesrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Setup the configuration ====&lt;br /&gt;
Now you should [[Getting Started/Build/kdesrc-build-config|setup your configuration]]. For the most part the defaults in the included kdesrc-buildrc-sample should be sufficient.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cp ~/kdesrc/kdesrc-build-1.14.1/kdesrc-buildrc-sample ~/.kdesrc-buildrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can start kdesrc-build using the commands&lt;br /&gt;
 cd&lt;br /&gt;
 ./kdesrc-build&lt;br /&gt;
&lt;br /&gt;
Now you can edit the configuration file ~/.kdesrc-buildrc&lt;br /&gt;
&lt;br /&gt;
{{tip|Note that the config file's name begins with a leading ., making it a hidden file. You may need to show hidden files in Dolphin or Konqueror to find the configuration file to edit it. Or, you can edit the sample before copying it to ~/.kdesrc-buildrc.}}&lt;br /&gt;
&lt;br /&gt;
Also, make sure that the modules you'll want to build are included. You'll want the following at the least:&lt;br /&gt;
&lt;br /&gt;
* qt-copy, kdesupport, kdelibs, kdepimlibs, kdebase&lt;br /&gt;
&lt;br /&gt;
Modules are built in the order they appear in your ~/.kdesrc-buildrc, so the first module should be qt-copy, kdelibs should be before any other KDE SC module, and so on.&lt;br /&gt;
&lt;br /&gt;
{{note|The sample configuration file does include these modules by default, you won't need to make many changes unless you'd like to add some modules to the build by uncommenting them.}}&lt;br /&gt;
&lt;br /&gt;
You may want to enable the make-install-prefix option if you are installing KDE SC or Qt to a directory that is not in your home directory.  make-install-prefix allows you to run su or sudo during the make install process so you can install files as root, or set certain programs to execute with higher permissions (This is required for certain programs to execute properly).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;module kdelibs&lt;br /&gt;
  make-install-prefix sudo -S # sudo with no stdin&lt;br /&gt;
end module&lt;br /&gt;
&lt;br /&gt;
module kdebase&lt;br /&gt;
  make-install-prefix sudo -S&lt;br /&gt;
end module&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If a module you'd like to build isn't already present, simply add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;module &amp;amp;lt;module-name&amp;amp;gt;&lt;br /&gt;
end module&amp;lt;/pre&amp;gt; at the end of the ~/.kdesrc-buildrc. &amp;amp;lt;module-name&amp;amp;gt; would be whatever the module is called in the software repository (for instance, kdemultimedia).&lt;br /&gt;
&lt;br /&gt;
===== Git-based modules =====&lt;br /&gt;
&lt;br /&gt;
Some KDE projects use the &amp;quot;git&amp;quot; source-control software instead of Subversion (as part of an ongoing migration to git). This includes software like Amarok and Konversation.&lt;br /&gt;
&lt;br /&gt;
To build these modules in kdesrc-build, you just need to add a couple of lines to the module configuration. For example, konversation is developed in the Git repository at [https://projects.kde.org/projects/extragear/network/konversation/repository]. So you would just add a module (you can pick whatever name for the module you like, as long as it's not already used):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;module konversation&lt;br /&gt;
    repository git://anongit.kde.org/konversation&lt;br /&gt;
    branch master&lt;br /&gt;
end module&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case I selected the &amp;quot;master&amp;quot; branch since that is the default git branch.&lt;br /&gt;
&lt;br /&gt;
Now whenever you build konversation, kdesrc-build will use git instead of Subversion.&lt;br /&gt;
&lt;br /&gt;
==== Useful kdesrc-build commands ====&lt;br /&gt;
kdesrc-build is driven from the command line, so here's a guide to some of the more useful command line options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table cellpadding=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Option&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Effect&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;tt&amp;gt;&amp;lt;span style=&amp;quot;white-space:nowrap;&amp;quot;&amp;gt;[http://kdesrc-build.kde.org/documentation/cmdline.html#cmdline-pretend --pretend]&amp;lt;/span&amp;gt;&amp;lt;/tt&amp;gt; (Short&amp;amp;nbsp;form&amp;amp;nbsp;&amp;lt;tt&amp;gt;&amp;lt;span style=&amp;quot;white-space:nowrap;&amp;quot;&amp;gt;-p&amp;lt;/span&amp;gt;&amp;lt;/tt&amp;gt;)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This option is like a dry run.  kdesrc-build will process the options and its configuration like normal, and run through the build as normal, but instead of downloading or running the build will instead output what kdesrc-build would have done.  You should always run with -p before running kdesrc-build to make sure it is doing what you expect.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;tt&amp;gt;[http://kdesrc-build.kde.org/documentation/cmdline.html#cmdline-no-svn --no-svn]&amp;lt;/tt&amp;gt; (Alt. form &amp;lt;tt&amp;gt;--no-src&amp;lt;/tt&amp;gt;)&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;This option skips the source code update step.  This is useful if you're running kdesrc-build again soon after the last update and don't want to wait to find out there were no changes.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;tt&amp;gt;[http://kdesrc-build.kde.org/documentation/cmdline.html#cmdline-refresh-build --refresh-build]&amp;lt;/tt&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;This option causes kdesrc-build to delete the current build information for the given modules and start building them again from scratch.  This option takes a lot of time but gives the best chance of a successful build.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Any other non-option arguments on the command line are assumed to be modules to build (and are built in the order provided on the command line).  If no modules are specified, all of the modules listed in the ~/.kdesrc-buildrc are built in the order listed in the file.&lt;br /&gt;
&lt;br /&gt;
== Build ==&lt;br /&gt;
We're almost there.  If you're happy with your settings then it's time to test out kdesrc-build.  In theory things are as simple as running kdesrc-build and then coming back later. ;)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd ~/kdesrc&lt;br /&gt;
./kdesrc-build&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You may want to test by building qt-copy first however.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd ~/kdesrc&lt;br /&gt;
./kdesrc-build qt-copy&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{tip|If you have the [http://www.gnu.org/software/screen/ GNU screen] program available then you should definitely use it to run kdesrc-build, as you can detach your kdesrc-build session and logout while kdesrc-build is still running.}}&lt;br /&gt;
&lt;br /&gt;
If the build failed (kdesrc-build will error out with a nice bright red error message) then there are several possibilities:&lt;br /&gt;
&lt;br /&gt;
# You are missing a key piece of required software (such as a development library)&lt;br /&gt;
# The KDE SC code being compiled is broken in some fashion to where it won't build.  This is commonly due to newly committed code that worked on the developer's machine, or occasionally on Mondays (when incompatible changes are permitted to kdelibs).&lt;br /&gt;
# kdesrc-build is not setup properly.  You may be trying to install to a directory that you have no permissions to access for instance, or you may have specified a system qtdir that does not exist.&lt;br /&gt;
# The module may depend on a newer version of qt-copy or kdelibs (or other module).  In this case you'll have to run kdesrc-build to update the out-of-date module first.&lt;br /&gt;
&lt;br /&gt;
How do you find out what the error was?  The output of the failing command will be in the log directory.  By default, all log output is in the {{path|log}} subdirectory of the KDE SC source directory.  The log directory is laid out like this: {{path|log/date-run/module/output-file.log}}.  To simplify finding the appropriate file, there are a couple of symlinks created:&lt;br /&gt;
&lt;br /&gt;
{{path|log/latest}} always has the debugging output for the last time kdesrc-build was run (--pretend doesn't count toward this)&lt;br /&gt;
{{path|log/latest/&amp;amp;lt;module&amp;amp;gt;/error.log}} has the debugging output for the command that caused a module build to fail.&lt;br /&gt;
&lt;br /&gt;
For instance if qt-copy just failed to build you could read the output like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd ~/kderc&lt;br /&gt;
kwrite log/latest/qt-copy/error.log&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replace kwrite with your preferred editor.  Hopefully the output can guide you to resolving the problem.  For instance, if the failure is a cmake output saying you're missing a library, install that library and try again. ;)  For link errors you can try running a --refresh-build on the module (or if that doesn't work, required libraries like qt-copy and kdelibs).&lt;br /&gt;
&lt;br /&gt;
If you're stumped by the error you may want to wait a day and try updating again, and hope that the reason for the error has been fixed.  You can also try mailing the [http://www.kde.org/mailinglists/ kde-devel] mailing list to see if others know about the problem or have had similar issues.&lt;br /&gt;
&lt;br /&gt;
== Running KDE ==&lt;br /&gt;
&lt;br /&gt;
Assuming you got enough of the modules to build and install to have a working KDE installation, you'll still need to setup your environment correctly to run it.  kdesrc-build doesn't help you out here (yet), so you should follow the instructions [[Getting_Started/Using_an_IDE_with_KDE4|here]].&lt;br /&gt;
&lt;br /&gt;
Make sure to use the same paths as the ones you defined in .kdesrc-buildrc: for the KDEDIRS and KDEDIR variable use the setting of the &amp;quot;prefix&amp;quot; option (in the global section). For the QTDIR variable use the setting of the &amp;quot;qtdir&amp;quot; option.&lt;br /&gt;
&lt;br /&gt;
== Keeping KDE up to date ==&lt;br /&gt;
&lt;br /&gt;
Keeping your KDE installation up to date is as simple as running kdesrc-build again.  Every kdesrc-build has these phases:&lt;br /&gt;
&lt;br /&gt;
# Update the source code for all modules being built.&lt;br /&gt;
# Build and then install all the modules.&lt;br /&gt;
&lt;br /&gt;
Old build directories are not deleted by default, so the build after a small update will not normally take as long as the initial build of a module.  This is called &amp;quot;incremental make&amp;quot;.  However it may be necessary at times to perform a full rebuild due to inconsistencies between the build directory configuation and changes to the source directory.  You can use the --refresh-build option to force a full rebuild.&lt;br /&gt;
&lt;br /&gt;
For more information on how to take advantage of kdesrc-build, see the [http://kdesrc-build.kde.org/documentation online documentation] for kdesrc-build, which describes all of the module options and command line options available for kdesrc-build and gives tips on how to perform various useful tasks.&lt;br /&gt;
&lt;br /&gt;
If you have any questions that are not answered please feel free to add them under the Discussion entry for this page and hopefully someone will be able to get the answer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
* To browse the KDE Subversion repository, use [http://websvn.kde.org/trunk/KDE WebSVN].&lt;br /&gt;
* To browse any of the various KDE projects using git, you can go to [http://projects.kde.org KDE Git Projects] or to [http://gitweb.kde.org KDE Git Web].&lt;br /&gt;
* The Nokia Qt toolkit used by KDE can be browsed at [http://qt.gitorious.org/qt Nokia's Qt version on gitorious].&lt;br /&gt;
&lt;br /&gt;
[[Category:Build_KDE]]&lt;br /&gt;
[[Category:Tutorial]]&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/kdesrc-build</id>
		<title>Getting Started/Build/kdesrc-build</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/kdesrc-build"/>
				<updated>2012-02-11T17:14:24Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: /* Setup the configuration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:I18n/Language Navigation Bar|Getting_Started/Build/kdesrc-build}}&lt;br /&gt;
&lt;br /&gt;
{{note|It is possible to build KDE 3 using older versions of kdesrc-build, but this is not described here.}}&lt;br /&gt;
&lt;br /&gt;
== Building KDE using the kdesrc-build tool ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction to kdesrc-build ===&lt;br /&gt;
&lt;br /&gt;
[http://kdesrc-build.kde.org/ kdesrc-build] (formerly kdesvn-build) is a tool to allow users and developers to easily download and build the latest versions of the KDE Software Compilation (KDE SC) from the KDE source code repositories.  It automates the following tasks and more:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Performing the initial checkout.&lt;br /&gt;
* Handling updates for modules that are already checked out.&lt;br /&gt;
* Setting up the build system for the module.&lt;br /&gt;
* Performing the build and install.&lt;br /&gt;
* Specifying your CMake options or configure flags (so you don't have to remember them every time).&lt;br /&gt;
* Logging build errors so you can review them easier for troubleshooting.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is not the end-all for your troubles building KDE, [[../Troubleshooting|Troubleshooting]] still applies. Many errors that occur using other methods occur here too, you read the log files that are stored for you.&lt;br /&gt;
&lt;br /&gt;
=== Why use kdesrc-build? ===&lt;br /&gt;
&lt;br /&gt;
So why use kdesrc-build?  There are several reasons you may like to use it:&lt;br /&gt;
&lt;br /&gt;
# Less manual editing of commands.  Instead of having to remember to add the correct options to the cmake command line or configure command, you can setup the options once and then kdesrc-build will use your settings from then on, saving you from wasting time because you forgot to enable a setting.&lt;br /&gt;
# Command logging to help debug build failures.  kdesrc-build logs all command outputs to a file.  This has several advantages:&lt;br /&gt;
## When a module fails to build, you already have the error output saved to disk, ready to be viewed and compared with other error messages to aid debugging.&lt;br /&gt;
## Quieter output.  Even with CMake, the output of Qt or a KDE SC module build can be extensive.  kdesrc-build does not show the details of a module build (but will show the progress), instead an overview of the build process is displayed.&lt;br /&gt;
# It's just easier.  Instead of having to learn how to use the Subversion and git tools, and how to setup a KDE build system, you can specify what modules you want build, where to install them to, and any other options you want and then have kdesrc-build actually do it, even while you're away from the computer or busy doing other things.&lt;br /&gt;
# It's easy to step in yourself.  kdesrc-build uses a standard source and build directory layout, and calls the same commands you would.  So kdesrc-build will not interfere with you performing the build or editing the source yourself if you so choose.&lt;br /&gt;
&lt;br /&gt;
=== Setting up ===&lt;br /&gt;
&lt;br /&gt;
==== Prerequisites ====&lt;br /&gt;
kdesrc-build is fairly easy to install and setup, but you also need to have the right software installed to build KDE. The requirements to build KDE are available as follows:&lt;br /&gt;
&lt;br /&gt;
* KDE 4: [[../Requirements|KDE 4 Requirements]]&lt;br /&gt;
&lt;br /&gt;
kdesrc-build requires Perl 5.8 or higher. It is installed by default with most distributions, and is included in the link above. Check your version of Perl with:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;perl -v&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will also need [https://github.com/gisle/libwww-perl#readme libwww], a collection of Perl Internet-related modules.&lt;br /&gt;
&lt;br /&gt;
{{note|kdesrc-build is developed on a Linux system, but it should work on the various BSD distributions as well (although GNU tools may be required).}}&lt;br /&gt;
&lt;br /&gt;
==== Download and install kdesrc-build ====&lt;br /&gt;
Once your system is setup to be able to compile the KDE SC, you can download kdesrc-build from its website, [http://kdesrc-build.kde.org/ kdesrc-build.kde.org].  The file you download will contain (at least) the kdesrc-build script and a sample configuration file.  Installing kdesrc-build is as simple as saving the file and making it executable.  If you'd like, you can move it to a directory in your PATH, however for this example we'll put it into the KDE source directory that we use (~/kdesrc)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
mkdir -p ~/kdesrc &amp;amp;&amp;amp;&lt;br /&gt;
cd ~/kdesrc &amp;amp;&amp;amp;&lt;br /&gt;
tar xjvf ~/path/to/kdesrc-build-1.14.1.tar.bz2 &amp;amp;&amp;amp;&lt;br /&gt;
cp kdesrc-build-1.14.1/kdesrc-build .&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively, the newest kdesrc-build script (and sample config file) can be pulled directly from git:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone git://anongit.kde.org/kdesrc-build.git ~/kdesrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Setup the configuration ====&lt;br /&gt;
Now you should [[Getting Started/Build/kdesrc-build-config|setup your configuration]].  For the most part the defaults in the included kdesrc-buildrc-sample should be sufficient.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cp ~/kdesrc/kdesrc-build-1.14.1/kdesrc-buildrc-sample ~/.kdesrc-buildrc&lt;br /&gt;
# Now edit the ~/.kdesrc-buildrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{tip|Note that the config file's name begins with a leading ., making it a hidden file.  You may need to show hidden files in Dolphin or Konqueror to find the configuration file to edit it.  Or, you can edit the sample before copying it to ~/.kdesrc-buildrc.}}&lt;br /&gt;
&lt;br /&gt;
Also, make sure that the modules you'll want to build are included.  You'll want the following at the least:&lt;br /&gt;
&lt;br /&gt;
* qt-copy, kdesupport, kdelibs, kdepimlibs, kdebase&lt;br /&gt;
&lt;br /&gt;
Modules are built in the order they appear in your ~/.kdesrc-buildrc, so the first module should be qt-copy, kdelibs should be before any other KDE SC module, and so on.&lt;br /&gt;
&lt;br /&gt;
{{note|The sample configuration file does include these modules by default, you won't need to make many changes unless you'd like to add some modules to the build by uncommenting them.}}&lt;br /&gt;
&lt;br /&gt;
You may want to enable the make-install-prefix option if you are installing KDE SC or Qt to a directory that is not in your home directory.  make-install-prefix allows you to run su or sudo during the make install process so you can install files as root, or set certain programs to execute with higher permissions (This is required for certain programs to execute properly).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;module kdelibs&lt;br /&gt;
  make-install-prefix sudo -S # sudo with no stdin&lt;br /&gt;
end module&lt;br /&gt;
&lt;br /&gt;
module kdebase&lt;br /&gt;
  make-install-prefix sudo -S&lt;br /&gt;
end module&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If a module you'd like to build isn't already present, simply add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;module &amp;amp;lt;module-name&amp;amp;gt;&lt;br /&gt;
end module&amp;lt;/pre&amp;gt; at the end of the ~/.kdesrc-buildrc. &amp;amp;lt;module-name&amp;amp;gt; would be whatever the module is called in the software repository (for instance, kdemultimedia).&lt;br /&gt;
&lt;br /&gt;
===== Git-based modules =====&lt;br /&gt;
&lt;br /&gt;
Some KDE projects use the &amp;quot;git&amp;quot; source-control software instead of Subversion (as part of an ongoing migration to git). This includes software like Amarok and Konversation.&lt;br /&gt;
&lt;br /&gt;
To build these modules in kdesrc-build, you just need to add a couple of lines to the module configuration. For example, konversation is developed in the Git repository at [https://projects.kde.org/projects/extragear/network/konversation/repository]. So you would just add a module (you can pick whatever name for the module you like, as long as it's not already used):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;module konversation&lt;br /&gt;
    repository git://anongit.kde.org/konversation&lt;br /&gt;
    branch master&lt;br /&gt;
end module&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case I selected the &amp;quot;master&amp;quot; branch since that is the default git branch.&lt;br /&gt;
&lt;br /&gt;
Now whenever you build konversation, kdesrc-build will use git instead of Subversion.&lt;br /&gt;
&lt;br /&gt;
==== Useful kdesrc-build commands ====&lt;br /&gt;
kdesrc-build is driven from the command line, so here's a guide to some of the more useful command line options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table cellpadding=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Option&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Effect&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;tt&amp;gt;&amp;lt;span style=&amp;quot;white-space:nowrap;&amp;quot;&amp;gt;[http://kdesrc-build.kde.org/documentation/cmdline.html#cmdline-pretend --pretend]&amp;lt;/span&amp;gt;&amp;lt;/tt&amp;gt; (Short&amp;amp;nbsp;form&amp;amp;nbsp;&amp;lt;tt&amp;gt;&amp;lt;span style=&amp;quot;white-space:nowrap;&amp;quot;&amp;gt;-p&amp;lt;/span&amp;gt;&amp;lt;/tt&amp;gt;)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This option is like a dry run.  kdesrc-build will process the options and its configuration like normal, and run through the build as normal, but instead of downloading or running the build will instead output what kdesrc-build would have done.  You should always run with -p before running kdesrc-build to make sure it is doing what you expect.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;tt&amp;gt;[http://kdesrc-build.kde.org/documentation/cmdline.html#cmdline-no-svn --no-svn]&amp;lt;/tt&amp;gt; (Alt. form &amp;lt;tt&amp;gt;--no-src&amp;lt;/tt&amp;gt;)&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;This option skips the source code update step.  This is useful if you're running kdesrc-build again soon after the last update and don't want to wait to find out there were no changes.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;tt&amp;gt;[http://kdesrc-build.kde.org/documentation/cmdline.html#cmdline-refresh-build --refresh-build]&amp;lt;/tt&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;This option causes kdesrc-build to delete the current build information for the given modules and start building them again from scratch.  This option takes a lot of time but gives the best chance of a successful build.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Any other non-option arguments on the command line are assumed to be modules to build (and are built in the order provided on the command line).  If no modules are specified, all of the modules listed in the ~/.kdesrc-buildrc are built in the order listed in the file.&lt;br /&gt;
&lt;br /&gt;
== Build ==&lt;br /&gt;
We're almost there.  If you're happy with your settings then it's time to test out kdesrc-build.  In theory things are as simple as running kdesrc-build and then coming back later. ;)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd ~/kdesrc&lt;br /&gt;
./kdesrc-build&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You may want to test by building qt-copy first however.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd ~/kdesrc&lt;br /&gt;
./kdesrc-build qt-copy&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{tip|If you have the [http://www.gnu.org/software/screen/ GNU screen] program available then you should definitely use it to run kdesrc-build, as you can detach your kdesrc-build session and logout while kdesrc-build is still running.}}&lt;br /&gt;
&lt;br /&gt;
If the build failed (kdesrc-build will error out with a nice bright red error message) then there are several possibilities:&lt;br /&gt;
&lt;br /&gt;
# You are missing a key piece of required software (such as a development library)&lt;br /&gt;
# The KDE SC code being compiled is broken in some fashion to where it won't build.  This is commonly due to newly committed code that worked on the developer's machine, or occasionally on Mondays (when incompatible changes are permitted to kdelibs).&lt;br /&gt;
# kdesrc-build is not setup properly.  You may be trying to install to a directory that you have no permissions to access for instance, or you may have specified a system qtdir that does not exist.&lt;br /&gt;
# The module may depend on a newer version of qt-copy or kdelibs (or other module).  In this case you'll have to run kdesrc-build to update the out-of-date module first.&lt;br /&gt;
&lt;br /&gt;
How do you find out what the error was?  The output of the failing command will be in the log directory.  By default, all log output is in the {{path|log}} subdirectory of the KDE SC source directory.  The log directory is laid out like this: {{path|log/date-run/module/output-file.log}}.  To simplify finding the appropriate file, there are a couple of symlinks created:&lt;br /&gt;
&lt;br /&gt;
{{path|log/latest}} always has the debugging output for the last time kdesrc-build was run (--pretend doesn't count toward this)&lt;br /&gt;
{{path|log/latest/&amp;amp;lt;module&amp;amp;gt;/error.log}} has the debugging output for the command that caused a module build to fail.&lt;br /&gt;
&lt;br /&gt;
For instance if qt-copy just failed to build you could read the output like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd ~/kderc&lt;br /&gt;
kwrite log/latest/qt-copy/error.log&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replace kwrite with your preferred editor.  Hopefully the output can guide you to resolving the problem.  For instance, if the failure is a cmake output saying you're missing a library, install that library and try again. ;)  For link errors you can try running a --refresh-build on the module (or if that doesn't work, required libraries like qt-copy and kdelibs).&lt;br /&gt;
&lt;br /&gt;
If you're stumped by the error you may want to wait a day and try updating again, and hope that the reason for the error has been fixed.  You can also try mailing the [http://www.kde.org/mailinglists/ kde-devel] mailing list to see if others know about the problem or have had similar issues.&lt;br /&gt;
&lt;br /&gt;
== Running KDE ==&lt;br /&gt;
&lt;br /&gt;
Assuming you got enough of the modules to build and install to have a working KDE installation, you'll still need to setup your environment correctly to run it.  kdesrc-build doesn't help you out here (yet), so you should follow the instructions [[Getting_Started/Using_an_IDE_with_KDE4|here]].&lt;br /&gt;
&lt;br /&gt;
Make sure to use the same paths as the ones you defined in .kdesrc-buildrc: for the KDEDIRS and KDEDIR variable use the setting of the &amp;quot;prefix&amp;quot; option (in the global section). For the QTDIR variable use the setting of the &amp;quot;qtdir&amp;quot; option.&lt;br /&gt;
&lt;br /&gt;
== Keeping KDE up to date ==&lt;br /&gt;
&lt;br /&gt;
Keeping your KDE installation up to date is as simple as running kdesrc-build again.  Every kdesrc-build has these phases:&lt;br /&gt;
&lt;br /&gt;
# Update the source code for all modules being built.&lt;br /&gt;
# Build and then install all the modules.&lt;br /&gt;
&lt;br /&gt;
Old build directories are not deleted by default, so the build after a small update will not normally take as long as the initial build of a module.  This is called &amp;quot;incremental make&amp;quot;.  However it may be necessary at times to perform a full rebuild due to inconsistencies between the build directory configuation and changes to the source directory.  You can use the --refresh-build option to force a full rebuild.&lt;br /&gt;
&lt;br /&gt;
For more information on how to take advantage of kdesrc-build, see the [http://kdesrc-build.kde.org/documentation online documentation] for kdesrc-build, which describes all of the module options and command line options available for kdesrc-build and gives tips on how to perform various useful tasks.&lt;br /&gt;
&lt;br /&gt;
If you have any questions that are not answered please feel free to add them under the Discussion entry for this page and hopefully someone will be able to get the answer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
* To browse the KDE Subversion repository, use [http://websvn.kde.org/trunk/KDE WebSVN].&lt;br /&gt;
* To browse any of the various KDE projects using git, you can go to [http://projects.kde.org KDE Git Projects] or to [http://gitweb.kde.org KDE Git Web].&lt;br /&gt;
* The Nokia Qt toolkit used by KDE can be browsed at [http://qt.gitorious.org/qt Nokia's Qt version on gitorious].&lt;br /&gt;
&lt;br /&gt;
[[Category:Build_KDE]]&lt;br /&gt;
[[Category:Tutorial]]&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/kdesrc-build-config</id>
		<title>Getting Started/Build/kdesrc-build-config</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/kdesrc-build-config"/>
				<updated>2012-02-11T17:12:37Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: moved Getting Started/Build/kdesrc-buildrc to Getting Started/Build/kdesrc-build-config: make it clear what this article is about. Make it visible that this article is not kdesrc-build.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== kdesvn-buildrc ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
The [[Getting_Started/Build/kdesvn-build|kdesvn-build]] program, which is used to download, build, and install [http://www.kde.org/ KDE] from the [http://websvn.kde.org/ KDE source repository], uses a file called {{path|kdesvn-buildrc}} in order to control what is downloaded and built, what options are used, and where KDE is installed to.&lt;br /&gt;
&lt;br /&gt;
This is a description of how to use {{path|kdesvn-buildrc}}.&lt;br /&gt;
&lt;br /&gt;
=== Creating your configuration ===&lt;br /&gt;
&lt;br /&gt;
The kdesvn-build download will include a file called {{path|kdesvn-buildrc-sample}}, which is a sample configuration file suitable for building the KDE Software Compilation (SC).&lt;br /&gt;
&lt;br /&gt;
To create your configuration, it is recommended to use this file as a base since it includes the standard list of KDE modules to build, in the correct order.  (You can, of course, add or remove most modules if you like).&lt;br /&gt;
&lt;br /&gt;
You can use any standard text editor to edit this file, such as KWrite, nano, vi, etc.&lt;br /&gt;
&lt;br /&gt;
==== Global configuration ====&lt;br /&gt;
&lt;br /&gt;
Once you open the file, you will see that it starts with some comments (on lines beginning with #), and then the world &amp;quot;global&amp;quot;.  This starts the global configuration for the kdesvn-buildrc, which is used to specify options which are common to all of the modules.&lt;br /&gt;
&lt;br /&gt;
Each option in the global section is specified in the following form:&lt;br /&gt;
:option-name  value&lt;br /&gt;
&lt;br /&gt;
Many options are already listed, with default values, and comments about the option on top.  Some options have more than one sample value listed.  In this situation, all but one of these will have comments.  If you want to use a different sample option, simply uncomment the line by deleting the '#' at the beginning, and commenting or deleting the other lines with the same option name.&lt;br /&gt;
&lt;br /&gt;
Here's a short listing of some of the important global options:&lt;br /&gt;
&lt;br /&gt;
* source-dir: This option controls where kdesvn-build will download the sources to.  In addition, most other directories that kdesvn-build uses will be subdirectories of this directory by default, so it is a kind of &amp;quot;kdesvn-build prefix&amp;quot;. The default value is {{path|~/kdesvn}}, which downloads the source in a subdirectory under your home directory.&lt;br /&gt;
* build-dir: This controls where kdesvn-build actually builds the various modules.  Normally it is the directory {{path|build}} under your source directory.&lt;br /&gt;
* kdedir: This controls where the KDE SC (and the various supporting modules such as kdesupport) get installed to. The default is {{path|~/kde}}, which installs to your home directory.&lt;br /&gt;
&lt;br /&gt;
{{note|As you can see, there are three different major directories, source, build, and install.  The build directory is used to keep the source directory clean and to hold intermediate files that don't get installed}}&lt;br /&gt;
&lt;br /&gt;
{{tip|You can use ~/ in these options to represent your home directory}}&lt;br /&gt;
&lt;br /&gt;
* qtdir: This controls where Qt 4 is assumed to be. If you use the qt-copy module, it also controls where qt-copy is installed to. Default is {{path|~/qt4}}, which installs qt-copy to your home directory.&lt;br /&gt;
&lt;br /&gt;
{{tip|qt-copy is a module specifically for building Nokia's Qt toolkit. See [[#qt-copy]] below for information about what is special.}}&lt;br /&gt;
&lt;br /&gt;
* cmake-options: This controls what [[Development/Tutorials/CMake#Command_Line_Variables|options]] are passed to CMake for ''every'' KDE module.  For instance, if you want to enable full debugging information, you could set:&lt;br /&gt;
:cmake-options -DCMAKE_BUILD_TYPE=debugfull&lt;br /&gt;
&lt;br /&gt;
* make-options: This is used to pass command line options to the make command, which is what actually performs the build.  The most likely option is -jN, where N is the number of jobs to perform at once.  If you have a system with more than one CPU, it is recommended to use N = number_of_CPUs + 1.  For instance, -j3 on a dual core machine or -j5 on a quad-core.  You can lower this number if your system is sluggish during the build, but raising it won't buy you much in build speed.&lt;br /&gt;
&lt;br /&gt;
* make-install-prefix: This is used to allow a program to run make install on your behalf.  Normally with would be the sudo program, which is used to perform actions with administrator permissions.  You only need this for the following:&lt;br /&gt;
# You want to install KDE to the system and not your home directory.&lt;br /&gt;
# Some installed files require elevated permissions to work properly (this is true for kdebase, and some files in kdelibs).&lt;br /&gt;
&lt;br /&gt;
If this ''is'' the case for you, you can use this option (either globally, or for each module) to run make install using sudo, or su, etc.&lt;br /&gt;
&lt;br /&gt;
==== Module configuration ====&lt;br /&gt;
&lt;br /&gt;
After the global options are all done, you'll see the line &amp;quot;end global&amp;quot;, which lets kdesvn-build know that all of the global options have been read.&lt;br /&gt;
&lt;br /&gt;
Next in the kdesvn-buildrc are the module options.  First off, modules are listed in the file, in the order they are to be built and installed.  Each module is listed in the following format:&lt;br /&gt;
:module ''module-name''&lt;br /&gt;
::module-options&lt;br /&gt;
:end module&lt;br /&gt;
&lt;br /&gt;
The ''module-name'' is how kdesvn-build refers to the module. It should match the name of the module you are downloading from the source repository. Base KDE modules are listed [http://websvn.kde.org/trunk/KDE/ in WebSVN].  Other modules are also available [http://websvn.kde.org/trunk/ in WebSVN].&lt;br /&gt;
&lt;br /&gt;
One exception is that modules downloaded from git can have any module name you'd like that isn't already used, as kdesvn-build determines their download location using a specific ''repository'' option.&lt;br /&gt;
&lt;br /&gt;
For each module you can specify options, in the same fashion as for the global options. Most of the time, if you set an option for a module, it completely overrides the global option, if any.&lt;br /&gt;
&lt;br /&gt;
However, the cmake-options for a module is added to the global cmake-options, instead of replacing it, which allows you to avoid having to give the same cmake-options for all of your modules.&lt;br /&gt;
&lt;br /&gt;
{{tip|If you need to disable a global cmake-option, you can specify it again for the module you need to disable it for, and give it the opposite value. For instance, if you were using }}-DCMAKE_BUILD_TYPE=debugfull globally but wanted Release mode for kdebindings, you could set cmake-options -DCMAKE_BUILD_TYPE=Release for kdebindings.&lt;br /&gt;
&lt;br /&gt;
{{tip|If you get the warning from kdesvn-build that a certain module is not listed in the kdesvn-buildrc, make sure that you've added it to the kdesvn-buildrc, even if you have no options for it. If it's already in the kdesvn-buildrc, make sure you spelled the module name right on the command line.}}&lt;br /&gt;
&lt;br /&gt;
==== qt-copy ====&lt;br /&gt;
&lt;br /&gt;
The qt-copy module is special in that it uses configure-options instead of cmake-options, and it never inherits compilation flags that are set globally, since Qt uses a different build system than KDE software does.  The sample kdesvn-buildrc contains a useful set of default configure flags, but if you aren't using qt-copy, you can simply comment the entire qt-copy module out.&lt;br /&gt;
&lt;br /&gt;
Since Nokia's Qt is developed using git instead of Subversion, you must specify the ''repository'' option for qt-copy to choose which version of Qt you will use:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|+ Qt Variants&lt;br /&gt;
|-&lt;br /&gt;
! Edition to build !! Repository to use&lt;br /&gt;
|-&lt;br /&gt;
| Official Nokia Qt || git://gitorious.org/qt/qt.git&lt;br /&gt;
|-&lt;br /&gt;
| Slightly modified Qt with KDE-specific patches and bugfixes (recommended if you're going to the trouble anyways) || git://gitorious.org/+kde-developers/qt/kde-qt.git&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Either way you should specify a ''branch'' of ''master'' to choose the default version.&lt;br /&gt;
&lt;br /&gt;
If you choose kde-qt make sure to look at the README.kde-qt after kdesvn-build downloads the module for you as well!&lt;br /&gt;
&lt;br /&gt;
=== Location ===&lt;br /&gt;
&lt;br /&gt;
kdesvn-build will search in several locations for your rc file.&lt;br /&gt;
&lt;br /&gt;
# First, kdesvn-build will look for a file called {{path|kdesvn-buildrc}} in ''the current directory''.  Notice that in this situation there is no leading dot on the filename.  This allows you to control the build based on what directory you're in, which would be useful for maintaining two different Subversion installs.&lt;br /&gt;
# If no kdesvn-buildrc is found, kdesvn-build will look for a {{path|~/.kdesvn-buildrc}}.  Notice there '''is''' a leading dot on the filename in this situation.  This is the standard Linux/UNIX convention for configuration files stored in the home directory, and marks this as a hidden file.  So if you try to find the file in Dolphin or Konqueror, you may need to Show Hidden Files first.  This controls the default configuration kdesvn-build will use, no matter what directory you run kdesvn-build from.&lt;br /&gt;
# If you specify the --rc-file option to kdesvn-build, kdesvn-build will try to read the given kdesvn-buildrc file instead of the default ones.  This is also independent of what directory kdesvn-build is run in.  But, you must remember to pass this option every time, so it is only useful for testing or for a one-time-only run.&lt;br /&gt;
&lt;br /&gt;
=== Making changes ===&lt;br /&gt;
&lt;br /&gt;
When you make changes to values in your kdesvn-buildrc, they may not always be picked up immediately.  For example, if you change cmake-options but kdesvn-build has no reason to run CMake again, then you'll still be building with your old cmake-options.&lt;br /&gt;
&lt;br /&gt;
{{note|This is only partially true -- kdesvn-build will be able to note that some values have changed and automatically re-run affected build portions as appropriate, but this advice still applies until this feature has been integrated for all options}}&lt;br /&gt;
&lt;br /&gt;
The safest way to ensure that a change to your module's options is picked up is to use the --refresh-build option when rebuilding a module. This option causes kdesvn-build to completely rebuild the given module, which includes running cmake and clearing out the build directory.&lt;br /&gt;
&lt;br /&gt;
Using --refresh-build takes the most time. Often, it is enough to use --reconfigure instead of --refresh-build, which runs CMake but does not clear out the build directory. But if --reconfigure doesn't work you'll end up doing --refresh-build anyways.&lt;br /&gt;
&lt;br /&gt;
On the other hand, if you change the svn-server option to move where kdesvn-build is downloading from, you need to run kdesvn-build one time with the --svn-only option, so that kdesvn-build can perform the correct &amp;quot;svn switch&amp;quot; command.&lt;br /&gt;
&lt;br /&gt;
=== Conclusion ===&lt;br /&gt;
&lt;br /&gt;
The kdesvn-buildrc file is one of the major reasons to use kdesvn-build instead of building manually, as it will allow you to specify build settings to use all of the time instead of having to always remember to type in the correct command line settings and export the right environment variables. There are many more options than the ones covered here, which are mostly [http://kdesvn-build.kde.org/documentation/ detailed at the kdesvn-build documentation]. However, these options are enough to get you a working KDE installation.&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/kdesrc-buildrc</id>
		<title>Getting Started/Build/kdesrc-buildrc</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/kdesrc-buildrc"/>
				<updated>2012-02-11T17:12:37Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: moved Getting Started/Build/kdesrc-buildrc to Getting Started/Build/kdesrc-build-config: make it clear what this article is about. Make it visible that this article is not kdesrc-build.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Getting Started/Build/kdesrc-build-config]]&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/kdesrc-build-config</id>
		<title>Getting Started/Build/kdesrc-build-config</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/kdesrc-build-config"/>
				<updated>2012-02-11T16:45:29Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: /* Module configuration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== kdesvn-buildrc ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
The [[Getting_Started/Build/kdesvn-build|kdesvn-build]] program, which is used to download, build, and install [http://www.kde.org/ KDE] from the [http://websvn.kde.org/ KDE source repository], uses a file called {{path|kdesvn-buildrc}} in order to control what is downloaded and built, what options are used, and where KDE is installed to.&lt;br /&gt;
&lt;br /&gt;
This is a description of how to use {{path|kdesvn-buildrc}}.&lt;br /&gt;
&lt;br /&gt;
=== Creating your configuration ===&lt;br /&gt;
&lt;br /&gt;
The kdesvn-build download will include a file called {{path|kdesvn-buildrc-sample}}, which is a sample configuration file suitable for building the KDE Software Compilation (SC).&lt;br /&gt;
&lt;br /&gt;
To create your configuration, it is recommended to use this file as a base since it includes the standard list of KDE modules to build, in the correct order.  (You can, of course, add or remove most modules if you like).&lt;br /&gt;
&lt;br /&gt;
You can use any standard text editor to edit this file, such as KWrite, nano, vi, etc.&lt;br /&gt;
&lt;br /&gt;
==== Global configuration ====&lt;br /&gt;
&lt;br /&gt;
Once you open the file, you will see that it starts with some comments (on lines beginning with #), and then the world &amp;quot;global&amp;quot;.  This starts the global configuration for the kdesvn-buildrc, which is used to specify options which are common to all of the modules.&lt;br /&gt;
&lt;br /&gt;
Each option in the global section is specified in the following form:&lt;br /&gt;
:option-name  value&lt;br /&gt;
&lt;br /&gt;
Many options are already listed, with default values, and comments about the option on top.  Some options have more than one sample value listed.  In this situation, all but one of these will have comments.  If you want to use a different sample option, simply uncomment the line by deleting the '#' at the beginning, and commenting or deleting the other lines with the same option name.&lt;br /&gt;
&lt;br /&gt;
Here's a short listing of some of the important global options:&lt;br /&gt;
&lt;br /&gt;
* source-dir: This option controls where kdesvn-build will download the sources to.  In addition, most other directories that kdesvn-build uses will be subdirectories of this directory by default, so it is a kind of &amp;quot;kdesvn-build prefix&amp;quot;. The default value is {{path|~/kdesvn}}, which downloads the source in a subdirectory under your home directory.&lt;br /&gt;
* build-dir: This controls where kdesvn-build actually builds the various modules.  Normally it is the directory {{path|build}} under your source directory.&lt;br /&gt;
* kdedir: This controls where the KDE SC (and the various supporting modules such as kdesupport) get installed to. The default is {{path|~/kde}}, which installs to your home directory.&lt;br /&gt;
&lt;br /&gt;
{{note|As you can see, there are three different major directories, source, build, and install.  The build directory is used to keep the source directory clean and to hold intermediate files that don't get installed}}&lt;br /&gt;
&lt;br /&gt;
{{tip|You can use ~/ in these options to represent your home directory}}&lt;br /&gt;
&lt;br /&gt;
* qtdir: This controls where Qt 4 is assumed to be. If you use the qt-copy module, it also controls where qt-copy is installed to. Default is {{path|~/qt4}}, which installs qt-copy to your home directory.&lt;br /&gt;
&lt;br /&gt;
{{tip|qt-copy is a module specifically for building Nokia's Qt toolkit. See [[#qt-copy]] below for information about what is special.}}&lt;br /&gt;
&lt;br /&gt;
* cmake-options: This controls what [[Development/Tutorials/CMake#Command_Line_Variables|options]] are passed to CMake for ''every'' KDE module.  For instance, if you want to enable full debugging information, you could set:&lt;br /&gt;
:cmake-options -DCMAKE_BUILD_TYPE=debugfull&lt;br /&gt;
&lt;br /&gt;
* make-options: This is used to pass command line options to the make command, which is what actually performs the build.  The most likely option is -jN, where N is the number of jobs to perform at once.  If you have a system with more than one CPU, it is recommended to use N = number_of_CPUs + 1.  For instance, -j3 on a dual core machine or -j5 on a quad-core.  You can lower this number if your system is sluggish during the build, but raising it won't buy you much in build speed.&lt;br /&gt;
&lt;br /&gt;
* make-install-prefix: This is used to allow a program to run make install on your behalf.  Normally with would be the sudo program, which is used to perform actions with administrator permissions.  You only need this for the following:&lt;br /&gt;
# You want to install KDE to the system and not your home directory.&lt;br /&gt;
# Some installed files require elevated permissions to work properly (this is true for kdebase, and some files in kdelibs).&lt;br /&gt;
&lt;br /&gt;
If this ''is'' the case for you, you can use this option (either globally, or for each module) to run make install using sudo, or su, etc.&lt;br /&gt;
&lt;br /&gt;
==== Module configuration ====&lt;br /&gt;
&lt;br /&gt;
After the global options are all done, you'll see the line &amp;quot;end global&amp;quot;, which lets kdesvn-build know that all of the global options have been read.&lt;br /&gt;
&lt;br /&gt;
Next in the kdesvn-buildrc are the module options.  First off, modules are listed in the file, in the order they are to be built and installed.  Each module is listed in the following format:&lt;br /&gt;
:module ''module-name''&lt;br /&gt;
::module-options&lt;br /&gt;
:end module&lt;br /&gt;
&lt;br /&gt;
The ''module-name'' is how kdesvn-build refers to the module. It should match the name of the module you are downloading from the source repository. Base KDE modules are listed [http://websvn.kde.org/trunk/KDE/ in WebSVN].  Other modules are also available [http://websvn.kde.org/trunk/ in WebSVN].&lt;br /&gt;
&lt;br /&gt;
One exception is that modules downloaded from git can have any module name you'd like that isn't already used, as kdesvn-build determines their download location using a specific ''repository'' option.&lt;br /&gt;
&lt;br /&gt;
For each module you can specify options, in the same fashion as for the global options. Most of the time, if you set an option for a module, it completely overrides the global option, if any.&lt;br /&gt;
&lt;br /&gt;
However, the cmake-options for a module is added to the global cmake-options, instead of replacing it, which allows you to avoid having to give the same cmake-options for all of your modules.&lt;br /&gt;
&lt;br /&gt;
{{tip|If you need to disable a global cmake-option, you can specify it again for the module you need to disable it for, and give it the opposite value. For instance, if you were using }}-DCMAKE_BUILD_TYPE=debugfull globally but wanted Release mode for kdebindings, you could set cmake-options -DCMAKE_BUILD_TYPE=Release for kdebindings.&lt;br /&gt;
&lt;br /&gt;
{{tip|If you get the warning from kdesvn-build that a certain module is not listed in the kdesvn-buildrc, make sure that you've added it to the kdesvn-buildrc, even if you have no options for it. If it's already in the kdesvn-buildrc, make sure you spelled the module name right on the command line.}}&lt;br /&gt;
&lt;br /&gt;
==== qt-copy ====&lt;br /&gt;
&lt;br /&gt;
The qt-copy module is special in that it uses configure-options instead of cmake-options, and it never inherits compilation flags that are set globally, since Qt uses a different build system than KDE software does.  The sample kdesvn-buildrc contains a useful set of default configure flags, but if you aren't using qt-copy, you can simply comment the entire qt-copy module out.&lt;br /&gt;
&lt;br /&gt;
Since Nokia's Qt is developed using git instead of Subversion, you must specify the ''repository'' option for qt-copy to choose which version of Qt you will use:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|+ Qt Variants&lt;br /&gt;
|-&lt;br /&gt;
! Edition to build !! Repository to use&lt;br /&gt;
|-&lt;br /&gt;
| Official Nokia Qt || git://gitorious.org/qt/qt.git&lt;br /&gt;
|-&lt;br /&gt;
| Slightly modified Qt with KDE-specific patches and bugfixes (recommended if you're going to the trouble anyways) || git://gitorious.org/+kde-developers/qt/kde-qt.git&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Either way you should specify a ''branch'' of ''master'' to choose the default version.&lt;br /&gt;
&lt;br /&gt;
If you choose kde-qt make sure to look at the README.kde-qt after kdesvn-build downloads the module for you as well!&lt;br /&gt;
&lt;br /&gt;
=== Location ===&lt;br /&gt;
&lt;br /&gt;
kdesvn-build will search in several locations for your rc file.&lt;br /&gt;
&lt;br /&gt;
# First, kdesvn-build will look for a file called {{path|kdesvn-buildrc}} in ''the current directory''.  Notice that in this situation there is no leading dot on the filename.  This allows you to control the build based on what directory you're in, which would be useful for maintaining two different Subversion installs.&lt;br /&gt;
# If no kdesvn-buildrc is found, kdesvn-build will look for a {{path|~/.kdesvn-buildrc}}.  Notice there '''is''' a leading dot on the filename in this situation.  This is the standard Linux/UNIX convention for configuration files stored in the home directory, and marks this as a hidden file.  So if you try to find the file in Dolphin or Konqueror, you may need to Show Hidden Files first.  This controls the default configuration kdesvn-build will use, no matter what directory you run kdesvn-build from.&lt;br /&gt;
# If you specify the --rc-file option to kdesvn-build, kdesvn-build will try to read the given kdesvn-buildrc file instead of the default ones.  This is also independent of what directory kdesvn-build is run in.  But, you must remember to pass this option every time, so it is only useful for testing or for a one-time-only run.&lt;br /&gt;
&lt;br /&gt;
=== Making changes ===&lt;br /&gt;
&lt;br /&gt;
When you make changes to values in your kdesvn-buildrc, they may not always be picked up immediately.  For example, if you change cmake-options but kdesvn-build has no reason to run CMake again, then you'll still be building with your old cmake-options.&lt;br /&gt;
&lt;br /&gt;
{{note|This is only partially true -- kdesvn-build will be able to note that some values have changed and automatically re-run affected build portions as appropriate, but this advice still applies until this feature has been integrated for all options}}&lt;br /&gt;
&lt;br /&gt;
The safest way to ensure that a change to your module's options is picked up is to use the --refresh-build option when rebuilding a module. This option causes kdesvn-build to completely rebuild the given module, which includes running cmake and clearing out the build directory.&lt;br /&gt;
&lt;br /&gt;
Using --refresh-build takes the most time. Often, it is enough to use --reconfigure instead of --refresh-build, which runs CMake but does not clear out the build directory. But if --reconfigure doesn't work you'll end up doing --refresh-build anyways.&lt;br /&gt;
&lt;br /&gt;
On the other hand, if you change the svn-server option to move where kdesvn-build is downloading from, you need to run kdesvn-build one time with the --svn-only option, so that kdesvn-build can perform the correct &amp;quot;svn switch&amp;quot; command.&lt;br /&gt;
&lt;br /&gt;
=== Conclusion ===&lt;br /&gt;
&lt;br /&gt;
The kdesvn-buildrc file is one of the major reasons to use kdesvn-build instead of building manually, as it will allow you to specify build settings to use all of the time instead of having to always remember to type in the correct command line settings and export the right environment variables. There are many more options than the ones covered here, which are mostly [http://kdesvn-build.kde.org/documentation/ detailed at the kdesvn-build documentation]. However, these options are enough to get you a working KDE installation.&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/kdesrc-build-config</id>
		<title>Getting Started/Build/kdesrc-build-config</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/kdesrc-build-config"/>
				<updated>2012-02-11T16:44:47Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: /* Module configuration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== kdesvn-buildrc ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
The [[Getting_Started/Build/kdesvn-build|kdesvn-build]] program, which is used to download, build, and install [http://www.kde.org/ KDE] from the [http://websvn.kde.org/ KDE source repository], uses a file called {{path|kdesvn-buildrc}} in order to control what is downloaded and built, what options are used, and where KDE is installed to.&lt;br /&gt;
&lt;br /&gt;
This is a description of how to use {{path|kdesvn-buildrc}}.&lt;br /&gt;
&lt;br /&gt;
=== Creating your configuration ===&lt;br /&gt;
&lt;br /&gt;
The kdesvn-build download will include a file called {{path|kdesvn-buildrc-sample}}, which is a sample configuration file suitable for building the KDE Software Compilation (SC).&lt;br /&gt;
&lt;br /&gt;
To create your configuration, it is recommended to use this file as a base since it includes the standard list of KDE modules to build, in the correct order.  (You can, of course, add or remove most modules if you like).&lt;br /&gt;
&lt;br /&gt;
You can use any standard text editor to edit this file, such as KWrite, nano, vi, etc.&lt;br /&gt;
&lt;br /&gt;
==== Global configuration ====&lt;br /&gt;
&lt;br /&gt;
Once you open the file, you will see that it starts with some comments (on lines beginning with #), and then the world &amp;quot;global&amp;quot;.  This starts the global configuration for the kdesvn-buildrc, which is used to specify options which are common to all of the modules.&lt;br /&gt;
&lt;br /&gt;
Each option in the global section is specified in the following form:&lt;br /&gt;
:option-name  value&lt;br /&gt;
&lt;br /&gt;
Many options are already listed, with default values, and comments about the option on top.  Some options have more than one sample value listed.  In this situation, all but one of these will have comments.  If you want to use a different sample option, simply uncomment the line by deleting the '#' at the beginning, and commenting or deleting the other lines with the same option name.&lt;br /&gt;
&lt;br /&gt;
Here's a short listing of some of the important global options:&lt;br /&gt;
&lt;br /&gt;
* source-dir: This option controls where kdesvn-build will download the sources to.  In addition, most other directories that kdesvn-build uses will be subdirectories of this directory by default, so it is a kind of &amp;quot;kdesvn-build prefix&amp;quot;. The default value is {{path|~/kdesvn}}, which downloads the source in a subdirectory under your home directory.&lt;br /&gt;
* build-dir: This controls where kdesvn-build actually builds the various modules.  Normally it is the directory {{path|build}} under your source directory.&lt;br /&gt;
* kdedir: This controls where the KDE SC (and the various supporting modules such as kdesupport) get installed to. The default is {{path|~/kde}}, which installs to your home directory.&lt;br /&gt;
&lt;br /&gt;
{{note|As you can see, there are three different major directories, source, build, and install.  The build directory is used to keep the source directory clean and to hold intermediate files that don't get installed}}&lt;br /&gt;
&lt;br /&gt;
{{tip|You can use ~/ in these options to represent your home directory}}&lt;br /&gt;
&lt;br /&gt;
* qtdir: This controls where Qt 4 is assumed to be. If you use the qt-copy module, it also controls where qt-copy is installed to. Default is {{path|~/qt4}}, which installs qt-copy to your home directory.&lt;br /&gt;
&lt;br /&gt;
{{tip|qt-copy is a module specifically for building Nokia's Qt toolkit. See [[#qt-copy]] below for information about what is special.}}&lt;br /&gt;
&lt;br /&gt;
* cmake-options: This controls what [[Development/Tutorials/CMake#Command_Line_Variables|options]] are passed to CMake for ''every'' KDE module.  For instance, if you want to enable full debugging information, you could set:&lt;br /&gt;
:cmake-options -DCMAKE_BUILD_TYPE=debugfull&lt;br /&gt;
&lt;br /&gt;
* make-options: This is used to pass command line options to the make command, which is what actually performs the build.  The most likely option is -jN, where N is the number of jobs to perform at once.  If you have a system with more than one CPU, it is recommended to use N = number_of_CPUs + 1.  For instance, -j3 on a dual core machine or -j5 on a quad-core.  You can lower this number if your system is sluggish during the build, but raising it won't buy you much in build speed.&lt;br /&gt;
&lt;br /&gt;
* make-install-prefix: This is used to allow a program to run make install on your behalf.  Normally with would be the sudo program, which is used to perform actions with administrator permissions.  You only need this for the following:&lt;br /&gt;
# You want to install KDE to the system and not your home directory.&lt;br /&gt;
# Some installed files require elevated permissions to work properly (this is true for kdebase, and some files in kdelibs).&lt;br /&gt;
&lt;br /&gt;
If this ''is'' the case for you, you can use this option (either globally, or for each module) to run make install using sudo, or su, etc.&lt;br /&gt;
&lt;br /&gt;
==== Module configuration ====&lt;br /&gt;
&lt;br /&gt;
After the global options are all done, you'll see the line &amp;quot;end global&amp;quot;, which lets kdesvn-build know that all of the global options have been read.&lt;br /&gt;
&lt;br /&gt;
Next in the kdesvn-buildrc are the module options.  First off, modules are listed in the file, in the order they are to be built and installed.  Each module is listed in the following format:&lt;br /&gt;
:module ''module-name''&lt;br /&gt;
::module-options&lt;br /&gt;
:end module&lt;br /&gt;
&lt;br /&gt;
The ''module-name'' is how kdesvn-build refers to the module. It should match the name of the module you are downloading from the source repository.  Base KDE modules are listed [http://websvn.kde.org/trunk/KDE/ in WebSVN].  Other modules are also available [http://websvn.kde.org/trunk/ in WebSVN].&lt;br /&gt;
&lt;br /&gt;
One exception is that modules downloaded from git can have any module name you'd like that isn't already used, as kdesvn-build determines their download location using a specific ''repository'' option.&lt;br /&gt;
&lt;br /&gt;
For each module you can specify options, in the same fashion as for the global options. Most of the time, if you set an option for a module, it completely overrides the global option, if any.&lt;br /&gt;
&lt;br /&gt;
However, the cmake-options for a module is added to the global cmake-options, instead of replacing it, which allows you to avoid having to give the same cmake-options for all of your modules.&lt;br /&gt;
&lt;br /&gt;
{{tip|If you need to disable a global cmake-option, you can specify it again for the module you need to disable it for, and give it the opposite value. For instance, if you were using -DCMAKE_BUILD_TYPE=debugfull}} globally but wanted Release mode for kdebindings, you could set cmake-options -DCMAKE_BUILD_TYPE=Release for kdebindings.&lt;br /&gt;
&lt;br /&gt;
{{tip|If you get the warning from kdesvn-build that a certain module is not listed in the kdesvn-buildrc, make sure that you've added it to the kdesvn-buildrc, even if you have no options for it. If it's already in the kdesvn-buildrc, make sure you spelled the module name right on the command line.}}&lt;br /&gt;
&lt;br /&gt;
==== qt-copy ====&lt;br /&gt;
&lt;br /&gt;
The qt-copy module is special in that it uses configure-options instead of cmake-options, and it never inherits compilation flags that are set globally, since Qt uses a different build system than KDE software does.  The sample kdesvn-buildrc contains a useful set of default configure flags, but if you aren't using qt-copy, you can simply comment the entire qt-copy module out.&lt;br /&gt;
&lt;br /&gt;
Since Nokia's Qt is developed using git instead of Subversion, you must specify the ''repository'' option for qt-copy to choose which version of Qt you will use:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|+ Qt Variants&lt;br /&gt;
|-&lt;br /&gt;
! Edition to build !! Repository to use&lt;br /&gt;
|-&lt;br /&gt;
| Official Nokia Qt || git://gitorious.org/qt/qt.git&lt;br /&gt;
|-&lt;br /&gt;
| Slightly modified Qt with KDE-specific patches and bugfixes (recommended if you're going to the trouble anyways) || git://gitorious.org/+kde-developers/qt/kde-qt.git&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Either way you should specify a ''branch'' of ''master'' to choose the default version.&lt;br /&gt;
&lt;br /&gt;
If you choose kde-qt make sure to look at the README.kde-qt after kdesvn-build downloads the module for you as well!&lt;br /&gt;
&lt;br /&gt;
=== Location ===&lt;br /&gt;
&lt;br /&gt;
kdesvn-build will search in several locations for your rc file.&lt;br /&gt;
&lt;br /&gt;
# First, kdesvn-build will look for a file called {{path|kdesvn-buildrc}} in ''the current directory''.  Notice that in this situation there is no leading dot on the filename.  This allows you to control the build based on what directory you're in, which would be useful for maintaining two different Subversion installs.&lt;br /&gt;
# If no kdesvn-buildrc is found, kdesvn-build will look for a {{path|~/.kdesvn-buildrc}}.  Notice there '''is''' a leading dot on the filename in this situation.  This is the standard Linux/UNIX convention for configuration files stored in the home directory, and marks this as a hidden file.  So if you try to find the file in Dolphin or Konqueror, you may need to Show Hidden Files first.  This controls the default configuration kdesvn-build will use, no matter what directory you run kdesvn-build from.&lt;br /&gt;
# If you specify the --rc-file option to kdesvn-build, kdesvn-build will try to read the given kdesvn-buildrc file instead of the default ones.  This is also independent of what directory kdesvn-build is run in.  But, you must remember to pass this option every time, so it is only useful for testing or for a one-time-only run.&lt;br /&gt;
&lt;br /&gt;
=== Making changes ===&lt;br /&gt;
&lt;br /&gt;
When you make changes to values in your kdesvn-buildrc, they may not always be picked up immediately.  For example, if you change cmake-options but kdesvn-build has no reason to run CMake again, then you'll still be building with your old cmake-options.&lt;br /&gt;
&lt;br /&gt;
{{note|This is only partially true -- kdesvn-build will be able to note that some values have changed and automatically re-run affected build portions as appropriate, but this advice still applies until this feature has been integrated for all options}}&lt;br /&gt;
&lt;br /&gt;
The safest way to ensure that a change to your module's options is picked up is to use the --refresh-build option when rebuilding a module. This option causes kdesvn-build to completely rebuild the given module, which includes running cmake and clearing out the build directory.&lt;br /&gt;
&lt;br /&gt;
Using --refresh-build takes the most time. Often, it is enough to use --reconfigure instead of --refresh-build, which runs CMake but does not clear out the build directory. But if --reconfigure doesn't work you'll end up doing --refresh-build anyways.&lt;br /&gt;
&lt;br /&gt;
On the other hand, if you change the svn-server option to move where kdesvn-build is downloading from, you need to run kdesvn-build one time with the --svn-only option, so that kdesvn-build can perform the correct &amp;quot;svn switch&amp;quot; command.&lt;br /&gt;
&lt;br /&gt;
=== Conclusion ===&lt;br /&gt;
&lt;br /&gt;
The kdesvn-buildrc file is one of the major reasons to use kdesvn-build instead of building manually, as it will allow you to specify build settings to use all of the time instead of having to always remember to type in the correct command line settings and export the right environment variables. There are many more options than the ones covered here, which are mostly [http://kdesvn-build.kde.org/documentation/ detailed at the kdesvn-build documentation]. However, these options are enough to get you a working KDE installation.&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/kdesrc-build-config</id>
		<title>Getting Started/Build/kdesrc-build-config</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/kdesrc-build-config"/>
				<updated>2012-02-11T16:43:39Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: /* Module configuration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== kdesvn-buildrc ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
The [[Getting_Started/Build/kdesvn-build|kdesvn-build]] program, which is used to download, build, and install [http://www.kde.org/ KDE] from the [http://websvn.kde.org/ KDE source repository], uses a file called {{path|kdesvn-buildrc}} in order to control what is downloaded and built, what options are used, and where KDE is installed to.&lt;br /&gt;
&lt;br /&gt;
This is a description of how to use {{path|kdesvn-buildrc}}.&lt;br /&gt;
&lt;br /&gt;
=== Creating your configuration ===&lt;br /&gt;
&lt;br /&gt;
The kdesvn-build download will include a file called {{path|kdesvn-buildrc-sample}}, which is a sample configuration file suitable for building the KDE Software Compilation (SC).&lt;br /&gt;
&lt;br /&gt;
To create your configuration, it is recommended to use this file as a base since it includes the standard list of KDE modules to build, in the correct order.  (You can, of course, add or remove most modules if you like).&lt;br /&gt;
&lt;br /&gt;
You can use any standard text editor to edit this file, such as KWrite, nano, vi, etc.&lt;br /&gt;
&lt;br /&gt;
==== Global configuration ====&lt;br /&gt;
&lt;br /&gt;
Once you open the file, you will see that it starts with some comments (on lines beginning with #), and then the world &amp;quot;global&amp;quot;.  This starts the global configuration for the kdesvn-buildrc, which is used to specify options which are common to all of the modules.&lt;br /&gt;
&lt;br /&gt;
Each option in the global section is specified in the following form:&lt;br /&gt;
:option-name  value&lt;br /&gt;
&lt;br /&gt;
Many options are already listed, with default values, and comments about the option on top.  Some options have more than one sample value listed.  In this situation, all but one of these will have comments.  If you want to use a different sample option, simply uncomment the line by deleting the '#' at the beginning, and commenting or deleting the other lines with the same option name.&lt;br /&gt;
&lt;br /&gt;
Here's a short listing of some of the important global options:&lt;br /&gt;
&lt;br /&gt;
* source-dir: This option controls where kdesvn-build will download the sources to.  In addition, most other directories that kdesvn-build uses will be subdirectories of this directory by default, so it is a kind of &amp;quot;kdesvn-build prefix&amp;quot;. The default value is {{path|~/kdesvn}}, which downloads the source in a subdirectory under your home directory.&lt;br /&gt;
* build-dir: This controls where kdesvn-build actually builds the various modules.  Normally it is the directory {{path|build}} under your source directory.&lt;br /&gt;
* kdedir: This controls where the KDE SC (and the various supporting modules such as kdesupport) get installed to. The default is {{path|~/kde}}, which installs to your home directory.&lt;br /&gt;
&lt;br /&gt;
{{note|As you can see, there are three different major directories, source, build, and install.  The build directory is used to keep the source directory clean and to hold intermediate files that don't get installed}}&lt;br /&gt;
&lt;br /&gt;
{{tip|You can use ~/ in these options to represent your home directory}}&lt;br /&gt;
&lt;br /&gt;
* qtdir: This controls where Qt 4 is assumed to be. If you use the qt-copy module, it also controls where qt-copy is installed to. Default is {{path|~/qt4}}, which installs qt-copy to your home directory.&lt;br /&gt;
&lt;br /&gt;
{{tip|qt-copy is a module specifically for building Nokia's Qt toolkit. See [[#qt-copy]] below for information about what is special.}}&lt;br /&gt;
&lt;br /&gt;
* cmake-options: This controls what [[Development/Tutorials/CMake#Command_Line_Variables|options]] are passed to CMake for ''every'' KDE module.  For instance, if you want to enable full debugging information, you could set:&lt;br /&gt;
:cmake-options -DCMAKE_BUILD_TYPE=debugfull&lt;br /&gt;
&lt;br /&gt;
* make-options: This is used to pass command line options to the make command, which is what actually performs the build.  The most likely option is -jN, where N is the number of jobs to perform at once.  If you have a system with more than one CPU, it is recommended to use N = number_of_CPUs + 1.  For instance, -j3 on a dual core machine or -j5 on a quad-core.  You can lower this number if your system is sluggish during the build, but raising it won't buy you much in build speed.&lt;br /&gt;
&lt;br /&gt;
* make-install-prefix: This is used to allow a program to run make install on your behalf.  Normally with would be the sudo program, which is used to perform actions with administrator permissions.  You only need this for the following:&lt;br /&gt;
# You want to install KDE to the system and not your home directory.&lt;br /&gt;
# Some installed files require elevated permissions to work properly (this is true for kdebase, and some files in kdelibs).&lt;br /&gt;
&lt;br /&gt;
If this ''is'' the case for you, you can use this option (either globally, or for each module) to run make install using sudo, or su, etc.&lt;br /&gt;
&lt;br /&gt;
==== Module configuration ====&lt;br /&gt;
&lt;br /&gt;
After the global options are all done, you'll see the line &amp;quot;end global&amp;quot;, which lets kdesvn-build know that all of the global options have been read.&lt;br /&gt;
&lt;br /&gt;
Next in the kdesvn-buildrc are the module options.  First off, modules are listed in the file, in the order they are to be built and installed.  Each module is listed in the following format:&lt;br /&gt;
:module ''module-name''&lt;br /&gt;
::module-options&lt;br /&gt;
:end module&lt;br /&gt;
&lt;br /&gt;
The ''module-name'' is how kdesvn-build refers to the module.  It should match the name of the module you are downloading from the source repository.  Base KDE modules are listed [http://websvn.kde.org/trunk/KDE/ in WebSVN].  Other modules are also available [http://websvn.kde.org/trunk/ in WebSVN].&lt;br /&gt;
&lt;br /&gt;
One exception is that modules downloaded from git can have any module name you'd like that isn't already used, as kdesvn-build determines their download location using a specific ''repository'' option.&lt;br /&gt;
&lt;br /&gt;
For each module you can specify options, in the same fashion as for the global options. Most of the time, if you set an option for a module, it completely overrides the global option, if any.&lt;br /&gt;
&lt;br /&gt;
However, the cmake-options for a module is added to the global cmake-options, instead of replacing it, which allows you to avoid having to give the same cmake-options for all of your modules.&lt;br /&gt;
&lt;br /&gt;
{{tip|If you need to disable a global cmake-option, you can specify it again for the module you need to disable it for, and give it the opposite value. For instance, if you were using &lt;br /&gt;
 CMAKE_BUILD_TYPE=debugfull}} globally but wanted Release mode for kdebindings, you could set cmake-options -DCMAKE_BUILD_TYPE=Release for kdebindings.&lt;br /&gt;
&lt;br /&gt;
{{tip|If you get the warning from kdesvn-build that a certain module is not listed in the kdesvn-buildrc, make sure that you've added it to the kdesvn-buildrc, even if you have no options for it. If it's already in the kdesvn-buildrc, make sure you spelled the module name right on the command line.}}&lt;br /&gt;
&lt;br /&gt;
==== qt-copy ====&lt;br /&gt;
&lt;br /&gt;
The qt-copy module is special in that it uses configure-options instead of cmake-options, and it never inherits compilation flags that are set globally, since Qt uses a different build system than KDE software does.  The sample kdesvn-buildrc contains a useful set of default configure flags, but if you aren't using qt-copy, you can simply comment the entire qt-copy module out.&lt;br /&gt;
&lt;br /&gt;
Since Nokia's Qt is developed using git instead of Subversion, you must specify the ''repository'' option for qt-copy to choose which version of Qt you will use:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|+ Qt Variants&lt;br /&gt;
|-&lt;br /&gt;
! Edition to build !! Repository to use&lt;br /&gt;
|-&lt;br /&gt;
| Official Nokia Qt || git://gitorious.org/qt/qt.git&lt;br /&gt;
|-&lt;br /&gt;
| Slightly modified Qt with KDE-specific patches and bugfixes (recommended if you're going to the trouble anyways) || git://gitorious.org/+kde-developers/qt/kde-qt.git&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Either way you should specify a ''branch'' of ''master'' to choose the default version.&lt;br /&gt;
&lt;br /&gt;
If you choose kde-qt make sure to look at the README.kde-qt after kdesvn-build downloads the module for you as well!&lt;br /&gt;
&lt;br /&gt;
=== Location ===&lt;br /&gt;
&lt;br /&gt;
kdesvn-build will search in several locations for your rc file.&lt;br /&gt;
&lt;br /&gt;
# First, kdesvn-build will look for a file called {{path|kdesvn-buildrc}} in ''the current directory''.  Notice that in this situation there is no leading dot on the filename.  This allows you to control the build based on what directory you're in, which would be useful for maintaining two different Subversion installs.&lt;br /&gt;
# If no kdesvn-buildrc is found, kdesvn-build will look for a {{path|~/.kdesvn-buildrc}}.  Notice there '''is''' a leading dot on the filename in this situation.  This is the standard Linux/UNIX convention for configuration files stored in the home directory, and marks this as a hidden file.  So if you try to find the file in Dolphin or Konqueror, you may need to Show Hidden Files first.  This controls the default configuration kdesvn-build will use, no matter what directory you run kdesvn-build from.&lt;br /&gt;
# If you specify the --rc-file option to kdesvn-build, kdesvn-build will try to read the given kdesvn-buildrc file instead of the default ones.  This is also independent of what directory kdesvn-build is run in.  But, you must remember to pass this option every time, so it is only useful for testing or for a one-time-only run.&lt;br /&gt;
&lt;br /&gt;
=== Making changes ===&lt;br /&gt;
&lt;br /&gt;
When you make changes to values in your kdesvn-buildrc, they may not always be picked up immediately.  For example, if you change cmake-options but kdesvn-build has no reason to run CMake again, then you'll still be building with your old cmake-options.&lt;br /&gt;
&lt;br /&gt;
{{note|This is only partially true -- kdesvn-build will be able to note that some values have changed and automatically re-run affected build portions as appropriate, but this advice still applies until this feature has been integrated for all options}}&lt;br /&gt;
&lt;br /&gt;
The safest way to ensure that a change to your module's options is picked up is to use the --refresh-build option when rebuilding a module. This option causes kdesvn-build to completely rebuild the given module, which includes running cmake and clearing out the build directory.&lt;br /&gt;
&lt;br /&gt;
Using --refresh-build takes the most time. Often, it is enough to use --reconfigure instead of --refresh-build, which runs CMake but does not clear out the build directory. But if --reconfigure doesn't work you'll end up doing --refresh-build anyways.&lt;br /&gt;
&lt;br /&gt;
On the other hand, if you change the svn-server option to move where kdesvn-build is downloading from, you need to run kdesvn-build one time with the --svn-only option, so that kdesvn-build can perform the correct &amp;quot;svn switch&amp;quot; command.&lt;br /&gt;
&lt;br /&gt;
=== Conclusion ===&lt;br /&gt;
&lt;br /&gt;
The kdesvn-buildrc file is one of the major reasons to use kdesvn-build instead of building manually, as it will allow you to specify build settings to use all of the time instead of having to always remember to type in the correct command line settings and export the right environment variables. There are many more options than the ones covered here, which are mostly [http://kdesvn-build.kde.org/documentation/ detailed at the kdesvn-build documentation]. However, these options are enough to get you a working KDE installation.&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/kdesrc-build-config</id>
		<title>Getting Started/Build/kdesrc-build-config</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/kdesrc-build-config"/>
				<updated>2012-02-11T16:42:46Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: /* Module configuration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== kdesvn-buildrc ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
The [[Getting_Started/Build/kdesvn-build|kdesvn-build]] program, which is used to download, build, and install [http://www.kde.org/ KDE] from the [http://websvn.kde.org/ KDE source repository], uses a file called {{path|kdesvn-buildrc}} in order to control what is downloaded and built, what options are used, and where KDE is installed to.&lt;br /&gt;
&lt;br /&gt;
This is a description of how to use {{path|kdesvn-buildrc}}.&lt;br /&gt;
&lt;br /&gt;
=== Creating your configuration ===&lt;br /&gt;
&lt;br /&gt;
The kdesvn-build download will include a file called {{path|kdesvn-buildrc-sample}}, which is a sample configuration file suitable for building the KDE Software Compilation (SC).&lt;br /&gt;
&lt;br /&gt;
To create your configuration, it is recommended to use this file as a base since it includes the standard list of KDE modules to build, in the correct order.  (You can, of course, add or remove most modules if you like).&lt;br /&gt;
&lt;br /&gt;
You can use any standard text editor to edit this file, such as KWrite, nano, vi, etc.&lt;br /&gt;
&lt;br /&gt;
==== Global configuration ====&lt;br /&gt;
&lt;br /&gt;
Once you open the file, you will see that it starts with some comments (on lines beginning with #), and then the world &amp;quot;global&amp;quot;.  This starts the global configuration for the kdesvn-buildrc, which is used to specify options which are common to all of the modules.&lt;br /&gt;
&lt;br /&gt;
Each option in the global section is specified in the following form:&lt;br /&gt;
:option-name  value&lt;br /&gt;
&lt;br /&gt;
Many options are already listed, with default values, and comments about the option on top.  Some options have more than one sample value listed.  In this situation, all but one of these will have comments.  If you want to use a different sample option, simply uncomment the line by deleting the '#' at the beginning, and commenting or deleting the other lines with the same option name.&lt;br /&gt;
&lt;br /&gt;
Here's a short listing of some of the important global options:&lt;br /&gt;
&lt;br /&gt;
* source-dir: This option controls where kdesvn-build will download the sources to.  In addition, most other directories that kdesvn-build uses will be subdirectories of this directory by default, so it is a kind of &amp;quot;kdesvn-build prefix&amp;quot;. The default value is {{path|~/kdesvn}}, which downloads the source in a subdirectory under your home directory.&lt;br /&gt;
* build-dir: This controls where kdesvn-build actually builds the various modules.  Normally it is the directory {{path|build}} under your source directory.&lt;br /&gt;
* kdedir: This controls where the KDE SC (and the various supporting modules such as kdesupport) get installed to. The default is {{path|~/kde}}, which installs to your home directory.&lt;br /&gt;
&lt;br /&gt;
{{note|As you can see, there are three different major directories, source, build, and install.  The build directory is used to keep the source directory clean and to hold intermediate files that don't get installed}}&lt;br /&gt;
&lt;br /&gt;
{{tip|You can use ~/ in these options to represent your home directory}}&lt;br /&gt;
&lt;br /&gt;
* qtdir: This controls where Qt 4 is assumed to be. If you use the qt-copy module, it also controls where qt-copy is installed to. Default is {{path|~/qt4}}, which installs qt-copy to your home directory.&lt;br /&gt;
&lt;br /&gt;
{{tip|qt-copy is a module specifically for building Nokia's Qt toolkit. See [[#qt-copy]] below for information about what is special.}}&lt;br /&gt;
&lt;br /&gt;
* cmake-options: This controls what [[Development/Tutorials/CMake#Command_Line_Variables|options]] are passed to CMake for ''every'' KDE module.  For instance, if you want to enable full debugging information, you could set:&lt;br /&gt;
:cmake-options -DCMAKE_BUILD_TYPE=debugfull&lt;br /&gt;
&lt;br /&gt;
* make-options: This is used to pass command line options to the make command, which is what actually performs the build.  The most likely option is -jN, where N is the number of jobs to perform at once.  If you have a system with more than one CPU, it is recommended to use N = number_of_CPUs + 1.  For instance, -j3 on a dual core machine or -j5 on a quad-core.  You can lower this number if your system is sluggish during the build, but raising it won't buy you much in build speed.&lt;br /&gt;
&lt;br /&gt;
* make-install-prefix: This is used to allow a program to run make install on your behalf.  Normally with would be the sudo program, which is used to perform actions with administrator permissions.  You only need this for the following:&lt;br /&gt;
# You want to install KDE to the system and not your home directory.&lt;br /&gt;
# Some installed files require elevated permissions to work properly (this is true for kdebase, and some files in kdelibs).&lt;br /&gt;
&lt;br /&gt;
If this ''is'' the case for you, you can use this option (either globally, or for each module) to run make install using sudo, or su, etc.&lt;br /&gt;
&lt;br /&gt;
==== Module configuration ====&lt;br /&gt;
&lt;br /&gt;
After the global options are all done, you'll see the line &amp;quot;end global&amp;quot;, which lets kdesvn-build know that all of the global options have been read.&lt;br /&gt;
&lt;br /&gt;
Next in the kdesvn-buildrc are the module options.  First off, modules are listed in the file, in the order they are to be built and installed.  Each module is listed in the following format:&lt;br /&gt;
:module ''module-name''&lt;br /&gt;
::module-options&lt;br /&gt;
:end module&lt;br /&gt;
&lt;br /&gt;
The ''module-name'' is how kdesvn-build refers to the module.  It should match the name of the module you are downloading from the source repository.  Base KDE modules are listed [http://websvn.kde.org/trunk/KDE/ in WebSVN].  Other modules are also available [http://websvn.kde.org/trunk/ in WebSVN].&lt;br /&gt;
&lt;br /&gt;
One exception is that modules downloaded from git can have any module name you'd like that isn't already used, as kdesvn-build determines their download location using a specific ''repository'' option.&lt;br /&gt;
&lt;br /&gt;
For each module you can specify options, in the same fashion as for the global options. Most of the time, if you set an option for a module, it completely overrides the global option, if any.&lt;br /&gt;
&lt;br /&gt;
However, the cmake-options for a module is added to the global cmake-options, instead of replacing it, which allows you to avoid having to give the same cmake-options for all of your modules.&lt;br /&gt;
&lt;br /&gt;
{{tip|If you need to disable a global cmake-option, you can specify it again for the module you need to disable it for, and give it the opposite value. For instance, if you were using CMAKE_BUILD_TYPE=debugfull}} globally but wanted Release mode for kdebindings, you could set cmake-options -DCMAKE_BUILD_TYPE=Release for kdebindings.&lt;br /&gt;
&lt;br /&gt;
{{tip|If you get the warning from kdesvn-build that a certain module is not listed in the kdesvn-buildrc, make sure that you've added it to the kdesvn-buildrc, even if you have no options for it. If it's already in the kdesvn-buildrc, make sure you spelled the module name right on the command line.}}&lt;br /&gt;
&lt;br /&gt;
==== qt-copy ====&lt;br /&gt;
&lt;br /&gt;
The qt-copy module is special in that it uses configure-options instead of cmake-options, and it never inherits compilation flags that are set globally, since Qt uses a different build system than KDE software does.  The sample kdesvn-buildrc contains a useful set of default configure flags, but if you aren't using qt-copy, you can simply comment the entire qt-copy module out.&lt;br /&gt;
&lt;br /&gt;
Since Nokia's Qt is developed using git instead of Subversion, you must specify the ''repository'' option for qt-copy to choose which version of Qt you will use:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|+ Qt Variants&lt;br /&gt;
|-&lt;br /&gt;
! Edition to build !! Repository to use&lt;br /&gt;
|-&lt;br /&gt;
| Official Nokia Qt || git://gitorious.org/qt/qt.git&lt;br /&gt;
|-&lt;br /&gt;
| Slightly modified Qt with KDE-specific patches and bugfixes (recommended if you're going to the trouble anyways) || git://gitorious.org/+kde-developers/qt/kde-qt.git&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Either way you should specify a ''branch'' of ''master'' to choose the default version.&lt;br /&gt;
&lt;br /&gt;
If you choose kde-qt make sure to look at the README.kde-qt after kdesvn-build downloads the module for you as well!&lt;br /&gt;
&lt;br /&gt;
=== Location ===&lt;br /&gt;
&lt;br /&gt;
kdesvn-build will search in several locations for your rc file.&lt;br /&gt;
&lt;br /&gt;
# First, kdesvn-build will look for a file called {{path|kdesvn-buildrc}} in ''the current directory''.  Notice that in this situation there is no leading dot on the filename.  This allows you to control the build based on what directory you're in, which would be useful for maintaining two different Subversion installs.&lt;br /&gt;
# If no kdesvn-buildrc is found, kdesvn-build will look for a {{path|~/.kdesvn-buildrc}}.  Notice there '''is''' a leading dot on the filename in this situation.  This is the standard Linux/UNIX convention for configuration files stored in the home directory, and marks this as a hidden file.  So if you try to find the file in Dolphin or Konqueror, you may need to Show Hidden Files first.  This controls the default configuration kdesvn-build will use, no matter what directory you run kdesvn-build from.&lt;br /&gt;
# If you specify the --rc-file option to kdesvn-build, kdesvn-build will try to read the given kdesvn-buildrc file instead of the default ones.  This is also independent of what directory kdesvn-build is run in.  But, you must remember to pass this option every time, so it is only useful for testing or for a one-time-only run.&lt;br /&gt;
&lt;br /&gt;
=== Making changes ===&lt;br /&gt;
&lt;br /&gt;
When you make changes to values in your kdesvn-buildrc, they may not always be picked up immediately.  For example, if you change cmake-options but kdesvn-build has no reason to run CMake again, then you'll still be building with your old cmake-options.&lt;br /&gt;
&lt;br /&gt;
{{note|This is only partially true -- kdesvn-build will be able to note that some values have changed and automatically re-run affected build portions as appropriate, but this advice still applies until this feature has been integrated for all options}}&lt;br /&gt;
&lt;br /&gt;
The safest way to ensure that a change to your module's options is picked up is to use the --refresh-build option when rebuilding a module. This option causes kdesvn-build to completely rebuild the given module, which includes running cmake and clearing out the build directory.&lt;br /&gt;
&lt;br /&gt;
Using --refresh-build takes the most time. Often, it is enough to use --reconfigure instead of --refresh-build, which runs CMake but does not clear out the build directory. But if --reconfigure doesn't work you'll end up doing --refresh-build anyways.&lt;br /&gt;
&lt;br /&gt;
On the other hand, if you change the svn-server option to move where kdesvn-build is downloading from, you need to run kdesvn-build one time with the --svn-only option, so that kdesvn-build can perform the correct &amp;quot;svn switch&amp;quot; command.&lt;br /&gt;
&lt;br /&gt;
=== Conclusion ===&lt;br /&gt;
&lt;br /&gt;
The kdesvn-buildrc file is one of the major reasons to use kdesvn-build instead of building manually, as it will allow you to specify build settings to use all of the time instead of having to always remember to type in the correct command line settings and export the right environment variables. There are many more options than the ones covered here, which are mostly [http://kdesvn-build.kde.org/documentation/ detailed at the kdesvn-build documentation]. However, these options are enough to get you a working KDE installation.&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/kdesrc-build-config</id>
		<title>Getting Started/Build/kdesrc-build-config</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/kdesrc-build-config"/>
				<updated>2012-02-11T16:41:32Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: /* Module configuration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== kdesvn-buildrc ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
The [[Getting_Started/Build/kdesvn-build|kdesvn-build]] program, which is used to download, build, and install [http://www.kde.org/ KDE] from the [http://websvn.kde.org/ KDE source repository], uses a file called {{path|kdesvn-buildrc}} in order to control what is downloaded and built, what options are used, and where KDE is installed to.&lt;br /&gt;
&lt;br /&gt;
This is a description of how to use {{path|kdesvn-buildrc}}.&lt;br /&gt;
&lt;br /&gt;
=== Creating your configuration ===&lt;br /&gt;
&lt;br /&gt;
The kdesvn-build download will include a file called {{path|kdesvn-buildrc-sample}}, which is a sample configuration file suitable for building the KDE Software Compilation (SC).&lt;br /&gt;
&lt;br /&gt;
To create your configuration, it is recommended to use this file as a base since it includes the standard list of KDE modules to build, in the correct order.  (You can, of course, add or remove most modules if you like).&lt;br /&gt;
&lt;br /&gt;
You can use any standard text editor to edit this file, such as KWrite, nano, vi, etc.&lt;br /&gt;
&lt;br /&gt;
==== Global configuration ====&lt;br /&gt;
&lt;br /&gt;
Once you open the file, you will see that it starts with some comments (on lines beginning with #), and then the world &amp;quot;global&amp;quot;.  This starts the global configuration for the kdesvn-buildrc, which is used to specify options which are common to all of the modules.&lt;br /&gt;
&lt;br /&gt;
Each option in the global section is specified in the following form:&lt;br /&gt;
:option-name  value&lt;br /&gt;
&lt;br /&gt;
Many options are already listed, with default values, and comments about the option on top.  Some options have more than one sample value listed.  In this situation, all but one of these will have comments.  If you want to use a different sample option, simply uncomment the line by deleting the '#' at the beginning, and commenting or deleting the other lines with the same option name.&lt;br /&gt;
&lt;br /&gt;
Here's a short listing of some of the important global options:&lt;br /&gt;
&lt;br /&gt;
* source-dir: This option controls where kdesvn-build will download the sources to.  In addition, most other directories that kdesvn-build uses will be subdirectories of this directory by default, so it is a kind of &amp;quot;kdesvn-build prefix&amp;quot;. The default value is {{path|~/kdesvn}}, which downloads the source in a subdirectory under your home directory.&lt;br /&gt;
* build-dir: This controls where kdesvn-build actually builds the various modules.  Normally it is the directory {{path|build}} under your source directory.&lt;br /&gt;
* kdedir: This controls where the KDE SC (and the various supporting modules such as kdesupport) get installed to. The default is {{path|~/kde}}, which installs to your home directory.&lt;br /&gt;
&lt;br /&gt;
{{note|As you can see, there are three different major directories, source, build, and install.  The build directory is used to keep the source directory clean and to hold intermediate files that don't get installed}}&lt;br /&gt;
&lt;br /&gt;
{{tip|You can use ~/ in these options to represent your home directory}}&lt;br /&gt;
&lt;br /&gt;
* qtdir: This controls where Qt 4 is assumed to be. If you use the qt-copy module, it also controls where qt-copy is installed to. Default is {{path|~/qt4}}, which installs qt-copy to your home directory.&lt;br /&gt;
&lt;br /&gt;
{{tip|qt-copy is a module specifically for building Nokia's Qt toolkit. See [[#qt-copy]] below for information about what is special.}}&lt;br /&gt;
&lt;br /&gt;
* cmake-options: This controls what [[Development/Tutorials/CMake#Command_Line_Variables|options]] are passed to CMake for ''every'' KDE module.  For instance, if you want to enable full debugging information, you could set:&lt;br /&gt;
:cmake-options -DCMAKE_BUILD_TYPE=debugfull&lt;br /&gt;
&lt;br /&gt;
* make-options: This is used to pass command line options to the make command, which is what actually performs the build.  The most likely option is -jN, where N is the number of jobs to perform at once.  If you have a system with more than one CPU, it is recommended to use N = number_of_CPUs + 1.  For instance, -j3 on a dual core machine or -j5 on a quad-core.  You can lower this number if your system is sluggish during the build, but raising it won't buy you much in build speed.&lt;br /&gt;
&lt;br /&gt;
* make-install-prefix: This is used to allow a program to run make install on your behalf.  Normally with would be the sudo program, which is used to perform actions with administrator permissions.  You only need this for the following:&lt;br /&gt;
# You want to install KDE to the system and not your home directory.&lt;br /&gt;
# Some installed files require elevated permissions to work properly (this is true for kdebase, and some files in kdelibs).&lt;br /&gt;
&lt;br /&gt;
If this ''is'' the case for you, you can use this option (either globally, or for each module) to run make install using sudo, or su, etc.&lt;br /&gt;
&lt;br /&gt;
==== Module configuration ====&lt;br /&gt;
&lt;br /&gt;
After the global options are all done, you'll see the line &amp;quot;end global&amp;quot;, which lets kdesvn-build know that all of the global options have been read.&lt;br /&gt;
&lt;br /&gt;
Next in the kdesvn-buildrc are the module options.  First off, modules are listed in the file, in the order they are to be built and installed.  Each module is listed in the following format:&lt;br /&gt;
:module ''module-name''&lt;br /&gt;
::module-options&lt;br /&gt;
:end module&lt;br /&gt;
&lt;br /&gt;
The ''module-name'' is how kdesvn-build refers to the module.  It should match the name of the module you are downloading from the source repository.  Base KDE modules are listed [http://websvn.kde.org/trunk/KDE/ in WebSVN].  Other modules are also available [http://websvn.kde.org/trunk/ in WebSVN].&lt;br /&gt;
&lt;br /&gt;
One exception is that modules downloaded from git can have any module name you'd like that isn't already used, as kdesvn-build determines their download location using a specific ''repository'' option.&lt;br /&gt;
&lt;br /&gt;
For each module you can specify options, in the same fashion as for the global options. Most of the time, if you set an option for a module, it completely overrides the global option, if any.&lt;br /&gt;
&lt;br /&gt;
However, the cmake-options for a module is added to the global cmake-options, instead of replacing it, which allows you to avoid having to give the same cmake-options for all of your modules.&lt;br /&gt;
&lt;br /&gt;
{{tip|If you need to disable a global cmake-option, you can specify it again for the module you need to disable it for, and give it the opposite value. For instance, if you were using}} CMAKE_BUILD_TYPE=debugfull globally but wanted Release mode for kdebindings, you could set cmake-options -DCMAKE_BUILD_TYPE=Release for kdebindings.&lt;br /&gt;
&lt;br /&gt;
{{tip|If you get the warning from kdesvn-build that a certain module is not listed in the kdesvn-buildrc, make sure that you've added it to the kdesvn-buildrc, even if you have no options for it. If it's already in the kdesvn-buildrc, make sure you spelled the module name right on the command line.}}&lt;br /&gt;
&lt;br /&gt;
==== qt-copy ====&lt;br /&gt;
&lt;br /&gt;
The qt-copy module is special in that it uses configure-options instead of cmake-options, and it never inherits compilation flags that are set globally, since Qt uses a different build system than KDE software does.  The sample kdesvn-buildrc contains a useful set of default configure flags, but if you aren't using qt-copy, you can simply comment the entire qt-copy module out.&lt;br /&gt;
&lt;br /&gt;
Since Nokia's Qt is developed using git instead of Subversion, you must specify the ''repository'' option for qt-copy to choose which version of Qt you will use:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|+ Qt Variants&lt;br /&gt;
|-&lt;br /&gt;
! Edition to build !! Repository to use&lt;br /&gt;
|-&lt;br /&gt;
| Official Nokia Qt || git://gitorious.org/qt/qt.git&lt;br /&gt;
|-&lt;br /&gt;
| Slightly modified Qt with KDE-specific patches and bugfixes (recommended if you're going to the trouble anyways) || git://gitorious.org/+kde-developers/qt/kde-qt.git&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Either way you should specify a ''branch'' of ''master'' to choose the default version.&lt;br /&gt;
&lt;br /&gt;
If you choose kde-qt make sure to look at the README.kde-qt after kdesvn-build downloads the module for you as well!&lt;br /&gt;
&lt;br /&gt;
=== Location ===&lt;br /&gt;
&lt;br /&gt;
kdesvn-build will search in several locations for your rc file.&lt;br /&gt;
&lt;br /&gt;
# First, kdesvn-build will look for a file called {{path|kdesvn-buildrc}} in ''the current directory''.  Notice that in this situation there is no leading dot on the filename.  This allows you to control the build based on what directory you're in, which would be useful for maintaining two different Subversion installs.&lt;br /&gt;
# If no kdesvn-buildrc is found, kdesvn-build will look for a {{path|~/.kdesvn-buildrc}}.  Notice there '''is''' a leading dot on the filename in this situation.  This is the standard Linux/UNIX convention for configuration files stored in the home directory, and marks this as a hidden file.  So if you try to find the file in Dolphin or Konqueror, you may need to Show Hidden Files first.  This controls the default configuration kdesvn-build will use, no matter what directory you run kdesvn-build from.&lt;br /&gt;
# If you specify the --rc-file option to kdesvn-build, kdesvn-build will try to read the given kdesvn-buildrc file instead of the default ones.  This is also independent of what directory kdesvn-build is run in.  But, you must remember to pass this option every time, so it is only useful for testing or for a one-time-only run.&lt;br /&gt;
&lt;br /&gt;
=== Making changes ===&lt;br /&gt;
&lt;br /&gt;
When you make changes to values in your kdesvn-buildrc, they may not always be picked up immediately.  For example, if you change cmake-options but kdesvn-build has no reason to run CMake again, then you'll still be building with your old cmake-options.&lt;br /&gt;
&lt;br /&gt;
{{note|This is only partially true -- kdesvn-build will be able to note that some values have changed and automatically re-run affected build portions as appropriate, but this advice still applies until this feature has been integrated for all options}}&lt;br /&gt;
&lt;br /&gt;
The safest way to ensure that a change to your module's options is picked up is to use the --refresh-build option when rebuilding a module. This option causes kdesvn-build to completely rebuild the given module, which includes running cmake and clearing out the build directory.&lt;br /&gt;
&lt;br /&gt;
Using --refresh-build takes the most time. Often, it is enough to use --reconfigure instead of --refresh-build, which runs CMake but does not clear out the build directory. But if --reconfigure doesn't work you'll end up doing --refresh-build anyways.&lt;br /&gt;
&lt;br /&gt;
On the other hand, if you change the svn-server option to move where kdesvn-build is downloading from, you need to run kdesvn-build one time with the --svn-only option, so that kdesvn-build can perform the correct &amp;quot;svn switch&amp;quot; command.&lt;br /&gt;
&lt;br /&gt;
=== Conclusion ===&lt;br /&gt;
&lt;br /&gt;
The kdesvn-buildrc file is one of the major reasons to use kdesvn-build instead of building manually, as it will allow you to specify build settings to use all of the time instead of having to always remember to type in the correct command line settings and export the right environment variables. There are many more options than the ones covered here, which are mostly [http://kdesvn-build.kde.org/documentation/ detailed at the kdesvn-build documentation]. However, these options are enough to get you a working KDE installation.&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/kdesrc-build-config</id>
		<title>Getting Started/Build/kdesrc-build-config</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/kdesrc-build-config"/>
				<updated>2012-02-11T16:40:41Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: /* Module configuration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== kdesvn-buildrc ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
The [[Getting_Started/Build/kdesvn-build|kdesvn-build]] program, which is used to download, build, and install [http://www.kde.org/ KDE] from the [http://websvn.kde.org/ KDE source repository], uses a file called {{path|kdesvn-buildrc}} in order to control what is downloaded and built, what options are used, and where KDE is installed to.&lt;br /&gt;
&lt;br /&gt;
This is a description of how to use {{path|kdesvn-buildrc}}.&lt;br /&gt;
&lt;br /&gt;
=== Creating your configuration ===&lt;br /&gt;
&lt;br /&gt;
The kdesvn-build download will include a file called {{path|kdesvn-buildrc-sample}}, which is a sample configuration file suitable for building the KDE Software Compilation (SC).&lt;br /&gt;
&lt;br /&gt;
To create your configuration, it is recommended to use this file as a base since it includes the standard list of KDE modules to build, in the correct order.  (You can, of course, add or remove most modules if you like).&lt;br /&gt;
&lt;br /&gt;
You can use any standard text editor to edit this file, such as KWrite, nano, vi, etc.&lt;br /&gt;
&lt;br /&gt;
==== Global configuration ====&lt;br /&gt;
&lt;br /&gt;
Once you open the file, you will see that it starts with some comments (on lines beginning with #), and then the world &amp;quot;global&amp;quot;.  This starts the global configuration for the kdesvn-buildrc, which is used to specify options which are common to all of the modules.&lt;br /&gt;
&lt;br /&gt;
Each option in the global section is specified in the following form:&lt;br /&gt;
:option-name  value&lt;br /&gt;
&lt;br /&gt;
Many options are already listed, with default values, and comments about the option on top.  Some options have more than one sample value listed.  In this situation, all but one of these will have comments.  If you want to use a different sample option, simply uncomment the line by deleting the '#' at the beginning, and commenting or deleting the other lines with the same option name.&lt;br /&gt;
&lt;br /&gt;
Here's a short listing of some of the important global options:&lt;br /&gt;
&lt;br /&gt;
* source-dir: This option controls where kdesvn-build will download the sources to.  In addition, most other directories that kdesvn-build uses will be subdirectories of this directory by default, so it is a kind of &amp;quot;kdesvn-build prefix&amp;quot;. The default value is {{path|~/kdesvn}}, which downloads the source in a subdirectory under your home directory.&lt;br /&gt;
* build-dir: This controls where kdesvn-build actually builds the various modules.  Normally it is the directory {{path|build}} under your source directory.&lt;br /&gt;
* kdedir: This controls where the KDE SC (and the various supporting modules such as kdesupport) get installed to. The default is {{path|~/kde}}, which installs to your home directory.&lt;br /&gt;
&lt;br /&gt;
{{note|As you can see, there are three different major directories, source, build, and install.  The build directory is used to keep the source directory clean and to hold intermediate files that don't get installed}}&lt;br /&gt;
&lt;br /&gt;
{{tip|You can use ~/ in these options to represent your home directory}}&lt;br /&gt;
&lt;br /&gt;
* qtdir: This controls where Qt 4 is assumed to be. If you use the qt-copy module, it also controls where qt-copy is installed to. Default is {{path|~/qt4}}, which installs qt-copy to your home directory.&lt;br /&gt;
&lt;br /&gt;
{{tip|qt-copy is a module specifically for building Nokia's Qt toolkit. See [[#qt-copy]] below for information about what is special.}}&lt;br /&gt;
&lt;br /&gt;
* cmake-options: This controls what [[Development/Tutorials/CMake#Command_Line_Variables|options]] are passed to CMake for ''every'' KDE module.  For instance, if you want to enable full debugging information, you could set:&lt;br /&gt;
:cmake-options -DCMAKE_BUILD_TYPE=debugfull&lt;br /&gt;
&lt;br /&gt;
* make-options: This is used to pass command line options to the make command, which is what actually performs the build.  The most likely option is -jN, where N is the number of jobs to perform at once.  If you have a system with more than one CPU, it is recommended to use N = number_of_CPUs + 1.  For instance, -j3 on a dual core machine or -j5 on a quad-core.  You can lower this number if your system is sluggish during the build, but raising it won't buy you much in build speed.&lt;br /&gt;
&lt;br /&gt;
* make-install-prefix: This is used to allow a program to run make install on your behalf.  Normally with would be the sudo program, which is used to perform actions with administrator permissions.  You only need this for the following:&lt;br /&gt;
# You want to install KDE to the system and not your home directory.&lt;br /&gt;
# Some installed files require elevated permissions to work properly (this is true for kdebase, and some files in kdelibs).&lt;br /&gt;
&lt;br /&gt;
If this ''is'' the case for you, you can use this option (either globally, or for each module) to run make install using sudo, or su, etc.&lt;br /&gt;
&lt;br /&gt;
==== Module configuration ====&lt;br /&gt;
&lt;br /&gt;
After the global options are all done, you'll see the line &amp;quot;end global&amp;quot;, which lets kdesvn-build know that all of the global options have been read.&lt;br /&gt;
&lt;br /&gt;
Next in the kdesvn-buildrc are the module options.  First off, modules are listed in the file, in the order they are to be built and installed.  Each module is listed in the following format:&lt;br /&gt;
:module ''module-name''&lt;br /&gt;
::module-options&lt;br /&gt;
:end module&lt;br /&gt;
&lt;br /&gt;
The ''module-name'' is how kdesvn-build refers to the module.  It should match the name of the module you are downloading from the source repository.  Base KDE modules are listed [http://websvn.kde.org/trunk/KDE/ in WebSVN].  Other modules are also available [http://websvn.kde.org/trunk/ in WebSVN].&lt;br /&gt;
&lt;br /&gt;
One exception is that modules downloaded from git can have any module name you'd like that isn't already used, as kdesvn-build determines their download location using a specific ''repository'' option.&lt;br /&gt;
&lt;br /&gt;
For each module you can specify options, in the same fashion as for the global options. Most of the time, if you set an option for a module, it completely overrides the global option, if any.&lt;br /&gt;
&lt;br /&gt;
However, the cmake-options for a module is added to the global cmake-options, instead of replacing it, which allows you to avoid having to give the same cmake-options for all of your modules.&lt;br /&gt;
&lt;br /&gt;
{{tip|If you need to disable a global cmake-option, you can specify it again for the module you need to disable it for, and give it the opposite value. For instance, if you were using CMAKE_BUILD_TYPE=debugfull globally but wanted Release mode for kdebindings, }}&lt;br /&gt;
&lt;br /&gt;
{{tip|If you get the warning from kdesvn-build that a certain module is not listed in the kdesvn-buildrc, make sure that you've added it to the kdesvn-buildrc, even if you have no options for it. If it's already in the kdesvn-buildrc, make sure you spelled the module name right on the command line.}}&lt;br /&gt;
&lt;br /&gt;
==== qt-copy ====&lt;br /&gt;
&lt;br /&gt;
The qt-copy module is special in that it uses configure-options instead of cmake-options, and it never inherits compilation flags that are set globally, since Qt uses a different build system than KDE software does.  The sample kdesvn-buildrc contains a useful set of default configure flags, but if you aren't using qt-copy, you can simply comment the entire qt-copy module out.&lt;br /&gt;
&lt;br /&gt;
Since Nokia's Qt is developed using git instead of Subversion, you must specify the ''repository'' option for qt-copy to choose which version of Qt you will use:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|+ Qt Variants&lt;br /&gt;
|-&lt;br /&gt;
! Edition to build !! Repository to use&lt;br /&gt;
|-&lt;br /&gt;
| Official Nokia Qt || git://gitorious.org/qt/qt.git&lt;br /&gt;
|-&lt;br /&gt;
| Slightly modified Qt with KDE-specific patches and bugfixes (recommended if you're going to the trouble anyways) || git://gitorious.org/+kde-developers/qt/kde-qt.git&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Either way you should specify a ''branch'' of ''master'' to choose the default version.&lt;br /&gt;
&lt;br /&gt;
If you choose kde-qt make sure to look at the README.kde-qt after kdesvn-build downloads the module for you as well!&lt;br /&gt;
&lt;br /&gt;
=== Location ===&lt;br /&gt;
&lt;br /&gt;
kdesvn-build will search in several locations for your rc file.&lt;br /&gt;
&lt;br /&gt;
# First, kdesvn-build will look for a file called {{path|kdesvn-buildrc}} in ''the current directory''.  Notice that in this situation there is no leading dot on the filename.  This allows you to control the build based on what directory you're in, which would be useful for maintaining two different Subversion installs.&lt;br /&gt;
# If no kdesvn-buildrc is found, kdesvn-build will look for a {{path|~/.kdesvn-buildrc}}.  Notice there '''is''' a leading dot on the filename in this situation.  This is the standard Linux/UNIX convention for configuration files stored in the home directory, and marks this as a hidden file.  So if you try to find the file in Dolphin or Konqueror, you may need to Show Hidden Files first.  This controls the default configuration kdesvn-build will use, no matter what directory you run kdesvn-build from.&lt;br /&gt;
# If you specify the --rc-file option to kdesvn-build, kdesvn-build will try to read the given kdesvn-buildrc file instead of the default ones.  This is also independent of what directory kdesvn-build is run in.  But, you must remember to pass this option every time, so it is only useful for testing or for a one-time-only run.&lt;br /&gt;
&lt;br /&gt;
=== Making changes ===&lt;br /&gt;
&lt;br /&gt;
When you make changes to values in your kdesvn-buildrc, they may not always be picked up immediately.  For example, if you change cmake-options but kdesvn-build has no reason to run CMake again, then you'll still be building with your old cmake-options.&lt;br /&gt;
&lt;br /&gt;
{{note|This is only partially true -- kdesvn-build will be able to note that some values have changed and automatically re-run affected build portions as appropriate, but this advice still applies until this feature has been integrated for all options}}&lt;br /&gt;
&lt;br /&gt;
The safest way to ensure that a change to your module's options is picked up is to use the --refresh-build option when rebuilding a module. This option causes kdesvn-build to completely rebuild the given module, which includes running cmake and clearing out the build directory.&lt;br /&gt;
&lt;br /&gt;
Using --refresh-build takes the most time. Often, it is enough to use --reconfigure instead of --refresh-build, which runs CMake but does not clear out the build directory. But if --reconfigure doesn't work you'll end up doing --refresh-build anyways.&lt;br /&gt;
&lt;br /&gt;
On the other hand, if you change the svn-server option to move where kdesvn-build is downloading from, you need to run kdesvn-build one time with the --svn-only option, so that kdesvn-build can perform the correct &amp;quot;svn switch&amp;quot; command.&lt;br /&gt;
&lt;br /&gt;
=== Conclusion ===&lt;br /&gt;
&lt;br /&gt;
The kdesvn-buildrc file is one of the major reasons to use kdesvn-build instead of building manually, as it will allow you to specify build settings to use all of the time instead of having to always remember to type in the correct command line settings and export the right environment variables. There are many more options than the ones covered here, which are mostly [http://kdesvn-build.kde.org/documentation/ detailed at the kdesvn-build documentation]. However, these options are enough to get you a working KDE installation.&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/kdesrc-build-config</id>
		<title>Getting Started/Build/kdesrc-build-config</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/kdesrc-build-config"/>
				<updated>2012-02-11T16:39:30Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: /* Module configuration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== kdesvn-buildrc ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
The [[Getting_Started/Build/kdesvn-build|kdesvn-build]] program, which is used to download, build, and install [http://www.kde.org/ KDE] from the [http://websvn.kde.org/ KDE source repository], uses a file called {{path|kdesvn-buildrc}} in order to control what is downloaded and built, what options are used, and where KDE is installed to.&lt;br /&gt;
&lt;br /&gt;
This is a description of how to use {{path|kdesvn-buildrc}}.&lt;br /&gt;
&lt;br /&gt;
=== Creating your configuration ===&lt;br /&gt;
&lt;br /&gt;
The kdesvn-build download will include a file called {{path|kdesvn-buildrc-sample}}, which is a sample configuration file suitable for building the KDE Software Compilation (SC).&lt;br /&gt;
&lt;br /&gt;
To create your configuration, it is recommended to use this file as a base since it includes the standard list of KDE modules to build, in the correct order.  (You can, of course, add or remove most modules if you like).&lt;br /&gt;
&lt;br /&gt;
You can use any standard text editor to edit this file, such as KWrite, nano, vi, etc.&lt;br /&gt;
&lt;br /&gt;
==== Global configuration ====&lt;br /&gt;
&lt;br /&gt;
Once you open the file, you will see that it starts with some comments (on lines beginning with #), and then the world &amp;quot;global&amp;quot;.  This starts the global configuration for the kdesvn-buildrc, which is used to specify options which are common to all of the modules.&lt;br /&gt;
&lt;br /&gt;
Each option in the global section is specified in the following form:&lt;br /&gt;
:option-name  value&lt;br /&gt;
&lt;br /&gt;
Many options are already listed, with default values, and comments about the option on top.  Some options have more than one sample value listed.  In this situation, all but one of these will have comments.  If you want to use a different sample option, simply uncomment the line by deleting the '#' at the beginning, and commenting or deleting the other lines with the same option name.&lt;br /&gt;
&lt;br /&gt;
Here's a short listing of some of the important global options:&lt;br /&gt;
&lt;br /&gt;
* source-dir: This option controls where kdesvn-build will download the sources to.  In addition, most other directories that kdesvn-build uses will be subdirectories of this directory by default, so it is a kind of &amp;quot;kdesvn-build prefix&amp;quot;. The default value is {{path|~/kdesvn}}, which downloads the source in a subdirectory under your home directory.&lt;br /&gt;
* build-dir: This controls where kdesvn-build actually builds the various modules.  Normally it is the directory {{path|build}} under your source directory.&lt;br /&gt;
* kdedir: This controls where the KDE SC (and the various supporting modules such as kdesupport) get installed to. The default is {{path|~/kde}}, which installs to your home directory.&lt;br /&gt;
&lt;br /&gt;
{{note|As you can see, there are three different major directories, source, build, and install.  The build directory is used to keep the source directory clean and to hold intermediate files that don't get installed}}&lt;br /&gt;
&lt;br /&gt;
{{tip|You can use ~/ in these options to represent your home directory}}&lt;br /&gt;
&lt;br /&gt;
* qtdir: This controls where Qt 4 is assumed to be. If you use the qt-copy module, it also controls where qt-copy is installed to. Default is {{path|~/qt4}}, which installs qt-copy to your home directory.&lt;br /&gt;
&lt;br /&gt;
{{tip|qt-copy is a module specifically for building Nokia's Qt toolkit. See [[#qt-copy]] below for information about what is special.}}&lt;br /&gt;
&lt;br /&gt;
* cmake-options: This controls what [[Development/Tutorials/CMake#Command_Line_Variables|options]] are passed to CMake for ''every'' KDE module.  For instance, if you want to enable full debugging information, you could set:&lt;br /&gt;
:cmake-options -DCMAKE_BUILD_TYPE=debugfull&lt;br /&gt;
&lt;br /&gt;
* make-options: This is used to pass command line options to the make command, which is what actually performs the build.  The most likely option is -jN, where N is the number of jobs to perform at once.  If you have a system with more than one CPU, it is recommended to use N = number_of_CPUs + 1.  For instance, -j3 on a dual core machine or -j5 on a quad-core.  You can lower this number if your system is sluggish during the build, but raising it won't buy you much in build speed.&lt;br /&gt;
&lt;br /&gt;
* make-install-prefix: This is used to allow a program to run make install on your behalf.  Normally with would be the sudo program, which is used to perform actions with administrator permissions.  You only need this for the following:&lt;br /&gt;
# You want to install KDE to the system and not your home directory.&lt;br /&gt;
# Some installed files require elevated permissions to work properly (this is true for kdebase, and some files in kdelibs).&lt;br /&gt;
&lt;br /&gt;
If this ''is'' the case for you, you can use this option (either globally, or for each module) to run make install using sudo, or su, etc.&lt;br /&gt;
&lt;br /&gt;
==== Module configuration ====&lt;br /&gt;
&lt;br /&gt;
After the global options are all done, you'll see the line &amp;quot;end global&amp;quot;, which lets kdesvn-build know that all of the global options have been read.&lt;br /&gt;
&lt;br /&gt;
Next in the kdesvn-buildrc are the module options.  First off, modules are listed in the file, in the order they are to be built and installed.  Each module is listed in the following format:&lt;br /&gt;
:module ''module-name''&lt;br /&gt;
::module-options&lt;br /&gt;
:end module&lt;br /&gt;
&lt;br /&gt;
The ''module-name'' is how kdesvn-build refers to the module.  It should match the name of the module you are downloading from the source repository.  Base KDE modules are listed [http://websvn.kde.org/trunk/KDE/ in WebSVN].  Other modules are also available [http://websvn.kde.org/trunk/ in WebSVN].&lt;br /&gt;
&lt;br /&gt;
One exception is that modules downloaded from git can have any module name you'd like that isn't already used, as kdesvn-build determines their download location using a specific ''repository'' option.&lt;br /&gt;
&lt;br /&gt;
For each module you can specify options, in the same fashion as for the global options. Most of the time, if you set an option for a module, it completely overrides the global option, if any.&lt;br /&gt;
&lt;br /&gt;
However, the cmake-options for a module is added to the global cmake-options, instead of replacing it, which allows you to avoid having to give the same cmake-options for all of your modules.&lt;br /&gt;
&lt;br /&gt;
{{tip|If you need to disable a global cmake-option, you can specify it again for the module you need to disable it for, and give it the opposite value. }}&lt;br /&gt;
&lt;br /&gt;
{{tip|If you get the warning from kdesvn-build that a certain module is not listed in the kdesvn-buildrc, make sure that you've added it to the kdesvn-buildrc, even if you have no options for it. If it's already in the kdesvn-buildrc, make sure you spelled the module name right on the command line.}}&lt;br /&gt;
&lt;br /&gt;
==== qt-copy ====&lt;br /&gt;
&lt;br /&gt;
The qt-copy module is special in that it uses configure-options instead of cmake-options, and it never inherits compilation flags that are set globally, since Qt uses a different build system than KDE software does.  The sample kdesvn-buildrc contains a useful set of default configure flags, but if you aren't using qt-copy, you can simply comment the entire qt-copy module out.&lt;br /&gt;
&lt;br /&gt;
Since Nokia's Qt is developed using git instead of Subversion, you must specify the ''repository'' option for qt-copy to choose which version of Qt you will use:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|+ Qt Variants&lt;br /&gt;
|-&lt;br /&gt;
! Edition to build !! Repository to use&lt;br /&gt;
|-&lt;br /&gt;
| Official Nokia Qt || git://gitorious.org/qt/qt.git&lt;br /&gt;
|-&lt;br /&gt;
| Slightly modified Qt with KDE-specific patches and bugfixes (recommended if you're going to the trouble anyways) || git://gitorious.org/+kde-developers/qt/kde-qt.git&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Either way you should specify a ''branch'' of ''master'' to choose the default version.&lt;br /&gt;
&lt;br /&gt;
If you choose kde-qt make sure to look at the README.kde-qt after kdesvn-build downloads the module for you as well!&lt;br /&gt;
&lt;br /&gt;
=== Location ===&lt;br /&gt;
&lt;br /&gt;
kdesvn-build will search in several locations for your rc file.&lt;br /&gt;
&lt;br /&gt;
# First, kdesvn-build will look for a file called {{path|kdesvn-buildrc}} in ''the current directory''.  Notice that in this situation there is no leading dot on the filename.  This allows you to control the build based on what directory you're in, which would be useful for maintaining two different Subversion installs.&lt;br /&gt;
# If no kdesvn-buildrc is found, kdesvn-build will look for a {{path|~/.kdesvn-buildrc}}.  Notice there '''is''' a leading dot on the filename in this situation.  This is the standard Linux/UNIX convention for configuration files stored in the home directory, and marks this as a hidden file.  So if you try to find the file in Dolphin or Konqueror, you may need to Show Hidden Files first.  This controls the default configuration kdesvn-build will use, no matter what directory you run kdesvn-build from.&lt;br /&gt;
# If you specify the --rc-file option to kdesvn-build, kdesvn-build will try to read the given kdesvn-buildrc file instead of the default ones.  This is also independent of what directory kdesvn-build is run in.  But, you must remember to pass this option every time, so it is only useful for testing or for a one-time-only run.&lt;br /&gt;
&lt;br /&gt;
=== Making changes ===&lt;br /&gt;
&lt;br /&gt;
When you make changes to values in your kdesvn-buildrc, they may not always be picked up immediately.  For example, if you change cmake-options but kdesvn-build has no reason to run CMake again, then you'll still be building with your old cmake-options.&lt;br /&gt;
&lt;br /&gt;
{{note|This is only partially true -- kdesvn-build will be able to note that some values have changed and automatically re-run affected build portions as appropriate, but this advice still applies until this feature has been integrated for all options}}&lt;br /&gt;
&lt;br /&gt;
The safest way to ensure that a change to your module's options is picked up is to use the --refresh-build option when rebuilding a module. This option causes kdesvn-build to completely rebuild the given module, which includes running cmake and clearing out the build directory.&lt;br /&gt;
&lt;br /&gt;
Using --refresh-build takes the most time. Often, it is enough to use --reconfigure instead of --refresh-build, which runs CMake but does not clear out the build directory. But if --reconfigure doesn't work you'll end up doing --refresh-build anyways.&lt;br /&gt;
&lt;br /&gt;
On the other hand, if you change the svn-server option to move where kdesvn-build is downloading from, you need to run kdesvn-build one time with the --svn-only option, so that kdesvn-build can perform the correct &amp;quot;svn switch&amp;quot; command.&lt;br /&gt;
&lt;br /&gt;
=== Conclusion ===&lt;br /&gt;
&lt;br /&gt;
The kdesvn-buildrc file is one of the major reasons to use kdesvn-build instead of building manually, as it will allow you to specify build settings to use all of the time instead of having to always remember to type in the correct command line settings and export the right environment variables. There are many more options than the ones covered here, which are mostly [http://kdesvn-build.kde.org/documentation/ detailed at the kdesvn-build documentation]. However, these options are enough to get you a working KDE installation.&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/kdesrc-build-config</id>
		<title>Getting Started/Build/kdesrc-build-config</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/kdesrc-build-config"/>
				<updated>2012-02-11T16:38:53Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== kdesvn-buildrc ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
The [[Getting_Started/Build/kdesvn-build|kdesvn-build]] program, which is used to download, build, and install [http://www.kde.org/ KDE] from the [http://websvn.kde.org/ KDE source repository], uses a file called {{path|kdesvn-buildrc}} in order to control what is downloaded and built, what options are used, and where KDE is installed to.&lt;br /&gt;
&lt;br /&gt;
This is a description of how to use {{path|kdesvn-buildrc}}.&lt;br /&gt;
&lt;br /&gt;
=== Creating your configuration ===&lt;br /&gt;
&lt;br /&gt;
The kdesvn-build download will include a file called {{path|kdesvn-buildrc-sample}}, which is a sample configuration file suitable for building the KDE Software Compilation (SC).&lt;br /&gt;
&lt;br /&gt;
To create your configuration, it is recommended to use this file as a base since it includes the standard list of KDE modules to build, in the correct order.  (You can, of course, add or remove most modules if you like).&lt;br /&gt;
&lt;br /&gt;
You can use any standard text editor to edit this file, such as KWrite, nano, vi, etc.&lt;br /&gt;
&lt;br /&gt;
==== Global configuration ====&lt;br /&gt;
&lt;br /&gt;
Once you open the file, you will see that it starts with some comments (on lines beginning with #), and then the world &amp;quot;global&amp;quot;.  This starts the global configuration for the kdesvn-buildrc, which is used to specify options which are common to all of the modules.&lt;br /&gt;
&lt;br /&gt;
Each option in the global section is specified in the following form:&lt;br /&gt;
:option-name  value&lt;br /&gt;
&lt;br /&gt;
Many options are already listed, with default values, and comments about the option on top.  Some options have more than one sample value listed.  In this situation, all but one of these will have comments.  If you want to use a different sample option, simply uncomment the line by deleting the '#' at the beginning, and commenting or deleting the other lines with the same option name.&lt;br /&gt;
&lt;br /&gt;
Here's a short listing of some of the important global options:&lt;br /&gt;
&lt;br /&gt;
* source-dir: This option controls where kdesvn-build will download the sources to.  In addition, most other directories that kdesvn-build uses will be subdirectories of this directory by default, so it is a kind of &amp;quot;kdesvn-build prefix&amp;quot;. The default value is {{path|~/kdesvn}}, which downloads the source in a subdirectory under your home directory.&lt;br /&gt;
* build-dir: This controls where kdesvn-build actually builds the various modules.  Normally it is the directory {{path|build}} under your source directory.&lt;br /&gt;
* kdedir: This controls where the KDE SC (and the various supporting modules such as kdesupport) get installed to. The default is {{path|~/kde}}, which installs to your home directory.&lt;br /&gt;
&lt;br /&gt;
{{note|As you can see, there are three different major directories, source, build, and install.  The build directory is used to keep the source directory clean and to hold intermediate files that don't get installed}}&lt;br /&gt;
&lt;br /&gt;
{{tip|You can use ~/ in these options to represent your home directory}}&lt;br /&gt;
&lt;br /&gt;
* qtdir: This controls where Qt 4 is assumed to be. If you use the qt-copy module, it also controls where qt-copy is installed to. Default is {{path|~/qt4}}, which installs qt-copy to your home directory.&lt;br /&gt;
&lt;br /&gt;
{{tip|qt-copy is a module specifically for building Nokia's Qt toolkit. See [[#qt-copy]] below for information about what is special.}}&lt;br /&gt;
&lt;br /&gt;
* cmake-options: This controls what [[Development/Tutorials/CMake#Command_Line_Variables|options]] are passed to CMake for ''every'' KDE module.  For instance, if you want to enable full debugging information, you could set:&lt;br /&gt;
:cmake-options -DCMAKE_BUILD_TYPE=debugfull&lt;br /&gt;
&lt;br /&gt;
* make-options: This is used to pass command line options to the make command, which is what actually performs the build.  The most likely option is -jN, where N is the number of jobs to perform at once.  If you have a system with more than one CPU, it is recommended to use N = number_of_CPUs + 1.  For instance, -j3 on a dual core machine or -j5 on a quad-core.  You can lower this number if your system is sluggish during the build, but raising it won't buy you much in build speed.&lt;br /&gt;
&lt;br /&gt;
* make-install-prefix: This is used to allow a program to run make install on your behalf.  Normally with would be the sudo program, which is used to perform actions with administrator permissions.  You only need this for the following:&lt;br /&gt;
# You want to install KDE to the system and not your home directory.&lt;br /&gt;
# Some installed files require elevated permissions to work properly (this is true for kdebase, and some files in kdelibs).&lt;br /&gt;
&lt;br /&gt;
If this ''is'' the case for you, you can use this option (either globally, or for each module) to run make install using sudo, or su, etc.&lt;br /&gt;
&lt;br /&gt;
==== Module configuration ====&lt;br /&gt;
&lt;br /&gt;
After the global options are all done, you'll see the line &amp;quot;end global&amp;quot;, which lets kdesvn-build know that all of the global options have been read.&lt;br /&gt;
&lt;br /&gt;
Next in the kdesvn-buildrc are the module options.  First off, modules are listed in the file, in the order they are to be built and installed.  Each module is listed in the following format:&lt;br /&gt;
:module ''module-name''&lt;br /&gt;
::module-options&lt;br /&gt;
:end module&lt;br /&gt;
&lt;br /&gt;
The ''module-name'' is how kdesvn-build refers to the module.  It should match the name of the module you are downloading from the source repository.  Base KDE modules are listed [http://websvn.kde.org/trunk/KDE/ in WebSVN].  Other modules are also available [http://websvn.kde.org/trunk/ in WebSVN].&lt;br /&gt;
&lt;br /&gt;
One exception is that modules downloaded from git can have any module name you'd like that isn't already used, as kdesvn-build determines their download location using a specific ''repository'' option.&lt;br /&gt;
&lt;br /&gt;
For each module you can specify options, in the same fashion as for the global options. Most of the time, if you set an option for a module, it completely overrides the global option, if any.&lt;br /&gt;
&lt;br /&gt;
However, the cmake-options for a module is added to the global cmake-options, instead of replacing it, which allows you to avoid having to give the same cmake-options for all of your modules.&lt;br /&gt;
&lt;br /&gt;
{{tip|I}}&lt;br /&gt;
&lt;br /&gt;
{{tip|If you get the warning from kdesvn-build that a certain module is not listed in the kdesvn-buildrc, make sure that you've added it to the kdesvn-buildrc, even if you have no options for it. If it's already in the kdesvn-buildrc, make sure you spelled the module name right on the command line.}}&lt;br /&gt;
&lt;br /&gt;
==== qt-copy ====&lt;br /&gt;
&lt;br /&gt;
The qt-copy module is special in that it uses configure-options instead of cmake-options, and it never inherits compilation flags that are set globally, since Qt uses a different build system than KDE software does.  The sample kdesvn-buildrc contains a useful set of default configure flags, but if you aren't using qt-copy, you can simply comment the entire qt-copy module out.&lt;br /&gt;
&lt;br /&gt;
Since Nokia's Qt is developed using git instead of Subversion, you must specify the ''repository'' option for qt-copy to choose which version of Qt you will use:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|+ Qt Variants&lt;br /&gt;
|-&lt;br /&gt;
! Edition to build !! Repository to use&lt;br /&gt;
|-&lt;br /&gt;
| Official Nokia Qt || git://gitorious.org/qt/qt.git&lt;br /&gt;
|-&lt;br /&gt;
| Slightly modified Qt with KDE-specific patches and bugfixes (recommended if you're going to the trouble anyways) || git://gitorious.org/+kde-developers/qt/kde-qt.git&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Either way you should specify a ''branch'' of ''master'' to choose the default version.&lt;br /&gt;
&lt;br /&gt;
If you choose kde-qt make sure to look at the README.kde-qt after kdesvn-build downloads the module for you as well!&lt;br /&gt;
&lt;br /&gt;
=== Location ===&lt;br /&gt;
&lt;br /&gt;
kdesvn-build will search in several locations for your rc file.&lt;br /&gt;
&lt;br /&gt;
# First, kdesvn-build will look for a file called {{path|kdesvn-buildrc}} in ''the current directory''.  Notice that in this situation there is no leading dot on the filename.  This allows you to control the build based on what directory you're in, which would be useful for maintaining two different Subversion installs.&lt;br /&gt;
# If no kdesvn-buildrc is found, kdesvn-build will look for a {{path|~/.kdesvn-buildrc}}.  Notice there '''is''' a leading dot on the filename in this situation.  This is the standard Linux/UNIX convention for configuration files stored in the home directory, and marks this as a hidden file.  So if you try to find the file in Dolphin or Konqueror, you may need to Show Hidden Files first.  This controls the default configuration kdesvn-build will use, no matter what directory you run kdesvn-build from.&lt;br /&gt;
# If you specify the --rc-file option to kdesvn-build, kdesvn-build will try to read the given kdesvn-buildrc file instead of the default ones.  This is also independent of what directory kdesvn-build is run in.  But, you must remember to pass this option every time, so it is only useful for testing or for a one-time-only run.&lt;br /&gt;
&lt;br /&gt;
=== Making changes ===&lt;br /&gt;
&lt;br /&gt;
When you make changes to values in your kdesvn-buildrc, they may not always be picked up immediately.  For example, if you change cmake-options but kdesvn-build has no reason to run CMake again, then you'll still be building with your old cmake-options.&lt;br /&gt;
&lt;br /&gt;
{{note|This is only partially true -- kdesvn-build will be able to note that some values have changed and automatically re-run affected build portions as appropriate, but this advice still applies until this feature has been integrated for all options}}&lt;br /&gt;
&lt;br /&gt;
The safest way to ensure that a change to your module's options is picked up is to use the --refresh-build option when rebuilding a module. This option causes kdesvn-build to completely rebuild the given module, which includes running cmake and clearing out the build directory.&lt;br /&gt;
&lt;br /&gt;
Using --refresh-build takes the most time. Often, it is enough to use --reconfigure instead of --refresh-build, which runs CMake but does not clear out the build directory. But if --reconfigure doesn't work you'll end up doing --refresh-build anyways.&lt;br /&gt;
&lt;br /&gt;
On the other hand, if you change the svn-server option to move where kdesvn-build is downloading from, you need to run kdesvn-build one time with the --svn-only option, so that kdesvn-build can perform the correct &amp;quot;svn switch&amp;quot; command.&lt;br /&gt;
&lt;br /&gt;
=== Conclusion ===&lt;br /&gt;
&lt;br /&gt;
The kdesvn-buildrc file is one of the major reasons to use kdesvn-build instead of building manually, as it will allow you to specify build settings to use all of the time instead of having to always remember to type in the correct command line settings and export the right environment variables. There are many more options than the ones covered here, which are mostly [http://kdesvn-build.kde.org/documentation/ detailed at the kdesvn-build documentation]. However, these options are enough to get you a working KDE installation.&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/kdesrc-build-config</id>
		<title>Getting Started/Build/kdesrc-build-config</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/kdesrc-build-config"/>
				<updated>2012-02-11T16:37:51Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== kdesvn-buildrc ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
The [[Getting_Started/Build/kdesvn-build|kdesvn-build]] program, which is used to download, build, and install [http://www.kde.org/ KDE] from the [http://websvn.kde.org/ KDE source repository], uses a file called {{path|kdesvn-buildrc}} in order to control what is downloaded and built, what options are used, and where KDE is installed to.&lt;br /&gt;
&lt;br /&gt;
This is a description of how to use {{path|kdesvn-buildrc}}.&lt;br /&gt;
&lt;br /&gt;
=== Creating your configuration ===&lt;br /&gt;
&lt;br /&gt;
The kdesvn-build download will include a file called {{path|kdesvn-buildrc-sample}}, which is a sample configuration file suitable for building the KDE Software Compilation (SC).&lt;br /&gt;
&lt;br /&gt;
To create your configuration, it is recommended to use this file as a base since it includes the standard list of KDE modules to build, in the correct order.  (You can, of course, add or remove most modules if you like).&lt;br /&gt;
&lt;br /&gt;
You can use any standard text editor to edit this file, such as KWrite, nano, vi, etc.&lt;br /&gt;
&lt;br /&gt;
==== Global configuration ====&lt;br /&gt;
&lt;br /&gt;
Once you open the file, you will see that it starts with some comments (on lines beginning with #), and then the world &amp;quot;global&amp;quot;.  This starts the global configuration for the kdesvn-buildrc, which is used to specify options which are common to all of the modules.&lt;br /&gt;
&lt;br /&gt;
Each option in the global section is specified in the following form:&lt;br /&gt;
:option-name  value&lt;br /&gt;
&lt;br /&gt;
Many options are already listed, with default values, and comments about the option on top.  Some options have more than one sample value listed.  In this situation, all but one of these will have comments.  If you want to use a different sample option, simply uncomment the line by deleting the '#' at the beginning, and commenting or deleting the other lines with the same option name.&lt;br /&gt;
&lt;br /&gt;
Here's a short listing of some of the important global options:&lt;br /&gt;
&lt;br /&gt;
* source-dir: This option controls where kdesvn-build will download the sources to.  In addition, most other directories that kdesvn-build uses will be subdirectories of this directory by default, so it is a kind of &amp;quot;kdesvn-build prefix&amp;quot;. The default value is {{path|~/kdesvn}}, which downloads the source in a subdirectory under your home directory.&lt;br /&gt;
* build-dir: This controls where kdesvn-build actually builds the various modules.  Normally it is the directory {{path|build}} under your source directory.&lt;br /&gt;
* kdedir: This controls where the KDE SC (and the various supporting modules such as kdesupport) get installed to. The default is {{path|~/kde}}, which installs to your home directory.&lt;br /&gt;
&lt;br /&gt;
{{note|As you can see, there are three different major directories, source, build, and install.  The build directory is used to keep the source directory clean and to hold intermediate files that don't get installed}}&lt;br /&gt;
&lt;br /&gt;
{{tip|You can use ~/ in these options to represent your home directory}}&lt;br /&gt;
&lt;br /&gt;
* qtdir: This controls where Qt 4 is assumed to be. If you use the qt-copy module, it also controls where qt-copy is installed to. Default is {{path|~/qt4}}, which installs qt-copy to your home directory.&lt;br /&gt;
&lt;br /&gt;
{{tip|qt-copy is a module specifically for building Nokia's Qt toolkit. See [[#qt-copy]] below for information about what is special.}}&lt;br /&gt;
&lt;br /&gt;
* cmake-options: This controls what [[Development/Tutorials/CMake#Command_Line_Variables|options]] are passed to CMake for ''every'' KDE module.  For instance, if you want to enable full debugging information, you could set:&lt;br /&gt;
:cmake-options -DCMAKE_BUILD_TYPE=debugfull&lt;br /&gt;
&lt;br /&gt;
* make-options: This is used to pass command line options to the make command, which is what actually performs the build.  The most likely option is -jN, where N is the number of jobs to perform at once.  If you have a system with more than one CPU, it is recommended to use N = number_of_CPUs + 1.  For instance, -j3 on a dual core machine or -j5 on a quad-core.  You can lower this number if your system is sluggish during the build, but raising it won't buy you much in build speed.&lt;br /&gt;
&lt;br /&gt;
* make-install-prefix: This is used to allow a program to run make install on your behalf.  Normally with would be the sudo program, which is used to perform actions with administrator permissions.  You only need this for the following:&lt;br /&gt;
# You want to install KDE to the system and not your home directory.&lt;br /&gt;
# Some installed files require elevated permissions to work properly (this is true for kdebase, and some files in kdelibs).&lt;br /&gt;
&lt;br /&gt;
If this ''is'' the case for you, you can use this option (either globally, or for each module) to run make install using sudo, or su, etc.&lt;br /&gt;
&lt;br /&gt;
==== Module configuration ====&lt;br /&gt;
&lt;br /&gt;
After the global options are all done, you'll see the line &amp;quot;end global&amp;quot;, which lets kdesvn-build know that all of the global options have been read.&lt;br /&gt;
&lt;br /&gt;
Next in the kdesvn-buildrc are the module options.  First off, modules are listed in the file, in the order they are to be built and installed.  Each module is listed in the following format:&lt;br /&gt;
:module ''module-name''&lt;br /&gt;
::module-options&lt;br /&gt;
:end module&lt;br /&gt;
&lt;br /&gt;
The ''module-name'' is how kdesvn-build refers to the module.  It should match the name of the module you are downloading from the source repository.  Base KDE modules are listed [http://websvn.kde.org/trunk/KDE/ in WebSVN].  Other modules are also available [http://websvn.kde.org/trunk/ in WebSVN].&lt;br /&gt;
&lt;br /&gt;
One exception is that modules downloaded from git can have any module name you'd like that isn't already used, as kdesvn-build determines their download location using a specific ''repository'' option.&lt;br /&gt;
&lt;br /&gt;
For each module you can specify options, in the same fashion as for the global options. Most of the time, if you set an option for a module, it completely overrides the global option, if any.&lt;br /&gt;
&lt;br /&gt;
However, the cmake-options for a module is added to the global cmake-options, instead of replacing it, which allows you to avoid having to give the same cmake-options for all of your modules.&lt;br /&gt;
&lt;br /&gt;
{{tip|If you need to disable a global cmake-option, you can specify it again for the module you need to disable it for, and give it the opposite value. For instance, if you were using CMAKE_BUILD_TYPE=debugfull globally but wanted Release mode for kdebindings, you could set cmake-options -DCMAKE_BUILD_TYPE=Release for kdebindings.}}&lt;br /&gt;
&lt;br /&gt;
{{tip|If you get the warning from kdesvn-build that a certain module is not listed in the kdesvn-buildrc, make sure that you've added it to the kdesvn-buildrc, even if you have no options for it. If it's already in the kdesvn-buildrc, make sure you spelled the module name right on the command line.}}&lt;br /&gt;
&lt;br /&gt;
==== qt-copy ====&lt;br /&gt;
&lt;br /&gt;
The qt-copy module is special in that it uses configure-options instead of cmake-options, and it never inherits compilation flags that are set globally, since Qt uses a different build system than KDE software does.  The sample kdesvn-buildrc contains a useful set of default configure flags, but if you aren't using qt-copy, you can simply comment the entire qt-copy module out.&lt;br /&gt;
&lt;br /&gt;
Since Nokia's Qt is developed using git instead of Subversion, you must specify the ''repository'' option for qt-copy to choose which version of Qt you will use:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|+ Qt Variants&lt;br /&gt;
|-&lt;br /&gt;
! Edition to build !! Repository to use&lt;br /&gt;
|-&lt;br /&gt;
| Official Nokia Qt || git://gitorious.org/qt/qt.git&lt;br /&gt;
|-&lt;br /&gt;
| Slightly modified Qt with KDE-specific patches and bugfixes (recommended if you're going to the trouble anyways) || git://gitorious.org/+kde-developers/qt/kde-qt.git&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Either way you should specify a ''branch'' of ''master'' to choose the default version.&lt;br /&gt;
&lt;br /&gt;
If you choose kde-qt make sure to look at the README.kde-qt after kdesvn-build downloads the module for you as well!&lt;br /&gt;
&lt;br /&gt;
=== Location ===&lt;br /&gt;
&lt;br /&gt;
kdesvn-build will search in several locations for your rc file.&lt;br /&gt;
&lt;br /&gt;
# First, kdesvn-build will look for a file called {{path|kdesvn-buildrc}} in ''the current directory''.  Notice that in this situation there is no leading dot on the filename.  This allows you to control the build based on what directory you're in, which would be useful for maintaining two different Subversion installs.&lt;br /&gt;
# If no kdesvn-buildrc is found, kdesvn-build will look for a {{path|~/.kdesvn-buildrc}}.  Notice there '''is''' a leading dot on the filename in this situation.  This is the standard Linux/UNIX convention for configuration files stored in the home directory, and marks this as a hidden file.  So if you try to find the file in Dolphin or Konqueror, you may need to Show Hidden Files first.  This controls the default configuration kdesvn-build will use, no matter what directory you run kdesvn-build from.&lt;br /&gt;
# If you specify the --rc-file option to kdesvn-build, kdesvn-build will try to read the given kdesvn-buildrc file instead of the default ones.  This is also independent of what directory kdesvn-build is run in.  But, you must remember to pass this option every time, so it is only useful for testing or for a one-time-only run.&lt;br /&gt;
&lt;br /&gt;
=== Making changes ===&lt;br /&gt;
&lt;br /&gt;
When you make changes to values in your kdesvn-buildrc, they may not always be picked up immediately.  For example, if you change cmake-options but kdesvn-build has no reason to run CMake again, then you'll still be building with your old cmake-options.&lt;br /&gt;
&lt;br /&gt;
{{note|This is only partially true -- kdesvn-build will be able to note that some values have changed and automatically re-run affected build portions as appropriate, but this advice still applies until this feature has been integrated for all options}}&lt;br /&gt;
&lt;br /&gt;
The safest way to ensure that a change to your module's options is picked up is to use the --refresh-build option when rebuilding a module. This option causes kdesvn-build to completely rebuild the given module, which includes running cmake and clearing out the build directory.&lt;br /&gt;
&lt;br /&gt;
Using --refresh-build takes the most time. Often, it is enough to use --reconfigure instead of --refresh-build, which runs CMake but does not clear out the build directory. But if --reconfigure doesn't work you'll end up doing --refresh-build anyways.&lt;br /&gt;
&lt;br /&gt;
On the other hand, if you change the svn-server option to move where kdesvn-build is downloading from, you need to run kdesvn-build one time with the --svn-only option, so that kdesvn-build can perform the correct &amp;quot;svn switch&amp;quot; command.&lt;br /&gt;
&lt;br /&gt;
=== Conclusion ===&lt;br /&gt;
&lt;br /&gt;
The kdesvn-buildrc file is one of the major reasons to use kdesvn-build instead of building manually, as it will allow you to specify build settings to use all of the time instead of having to always remember to type in the correct command line settings and export the right environment variables. There are many more options than the ones covered here, which are mostly [http://kdesvn-build.kde.org/documentation/ detailed at the kdesvn-build documentation]. However, these options are enough to get you a working KDE installation.&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/kdesrc-build-config</id>
		<title>Getting Started/Build/kdesrc-build-config</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/kdesrc-build-config"/>
				<updated>2012-02-11T16:35:56Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: /* Module configuration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== kdesvn-buildrc ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
The [[Getting_Started/Build/kdesvn-build|kdesvn-build]] program, which is used to download, build, and install [http://www.kde.org/ KDE] from the [http://websvn.kde.org/ KDE source repository], uses a file called {{path|kdesvn-buildrc}} in order to control what is downloaded and built, what options are used, and where KDE is installed to.&lt;br /&gt;
&lt;br /&gt;
This is a description of how to use {{path|kdesvn-buildrc}}.&lt;br /&gt;
&lt;br /&gt;
=== Creating your configuration ===&lt;br /&gt;
&lt;br /&gt;
The kdesvn-build download will include a file called {{path|kdesvn-buildrc-sample}}, which is a sample configuration file suitable for building the KDE Software Compilation (SC).&lt;br /&gt;
&lt;br /&gt;
To create your configuration, it is recommended to use this file as a base since it includes the standard list of KDE modules to build, in the correct order.  (You can, of course, add or remove most modules if you like).&lt;br /&gt;
&lt;br /&gt;
You can use any standard text editor to edit this file, such as KWrite, nano, vi, etc.&lt;br /&gt;
&lt;br /&gt;
==== Global configuration ====&lt;br /&gt;
&lt;br /&gt;
Once you open the file, you will see that it starts with some comments (on lines beginning with #), and then the world &amp;quot;global&amp;quot;.  This starts the global configuration for the kdesvn-buildrc, which is used to specify options which are common to all of the modules.&lt;br /&gt;
&lt;br /&gt;
Each option in the global section is specified in the following form:&lt;br /&gt;
:option-name  value&lt;br /&gt;
&lt;br /&gt;
Many options are already listed, with default values, and comments about the option on top.  Some options have more than one sample value listed.  In this situation, all but one of these will have comments.  If you want to use a different sample option, simply uncomment the line by deleting the '#' at the beginning, and commenting or deleting the other lines with the same option name.&lt;br /&gt;
&lt;br /&gt;
Here's a short listing of some of the important global options:&lt;br /&gt;
&lt;br /&gt;
* source-dir: This option controls where kdesvn-build will download the sources to.  In addition, most other directories that kdesvn-build uses will be subdirectories of this directory by default, so it is a kind of &amp;quot;kdesvn-build prefix&amp;quot;.  The default value is {{path|~/kdesvn}}, which downloads the source in a subdirectory under your home directory.&lt;br /&gt;
* build-dir: This controls where kdesvn-build actually builds the various modules.  Normally it is the directory {{path|build}} under your source directory.&lt;br /&gt;
* kdedir: This controls where the KDE SC (and the various supporting modules such as kdesupport) get installed to.  The default is {{path|~/kde}}, which installs to your home directory.&lt;br /&gt;
&lt;br /&gt;
{{note|As you can see, there are three different major directories, source, build, and install.  The build directory is used to keep the source directory clean and to hold intermediate files that don't get installed}}&lt;br /&gt;
&lt;br /&gt;
{{tip|You can use ~/ in these options to represent your home directory}}&lt;br /&gt;
&lt;br /&gt;
* qtdir: This controls where Qt 4 is assumed to be.  If you use the qt-copy module, it also controls where qt-copy is installed to.  Default is {{path|~/qt4}}, which installs qt-copy to your home directory.&lt;br /&gt;
&lt;br /&gt;
{{tip|qt-copy is a module specifically for building Nokia's Qt toolkit. See [[#qt-copy]] below for information about what is special.}}&lt;br /&gt;
&lt;br /&gt;
* cmake-options: This controls what [[Development/Tutorials/CMake#Command_Line_Variables|options]] are passed to CMake for ''every'' KDE module.  For instance, if you want to enable full debugging information, you could set:&lt;br /&gt;
:cmake-options -DCMAKE_BUILD_TYPE=debugfull&lt;br /&gt;
&lt;br /&gt;
* make-options: This is used to pass command line options to the make command, which is what actually performs the build.  The most likely option is -jN, where N is the number of jobs to perform at once.  If you have a system with more than one CPU, it is recommended to use N = number_of_CPUs + 1.  For instance, -j3 on a dual core machine or -j5 on a quad-core.  You can lower this number if your system is sluggish during the build, but raising it won't buy you much in build speed.&lt;br /&gt;
&lt;br /&gt;
* make-install-prefix: This is used to allow a program to run make install on your behalf.  Normally with would be the sudo program, which is used to perform actions with administrator permissions.  You only need this for the following:&lt;br /&gt;
# You want to install KDE to the system and not your home directory.&lt;br /&gt;
# Some installed files require elevated permissions to work properly (this is true for kdebase, and some files in kdelibs).&lt;br /&gt;
&lt;br /&gt;
If this ''is'' the case for you, you can use this option (either globally, or for each module) to run make install using sudo, or su, etc.&lt;br /&gt;
&lt;br /&gt;
==== Module configuration ====&lt;br /&gt;
&lt;br /&gt;
After the global options are all done, you'll see the line &amp;quot;end global&amp;quot;, which lets kdesvn-build know that all of the global options have been read.&lt;br /&gt;
&lt;br /&gt;
Next in the kdesvn-buildrc are the module options.  First off, modules are listed in the file, in the order they are to be built and installed.  Each module is listed in the following format:&lt;br /&gt;
:module ''module-name''&lt;br /&gt;
::module-options&lt;br /&gt;
:end module&lt;br /&gt;
&lt;br /&gt;
The ''module-name'' is how kdesvn-build refers to the module.  It should match the name of the module you are downloading from the source repository.  Base KDE modules are listed [http://websvn.kde.org/trunk/KDE/ in WebSVN].  Other modules are also available [http://websvn.kde.org/trunk/ in WebSVN].&lt;br /&gt;
&lt;br /&gt;
One exception is that modules downloaded from git can have any module name you'd like that isn't already used, as kdesvn-build determines their download location using a specific ''repository'' option.&lt;br /&gt;
&lt;br /&gt;
For each module you can specify options, in the same fashion as for the global options. Most of the time, if you set an option for a module, it completely overrides the global option, if any.&lt;br /&gt;
&lt;br /&gt;
However, the cmake-options for a module is added to the global cmake-options, instead of replacing it, which allows you to avoid having to give the same cmake-options for all of your modules.&lt;br /&gt;
&lt;br /&gt;
{{tip|If you need to disable a global cmake-option, you can specify it again for the module you need to disable it for, and give it the opposite value. For instance, if you were using CMAKE_BUILD_TYPE=debugfull globally but wanted Release mode for kdebindings, you could set cmake-options -DCMAKE_BUILD_TYPE=Release for kdebindings.}}&lt;br /&gt;
&lt;br /&gt;
{{tip|If you get the warning from kdesvn-build that a certain module is not listed in the kdesvn-buildrc, make sure that you've added it to the kdesvn-buildrc, even if you have no options for it. If it's already in the kdesvn-buildrc, make sure you spelled the module name right on the command line.}}&lt;br /&gt;
&lt;br /&gt;
==== qt-copy ====&lt;br /&gt;
&lt;br /&gt;
The qt-copy module is special in that it uses configure-options instead of cmake-options, and it never inherits compilation flags that are set globally, since Qt uses a different build system than KDE software does.  The sample kdesvn-buildrc contains a useful set of default configure flags, but if you aren't using qt-copy, you can simply comment the entire qt-copy module out.&lt;br /&gt;
&lt;br /&gt;
Since Nokia's Qt is developed using git instead of Subversion, you must specify the ''repository'' option for qt-copy to choose which version of Qt you will use:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|+ Qt Variants&lt;br /&gt;
|-&lt;br /&gt;
! Edition to build !! Repository to use&lt;br /&gt;
|-&lt;br /&gt;
| Official Nokia Qt || git://gitorious.org/qt/qt.git&lt;br /&gt;
|-&lt;br /&gt;
| Slightly modified Qt with KDE-specific patches and bugfixes (recommended if you're going to the trouble anyways) || git://gitorious.org/+kde-developers/qt/kde-qt.git&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Either way you should specify a ''branch'' of ''master'' to choose the default version.&lt;br /&gt;
&lt;br /&gt;
If you choose kde-qt make sure to look at the README.kde-qt after kdesvn-build downloads the module for you as well!&lt;br /&gt;
&lt;br /&gt;
=== Location ===&lt;br /&gt;
&lt;br /&gt;
kdesvn-build will search in several locations for your rc file.&lt;br /&gt;
&lt;br /&gt;
# First, kdesvn-build will look for a file called {{path|kdesvn-buildrc}} in ''the current directory''.  Notice that in this situation there is no leading dot on the filename.  This allows you to control the build based on what directory you're in, which would be useful for maintaining two different Subversion installs.&lt;br /&gt;
# If no kdesvn-buildrc is found, kdesvn-build will look for a {{path|~/.kdesvn-buildrc}}.  Notice there '''is''' a leading dot on the filename in this situation.  This is the standard Linux/UNIX convention for configuration files stored in the home directory, and marks this as a hidden file.  So if you try to find the file in Dolphin or Konqueror, you may need to Show Hidden Files first.  This controls the default configuration kdesvn-build will use, no matter what directory you run kdesvn-build from.&lt;br /&gt;
# If you specify the --rc-file option to kdesvn-build, kdesvn-build will try to read the given kdesvn-buildrc file instead of the default ones.  This is also independent of what directory kdesvn-build is run in.  But, you must remember to pass this option every time, so it is only useful for testing or for a one-time-only run.&lt;br /&gt;
&lt;br /&gt;
=== Making changes ===&lt;br /&gt;
&lt;br /&gt;
When you make changes to values in your kdesvn-buildrc, they may not always be picked up immediately.  For example, if you change cmake-options but kdesvn-build has no reason to run CMake again, then you'll still be building with your old cmake-options.&lt;br /&gt;
&lt;br /&gt;
{{note|This is only partially true -- kdesvn-build will be able to note that some values have changed and automatically re-run affected build portions as appropriate, but this advice still applies until this feature has been integrated for all options}}&lt;br /&gt;
&lt;br /&gt;
The safest way to ensure that a change to your module's options is picked up is to use the --refresh-build option when rebuilding a module.  This option causes kdesvn-build to completely rebuild the given module, which includes running cmake and clearing out the build directory.&lt;br /&gt;
&lt;br /&gt;
Using --refresh-build takes the most time.  Often, it is enough to use --reconfigure instead of --refresh-build, which runs CMake but does not clear out the build directory.  But if --reconfigure doesn't work you'll end up doing --refresh-build anyways.&lt;br /&gt;
&lt;br /&gt;
On the other hand, if you change the svn-server option to move where kdesvn-build is downloading from, you need to run kdesvn-build one time with the --svn-only option, so that kdesvn-build can perform the correct &amp;quot;svn switch&amp;quot; command.&lt;br /&gt;
&lt;br /&gt;
=== Conclusion ===&lt;br /&gt;
&lt;br /&gt;
The kdesvn-buildrc file is one of the major reasons to use kdesvn-build instead of building manually, as it will allow you to specify build settings to use all of the time instead of having to always remember to type in the correct command line settings and export the right environment variables.  There are many more options than the ones covered here, which are mostly [http://kdesvn-build.kde.org/documentation/ detailed at the kdesvn-build documentation].  However, these options are enough to get you a working KDE installation.&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/kdesrc-build</id>
		<title>Getting Started/Build/kdesrc-build</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/kdesrc-build"/>
				<updated>2012-02-11T16:33:20Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: /* Download and install kdesrc-build */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:I18n/Language Navigation Bar|Getting_Started/Build/kdesrc-build}}&lt;br /&gt;
&lt;br /&gt;
{{note|It is possible to build KDE 3 using older versions of kdesrc-build, but this is not described here.}}&lt;br /&gt;
&lt;br /&gt;
== Building KDE using the kdesrc-build tool ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction to kdesrc-build ===&lt;br /&gt;
&lt;br /&gt;
[http://kdesrc-build.kde.org/ kdesrc-build] (formerly kdesvn-build) is a tool to allow users and developers to easily download and build the latest versions of the KDE Software Compilation (KDE SC) from the KDE source code repositories.  It automates the following tasks and more:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Performing the initial checkout.&lt;br /&gt;
* Handling updates for modules that are already checked out.&lt;br /&gt;
* Setting up the build system for the module.&lt;br /&gt;
* Performing the build and install.&lt;br /&gt;
* Specifying your CMake options or configure flags (so you don't have to remember them every time).&lt;br /&gt;
* Logging build errors so you can review them easier for troubleshooting.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is not the end-all for your troubles building KDE, [[../Troubleshooting|Troubleshooting]] still applies. Many errors that occur using other methods occur here too, you read the log files that are stored for you.&lt;br /&gt;
&lt;br /&gt;
=== Why use kdesrc-build? ===&lt;br /&gt;
&lt;br /&gt;
So why use kdesrc-build?  There are several reasons you may like to use it:&lt;br /&gt;
&lt;br /&gt;
# Less manual editing of commands.  Instead of having to remember to add the correct options to the cmake command line or configure command, you can setup the options once and then kdesrc-build will use your settings from then on, saving you from wasting time because you forgot to enable a setting.&lt;br /&gt;
# Command logging to help debug build failures.  kdesrc-build logs all command outputs to a file.  This has several advantages:&lt;br /&gt;
## When a module fails to build, you already have the error output saved to disk, ready to be viewed and compared with other error messages to aid debugging.&lt;br /&gt;
## Quieter output.  Even with CMake, the output of Qt or a KDE SC module build can be extensive.  kdesrc-build does not show the details of a module build (but will show the progress), instead an overview of the build process is displayed.&lt;br /&gt;
# It's just easier.  Instead of having to learn how to use the Subversion and git tools, and how to setup a KDE build system, you can specify what modules you want build, where to install them to, and any other options you want and then have kdesrc-build actually do it, even while you're away from the computer or busy doing other things.&lt;br /&gt;
# It's easy to step in yourself.  kdesrc-build uses a standard source and build directory layout, and calls the same commands you would.  So kdesrc-build will not interfere with you performing the build or editing the source yourself if you so choose.&lt;br /&gt;
&lt;br /&gt;
=== Setting up ===&lt;br /&gt;
&lt;br /&gt;
==== Prerequisites ====&lt;br /&gt;
kdesrc-build is fairly easy to install and setup, but you also need to have the right software installed to build KDE. The requirements to build KDE are available as follows:&lt;br /&gt;
&lt;br /&gt;
* KDE 4: [[../Requirements|KDE 4 Requirements]]&lt;br /&gt;
&lt;br /&gt;
kdesrc-build requires Perl 5.8 or higher. It is installed by default with most distributions, and is included in the link above. Check your version of Perl with:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;perl -v&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will also need [https://github.com/gisle/libwww-perl#readme libwww], a collection of Perl Internet-related modules.&lt;br /&gt;
&lt;br /&gt;
{{note|kdesrc-build is developed on a Linux system, but it should work on the various BSD distributions as well (although GNU tools may be required).}}&lt;br /&gt;
&lt;br /&gt;
==== Download and install kdesrc-build ====&lt;br /&gt;
Once your system is setup to be able to compile the KDE SC, you can download kdesrc-build from its website, [http://kdesrc-build.kde.org/ kdesrc-build.kde.org].  The file you download will contain (at least) the kdesrc-build script and a sample configuration file.  Installing kdesrc-build is as simple as saving the file and making it executable.  If you'd like, you can move it to a directory in your PATH, however for this example we'll put it into the KDE source directory that we use (~/kdesrc)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
mkdir -p ~/kdesrc &amp;amp;&amp;amp;&lt;br /&gt;
cd ~/kdesrc &amp;amp;&amp;amp;&lt;br /&gt;
tar xjvf ~/path/to/kdesrc-build-1.14.1.tar.bz2 &amp;amp;&amp;amp;&lt;br /&gt;
cp kdesrc-build-1.14.1/kdesrc-build .&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively, the newest kdesrc-build script (and sample config file) can be pulled directly from git:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone git://anongit.kde.org/kdesrc-build.git ~/kdesrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Setup the configuration ====&lt;br /&gt;
Now you should [[Getting Started/Build/kdesrc-buildrc|setup your configuration]].  For the most part the defaults in the included kdesrc-buildrc-sample should be sufficient.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cp ~/kdesrc/kdesrc-build-1.14.1/kdesrc-buildrc-sample ~/.kdesrc-buildrc&lt;br /&gt;
# Now edit the ~/.kdesrc-buildrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{tip|Note that the config file's name begins with a leading ., making it a hidden file.  You may need to show hidden files in Dolphin or Konqueror to find the configuration file to edit it.  Or, you can edit the sample before copying it to ~/.kdesrc-buildrc.}}&lt;br /&gt;
&lt;br /&gt;
Also, make sure that the modules you'll want to build are included.  You'll want the following at the least:&lt;br /&gt;
&lt;br /&gt;
* qt-copy, kdesupport, kdelibs, kdepimlibs, kdebase&lt;br /&gt;
&lt;br /&gt;
Modules are built in the order they appear in your ~/.kdesrc-buildrc, so the first module should be qt-copy, kdelibs should be before any other KDE SC module, and so on.&lt;br /&gt;
&lt;br /&gt;
{{note|The sample configuration file does include these modules by default, you won't need to make many changes unless you'd like to add some modules to the build by uncommenting them.}}&lt;br /&gt;
&lt;br /&gt;
You may want to enable the make-install-prefix option if you are installing KDE SC or Qt to a directory that is not in your home directory.  make-install-prefix allows you to run su or sudo during the make install process so you can install files as root, or set certain programs to execute with higher permissions (This is required for certain programs to execute properly).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;module kdelibs&lt;br /&gt;
  make-install-prefix sudo -S # sudo with no stdin&lt;br /&gt;
end module&lt;br /&gt;
&lt;br /&gt;
module kdebase&lt;br /&gt;
  make-install-prefix sudo -S&lt;br /&gt;
end module&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If a module you'd like to build isn't already present, simply add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;module &amp;amp;lt;module-name&amp;amp;gt;&lt;br /&gt;
end module&amp;lt;/pre&amp;gt; at the end of the ~/.kdesrc-buildrc. &amp;amp;lt;module-name&amp;amp;gt; would be whatever the module is called in the software repository (for instance, kdemultimedia).&lt;br /&gt;
&lt;br /&gt;
===== Git-based modules =====&lt;br /&gt;
&lt;br /&gt;
Some KDE projects use the &amp;quot;git&amp;quot; source-control software instead of Subversion (as part of an ongoing migration to git). This includes software like Amarok and Konversation.&lt;br /&gt;
&lt;br /&gt;
To build these modules in kdesrc-build, you just need to add a couple of lines to the module configuration. For example, konversation is developed in the Git repository at [https://projects.kde.org/projects/extragear/network/konversation/repository]. So you would just add a module (you can pick whatever name for the module you like, as long as it's not already used):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;module konversation&lt;br /&gt;
    repository git://anongit.kde.org/konversation&lt;br /&gt;
    branch master&lt;br /&gt;
end module&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case I selected the &amp;quot;master&amp;quot; branch since that is the default git branch.&lt;br /&gt;
&lt;br /&gt;
Now whenever you build konversation, kdesrc-build will use git instead of Subversion.&lt;br /&gt;
&lt;br /&gt;
==== Useful kdesrc-build commands ====&lt;br /&gt;
kdesrc-build is driven from the command line, so here's a guide to some of the more useful command line options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table cellpadding=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Option&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Effect&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;tt&amp;gt;&amp;lt;span style=&amp;quot;white-space:nowrap;&amp;quot;&amp;gt;[http://kdesrc-build.kde.org/documentation/cmdline.html#cmdline-pretend --pretend]&amp;lt;/span&amp;gt;&amp;lt;/tt&amp;gt; (Short&amp;amp;nbsp;form&amp;amp;nbsp;&amp;lt;tt&amp;gt;&amp;lt;span style=&amp;quot;white-space:nowrap;&amp;quot;&amp;gt;-p&amp;lt;/span&amp;gt;&amp;lt;/tt&amp;gt;)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This option is like a dry run.  kdesrc-build will process the options and its configuration like normal, and run through the build as normal, but instead of downloading or running the build will instead output what kdesrc-build would have done.  You should always run with -p before running kdesrc-build to make sure it is doing what you expect.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;tt&amp;gt;[http://kdesrc-build.kde.org/documentation/cmdline.html#cmdline-no-svn --no-svn]&amp;lt;/tt&amp;gt; (Alt. form &amp;lt;tt&amp;gt;--no-src&amp;lt;/tt&amp;gt;)&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;This option skips the source code update step.  This is useful if you're running kdesrc-build again soon after the last update and don't want to wait to find out there were no changes.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;tt&amp;gt;[http://kdesrc-build.kde.org/documentation/cmdline.html#cmdline-refresh-build --refresh-build]&amp;lt;/tt&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;This option causes kdesrc-build to delete the current build information for the given modules and start building them again from scratch.  This option takes a lot of time but gives the best chance of a successful build.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Any other non-option arguments on the command line are assumed to be modules to build (and are built in the order provided on the command line).  If no modules are specified, all of the modules listed in the ~/.kdesrc-buildrc are built in the order listed in the file.&lt;br /&gt;
&lt;br /&gt;
== Build ==&lt;br /&gt;
We're almost there.  If you're happy with your settings then it's time to test out kdesrc-build.  In theory things are as simple as running kdesrc-build and then coming back later. ;)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd ~/kdesrc&lt;br /&gt;
./kdesrc-build&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You may want to test by building qt-copy first however.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd ~/kdesrc&lt;br /&gt;
./kdesrc-build qt-copy&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{tip|If you have the [http://www.gnu.org/software/screen/ GNU screen] program available then you should definitely use it to run kdesrc-build, as you can detach your kdesrc-build session and logout while kdesrc-build is still running.}}&lt;br /&gt;
&lt;br /&gt;
If the build failed (kdesrc-build will error out with a nice bright red error message) then there are several possibilities:&lt;br /&gt;
&lt;br /&gt;
# You are missing a key piece of required software (such as a development library)&lt;br /&gt;
# The KDE SC code being compiled is broken in some fashion to where it won't build.  This is commonly due to newly committed code that worked on the developer's machine, or occasionally on Mondays (when incompatible changes are permitted to kdelibs).&lt;br /&gt;
# kdesrc-build is not setup properly.  You may be trying to install to a directory that you have no permissions to access for instance, or you may have specified a system qtdir that does not exist.&lt;br /&gt;
# The module may depend on a newer version of qt-copy or kdelibs (or other module).  In this case you'll have to run kdesrc-build to update the out-of-date module first.&lt;br /&gt;
&lt;br /&gt;
How do you find out what the error was?  The output of the failing command will be in the log directory.  By default, all log output is in the {{path|log}} subdirectory of the KDE SC source directory.  The log directory is laid out like this: {{path|log/date-run/module/output-file.log}}.  To simplify finding the appropriate file, there are a couple of symlinks created:&lt;br /&gt;
&lt;br /&gt;
{{path|log/latest}} always has the debugging output for the last time kdesrc-build was run (--pretend doesn't count toward this)&lt;br /&gt;
{{path|log/latest/&amp;amp;lt;module&amp;amp;gt;/error.log}} has the debugging output for the command that caused a module build to fail.&lt;br /&gt;
&lt;br /&gt;
For instance if qt-copy just failed to build you could read the output like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd ~/kderc&lt;br /&gt;
kwrite log/latest/qt-copy/error.log&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replace kwrite with your preferred editor.  Hopefully the output can guide you to resolving the problem.  For instance, if the failure is a cmake output saying you're missing a library, install that library and try again. ;)  For link errors you can try running a --refresh-build on the module (or if that doesn't work, required libraries like qt-copy and kdelibs).&lt;br /&gt;
&lt;br /&gt;
If you're stumped by the error you may want to wait a day and try updating again, and hope that the reason for the error has been fixed.  You can also try mailing the [http://www.kde.org/mailinglists/ kde-devel] mailing list to see if others know about the problem or have had similar issues.&lt;br /&gt;
&lt;br /&gt;
== Running KDE ==&lt;br /&gt;
&lt;br /&gt;
Assuming you got enough of the modules to build and install to have a working KDE installation, you'll still need to setup your environment correctly to run it.  kdesrc-build doesn't help you out here (yet), so you should follow the instructions [[Getting_Started/Using_an_IDE_with_KDE4|here]].&lt;br /&gt;
&lt;br /&gt;
Make sure to use the same paths as the ones you defined in .kdesrc-buildrc: for the KDEDIRS and KDEDIR variable use the setting of the &amp;quot;prefix&amp;quot; option (in the global section). For the QTDIR variable use the setting of the &amp;quot;qtdir&amp;quot; option.&lt;br /&gt;
&lt;br /&gt;
== Keeping KDE up to date ==&lt;br /&gt;
&lt;br /&gt;
Keeping your KDE installation up to date is as simple as running kdesrc-build again.  Every kdesrc-build has these phases:&lt;br /&gt;
&lt;br /&gt;
# Update the source code for all modules being built.&lt;br /&gt;
# Build and then install all the modules.&lt;br /&gt;
&lt;br /&gt;
Old build directories are not deleted by default, so the build after a small update will not normally take as long as the initial build of a module.  This is called &amp;quot;incremental make&amp;quot;.  However it may be necessary at times to perform a full rebuild due to inconsistencies between the build directory configuation and changes to the source directory.  You can use the --refresh-build option to force a full rebuild.&lt;br /&gt;
&lt;br /&gt;
For more information on how to take advantage of kdesrc-build, see the [http://kdesrc-build.kde.org/documentation online documentation] for kdesrc-build, which describes all of the module options and command line options available for kdesrc-build and gives tips on how to perform various useful tasks.&lt;br /&gt;
&lt;br /&gt;
If you have any questions that are not answered please feel free to add them under the Discussion entry for this page and hopefully someone will be able to get the answer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
* To browse the KDE Subversion repository, use [http://websvn.kde.org/trunk/KDE WebSVN].&lt;br /&gt;
* To browse any of the various KDE projects using git, you can go to [http://projects.kde.org KDE Git Projects] or to [http://gitweb.kde.org KDE Git Web].&lt;br /&gt;
* The Nokia Qt toolkit used by KDE can be browsed at [http://qt.gitorious.org/qt Nokia's Qt version on gitorious].&lt;br /&gt;
&lt;br /&gt;
[[Category:Build_KDE]]&lt;br /&gt;
[[Category:Tutorial]]&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/kdesrc-build</id>
		<title>Getting Started/Build/kdesrc-build</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/kdesrc-build"/>
				<updated>2012-02-11T16:32:36Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: /* Setup the configuration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:I18n/Language Navigation Bar|Getting_Started/Build/kdesrc-build}}&lt;br /&gt;
&lt;br /&gt;
{{note|It is possible to build KDE 3 using older versions of kdesrc-build, but this is not described here.}}&lt;br /&gt;
&lt;br /&gt;
== Building KDE using the kdesrc-build tool ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction to kdesrc-build ===&lt;br /&gt;
&lt;br /&gt;
[http://kdesrc-build.kde.org/ kdesrc-build] (formerly kdesvn-build) is a tool to allow users and developers to easily download and build the latest versions of the KDE Software Compilation (KDE SC) from the KDE source code repositories.  It automates the following tasks and more:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Performing the initial checkout.&lt;br /&gt;
* Handling updates for modules that are already checked out.&lt;br /&gt;
* Setting up the build system for the module.&lt;br /&gt;
* Performing the build and install.&lt;br /&gt;
* Specifying your CMake options or configure flags (so you don't have to remember them every time).&lt;br /&gt;
* Logging build errors so you can review them easier for troubleshooting.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is not the end-all for your troubles building KDE, [[../Troubleshooting|Troubleshooting]] still applies. Many errors that occur using other methods occur here too, you read the log files that are stored for you.&lt;br /&gt;
&lt;br /&gt;
=== Why use kdesrc-build? ===&lt;br /&gt;
&lt;br /&gt;
So why use kdesrc-build?  There are several reasons you may like to use it:&lt;br /&gt;
&lt;br /&gt;
# Less manual editing of commands.  Instead of having to remember to add the correct options to the cmake command line or configure command, you can setup the options once and then kdesrc-build will use your settings from then on, saving you from wasting time because you forgot to enable a setting.&lt;br /&gt;
# Command logging to help debug build failures.  kdesrc-build logs all command outputs to a file.  This has several advantages:&lt;br /&gt;
## When a module fails to build, you already have the error output saved to disk, ready to be viewed and compared with other error messages to aid debugging.&lt;br /&gt;
## Quieter output.  Even with CMake, the output of Qt or a KDE SC module build can be extensive.  kdesrc-build does not show the details of a module build (but will show the progress), instead an overview of the build process is displayed.&lt;br /&gt;
# It's just easier.  Instead of having to learn how to use the Subversion and git tools, and how to setup a KDE build system, you can specify what modules you want build, where to install them to, and any other options you want and then have kdesrc-build actually do it, even while you're away from the computer or busy doing other things.&lt;br /&gt;
# It's easy to step in yourself.  kdesrc-build uses a standard source and build directory layout, and calls the same commands you would.  So kdesrc-build will not interfere with you performing the build or editing the source yourself if you so choose.&lt;br /&gt;
&lt;br /&gt;
=== Setting up ===&lt;br /&gt;
&lt;br /&gt;
==== Prerequisites ====&lt;br /&gt;
kdesrc-build is fairly easy to install and setup, but you also need to have the right software installed to build KDE. The requirements to build KDE are available as follows:&lt;br /&gt;
&lt;br /&gt;
* KDE 4: [[../Requirements|KDE 4 Requirements]]&lt;br /&gt;
&lt;br /&gt;
kdesrc-build requires Perl 5.8 or higher. It is installed by default with most distributions, and is included in the link above. Check your version of Perl with:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;perl -v&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will also need [https://github.com/gisle/libwww-perl#readme libwww], a collection of Perl Internet-related modules.&lt;br /&gt;
&lt;br /&gt;
{{note|kdesrc-build is developed on a Linux system, but it should work on the various BSD distributions as well (although GNU tools may be required).}}&lt;br /&gt;
&lt;br /&gt;
==== Download and install kdesrc-build ====&lt;br /&gt;
Once your system is setup to be able to compile the KDE SC, you can download kdesrc-build from its website, [http://kdesrc-build.kde.org/ kdesrc-build.kde.org].  The file you download will contain (at least) the kdesrc-build script and a sample configuration file.  Installing kdesrc-build is as simple as saving the file and making it executable.  If you'd like, you can move it to a directory in your PATH, however for this example we'll put it into the KDE source directory that we use (~/kdesrc)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
mkdir -p ~/kdesrc &amp;amp;&amp;amp;&lt;br /&gt;
cd ~/kdesrc &amp;amp;&amp;amp;&lt;br /&gt;
tar xjvf ~/path/to/kdesrc-build-1.14.tar.bz2 &amp;amp;&amp;amp;&lt;br /&gt;
cp kdesrc-build-1.14/kdesrc-build .&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively, the newest kdesrc-build script (and sample config file) can be pulled directly from git:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone git://anongit.kde.org/kdesrc-build.git ~/kdesrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Setup the configuration ====&lt;br /&gt;
Now you should [[Getting Started/Build/kdesrc-buildrc|setup your configuration]].  For the most part the defaults in the included kdesrc-buildrc-sample should be sufficient.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cp ~/kdesrc/kdesrc-build-1.14.1/kdesrc-buildrc-sample ~/.kdesrc-buildrc&lt;br /&gt;
# Now edit the ~/.kdesrc-buildrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{tip|Note that the config file's name begins with a leading ., making it a hidden file.  You may need to show hidden files in Dolphin or Konqueror to find the configuration file to edit it.  Or, you can edit the sample before copying it to ~/.kdesrc-buildrc.}}&lt;br /&gt;
&lt;br /&gt;
Also, make sure that the modules you'll want to build are included.  You'll want the following at the least:&lt;br /&gt;
&lt;br /&gt;
* qt-copy, kdesupport, kdelibs, kdepimlibs, kdebase&lt;br /&gt;
&lt;br /&gt;
Modules are built in the order they appear in your ~/.kdesrc-buildrc, so the first module should be qt-copy, kdelibs should be before any other KDE SC module, and so on.&lt;br /&gt;
&lt;br /&gt;
{{note|The sample configuration file does include these modules by default, you won't need to make many changes unless you'd like to add some modules to the build by uncommenting them.}}&lt;br /&gt;
&lt;br /&gt;
You may want to enable the make-install-prefix option if you are installing KDE SC or Qt to a directory that is not in your home directory.  make-install-prefix allows you to run su or sudo during the make install process so you can install files as root, or set certain programs to execute with higher permissions (This is required for certain programs to execute properly).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;module kdelibs&lt;br /&gt;
  make-install-prefix sudo -S # sudo with no stdin&lt;br /&gt;
end module&lt;br /&gt;
&lt;br /&gt;
module kdebase&lt;br /&gt;
  make-install-prefix sudo -S&lt;br /&gt;
end module&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If a module you'd like to build isn't already present, simply add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;module &amp;amp;lt;module-name&amp;amp;gt;&lt;br /&gt;
end module&amp;lt;/pre&amp;gt; at the end of the ~/.kdesrc-buildrc. &amp;amp;lt;module-name&amp;amp;gt; would be whatever the module is called in the software repository (for instance, kdemultimedia).&lt;br /&gt;
&lt;br /&gt;
===== Git-based modules =====&lt;br /&gt;
&lt;br /&gt;
Some KDE projects use the &amp;quot;git&amp;quot; source-control software instead of Subversion (as part of an ongoing migration to git). This includes software like Amarok and Konversation.&lt;br /&gt;
&lt;br /&gt;
To build these modules in kdesrc-build, you just need to add a couple of lines to the module configuration. For example, konversation is developed in the Git repository at [https://projects.kde.org/projects/extragear/network/konversation/repository]. So you would just add a module (you can pick whatever name for the module you like, as long as it's not already used):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;module konversation&lt;br /&gt;
    repository git://anongit.kde.org/konversation&lt;br /&gt;
    branch master&lt;br /&gt;
end module&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case I selected the &amp;quot;master&amp;quot; branch since that is the default git branch.&lt;br /&gt;
&lt;br /&gt;
Now whenever you build konversation, kdesrc-build will use git instead of Subversion.&lt;br /&gt;
&lt;br /&gt;
==== Useful kdesrc-build commands ====&lt;br /&gt;
kdesrc-build is driven from the command line, so here's a guide to some of the more useful command line options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table cellpadding=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Option&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Effect&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;tt&amp;gt;&amp;lt;span style=&amp;quot;white-space:nowrap;&amp;quot;&amp;gt;[http://kdesrc-build.kde.org/documentation/cmdline.html#cmdline-pretend --pretend]&amp;lt;/span&amp;gt;&amp;lt;/tt&amp;gt; (Short&amp;amp;nbsp;form&amp;amp;nbsp;&amp;lt;tt&amp;gt;&amp;lt;span style=&amp;quot;white-space:nowrap;&amp;quot;&amp;gt;-p&amp;lt;/span&amp;gt;&amp;lt;/tt&amp;gt;)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This option is like a dry run.  kdesrc-build will process the options and its configuration like normal, and run through the build as normal, but instead of downloading or running the build will instead output what kdesrc-build would have done.  You should always run with -p before running kdesrc-build to make sure it is doing what you expect.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;tt&amp;gt;[http://kdesrc-build.kde.org/documentation/cmdline.html#cmdline-no-svn --no-svn]&amp;lt;/tt&amp;gt; (Alt. form &amp;lt;tt&amp;gt;--no-src&amp;lt;/tt&amp;gt;)&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;This option skips the source code update step.  This is useful if you're running kdesrc-build again soon after the last update and don't want to wait to find out there were no changes.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;tt&amp;gt;[http://kdesrc-build.kde.org/documentation/cmdline.html#cmdline-refresh-build --refresh-build]&amp;lt;/tt&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;This option causes kdesrc-build to delete the current build information for the given modules and start building them again from scratch.  This option takes a lot of time but gives the best chance of a successful build.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Any other non-option arguments on the command line are assumed to be modules to build (and are built in the order provided on the command line).  If no modules are specified, all of the modules listed in the ~/.kdesrc-buildrc are built in the order listed in the file.&lt;br /&gt;
&lt;br /&gt;
== Build ==&lt;br /&gt;
We're almost there.  If you're happy with your settings then it's time to test out kdesrc-build.  In theory things are as simple as running kdesrc-build and then coming back later. ;)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd ~/kdesrc&lt;br /&gt;
./kdesrc-build&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You may want to test by building qt-copy first however.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd ~/kdesrc&lt;br /&gt;
./kdesrc-build qt-copy&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{tip|If you have the [http://www.gnu.org/software/screen/ GNU screen] program available then you should definitely use it to run kdesrc-build, as you can detach your kdesrc-build session and logout while kdesrc-build is still running.}}&lt;br /&gt;
&lt;br /&gt;
If the build failed (kdesrc-build will error out with a nice bright red error message) then there are several possibilities:&lt;br /&gt;
&lt;br /&gt;
# You are missing a key piece of required software (such as a development library)&lt;br /&gt;
# The KDE SC code being compiled is broken in some fashion to where it won't build.  This is commonly due to newly committed code that worked on the developer's machine, or occasionally on Mondays (when incompatible changes are permitted to kdelibs).&lt;br /&gt;
# kdesrc-build is not setup properly.  You may be trying to install to a directory that you have no permissions to access for instance, or you may have specified a system qtdir that does not exist.&lt;br /&gt;
# The module may depend on a newer version of qt-copy or kdelibs (or other module).  In this case you'll have to run kdesrc-build to update the out-of-date module first.&lt;br /&gt;
&lt;br /&gt;
How do you find out what the error was?  The output of the failing command will be in the log directory.  By default, all log output is in the {{path|log}} subdirectory of the KDE SC source directory.  The log directory is laid out like this: {{path|log/date-run/module/output-file.log}}.  To simplify finding the appropriate file, there are a couple of symlinks created:&lt;br /&gt;
&lt;br /&gt;
{{path|log/latest}} always has the debugging output for the last time kdesrc-build was run (--pretend doesn't count toward this)&lt;br /&gt;
{{path|log/latest/&amp;amp;lt;module&amp;amp;gt;/error.log}} has the debugging output for the command that caused a module build to fail.&lt;br /&gt;
&lt;br /&gt;
For instance if qt-copy just failed to build you could read the output like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd ~/kderc&lt;br /&gt;
kwrite log/latest/qt-copy/error.log&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replace kwrite with your preferred editor.  Hopefully the output can guide you to resolving the problem.  For instance, if the failure is a cmake output saying you're missing a library, install that library and try again. ;)  For link errors you can try running a --refresh-build on the module (or if that doesn't work, required libraries like qt-copy and kdelibs).&lt;br /&gt;
&lt;br /&gt;
If you're stumped by the error you may want to wait a day and try updating again, and hope that the reason for the error has been fixed.  You can also try mailing the [http://www.kde.org/mailinglists/ kde-devel] mailing list to see if others know about the problem or have had similar issues.&lt;br /&gt;
&lt;br /&gt;
== Running KDE ==&lt;br /&gt;
&lt;br /&gt;
Assuming you got enough of the modules to build and install to have a working KDE installation, you'll still need to setup your environment correctly to run it.  kdesrc-build doesn't help you out here (yet), so you should follow the instructions [[Getting_Started/Using_an_IDE_with_KDE4|here]].&lt;br /&gt;
&lt;br /&gt;
Make sure to use the same paths as the ones you defined in .kdesrc-buildrc: for the KDEDIRS and KDEDIR variable use the setting of the &amp;quot;prefix&amp;quot; option (in the global section). For the QTDIR variable use the setting of the &amp;quot;qtdir&amp;quot; option.&lt;br /&gt;
&lt;br /&gt;
== Keeping KDE up to date ==&lt;br /&gt;
&lt;br /&gt;
Keeping your KDE installation up to date is as simple as running kdesrc-build again.  Every kdesrc-build has these phases:&lt;br /&gt;
&lt;br /&gt;
# Update the source code for all modules being built.&lt;br /&gt;
# Build and then install all the modules.&lt;br /&gt;
&lt;br /&gt;
Old build directories are not deleted by default, so the build after a small update will not normally take as long as the initial build of a module.  This is called &amp;quot;incremental make&amp;quot;.  However it may be necessary at times to perform a full rebuild due to inconsistencies between the build directory configuation and changes to the source directory.  You can use the --refresh-build option to force a full rebuild.&lt;br /&gt;
&lt;br /&gt;
For more information on how to take advantage of kdesrc-build, see the [http://kdesrc-build.kde.org/documentation online documentation] for kdesrc-build, which describes all of the module options and command line options available for kdesrc-build and gives tips on how to perform various useful tasks.&lt;br /&gt;
&lt;br /&gt;
If you have any questions that are not answered please feel free to add them under the Discussion entry for this page and hopefully someone will be able to get the answer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
* To browse the KDE Subversion repository, use [http://websvn.kde.org/trunk/KDE WebSVN].&lt;br /&gt;
* To browse any of the various KDE projects using git, you can go to [http://projects.kde.org KDE Git Projects] or to [http://gitweb.kde.org KDE Git Web].&lt;br /&gt;
* The Nokia Qt toolkit used by KDE can be browsed at [http://qt.gitorious.org/qt Nokia's Qt version on gitorious].&lt;br /&gt;
&lt;br /&gt;
[[Category:Build_KDE]]&lt;br /&gt;
[[Category:Tutorial]]&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/kdesrc-build</id>
		<title>Getting Started/Build/kdesrc-build</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/kdesrc-build"/>
				<updated>2012-02-11T16:31:19Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: /* Setup the configuration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:I18n/Language Navigation Bar|Getting_Started/Build/kdesrc-build}}&lt;br /&gt;
&lt;br /&gt;
{{note|It is possible to build KDE 3 using older versions of kdesrc-build, but this is not described here.}}&lt;br /&gt;
&lt;br /&gt;
== Building KDE using the kdesrc-build tool ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction to kdesrc-build ===&lt;br /&gt;
&lt;br /&gt;
[http://kdesrc-build.kde.org/ kdesrc-build] (formerly kdesvn-build) is a tool to allow users and developers to easily download and build the latest versions of the KDE Software Compilation (KDE SC) from the KDE source code repositories.  It automates the following tasks and more:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Performing the initial checkout.&lt;br /&gt;
* Handling updates for modules that are already checked out.&lt;br /&gt;
* Setting up the build system for the module.&lt;br /&gt;
* Performing the build and install.&lt;br /&gt;
* Specifying your CMake options or configure flags (so you don't have to remember them every time).&lt;br /&gt;
* Logging build errors so you can review them easier for troubleshooting.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is not the end-all for your troubles building KDE, [[../Troubleshooting|Troubleshooting]] still applies. Many errors that occur using other methods occur here too, you read the log files that are stored for you.&lt;br /&gt;
&lt;br /&gt;
=== Why use kdesrc-build? ===&lt;br /&gt;
&lt;br /&gt;
So why use kdesrc-build?  There are several reasons you may like to use it:&lt;br /&gt;
&lt;br /&gt;
# Less manual editing of commands.  Instead of having to remember to add the correct options to the cmake command line or configure command, you can setup the options once and then kdesrc-build will use your settings from then on, saving you from wasting time because you forgot to enable a setting.&lt;br /&gt;
# Command logging to help debug build failures.  kdesrc-build logs all command outputs to a file.  This has several advantages:&lt;br /&gt;
## When a module fails to build, you already have the error output saved to disk, ready to be viewed and compared with other error messages to aid debugging.&lt;br /&gt;
## Quieter output.  Even with CMake, the output of Qt or a KDE SC module build can be extensive.  kdesrc-build does not show the details of a module build (but will show the progress), instead an overview of the build process is displayed.&lt;br /&gt;
# It's just easier.  Instead of having to learn how to use the Subversion and git tools, and how to setup a KDE build system, you can specify what modules you want build, where to install them to, and any other options you want and then have kdesrc-build actually do it, even while you're away from the computer or busy doing other things.&lt;br /&gt;
# It's easy to step in yourself.  kdesrc-build uses a standard source and build directory layout, and calls the same commands you would.  So kdesrc-build will not interfere with you performing the build or editing the source yourself if you so choose.&lt;br /&gt;
&lt;br /&gt;
=== Setting up ===&lt;br /&gt;
&lt;br /&gt;
==== Prerequisites ====&lt;br /&gt;
kdesrc-build is fairly easy to install and setup, but you also need to have the right software installed to build KDE. The requirements to build KDE are available as follows:&lt;br /&gt;
&lt;br /&gt;
* KDE 4: [[../Requirements|KDE 4 Requirements]]&lt;br /&gt;
&lt;br /&gt;
kdesrc-build requires Perl 5.8 or higher. It is installed by default with most distributions, and is included in the link above. Check your version of Perl with:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;perl -v&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will also need [https://github.com/gisle/libwww-perl#readme libwww], a collection of Perl Internet-related modules.&lt;br /&gt;
&lt;br /&gt;
{{note|kdesrc-build is developed on a Linux system, but it should work on the various BSD distributions as well (although GNU tools may be required).}}&lt;br /&gt;
&lt;br /&gt;
==== Download and install kdesrc-build ====&lt;br /&gt;
Once your system is setup to be able to compile the KDE SC, you can download kdesrc-build from its website, [http://kdesrc-build.kde.org/ kdesrc-build.kde.org].  The file you download will contain (at least) the kdesrc-build script and a sample configuration file.  Installing kdesrc-build is as simple as saving the file and making it executable.  If you'd like, you can move it to a directory in your PATH, however for this example we'll put it into the KDE source directory that we use (~/kdesrc)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
mkdir -p ~/kdesrc &amp;amp;&amp;amp;&lt;br /&gt;
cd ~/kdesrc &amp;amp;&amp;amp;&lt;br /&gt;
tar xjvf ~/path/to/kdesrc-build-1.14.tar.bz2 &amp;amp;&amp;amp;&lt;br /&gt;
cp kdesrc-build-1.14/kdesrc-build .&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively, the newest kdesrc-build script (and sample config file) can be pulled directly from git:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone git://anongit.kde.org/kdesrc-build.git ~/kdesrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Setup the configuration ====&lt;br /&gt;
Now you should [[Getting Started/Build/kdesrc-buildrc|setup your configuration]].  For the most part the defaults in the included kdesrc-buildrc-sample should be sufficient.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cp ~/kdesrc/kdesrc-build-1.14/kdesrc-buildrc-sample ~/.kdesrc-buildrc&lt;br /&gt;
# Now edit the ~/.kdesrc-buildrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{tip|Note that the config file's name begins with a leading ., making it a hidden file.  You may need to show hidden files in Dolphin or Konqueror to find the configuration file to edit it.  Or, you can edit the sample before copying it to ~/.kdesrc-buildrc.}}&lt;br /&gt;
&lt;br /&gt;
Also, make sure that the modules you'll want to build are included.  You'll want the following at the least:&lt;br /&gt;
&lt;br /&gt;
* qt-copy, kdesupport, kdelibs, kdepimlibs, kdebase&lt;br /&gt;
&lt;br /&gt;
Modules are built in the order they appear in your ~/.kdesrc-buildrc, so the first module should be qt-copy, kdelibs should be before any other KDE SC module, and so on.&lt;br /&gt;
&lt;br /&gt;
{{note|The sample configuration file does include these modules by default, you won't need to make many changes unless you'd like to add some modules to the build by uncommenting them.}}&lt;br /&gt;
&lt;br /&gt;
You may want to enable the make-install-prefix option if you are installing KDE SC or Qt to a directory that is not in your home directory.  make-install-prefix allows you to run su or sudo during the make install process so you can install files as root, or set certain programs to execute with higher permissions (This is required for certain programs to execute properly).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;module kdelibs&lt;br /&gt;
  make-install-prefix sudo -S # sudo with no stdin&lt;br /&gt;
end module&lt;br /&gt;
&lt;br /&gt;
module kdebase&lt;br /&gt;
  make-install-prefix sudo -S&lt;br /&gt;
end module&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If a module you'd like to build isn't already present, simply add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;module &amp;amp;lt;module-name&amp;amp;gt;&lt;br /&gt;
end module&amp;lt;/pre&amp;gt; at the end of the ~/.kdesrc-buildrc. &amp;amp;lt;module-name&amp;amp;gt; would be whatever the module is called in the software repository (for instance, kdemultimedia).&lt;br /&gt;
&lt;br /&gt;
===== Git-based modules =====&lt;br /&gt;
&lt;br /&gt;
Some KDE projects use the &amp;quot;git&amp;quot; source-control software instead of Subversion (as part of an ongoing migration to git). This includes software like Amarok and Konversation.&lt;br /&gt;
&lt;br /&gt;
To build these modules in kdesrc-build, you just need to add a couple of lines to the module configuration. For example, konversation is developed in the Git repository at [https://projects.kde.org/projects/extragear/network/konversation/repository]. So you would just add a module (you can pick whatever name for the module you like, as long as it's not already used):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;module konversation&lt;br /&gt;
    repository git://anongit.kde.org/konversation&lt;br /&gt;
    branch master&lt;br /&gt;
end module&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case I selected the &amp;quot;master&amp;quot; branch since that is the default git branch.&lt;br /&gt;
&lt;br /&gt;
Now whenever you build konversation, kdesrc-build will use git instead of Subversion.&lt;br /&gt;
&lt;br /&gt;
==== Useful kdesrc-build commands ====&lt;br /&gt;
kdesrc-build is driven from the command line, so here's a guide to some of the more useful command line options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table cellpadding=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Option&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Effect&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;tt&amp;gt;&amp;lt;span style=&amp;quot;white-space:nowrap;&amp;quot;&amp;gt;[http://kdesrc-build.kde.org/documentation/cmdline.html#cmdline-pretend --pretend]&amp;lt;/span&amp;gt;&amp;lt;/tt&amp;gt; (Short&amp;amp;nbsp;form&amp;amp;nbsp;&amp;lt;tt&amp;gt;&amp;lt;span style=&amp;quot;white-space:nowrap;&amp;quot;&amp;gt;-p&amp;lt;/span&amp;gt;&amp;lt;/tt&amp;gt;)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This option is like a dry run.  kdesrc-build will process the options and its configuration like normal, and run through the build as normal, but instead of downloading or running the build will instead output what kdesrc-build would have done.  You should always run with -p before running kdesrc-build to make sure it is doing what you expect.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;tt&amp;gt;[http://kdesrc-build.kde.org/documentation/cmdline.html#cmdline-no-svn --no-svn]&amp;lt;/tt&amp;gt; (Alt. form &amp;lt;tt&amp;gt;--no-src&amp;lt;/tt&amp;gt;)&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;This option skips the source code update step.  This is useful if you're running kdesrc-build again soon after the last update and don't want to wait to find out there were no changes.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;tt&amp;gt;[http://kdesrc-build.kde.org/documentation/cmdline.html#cmdline-refresh-build --refresh-build]&amp;lt;/tt&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;This option causes kdesrc-build to delete the current build information for the given modules and start building them again from scratch.  This option takes a lot of time but gives the best chance of a successful build.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Any other non-option arguments on the command line are assumed to be modules to build (and are built in the order provided on the command line).  If no modules are specified, all of the modules listed in the ~/.kdesrc-buildrc are built in the order listed in the file.&lt;br /&gt;
&lt;br /&gt;
== Build ==&lt;br /&gt;
We're almost there.  If you're happy with your settings then it's time to test out kdesrc-build.  In theory things are as simple as running kdesrc-build and then coming back later. ;)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd ~/kdesrc&lt;br /&gt;
./kdesrc-build&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You may want to test by building qt-copy first however.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd ~/kdesrc&lt;br /&gt;
./kdesrc-build qt-copy&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{tip|If you have the [http://www.gnu.org/software/screen/ GNU screen] program available then you should definitely use it to run kdesrc-build, as you can detach your kdesrc-build session and logout while kdesrc-build is still running.}}&lt;br /&gt;
&lt;br /&gt;
If the build failed (kdesrc-build will error out with a nice bright red error message) then there are several possibilities:&lt;br /&gt;
&lt;br /&gt;
# You are missing a key piece of required software (such as a development library)&lt;br /&gt;
# The KDE SC code being compiled is broken in some fashion to where it won't build.  This is commonly due to newly committed code that worked on the developer's machine, or occasionally on Mondays (when incompatible changes are permitted to kdelibs).&lt;br /&gt;
# kdesrc-build is not setup properly.  You may be trying to install to a directory that you have no permissions to access for instance, or you may have specified a system qtdir that does not exist.&lt;br /&gt;
# The module may depend on a newer version of qt-copy or kdelibs (or other module).  In this case you'll have to run kdesrc-build to update the out-of-date module first.&lt;br /&gt;
&lt;br /&gt;
How do you find out what the error was?  The output of the failing command will be in the log directory.  By default, all log output is in the {{path|log}} subdirectory of the KDE SC source directory.  The log directory is laid out like this: {{path|log/date-run/module/output-file.log}}.  To simplify finding the appropriate file, there are a couple of symlinks created:&lt;br /&gt;
&lt;br /&gt;
{{path|log/latest}} always has the debugging output for the last time kdesrc-build was run (--pretend doesn't count toward this)&lt;br /&gt;
{{path|log/latest/&amp;amp;lt;module&amp;amp;gt;/error.log}} has the debugging output for the command that caused a module build to fail.&lt;br /&gt;
&lt;br /&gt;
For instance if qt-copy just failed to build you could read the output like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd ~/kderc&lt;br /&gt;
kwrite log/latest/qt-copy/error.log&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replace kwrite with your preferred editor.  Hopefully the output can guide you to resolving the problem.  For instance, if the failure is a cmake output saying you're missing a library, install that library and try again. ;)  For link errors you can try running a --refresh-build on the module (or if that doesn't work, required libraries like qt-copy and kdelibs).&lt;br /&gt;
&lt;br /&gt;
If you're stumped by the error you may want to wait a day and try updating again, and hope that the reason for the error has been fixed.  You can also try mailing the [http://www.kde.org/mailinglists/ kde-devel] mailing list to see if others know about the problem or have had similar issues.&lt;br /&gt;
&lt;br /&gt;
== Running KDE ==&lt;br /&gt;
&lt;br /&gt;
Assuming you got enough of the modules to build and install to have a working KDE installation, you'll still need to setup your environment correctly to run it.  kdesrc-build doesn't help you out here (yet), so you should follow the instructions [[Getting_Started/Using_an_IDE_with_KDE4|here]].&lt;br /&gt;
&lt;br /&gt;
Make sure to use the same paths as the ones you defined in .kdesrc-buildrc: for the KDEDIRS and KDEDIR variable use the setting of the &amp;quot;prefix&amp;quot; option (in the global section). For the QTDIR variable use the setting of the &amp;quot;qtdir&amp;quot; option.&lt;br /&gt;
&lt;br /&gt;
== Keeping KDE up to date ==&lt;br /&gt;
&lt;br /&gt;
Keeping your KDE installation up to date is as simple as running kdesrc-build again.  Every kdesrc-build has these phases:&lt;br /&gt;
&lt;br /&gt;
# Update the source code for all modules being built.&lt;br /&gt;
# Build and then install all the modules.&lt;br /&gt;
&lt;br /&gt;
Old build directories are not deleted by default, so the build after a small update will not normally take as long as the initial build of a module.  This is called &amp;quot;incremental make&amp;quot;.  However it may be necessary at times to perform a full rebuild due to inconsistencies between the build directory configuation and changes to the source directory.  You can use the --refresh-build option to force a full rebuild.&lt;br /&gt;
&lt;br /&gt;
For more information on how to take advantage of kdesrc-build, see the [http://kdesrc-build.kde.org/documentation online documentation] for kdesrc-build, which describes all of the module options and command line options available for kdesrc-build and gives tips on how to perform various useful tasks.&lt;br /&gt;
&lt;br /&gt;
If you have any questions that are not answered please feel free to add them under the Discussion entry for this page and hopefully someone will be able to get the answer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
* To browse the KDE Subversion repository, use [http://websvn.kde.org/trunk/KDE WebSVN].&lt;br /&gt;
* To browse any of the various KDE projects using git, you can go to [http://projects.kde.org KDE Git Projects] or to [http://gitweb.kde.org KDE Git Web].&lt;br /&gt;
* The Nokia Qt toolkit used by KDE can be browsed at [http://qt.gitorious.org/qt Nokia's Qt version on gitorious].&lt;br /&gt;
&lt;br /&gt;
[[Category:Build_KDE]]&lt;br /&gt;
[[Category:Tutorial]]&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/kdesrc-build</id>
		<title>Getting Started/Build/kdesrc-build</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/kdesrc-build"/>
				<updated>2012-02-11T16:30:54Z</updated>
		
		<summary type="html">&lt;p&gt;Tstaerk: /* Download and install kdesrc-build */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:I18n/Language Navigation Bar|Getting_Started/Build/kdesrc-build}}&lt;br /&gt;
&lt;br /&gt;
{{note|It is possible to build KDE 3 using older versions of kdesrc-build, but this is not described here.}}&lt;br /&gt;
&lt;br /&gt;
== Building KDE using the kdesrc-build tool ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction to kdesrc-build ===&lt;br /&gt;
&lt;br /&gt;
[http://kdesrc-build.kde.org/ kdesrc-build] (formerly kdesvn-build) is a tool to allow users and developers to easily download and build the latest versions of the KDE Software Compilation (KDE SC) from the KDE source code repositories.  It automates the following tasks and more:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Performing the initial checkout.&lt;br /&gt;
* Handling updates for modules that are already checked out.&lt;br /&gt;
* Setting up the build system for the module.&lt;br /&gt;
* Performing the build and install.&lt;br /&gt;
* Specifying your CMake options or configure flags (so you don't have to remember them every time).&lt;br /&gt;
* Logging build errors so you can review them easier for troubleshooting.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is not the end-all for your troubles building KDE, [[../Troubleshooting|Troubleshooting]] still applies. Many errors that occur using other methods occur here too, you read the log files that are stored for you.&lt;br /&gt;
&lt;br /&gt;
=== Why use kdesrc-build? ===&lt;br /&gt;
&lt;br /&gt;
So why use kdesrc-build?  There are several reasons you may like to use it:&lt;br /&gt;
&lt;br /&gt;
# Less manual editing of commands.  Instead of having to remember to add the correct options to the cmake command line or configure command, you can setup the options once and then kdesrc-build will use your settings from then on, saving you from wasting time because you forgot to enable a setting.&lt;br /&gt;
# Command logging to help debug build failures.  kdesrc-build logs all command outputs to a file.  This has several advantages:&lt;br /&gt;
## When a module fails to build, you already have the error output saved to disk, ready to be viewed and compared with other error messages to aid debugging.&lt;br /&gt;
## Quieter output.  Even with CMake, the output of Qt or a KDE SC module build can be extensive.  kdesrc-build does not show the details of a module build (but will show the progress), instead an overview of the build process is displayed.&lt;br /&gt;
# It's just easier.  Instead of having to learn how to use the Subversion and git tools, and how to setup a KDE build system, you can specify what modules you want build, where to install them to, and any other options you want and then have kdesrc-build actually do it, even while you're away from the computer or busy doing other things.&lt;br /&gt;
# It's easy to step in yourself.  kdesrc-build uses a standard source and build directory layout, and calls the same commands you would.  So kdesrc-build will not interfere with you performing the build or editing the source yourself if you so choose.&lt;br /&gt;
&lt;br /&gt;
=== Setting up ===&lt;br /&gt;
&lt;br /&gt;
==== Prerequisites ====&lt;br /&gt;
kdesrc-build is fairly easy to install and setup, but you also need to have the right software installed to build KDE. The requirements to build KDE are available as follows:&lt;br /&gt;
&lt;br /&gt;
* KDE 4: [[../Requirements|KDE 4 Requirements]]&lt;br /&gt;
&lt;br /&gt;
kdesrc-build requires Perl 5.8 or higher. It is installed by default with most distributions, and is included in the link above. Check your version of Perl with:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;perl -v&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will also need [https://github.com/gisle/libwww-perl#readme libwww], a collection of Perl Internet-related modules.&lt;br /&gt;
&lt;br /&gt;
{{note|kdesrc-build is developed on a Linux system, but it should work on the various BSD distributions as well (although GNU tools may be required).}}&lt;br /&gt;
&lt;br /&gt;
==== Download and install kdesrc-build ====&lt;br /&gt;
Once your system is setup to be able to compile the KDE SC, you can download kdesrc-build from its website, [http://kdesrc-build.kde.org/ kdesrc-build.kde.org].  The file you download will contain (at least) the kdesrc-build script and a sample configuration file.  Installing kdesrc-build is as simple as saving the file and making it executable.  If you'd like, you can move it to a directory in your PATH, however for this example we'll put it into the KDE source directory that we use (~/kdesrc)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
mkdir -p ~/kdesrc &amp;amp;&amp;amp;&lt;br /&gt;
cd ~/kdesrc &amp;amp;&amp;amp;&lt;br /&gt;
tar xjvf ~/path/to/kdesrc-build-1.14.tar.bz2 &amp;amp;&amp;amp;&lt;br /&gt;
cp kdesrc-build-1.14/kdesrc-build .&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively, the newest kdesrc-build script (and sample config file) can be pulled directly from git:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone git://anongit.kde.org/kdesrc-build.git ~/kdesrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Setup the configuration ====&lt;br /&gt;
Now you should [[Getting Started/Build/kdesrc-buildrc|setup your configuration]].  For the most part the defaults in the included kdesrc-buildrc-sample should be sufficient.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cp ~/kdesrc/kdesrc-build-1.12/kdesrc-buildrc-sample ~/.kdesrc-buildrc&lt;br /&gt;
# Now edit the ~/.kdesrc-buildrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{tip|Note that the config file's name begins with a leading ., making it a hidden file.  You may need to show hidden files in Dolphin or Konqueror to find the configuration file to edit it.  Or, you can edit the sample before copying it to ~/.kdesrc-buildrc.}}&lt;br /&gt;
&lt;br /&gt;
Also, make sure that the modules you'll want to build are included.  You'll want the following at the least:&lt;br /&gt;
&lt;br /&gt;
* qt-copy, kdesupport, kdelibs, kdepimlibs, kdebase&lt;br /&gt;
&lt;br /&gt;
Modules are built in the order they appear in your ~/.kdesrc-buildrc, so the first module should be qt-copy, kdelibs should be before any other KDE SC module, and so on.&lt;br /&gt;
&lt;br /&gt;
{{note|The sample configuration file does include these modules by default, you won't need to make many changes unless you'd like to add some modules to the build by uncommenting them.}}&lt;br /&gt;
&lt;br /&gt;
You may want to enable the make-install-prefix option if you are installing KDE SC or Qt to a directory that is not in your home directory.  make-install-prefix allows you to run su or sudo during the make install process so you can install files as root, or set certain programs to execute with higher permissions (This is required for certain programs to execute properly).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;module kdelibs&lt;br /&gt;
  make-install-prefix sudo -S # sudo with no stdin&lt;br /&gt;
end module&lt;br /&gt;
&lt;br /&gt;
module kdebase&lt;br /&gt;
  make-install-prefix sudo -S&lt;br /&gt;
end module&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If a module you'd like to build isn't already present, simply add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;module &amp;amp;lt;module-name&amp;amp;gt;&lt;br /&gt;
end module&amp;lt;/pre&amp;gt; at the end of the ~/.kdesrc-buildrc. &amp;amp;lt;module-name&amp;amp;gt; would be whatever the module is called in the software repository (for instance, kdemultimedia).&lt;br /&gt;
&lt;br /&gt;
===== Git-based modules =====&lt;br /&gt;
&lt;br /&gt;
Some KDE projects use the &amp;quot;git&amp;quot; source-control software instead of Subversion (as part of an ongoing migration to git). This includes software like Amarok and Konversation.&lt;br /&gt;
&lt;br /&gt;
To build these modules in kdesrc-build, you just need to add a couple of lines to the module configuration. For example, konversation is developed in the Git repository at [https://projects.kde.org/projects/extragear/network/konversation/repository]. So you would just add a module (you can pick whatever name for the module you like, as long as it's not already used):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;module konversation&lt;br /&gt;
    repository git://anongit.kde.org/konversation&lt;br /&gt;
    branch master&lt;br /&gt;
end module&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case I selected the &amp;quot;master&amp;quot; branch since that is the default git branch.&lt;br /&gt;
&lt;br /&gt;
Now whenever you build konversation, kdesrc-build will use git instead of Subversion.&lt;br /&gt;
&lt;br /&gt;
==== Useful kdesrc-build commands ====&lt;br /&gt;
kdesrc-build is driven from the command line, so here's a guide to some of the more useful command line options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table cellpadding=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Option&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Effect&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;tt&amp;gt;&amp;lt;span style=&amp;quot;white-space:nowrap;&amp;quot;&amp;gt;[http://kdesrc-build.kde.org/documentation/cmdline.html#cmdline-pretend --pretend]&amp;lt;/span&amp;gt;&amp;lt;/tt&amp;gt; (Short&amp;amp;nbsp;form&amp;amp;nbsp;&amp;lt;tt&amp;gt;&amp;lt;span style=&amp;quot;white-space:nowrap;&amp;quot;&amp;gt;-p&amp;lt;/span&amp;gt;&amp;lt;/tt&amp;gt;)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This option is like a dry run.  kdesrc-build will process the options and its configuration like normal, and run through the build as normal, but instead of downloading or running the build will instead output what kdesrc-build would have done.  You should always run with -p before running kdesrc-build to make sure it is doing what you expect.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;tt&amp;gt;[http://kdesrc-build.kde.org/documentation/cmdline.html#cmdline-no-svn --no-svn]&amp;lt;/tt&amp;gt; (Alt. form &amp;lt;tt&amp;gt;--no-src&amp;lt;/tt&amp;gt;)&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;This option skips the source code update step.  This is useful if you're running kdesrc-build again soon after the last update and don't want to wait to find out there were no changes.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;tt&amp;gt;[http://kdesrc-build.kde.org/documentation/cmdline.html#cmdline-refresh-build --refresh-build]&amp;lt;/tt&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;This option causes kdesrc-build to delete the current build information for the given modules and start building them again from scratch.  This option takes a lot of time but gives the best chance of a successful build.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Any other non-option arguments on the command line are assumed to be modules to build (and are built in the order provided on the command line).  If no modules are specified, all of the modules listed in the ~/.kdesrc-buildrc are built in the order listed in the file.&lt;br /&gt;
&lt;br /&gt;
== Build ==&lt;br /&gt;
We're almost there.  If you're happy with your settings then it's time to test out kdesrc-build.  In theory things are as simple as running kdesrc-build and then coming back later. ;)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd ~/kdesrc&lt;br /&gt;
./kdesrc-build&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You may want to test by building qt-copy first however.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd ~/kdesrc&lt;br /&gt;
./kdesrc-build qt-copy&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{tip|If you have the [http://www.gnu.org/software/screen/ GNU screen] program available then you should definitely use it to run kdesrc-build, as you can detach your kdesrc-build session and logout while kdesrc-build is still running.}}&lt;br /&gt;
&lt;br /&gt;
If the build failed (kdesrc-build will error out with a nice bright red error message) then there are several possibilities:&lt;br /&gt;
&lt;br /&gt;
# You are missing a key piece of required software (such as a development library)&lt;br /&gt;
# The KDE SC code being compiled is broken in some fashion to where it won't build.  This is commonly due to newly committed code that worked on the developer's machine, or occasionally on Mondays (when incompatible changes are permitted to kdelibs).&lt;br /&gt;
# kdesrc-build is not setup properly.  You may be trying to install to a directory that you have no permissions to access for instance, or you may have specified a system qtdir that does not exist.&lt;br /&gt;
# The module may depend on a newer version of qt-copy or kdelibs (or other module).  In this case you'll have to run kdesrc-build to update the out-of-date module first.&lt;br /&gt;
&lt;br /&gt;
How do you find out what the error was?  The output of the failing command will be in the log directory.  By default, all log output is in the {{path|log}} subdirectory of the KDE SC source directory.  The log directory is laid out like this: {{path|log/date-run/module/output-file.log}}.  To simplify finding the appropriate file, there are a couple of symlinks created:&lt;br /&gt;
&lt;br /&gt;
{{path|log/latest}} always has the debugging output for the last time kdesrc-build was run (--pretend doesn't count toward this)&lt;br /&gt;
{{path|log/latest/&amp;amp;lt;module&amp;amp;gt;/error.log}} has the debugging output for the command that caused a module build to fail.&lt;br /&gt;
&lt;br /&gt;
For instance if qt-copy just failed to build you could read the output like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd ~/kderc&lt;br /&gt;
kwrite log/latest/qt-copy/error.log&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replace kwrite with your preferred editor.  Hopefully the output can guide you to resolving the problem.  For instance, if the failure is a cmake output saying you're missing a library, install that library and try again. ;)  For link errors you can try running a --refresh-build on the module (or if that doesn't work, required libraries like qt-copy and kdelibs).&lt;br /&gt;
&lt;br /&gt;
If you're stumped by the error you may want to wait a day and try updating again, and hope that the reason for the error has been fixed.  You can also try mailing the [http://www.kde.org/mailinglists/ kde-devel] mailing list to see if others know about the problem or have had similar issues.&lt;br /&gt;
&lt;br /&gt;
== Running KDE ==&lt;br /&gt;
&lt;br /&gt;
Assuming you got enough of the modules to build and install to have a working KDE installation, you'll still need to setup your environment correctly to run it.  kdesrc-build doesn't help you out here (yet), so you should follow the instructions [[Getting_Started/Using_an_IDE_with_KDE4|here]].&lt;br /&gt;
&lt;br /&gt;
Make sure to use the same paths as the ones you defined in .kdesrc-buildrc: for the KDEDIRS and KDEDIR variable use the setting of the &amp;quot;prefix&amp;quot; option (in the global section). For the QTDIR variable use the setting of the &amp;quot;qtdir&amp;quot; option.&lt;br /&gt;
&lt;br /&gt;
== Keeping KDE up to date ==&lt;br /&gt;
&lt;br /&gt;
Keeping your KDE installation up to date is as simple as running kdesrc-build again.  Every kdesrc-build has these phases:&lt;br /&gt;
&lt;br /&gt;
# Update the source code for all modules being built.&lt;br /&gt;
# Build and then install all the modules.&lt;br /&gt;
&lt;br /&gt;
Old build directories are not deleted by default, so the build after a small update will not normally take as long as the initial build of a module.  This is called &amp;quot;incremental make&amp;quot;.  However it may be necessary at times to perform a full rebuild due to inconsistencies between the build directory configuation and changes to the source directory.  You can use the --refresh-build option to force a full rebuild.&lt;br /&gt;
&lt;br /&gt;
For more information on how to take advantage of kdesrc-build, see the [http://kdesrc-build.kde.org/documentation online documentation] for kdesrc-build, which describes all of the module options and command line options available for kdesrc-build and gives tips on how to perform various useful tasks.&lt;br /&gt;
&lt;br /&gt;
If you have any questions that are not answered please feel free to add them under the Discussion entry for this page and hopefully someone will be able to get the answer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
* To browse the KDE Subversion repository, use [http://websvn.kde.org/trunk/KDE WebSVN].&lt;br /&gt;
* To browse any of the various KDE projects using git, you can go to [http://projects.kde.org KDE Git Projects] or to [http://gitweb.kde.org KDE Git Web].&lt;br /&gt;
* The Nokia Qt toolkit used by KDE can be browsed at [http://qt.gitorious.org/qt Nokia's Qt version on gitorious].&lt;br /&gt;
&lt;br /&gt;
[[Category:Build_KDE]]&lt;br /&gt;
[[Category:Tutorial]]&lt;/div&gt;</summary>
		<author><name>Tstaerk</name></author>	</entry>

	</feed>