|
|
(49 intermediate revisions by the same user not shown) |
Line 1: |
Line 1: |
| = Building KDE/Plasma 5 on Ubuntu 14.04 LTS = | | ==Projects== |
| {{Warning|Since this guide uses packages from Xenial and PPA's, this may cause instability to your system
| | ===Dolphin=== |
| }}
| | [https://www.kde.org/applications/system/dolphin/development Dolphin - Development Information] |
| The aim of this guide is to help you build KDE Plasma 5 for development and/or use. I decided to write a guide specifically for Ubuntu 14.04 because it can be tricky to resolve all of the build dependencies and problems specific to this system. These instructions are valid as of 2 Sep 2016, which will build Plasma 5.7.90 and KDE Frameworks 5.25.0. Since you will be building out of the master branch, dependencies may change after this guide is written. I will try to update this guide to cover any new dependencies.
| |
|
| |
|
| Most of the instructions in this guide can be cut and pasted. A few steps will require you to edit some files or interact with a GUI.
| | [https://docs.kde.org/trunk5/en/applications/dolphin/ Dolpin Handbook] |
|
| |
|
| {{Note|Following the instructions in this guide will install Qt to /opt/Qt5.7.0 and kde to /opt/kde-5.
| | [https://github.com/KDE/dolphin Dolphin github] |
| }}
| |
|
| |
|
| == Install a recent version of cmake == | | ==Guides I've Written== |
| You will need to install a more recent version of cmake to build.
| | [[Guidelines_and_HOWTOs/Build_from_source/Plasma 5 on Ubuntu 14.04 LTS|How to build KDE/Plasma 5 on Ubuntu 14.04 LTS]] |
| {{Input|1=<nowiki>
| |
| sudo apt-get install build-essential
| |
| wget https://cmake.org/files/v3.6/cmake-3.6.1.tar.gz
| |
| tar -zxvf cmake-3.6.1.tar.gz
| |
| cd cmake-3.6.1/
| |
| ./configure | |
| make
| |
| sudo apt-get install checkinstall
| |
| sudo checkinstall
| |
| </nowiki>}}
| |
|
| |
|
| == Upgrade libwayland-dev and network-manager from PPA's ==
| | [[/Building_and_using_Qt5GStreamer_on_Windows|Building and using Qt5GStreamer on Windows]] |
| Upgrade libwayland-dev and related dependencies:
| |
| {{Input|1=<nowiki>sudo add-apt-repository ppa:xorg-edgers/ppa
| |
| sudo apt-get update
| |
| sudo apt-get install libwayland-dev
| |
| </nowiki>}}
| |
| Upgrade network-manager and related dependencies:
| |
| {{Input|1=<nowiki>sudo add-apt-repository ppa:9v-shaun-42/networkmanager
| |
| sudo apt-get update
| |
| sudo apt-get install network-manager
| |
| </nowiki>}}
| |
| {{Tip|You may lose network connection after this step. Reboot to fix.}}
| |
|
| |
|
| == Install Qt 5.7.0 using Qt offline installer == | | ==Videos I've Made== |
| Download and install Qt 5.7.0 to the default location /opt/Qt5.7.0
| | [https://www.youtube.com/watch?v=28Jjf5Ak6Q0 Touchscreen gestures in Linux using Touchegg] |
| {{Input|1=<nowiki>wget http://download.qt.io/official_releases/qt/5.7/5.7.0/qt-opensource-linux-x64-5.7.0.run
| |
| sudo ./qt-opensource-linux-x64-5.7.0.run</nowiki>}}
| |
| Choose default options and include "Sources" option
| |
| {{Note|On my computer it appears to be stuck at 4%(dialog box doesn't respond), but it installs just fine if I wait.}}
| |
|
| |
|
| == Install some build dependencies == | | ==KDE== |
| | [irc://irc.kde.org/kde-devel <nowiki>#kde-devel</nowiki>] |
|
| |
|
| {{Input|1=<nowiki>sudo apt-get build-dep kde-workspace qtbase5-dev</nowiki>}}
| | https://git.reviewboard.kde.org/dashboard/ |
|
| |
|
| == Build Qtwebkit == | | ===https://bugs.kde.org/=== |
|
| | [https://bugs.kde.org/buglist.cgi?bug_status=CONFIRMED&order=changeddate%20DESC%2Cbug_id%20DESC&product=dolphin&query_format=advanced Confirmed dolphin bugs] |
| Install dependencies for building Qtwebkit:
| |
| {{Input|1=<nowiki>sudo apt-get install flex bison gperf libicu-dev libxslt-dev ruby</nowiki>}}
| |
| Install git:
| |
| {{Input|1=<nowiki>sudo apt-get install git</nowiki>}}
| |
| Clone and build qtwebkit:
| |
| {{Input|1=<nowiki>git clone git://code.qt.io/qt/qtwebkit.git --branch 5.7.0
| |
| mkdir qtwebkit-build
| |
| cd qtwebkit-build
| |
| /opt/Qt5.7.0/5.7/gcc_64/bin/qmake ../qtwebkit | |
| make
| |
| sudo make install
| |
| </nowiki>}}
| |
|
| |
|
| == Setup kdesrc-build and .kdesrc-buildrc == | | [https://bugs.kde.org/buglist.cgi?bug_status=UNCONFIRMED&bug_status=CONFIRMED&bug_status=ASSIGNED&bug_status=REOPENED&email2=don78colorado&emailassigned_to2=1&emailcc2=1&emailreporter2=1&emailtype2=substring&query_format=advanced Bugs related to me] |
| kdesrc-build needs xml-parser-perl so install it with the following command:
| |
| {{Input|1=<nowiki>sudo apt-get install libxml-parser-perl</nowiki>}}
| |
|
| |
|
| Most of this section is taken from https://community.kde.org/Guidelines_and_HOWTOs/Build_from_source and copied here for your convenience. Be sure to set qtdir and kdedir as directed at the end of this section.
| |
|
| |
|
| === Git remote prefix ===
| | https://identity.kde.org/ |
| Let's setup a "kde:" prefix for git commands. Add the following text to your ~/.gitconfig:
| |
| <syntaxhighlight lang="ini">
| |
| [url "git://anongit.kde.org/"]
| |
| insteadOf = kde:
| |
| | |
| pushInsteadOf = kde:
| |
| </syntaxhighlight>
| |
|
| |
|
| === Install kdesrc-build ===
| | https://lxr.kde.org |
| ''kdesrc-build'' is, a user-space package manager, it is used to compile KDE-related projects from source and installs them into a designated directory.
| |
|
| |
|
| Follow the given steps to set up kdesrc-build to install KDevelop into our $HOME directory:
| | https://phabricator.kde.org/ |
| <pre>
| |
| mkdir ~/kdesrc
| |
| cd ~/kdesrc
| |
| git clone kde:kdesrc-build
| |
| cd kdesrc-build
| |
| cp kdesrc-buildrc-kf5-sample ~/.kdesrc-buildrc
| |
|
| |
|
| # Install a symlink of kdesrc-build to a location in PATH
| | [https://quickgit.kde.org/ KDE QuickGit] |
| mkdir ~/bin
| |
| ln -s $PWD/kdesrc-build ~/bin
| |
| export PATH=~/bin:$PATH
| |
| </pre>
| |
|
| |
|
| You will need to append the line <pre>export PATH=~/bin:$PATH</pre> to <pre>~/.bashrc</pre> so kdesrc-build is available in PATH whenever you open a terminal.
| | [https://github.com/kde/ KDE GitHub] |
|
| |
|
| | [https://www.kde.org/standards/kxmlgui/1.0/kxmlgui.xsd KXMLGUI XSD] |
|
| |
|
| '''Configure kdesrc-build
| | ==Links== |
| '''
| | ===Development=== |
| edit<pre>~/.kdesrc-buildrc</pre>
| | [[Get_Involved/development]] |
| Replace <pre>/path/to/kdesrc-build/kf5-qt5-build-include</pre> with <pre>~/kdesrc/kdesrc-build/kf5-qt5-build-include</pre> in ~/.kdesrc-buildrc file
| |
|
| |
|
| Add <pre>ignore-kde-structure true</pre> and <pre>make-options -jN</pre> to the global section in ~/.kdesrc-buildrc
| | [[Guidelines_and_HOWTOs/Using_Qt_Creator]] |
| <pre>
| |
| global
| |
| ...
| |
| ignore-kde-structure true
| |
| make-options -j5 # NOTE: 5 is the number of jobs, this should usually be (number-of-cpu-cores + 1)
| |
| #stop-on-failure true # Stop kdesrc-build
| |
| ...
| |
| end global
| |
| </pre>
| |
|
| |
|
| Set qtdir to output of <code>qmake –v</code> minus the lib
| | [[Policies/Commit_Policy]] |
| kdedir /opt/kde-5 # Where to install KF5-based software
| |
| qtdir /opt/Qt5.7.0/5.7/gcc_64 # Where to find Qt5
| |
| {{Remember|Make sure you have write access to the directory specified by kdedir!}}
| |
| ===Setup work around for baloo compilation error ===
| |
| Add the following to ~/.kdesrc-buildrc to work around the compilation error with baloo:
| |
| options baloo
| |
| cmake-options -DCMAKE_CXX_FLAGS="-lc"
| |
| end options
| |
|
| |
|
| == Build plasma-desktop ==
| | [[Guidelines_and_HOWTOs/UnitTests]] |
|
| |
| Install dependencies to build plasma-desktop:
| |
| {{Input|1=<nowiki>sudo apt-get build-dep polkit-qt-1
| |
| sudo apt-get install libgif-dev libnm-glib-dev "^libxcb.*" libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev libattr1-dev liblmdb-dev libxapian-dev
| |
| </nowiki>}}
| |
| Download and install some packages from Xenial:
| |
| {{Input|1=<nowiki>mkdir extra-deb
| |
| cd extra-deb
| |
| wget http://mirrors.kernel.org/ubuntu/pool/main/libx/libxkbcommon/libxkbcommon-dev_0.5.0-1ubuntu2_amd64.deb
| |
| wget http://mirrors.kernel.org/ubuntu/pool/main/libx/libxkbcommon/libxkbcommon0_0.5.0-1ubuntu2_amd64.deb
| |
| wget http://mirrors.kernel.org/ubuntu/pool/main/libe/libepoxy/libepoxy-dev_1.3.1-1_amd64.deb
| |
| wget http://mirrors.kernel.org/ubuntu/pool/main/libe/libepoxy/libepoxy0_1.3.1-1_amd64.deb
| |
| dpkg -i *.deb
| |
| </nowiki>}}
| |
| Finally, we can build plasma-desktop:
| |
| {{Input|1=<nowiki>kdesrc-build --include-dependencies plasma-desktop</nowiki>}}
| |
|
| |
|
| == Build some extra applications == | | ===Learning=== |
| You may want to build some base applications and can do so with:
| | https://techbase.kde.org/Development/Tutorials |
| {{Input|1=<nowiki>
| |
| kdesrc-build applications
| |
| </nowiki>}}
| |
| You can use kdesrc-build to build other applications. For example, to build kdevelop:
| |
| {{Input|1=<nowiki>
| |
| kdesrc-build --include-dependencies kdevelop
| |
| </nowiki>}}
| |
|
| |
|
| | ===API=== |
| | https://api.kde.org/frameworks/kxmlgui/html/classKXmlGuiWindow.html |
|
| |
|
| == Set up environment to run plasma 5 == | | http://doc.qt.io/qt-5/qobject.html |
| Follow this guide to test your plasma 5 build: https://community.kde.org/Guidelines_and_HOWTOs/Build_from_source/Test_plasma
| | |
| | ===Qt=== |
| | [http://doc.qt.io/qt-5/qtexamplesandtutorials.html Qt Examples And Tutorials] |
| | |
| | [http://doc.qt.io/ Qt Documentation] |
| | |
| | ===Git=== |
| | |
| | [[Infrastructure/Git/Recipes]] |
| | |
| | [[Sysadmin/GitKdeOrgManual]] |
| | |
| | [[Infrastructure/Git]] |
| | |
| | [[Frameworks/Git_Workflow]] |
| | |
| | [[Infrastructure/Git/Simple_Workflow]] |
| | |
| | ===cmake=== |
| | https://cmake.org/cmake/help/v3.6/manual/cmake-commands.7.html |
| | |
| | https://api.kde.org/ecm/manual/ecm-modules.7.html |
| | |
| | ==Test Section== |
| | Under User:donnguyen (outdated, just for testing) - [[/How to build KDE/Plasma 5 on Ubuntu 14.04 LTS|How to build KDE/Plasma 5 on Ubuntu 14.04 LTS]] |
| | |
| | [[/first with prepending slash|Desc with slash]] - Creates it under here |
| | |
| | [[first without prepending slash|Desc with no slash]] - Creates it at root |
| | |
| | Testing "/Test new link" - [[/Test new link|Test new link]] |
| | |
| | Testing "Special:myLanguage" - [[Special:myLanguage/Guidelines_and_HOWTOs/Build_from_source/Plasma 5 on Ubuntu 14.04 LTS|How to build KDE/Plasma 5 on Ubuntu 14.04 LTS]] |