KDE Frameworks/Getting Started: Difference between revisions

From KDE TechBase
No edit summary
m (Jucato moved page KF5/Getting Started to KDE Frameworks/Getting Started: Give a more descriptive title)
 
(42 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{Proposed_deletion|reason=this stuff has all been moved to community now (mostly to Get Involved)}}
<languages />
<languages />
{{Construction|This is a rewrite of the Getting Stared pages for KF5 using kdesrc-build by John Layt}}
<translate>
<translate>
==Introduction== <!--T:1-->


{{Construction|This is a rewrite of the Getting Stared pages for KF5 using kdesrc-build by John Layt}}
<!--T:2-->
There are many different ways to become [http://community.kde.org/Get_Involved involved in the KDE Community], starting with simply using our software. This guide is to help you get started on the technical side of developing the software itself.


== Introduction == <!--T:3-->
<!--T:3-->
{{Note|1=If you just want to use stable KDE Software for your everyday computing needs, then you do not usually need to build KDE Software for yourself. See [https://www.kde.org/download/ Getting KDE Software] for information about how to get hold of the software for your system.}}


<!--T:4-->
<!--T:4-->
There are many different ways to become [http://community.kde.org/Getinvolved involved in the KDE Community], ranging all the way from a simply using our software through to being a core platform developer.
It is important to note that the version of KDE Software that is provided by your distribution or downloaded via an installer is ''not'' the same as the version that is being worked on by software developers. If you are using KDE CoolApp 1.2, the developers are working on the "development" version, usually called "KDE CoolApp ''master''". This is the version that will become KDE CoolApp 1.3, or maybe 2.0. If you want to get involved in developing KDE Software, you will need to get hold of and build the development versions.
 
<!--T:5-->
This guide will aim to show you how to build, run and help improve the development versions of KDE Software. We will primarily be looking at submitting a ''patch'' to change the software, but the information here is also useful if you want to [https://techbase.kde.org/Contribute/Bugsquad test whether a bug still exists in the software], for example.


<!--T:6-->
<!--T:6-->
This section of KDE TechBase is designed to help get you started in participating in the technical side of the KDE community.  It will explain to you how KDE Software is structured and built, and how you can participate by building KDE Software for yourself. If you just want to get started then you can skip to the [[Special:myLanguage/KF5/Getting_Started/Build|build instructions]], but it is recommended you first understand the background material presented here.
If you just want to get started building the code then you can skip to the [[Special:myLanguage/KF5/Getting_Started/Build|build instructions]], but it is recommended you first understand the background material presented here.
</translate>


== Using KDE Software == <!--T:8-->
<translate>
== Getting Help == <!--T:7-->
 
<!--T:8-->
If you are looking for help in using KDE Plasma or KDE Applications then please visit the [http://userbase.kde.org/ KDE UserBase].


<!--T:9-->
<!--T:9-->
If you just want to use stable KDE Software for your everyday computing needs, then you do not need to build KDE Software for yourself. You should instead use the software installer provided by your Linux distribution to install KDE Software packages.
Before you continue with this guide, it is a good idea to get on <abbr title="Internet Relay Chat">IRC</abbr>. This is a realtime text communication system, and the primary "casual" communication tool for KDE developers.


<!--T:10-->
<!--T:10-->
The best place to learn how to do this is through your distribution's normal support channels, although you may find some useful information on the following pages:
You will need a way to connect to the [http://freenode.net/ freenode IRC network]. We suggest [https://konversation.kde.org/ Konversation] (see the [https://docs.kde.org/trunk5/en/extragear-network/konversation/index.html handbook] for help in setting it up), although a convenient alternative if you want to get going quickly is freenode's [http://webchat.freenode.net/ online webchat]. You will need to choose a ''nick'' (the name you appear on the network as), [http://freenode.net/using_the_network.shtml connect to freenode] and join [irc://irc.kde.org/kde-devel #kde-devel].
* [https://community.kde.org/Distributions Linux and BSD Distributions shipping KDE]
* [[Special:myLanguage/Projects/KDE_on_Windows/Installation|Install KDE Software on Windows]]
[http://community.kde.org/Mac#Installing_KDE_on_Mac_OSX Install KDE Software on Mac OS X]


== Getting Help == <!--T:11-->
<!--T:11-->
The other main channel for communication is the KDE mailing lists. To start with, you should subscribe to [https://mail.kde.org/mailman/listinfo/kde-devel the kde-devel list] (you will need to subscribe before you can send emails to the list).


<!--T:12-->
<!--T:12-->
If you are looking for help in using the KDE Workspace or KDE Applications then please visit the [http://userbase.kde.org/ KDE UserBase].  
For more information about getting help, see the main [[Special:myLanguage/Development/Getting_Help|Getting Help]] page, and remember that applications often have their own IRC channels and mailing lists that can be better places to ask for help.


<!--T:13-->
<!--T:13-->
If you have any questions or problems with building or developing KDE Software please feel free to [[Special:myLanguage/Development/Getting_Help|ask for help]]. The IRC channel [irc://irc.kde.org/kde-devel #kde-devel] is recommended as the best source of general help. For application specific help please try their specific mailing list or IRC channel.
Be patient while waiting for a response, and try to work through the problem yourself: we aren't going to do it ''all'' for you. Working your way through and understanding why something doesn't work is a good way to learn how to do things the right way.
</translate>


Be patient while waiting for a response, and try to work through the problem yourself, we aren't going to do it ''all'' for you.  Working your way through and understanding why something doesn't work is a good way to learn how to do things the right way.
<translate>
 
==Development Policies== <!--T:14-->
== Browsing the code == <!--T:28-->
All KDE Software is free and open source. You are free to view the source code, and free to make changes to the code in line with the (L)GPL family of licences.
 
Most KDE Software developed within the KDE Community is stored in Git repositories which are hosted at [http://projects.kde.org KDE Projects]. There are a number of ways to browse or search the code online:
 
* https://projects.kde.org/projects is a list of all KDE Projects, choose a project and then click on Repository to browse the source
* https://quickgit.kde.org/ is an alternative online code browser for code in Git repositories
* https://websvn.kde.org/ is an online code browser for code still in the Subversion repository
* http://lxr.kde.org/ lets you search the code for identifiers like API calls
* http://lxr.kde.org/search lets you search the code for any string
* http://api.kde.org lets you browse or search the API documentation generated from the code
 
Read the [[KF5/Getting_Started/Source_Code|Source Code section]] to learn how the KDE Software repositories are organized.
 
== Building and Running KDE Software From Source == <!--T:14-->


<!--T:15-->
<!--T:15-->
There are several possible ways to build and install KDE Software and the method you choose depends on what you want to do with the software.  In particular if you are only wanting to build and develop a single KDE application you may not need to build the latest KDE Frameworks or KDE Plasma to do so, you may only need to build the application itself.
KDE Software is a very large, diverse and complex code base and the KDE Community has developed many policies and processes to make the KDE Software development process manageable, which are documented [[Special:myLanguage/Policies|elsewhere in TechBase]]. As you become more involved in KDE Development, you will need to become familiar with them, as well as any policies specific to the projects you are contributing to, but for your first few patches you will not need to worry about most of them.
 
The easiest and recommended way to build and run KDE Software from source is using the [https://kdesrc-build.kde.org/ kdesrc-build tool] written by Michael Pyne. These pages will describe how to use this tool to build the KDE Software you want to work on. Other more manual methods are possible but not recommended due to the complex dependency requirements that kdesrc-build will manage for you. You can build both KDE4 and KF5 based code using kdesrc-build, but these instructions will focus on KF5.


<!--T:16-->
<!--T:16-->
The following sections explain the steps you need to understand and give the instructions you need to follow to successfully build KDE Software from source:
At this point, the main thing you need to read is the [https://www.kde.org/code-of-conduct/ KDE Community Code of Conduct], because this is the basis for interacting with the KDE Community in general. You will also need to be willing for your code to be licensed under the one of the licenses listed in the [[Special:myLanguage/Policies/Licensing_Policy|licensing policy]].
 
You should follow the following sections to gain a better understanding of how KDE Software is organized, how to build it, and how to run it:


<!--T:17-->
<!--T:17-->
* [[Special:myLanguage/KF5/Getting_Started/Source_Code|How the KDE Software source code is structured]]
If you want to make changes to library code, especially the KDE Frameworks, reading the [[Special:myLanguage/Policies/Library_Code_Policy|library code policy]] can help you write code that will satisfy the requirements of those projects.
* [[Special:myLanguage/KF5/Getting_Started/Source_Code|How the KDE Software source code is structured]]
</translate>
* [[Special:myLanguage/KF5/Getting_Started/Build|How to Build and Install the software]]
* [[Special:myLanguage/KF5/Getting_Started/Build|How to Build and Install the software]]


== Development Model == <!--T:18-->
<translate>
==KDE Projects== <!--T:18-->


<!--T:19-->
<!--T:19-->
TODO: General introduction to the dev model, release cycles, etc.
As mentioned above, there is a lot of KDE Software. You may already have a project in mind that you want to help with, in which case it is helpful to know where it fits in the overall structure of KDE Software. If you haven't chosen a specific project, knowing this structure will help you start your search for where to begin contributing.


<!--T:20-->
<!--T:20-->
* [[Special:myLanguage/Schedules/Release_Schedules_Guide|The KDE Release Schedule]]
KDE Software is divided into three main Products:
* [[Special:myLanguage/Development/Software_Engineering_Framework|The KDE Software Engineering Framework]]
* [http://api.kde.org/frameworks-api/frameworks5-apidocs/ KDE Frameworks]
* [[Special:myLanguage/Policies|KDE Development Policies and Procedures to follow]]
* [https://www.kde.org/workspaces/ KDE Plasma]
* [[Special:myLanguage/Policies/Application_Lifecycle|The development lifecycle for a new application]]
* [https://www.kde.org/applications/ KDE Applications]


== Development Tools == <!--T:21-->
<!--T:21-->
The Frameworks are the libraries that underpin all the other KDE Software. Almost all KDE Software is built on [http://www.qt.io/ Qt], a C++ framework and GUI toolkit. The Frameworks provide additional functionality on top of Qt, and are used both within and outside KDE.


<!--T:22-->
<!--T:22-->
There are a number of [[Special:myLanguage/Development/Tools|Development Tools]] that are either required or helpful when building KDE Software. For these you will usually want to use the stable packages provided by your distribution.
KDE Plasma is KDE's desktop environment. Applications built on top of Qt and KDE Frameworks will integrate well with KDE Plasma, but they will also integrate with other desktops. Plasma will also attempt to help other applications (such as GTK-based ones) integrate with it.


<!--T:23-->
<!--T:23-->
You may want to use a graphical IDE for your development work:
Most other KDE projects are applications that come under the KDE Applications umbrella. This contains several coherent groups, such as [https://edu.kde.org/applications/ KDE Education], [https://games.kde.org/ KDE Games], the [https://www.calligra.org/ Calligra Suite] and the [https://userbase.kde.org/Kontact Kontact Suite].
* [[Special:myLanguage/Development/Tutorials/Using_Qt_Creator|Qt Creator]]
* [http://www.kdevelop.org/ KDevelop 4]
* [[Special:myLanguage/Development/Tools/Eclipse|Eclipse]]
* [[Special:myLanguage/Getting_Started/Using_an_IDE_with_KDE4|Using an IDE with KDE4]]


== Contributing To KDE == <!--T:24-->
<!--T:24-->
Each of these Products has its own release cycle. For example, a new version of the Frameworks is released every month. KDE also has other projects that are not part of the above Products. These can be divided into the following groups:


<!--T:25-->
<!--T:25-->
Once you have a copy of KDE built you can then start contributing back to KDE. The pages below will help you find out how you can help make KDE even better.
* Extragear contains stable software (often applications) that have their own release cycles, separate from the above major Products.
* Playground contains software that is not yet stable.
* Review projects are waiting to move into one of the three main Products, or from Playground to Extragear.
* Unmaintained projects are no longer worked on.
* Sysadmin and Website projects are used to help manage KDE infrastructure.
</translate>


<!--T:26-->
<translate>
[[Image:Action_tool.svg|right|32px]]
 
==Getting and Building the Source== <!--T:26-->
 
<!--T:27-->
If you are generally familiar with getting and building open source software projects, you can follow a similar strategy for KDE Software: find the repository on [https://quickgit.kde.org/ KDE QuickGit], clone it and [[Special:myLanguage/Development/CMake#Building_a_project_with_CMake|build it like any other CMake project]]. However, KDE has a lot of interdependent projects, and you can end up spending a lot of time building the dependencies and dependencies-of-dependencies of the project you actually want to contribute to.
 
<!--T:28-->
The approach we will present here is to use a tool that will manage building all the dependencies for you.
 
<!--T:29-->
First, we recommend you read about [[Special:myLanguage/KF5/Getting_Started/Source_Code|how to access the KDE source code]]. The tool we will use to build the software will fetch the source code that it needs itself, so reading this is not strictly necessary, but it will give you an overview that will help you understand what the tool is doing, as well as potentially being useful later.
 
<!--T:30-->
After that, you are ready to [[Special:myLanguage/KF5/Getting_Started/Build|build and install KDE Software]].
</translate>
 
<translate>
==Testing== <!--T:31-->
 
<!--T:32-->
TODO: Running unit tests, running the software.
</translate>
 
<translate>
==Making A Patch== <!--T:33-->
 
<!--T:34-->
TODO: how to find a task (junior jobs), the edit-compile-fix cycle?
 
<!--T:35-->
Relevant: [[Special:myLanguage/Development/Tools|Development Tools useful in developing KDE Software]].
</translate>
 
<translate>
==Submitting Your Change== <!--T:36-->
 
<!--T:37-->
TODO: Reviewboard/Phabricator
 
<!--T:38-->
Relevant: [[Special:myLanguage/Contribute/Send_Patches|Send Patches]]
 
<!--T:39-->
Maybe link to:
* [[Special:myLanguage/Contribute|Contribute]]
* [[Special:myLanguage/Contribute|Contribute]]
* [[Special:myLanguage/Contribute/Send_Patches|Send Patches]]
* [[Special:myLanguage/Contribute/Bugsquad|Bugsquad]]
* [[Special:myLanguage/Contribute/Bugsquad|Bugsquad]]
</translate>
<translate>
==Next Steps== <!--T:40-->


<!--T:27-->
<!--T:41-->
TODO: keep submitting patches, get invited to get a contributor account?
</translate>
 
<translate>
<!--T:42-->
[[Category:Build_KDE]]
[[Category:Build_KDE]]
</translate>
</translate>

Latest revision as of 09:35, 22 May 2019

 
Proposed for Deletion
This page has been proposed for deletion for the following reason:

this stuff has all been moved to community now (mostly to Get Involved)

Other languages:
  • English
 
Under Construction
This is a new page, currently under construction!


Introduction

There are many different ways to become involved in the KDE Community, starting with simply using our software. This guide is to help you get started on the technical side of developing the software itself.

Note
If you just want to use stable KDE Software for your everyday computing needs, then you do not usually need to build KDE Software for yourself. See Getting KDE Software for information about how to get hold of the software for your system.


It is important to note that the version of KDE Software that is provided by your distribution or downloaded via an installer is not the same as the version that is being worked on by software developers. If you are using KDE CoolApp 1.2, the developers are working on the "development" version, usually called "KDE CoolApp master". This is the version that will become KDE CoolApp 1.3, or maybe 2.0. If you want to get involved in developing KDE Software, you will need to get hold of and build the development versions.

This guide will aim to show you how to build, run and help improve the development versions of KDE Software. We will primarily be looking at submitting a patch to change the software, but the information here is also useful if you want to test whether a bug still exists in the software, for example.

If you just want to get started building the code then you can skip to the build instructions, but it is recommended you first understand the background material presented here.

Getting Help

If you are looking for help in using KDE Plasma or KDE Applications then please visit the KDE UserBase.

Before you continue with this guide, it is a good idea to get on IRC. This is a realtime text communication system, and the primary "casual" communication tool for KDE developers.

You will need a way to connect to the freenode IRC network. We suggest Konversation (see the handbook for help in setting it up), although a convenient alternative if you want to get going quickly is freenode's online webchat. You will need to choose a nick (the name you appear on the network as), connect to freenode and join #kde-devel.

The other main channel for communication is the KDE mailing lists. To start with, you should subscribe to the kde-devel list (you will need to subscribe before you can send emails to the list).

For more information about getting help, see the main Getting Help page, and remember that applications often have their own IRC channels and mailing lists that can be better places to ask for help.

Be patient while waiting for a response, and try to work through the problem yourself: we aren't going to do it all for you. Working your way through and understanding why something doesn't work is a good way to learn how to do things the right way.

Development Policies

KDE Software is a very large, diverse and complex code base and the KDE Community has developed many policies and processes to make the KDE Software development process manageable, which are documented elsewhere in TechBase. As you become more involved in KDE Development, you will need to become familiar with them, as well as any policies specific to the projects you are contributing to, but for your first few patches you will not need to worry about most of them.

At this point, the main thing you need to read is the KDE Community Code of Conduct, because this is the basis for interacting with the KDE Community in general. You will also need to be willing for your code to be licensed under the one of the licenses listed in the licensing policy.

If you want to make changes to library code, especially the KDE Frameworks, reading the library code policy can help you write code that will satisfy the requirements of those projects.

KDE Projects

As mentioned above, there is a lot of KDE Software. You may already have a project in mind that you want to help with, in which case it is helpful to know where it fits in the overall structure of KDE Software. If you haven't chosen a specific project, knowing this structure will help you start your search for where to begin contributing.

KDE Software is divided into three main Products:

The Frameworks are the libraries that underpin all the other KDE Software. Almost all KDE Software is built on Qt, a C++ framework and GUI toolkit. The Frameworks provide additional functionality on top of Qt, and are used both within and outside KDE.

KDE Plasma is KDE's desktop environment. Applications built on top of Qt and KDE Frameworks will integrate well with KDE Plasma, but they will also integrate with other desktops. Plasma will also attempt to help other applications (such as GTK-based ones) integrate with it.

Most other KDE projects are applications that come under the KDE Applications umbrella. This contains several coherent groups, such as KDE Education, KDE Games, the Calligra Suite and the Kontact Suite.

Each of these Products has its own release cycle. For example, a new version of the Frameworks is released every month. KDE also has other projects that are not part of the above Products. These can be divided into the following groups:

  • Extragear contains stable software (often applications) that have their own release cycles, separate from the above major Products.
  • Playground contains software that is not yet stable.
  • Review projects are waiting to move into one of the three main Products, or from Playground to Extragear.
  • Unmaintained projects are no longer worked on.
  • Sysadmin and Website projects are used to help manage KDE infrastructure.


Getting and Building the Source

If you are generally familiar with getting and building open source software projects, you can follow a similar strategy for KDE Software: find the repository on KDE QuickGit, clone it and build it like any other CMake project. However, KDE has a lot of interdependent projects, and you can end up spending a lot of time building the dependencies and dependencies-of-dependencies of the project you actually want to contribute to.

The approach we will present here is to use a tool that will manage building all the dependencies for you.

First, we recommend you read about how to access the KDE source code. The tool we will use to build the software will fetch the source code that it needs itself, so reading this is not strictly necessary, but it will give you an overview that will help you understand what the tool is doing, as well as potentially being useful later.

After that, you are ready to build and install KDE Software.

Testing

TODO: Running unit tests, running the software.

Making A Patch

TODO: how to find a task (junior jobs), the edit-compile-fix cycle?

Relevant: Development Tools useful in developing KDE Software.

Submitting Your Change

TODO: Reviewboard/Phabricator

Relevant: Send Patches

Maybe link to:

Next Steps

TODO: keep submitting patches, get invited to get a contributor account?