|
|
Contributors will want to set up an environment to be able to build and test the shell locally on their machine.
|
|
|
|
|
|
Rolling release distributions are preferred development environments because they have more up-to-date packages, preventing the pain of trying to find newer versions of them if necessary.
|
|
|
|
|
|
It is highly recommended to use the `kdesrc-build` utility to build and test KDE projects. This is because it can handle building the **entire** Plasma stack, which may be necessary if the current master branch depends on unreleased changes from it (and so will not work with your system Plasma version).
|
|
|
|
|
|
### Setting up `kdesrc-build`
|
|
|
|
|
|
View [this page](https://community.kde.org/Get_Involved/development) for more detailed instructions on setting up the utility.
|
|
|
|
|
|
We can setup the `kde` folder in your home directory for KDE development:
|
|
|
|
|
|
```bash
|
|
|
mkdir -p ~/kde/src
|
|
|
cd ~/kde/src/
|
|
|
|
|
|
# Download the utility
|
|
|
git clone https://invent.kde.org/sdk/kdesrc-build.git && cd kdesrc-build
|
|
|
./kdesrc-build --initial-setup
|
|
|
|
|
|
# Reload the environment so that you can use the kdesrc-build command directly
|
|
|
source ~/.bashrc
|
|
|
```
|
|
|
|
|
|
If you have trouble with distribution specific dependencies, view [this page](https://community.kde.org/Guidelines_and_HOWTOs/Build_from_source/Install_the_dependencies) on resolving them.
|
|
|
|
|
|
We now have the utility setup to build KDE projects! For example, if we wanted to build the [KWeather](https://invent.kde.org/plasma-mobile/kweather) project, we can simply do:
|
|
|
|
|
|
```bash
|
|
|
# Build KWeather and its dependencies
|
|
|
kdesrc-build kweather
|
|
|
|
|
|
# Run the application
|
|
|
kdesrc-run kweather
|
|
|
```
|
|
|
|
|
|
We can also specify some flags:
|
|
|
* `--no-src` builds local changes from `~/kde/src`, rather than fetching the source code from GitLab
|
|
|
* `--no-include-dependencies` skips building all of the dependencies, and just solely builds the specified repository
|
|
|
|
|
|
So `kdesrc-build kweather --no-src --no-include-depencencies` skips building dependencies and builds the project from the existing code in `~/kde/src/kweather`. See [the manual](https://docs.kde.org/trunk5/en/kdesrc-build/kdesrc-build/) for more information.
|
|
|
|
|
|
---
|
|
|
|
|
|
<img src="uploads/b0b5f5578fdc882772a18f33a084ef86/image.png" width=200px/>
|
|
|
|
|
|
*konqi is preparing to build the shell...*
|
|
|
|
|
|
---
|
|
|
|
|
|
### Using a development Plasma session
|
|
|
|
|
|
It can be much easier to test applications in development as well as the shell in a **development** Plasma session.
|
|
|
|
|
|
This means logging into a Plasma session that is built right from the latest source code (not a release version!).
|
|
|
|
|
|
```bash
|
|
|
# Build plasma-desktop and all of its dependencies
|
|
|
kdesrc-build plasma-desktop systemsettings
|
|
|
```
|
|
|
|
|
|
This command will take a long time!
|
|
|
|
|
|
Once it is complete, we can make the development session selectable from SDDM (or whichever desktop manager you use).
|
|
|
|
|
|
```
|
|
|
~/kde/build/plasma-workspace/login-sessions/install-sessions.sh
|
|
|
```
|
|
|
|
|
|
Logout, and select the `Plasma (Development, Wayland /home/devin/kde/usr/bin)` session to login. You should be in the Plasma session that you built locally!
|
|
|
|
|
|
### Building the shell
|
|
|
|
|
|
To build the Plasma Mobile shell and environment, we run:
|
|
|
|
|
|
```bash
|
|
|
kdesrc-build plasma-mobile plasma-settings
|
|
|
```
|
|
|
|
|
|
This should pull the remote repository and put it in `~/kde/src/plasma-mobile`. If you **make any changes** and want to rebuild, you should use the `--no-src` flag in order to have those changes built.
|
|
|
|
|
|
### Running the shell in a window
|
|
|
|
|
|
We can now run the shell in a window:
|
|
|
|
|
|
```bash
|
|
|
# Environment variables
|
|
|
export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
|
|
|
export QT_QUICK_CONTROLS_MOBILE=1
|
|
|
export PLASMA_PLATFORM=phone:handheld
|
|
|
|
|
|
QT_QPA_PLATFORM=wayland dbus-run-session kwin_wayland --xwayland "plasmashell -p org.kde.plasma.phoneshell" --width 360 --height 720
|
|
|
```
|
|
|
|
|
|
The Plasma Mobile session should open in a window.
|
|
|
|
|
|
If you are having issues with this process, please join the developer channels linked on the [home page](Home)!
|
|
|
|
|
|
---
|
|
|
|
|
|
<img src="uploads/2b4f68a1b5086538952bee6de3a1231f/image.png" width=200px/>
|
|
|
|
|
|
*konqi is ready to develop!* |
|
|
\ No newline at end of file |