1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
2 | <!DOCTYPE partintro PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
5 | %general-entities;
|
---|
6 | ]>
|
---|
7 |
|
---|
8 | <sect1 id="frameworks-intro">
|
---|
9 | <?dbhtml filename="frameworks-intro.html"?>
|
---|
10 |
|
---|
11 | <sect1info>
|
---|
12 | <othername>$LastChangedBy: krejzi $</othername>
|
---|
13 | <date>$Date: 2014-10-19 17:01:03 +0200 (Sun, 19 Oct 2014) $</date>
|
---|
14 | </sect1info>
|
---|
15 |
|
---|
16 | <title>Introduction to KDE Frameworks 5</title>
|
---|
17 |
|
---|
18 | <para>
|
---|
19 | <application>KDE Frameworks 5</application> is a collection of
|
---|
20 | libraries based on top of <application>Qt5</application> and
|
---|
21 | QML that can be used independently of
|
---|
22 | <application>KDE</application>.
|
---|
23 | </para>
|
---|
24 |
|
---|
25 | <important>
|
---|
26 | <para>
|
---|
27 | The instructions for <application>KDE Frameworks 5</application>
|
---|
28 | packages assume that <xref linkend="qt5"/> was built with
|
---|
29 | recommended dependencies installed.
|
---|
30 | </para>
|
---|
31 | </important>
|
---|
32 |
|
---|
33 | <sect2>
|
---|
34 | <title>Build Order</title>
|
---|
35 |
|
---|
36 | <para>
|
---|
37 | <application>KDE Frameworks 5</application> packages are listed
|
---|
38 | in the recommended and tested build order based on dependencies.
|
---|
39 | </para>
|
---|
40 |
|
---|
41 | </sect2>
|
---|
42 |
|
---|
43 | <sect2>
|
---|
44 | <title>Installing in /usr</title>
|
---|
45 |
|
---|
46 | <para>
|
---|
47 | One option is to install <application>KDE Frameworks 5</application>
|
---|
48 | into the <filename class="directory">/usr</filename> hierarchy.
|
---|
49 | This creates a simpler setup but makes it more difficult to try
|
---|
50 | multiple versions of <application>KDE Frameworks</application>.
|
---|
51 | </para>
|
---|
52 |
|
---|
53 | <screen><userinput>export KF5_PREFIX=/usr</userinput></screen>
|
---|
54 |
|
---|
55 | <para>
|
---|
56 | It is a good idea to add the following variables to your
|
---|
57 | system or personal profile:
|
---|
58 | </para>
|
---|
59 |
|
---|
60 | <screen role="root"><userinput>cat > /etc/profile.d/kf5.sh << "EOF"
|
---|
61 | <literal># Begin /etc/profile.d/kf5.sh
|
---|
62 |
|
---|
63 | . /etc/profile.d/qt5.sh
|
---|
64 |
|
---|
65 | export KF5_PREFIX=/usr
|
---|
66 |
|
---|
67 | pathappend /usr/lib/qt5/plugins QT_PLUGIN_PATH
|
---|
68 | pathappend $QT5DIR/lib/qt5/plugins QT_PLUGIN_PATH
|
---|
69 |
|
---|
70 | pathappend /usr/lib/qt5/qml QML_IMPORT_PATH
|
---|
71 | pathappend $QT5DIR/lib/qt5/qml QML_IMPORT_PATH
|
---|
72 |
|
---|
73 | pathappend /usr/lib/qt5/qml QML2_IMPORT_PATH
|
---|
74 | pathappend $QT5DIR/lib/qt5/qml QML2_IMPORT_PATH
|
---|
75 |
|
---|
76 | # End /etc/profile.d/kf5.sh</literal>
|
---|
77 | EOF</userinput></screen>
|
---|
78 |
|
---|
79 | <warning>
|
---|
80 | <para>
|
---|
81 | If <application>KDE4</application> is installed in
|
---|
82 | <filename class="directory">/usr</filename>, some packages
|
---|
83 | from this chapter might overwrite some programs installed
|
---|
84 | by <application>KDE4</application> packages.
|
---|
85 | </para>
|
---|
86 | </warning>
|
---|
87 |
|
---|
88 | </sect2>
|
---|
89 |
|
---|
90 | <sect2>
|
---|
91 | <title>Installing in /opt</title>
|
---|
92 |
|
---|
93 | <para>
|
---|
94 | A method of building multiple versions installs
|
---|
95 | <application>KDE Frameworks 5</application> in the
|
---|
96 | <filename class="directory">/opt</filename> hierarchy:
|
---|
97 | </para>
|
---|
98 |
|
---|
99 | <screen><userinput>export KF5_PREFIX=/opt/kf5</userinput></screen>
|
---|
100 |
|
---|
101 | <para>
|
---|
102 | If you are not installing <application>KDE Frameworks 5</application>
|
---|
103 | in <filename class="directory">/usr</filename>, you will need to
|
---|
104 | make some additional configuration changes. Best practice is to add
|
---|
105 | those to your system or personal profile:
|
---|
106 | </para>
|
---|
107 |
|
---|
108 | <screen role="root"><userinput>cat > /etc/profile.d/kf5.sh << "EOF"
|
---|
109 | <literal># Begin /etc/profile.d/kf5.sh
|
---|
110 |
|
---|
111 | . /etc/profile.d/qt5.sh
|
---|
112 |
|
---|
113 | export KF5_PREFIX=/opt/kf5
|
---|
114 |
|
---|
115 | pathappend $KF5_PREFIX CMAKE_PREFIX_PATH
|
---|
116 | pathappend $KF5_PREFIX/bin PATH
|
---|
117 | pathappend $KF5_PREFIX/lib/pkgconfig PKG_CONFIG_PATH
|
---|
118 | pathappend $KF5_PREFIX/lib/python&python2-majorver;/site-packages PYTHONPATH
|
---|
119 |
|
---|
120 | pathappend /etc/xdg XDG_CONFIG_DIRS
|
---|
121 | pathappend $KF5_PREFIX/etc/xdg XDG_CONFIG_DIRS
|
---|
122 | pathappend /usr/share XDG_DATA_DIRS
|
---|
123 | pathappend $KF5_PREFIX/share XDG_DATA_DIRS
|
---|
124 |
|
---|
125 | pathappend /usr/lib/qt5/plugins QT_PLUGIN_PATH
|
---|
126 | pathappend $QT5DIR/lib/qt5/plugins QT_PLUGIN_PATH
|
---|
127 | pathappend $KF5_PREFIX/lib/qt5/plugins QT_PLUGIN_PATH
|
---|
128 |
|
---|
129 | pathappend /usr/lib/qt5/qml QML_IMPORT_PATH
|
---|
130 | pathappend $QT5DIR/lib/qt5/qml QML_IMPORT_PATH
|
---|
131 | pathappend $KF5_PREFIX/lib/qt5/qml QML_IMPORT_PATH
|
---|
132 |
|
---|
133 | pathappend /usr/lib/qt5/qml QML2_IMPORT_PATH
|
---|
134 | pathappend $QT5DIR/lib/qt5/qml QML2_IMPORT_PATH
|
---|
135 | pathappend $KF5_PREFIX/lib/qt5/qml QML2_IMPORT_PATH
|
---|
136 |
|
---|
137 | # End /etc/profile.d/kf5.sh</literal>
|
---|
138 | EOF</userinput></screen>
|
---|
139 |
|
---|
140 | <para>
|
---|
141 | Expand your <filename>/etc/ld.so.conf</filename> file:
|
---|
142 | </para>
|
---|
143 |
|
---|
144 | <screen role="root"><userinput>cat >> /etc/ld.so.conf << "EOF"
|
---|
145 | <literal># Begin KF5 addition
|
---|
146 |
|
---|
147 | /opt/kf5/lib
|
---|
148 |
|
---|
149 | # End KF5 addition</literal>
|
---|
150 | EOF</userinput></screen>
|
---|
151 |
|
---|
152 | <indexterm zone="frameworks-intro">
|
---|
153 | <primary sortas="e-etc-ld.so.conf">/etc/ld.so.conf</primary>
|
---|
154 | </indexterm>
|
---|
155 |
|
---|
156 | <para>
|
---|
157 | Several <application>KDE Frameworks 5</application> packages install files into
|
---|
158 | <application>D-Bus</application> directories. When installing
|
---|
159 | <application>KDE Frameworks 5</application> in a location other than
|
---|
160 | <filename class="directory">/usr</filename>, <application>D-Bus</application>
|
---|
161 | needs to be able to find these files. The easiest way to achieve this is to
|
---|
162 | create the following symlinks (as the <systemitem
|
---|
163 | class="username">root</systemitem> user):
|
---|
164 | </para>
|
---|
165 |
|
---|
166 | <screen role="root"><userinput>install -v -dm755 $KF5_PREFIX/{etc,share} &&
|
---|
167 | ln -sfv /etc/dbus-1 $KF5_PREFIX/etc &&
|
---|
168 | ln -sfv /usr/share/dbus-1 $KF5_PREFIX/share</userinput></screen>
|
---|
169 |
|
---|
170 | <para>
|
---|
171 | Some packages may also install icons from the "hicolor" icon set. Since that
|
---|
172 | icon set is used by many packages, it is a good idea to create a
|
---|
173 | symlink to the one in <filename class="directory">/usr/share</filename>
|
---|
174 | to avoid having multiple installations of <xref linkend="hicolor-icon-theme"/>.
|
---|
175 | Run the following commands as the <systemitem class="username">root</systemitem>
|
---|
176 | user:
|
---|
177 | </para>
|
---|
178 |
|
---|
179 | <screen role="root"><userinput>install -v -dm755 $KF5_PREFIX/share/icons &&
|
---|
180 | ln -sfv /usr/share/icons/hicolor $KF5_PREFIX/share/icons</userinput></screen>
|
---|
181 |
|
---|
182 | <tip>
|
---|
183 | <para>
|
---|
184 | Sometimes, the installation paths are hardcoded into installed files.
|
---|
185 | This is the reason why <filename class="directory">/opt/kf5</filename>
|
---|
186 | is used as installation prefix instead of <filename
|
---|
187 | class="directory">/opt/kf5-&kf5-version;</filename>. After installing
|
---|
188 | <application>KDE Frameworks</application>, you may rename the directory
|
---|
189 | and create a symlink:
|
---|
190 | </para>
|
---|
191 |
|
---|
192 | <screen role="root"><userinput>mv /opt/kf5{,-&kf5-version;}
|
---|
193 | ln -sfv kf5-&kf5-version; /opt/kf5</userinput></screen>
|
---|
194 |
|
---|
195 | <para>
|
---|
196 | Later on, you may want to install other versions of
|
---|
197 | <application>KDE Frameworks 5</application>. To do that, just remove
|
---|
198 | the symlink and use <filename class="directory">/opt/kf5</filename>
|
---|
199 | as the prefix again. Which version of
|
---|
200 | <application>KDE Frameworks 5</application> you use depends only on
|
---|
201 | where the symlink points to. No other reconfiguration will be needed.
|
---|
202 | </para>
|
---|
203 | </tip>
|
---|
204 |
|
---|
205 | </sect2>
|
---|
206 |
|
---|
207 | </sect1>
|
---|