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$</othername>
|
---|
13 | <date>$Date$</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
|
---|
54 | export KF5_SYSCONFDIR=/etc</userinput></screen>
|
---|
55 |
|
---|
56 | <para>
|
---|
57 | It is a good idea to add the following variables to your
|
---|
58 | system or personal profile:
|
---|
59 | </para>
|
---|
60 |
|
---|
61 | <screen role="root"><userinput>cat > /etc/profile.d/kf5.sh << "EOF"
|
---|
62 | <literal># Begin /etc/profile.d/kf5.sh
|
---|
63 |
|
---|
64 | export KF5_PREFIX=/usr
|
---|
65 | export KF5_SYSCONFDIR=/etc
|
---|
66 |
|
---|
67 | export QT_SELECT=qt5
|
---|
68 |
|
---|
69 | pathappend /usr/lib/qt5/plugins QT_PLUGIN_PATH
|
---|
70 | pathappend /opt/qt5/plugins QT_PLUGIN_PATH
|
---|
71 |
|
---|
72 | pathappend /usr/lib/qt5/qml QML_IMPORT_PATH
|
---|
73 | pathappend /opt/qt5/qml QML_IMPORT_PATH
|
---|
74 |
|
---|
75 | pathappend /usr/lib/qt5/qml QML2_IMPORT_PATH
|
---|
76 | pathappend /opt/qt5/qml QML2_IMPORT_PATH
|
---|
77 |
|
---|
78 | # End /etc/profile.d/kf5.sh</literal>
|
---|
79 | EOF</userinput></screen>
|
---|
80 |
|
---|
81 | <warning>
|
---|
82 | <para>
|
---|
83 | If <application>KDE4</application> is installed in
|
---|
84 | <filename class="directory">/usr</filename>, some packages
|
---|
85 | from this chapter might overwrite some programs installed
|
---|
86 | by <application>KDE4</application> packages.
|
---|
87 | </para>
|
---|
88 | </warning>
|
---|
89 |
|
---|
90 | </sect2>
|
---|
91 |
|
---|
92 | <sect2>
|
---|
93 | <title>Installing in /opt</title>
|
---|
94 |
|
---|
95 | <para>
|
---|
96 | A method of building multiple versions installs
|
---|
97 | <application>KDE Frameworks 5</application> in the
|
---|
98 | <filename class="directory">/opt</filename> hierarchy:
|
---|
99 | </para>
|
---|
100 |
|
---|
101 | <screen><userinput>export KF5_PREFIX=/opt/kf5
|
---|
102 | export KF5_SYSCONFDIR=$KF5_PREFIX/etc</userinput></screen>
|
---|
103 |
|
---|
104 | <para>
|
---|
105 | If you are not installing <application>KDE Frameworks 5</application>
|
---|
106 | in <filename class="directory">/usr</filename>, you will need to
|
---|
107 | make some additional configuration changes. Best practice is to add
|
---|
108 | those to your system or personal profile:
|
---|
109 | </para>
|
---|
110 |
|
---|
111 | <screen role="root"><userinput>cat > /etc/profile.d/kf5.sh << "EOF"
|
---|
112 | <literal># Begin /etc/profile.d/kf5.sh
|
---|
113 |
|
---|
114 | export KF5_PREFIX=/opt/kf5
|
---|
115 | export KF5_SYSCONFDIR=$KF5_PREFIX/etc
|
---|
116 |
|
---|
117 | export QT_SELECT=qt5
|
---|
118 |
|
---|
119 | pathappend $KF5_PREFIX CMAKE_PREFIX_PATH
|
---|
120 | pathappend $KF5_PREFIX/bin PATH
|
---|
121 | pathappend $KF5_PREFIX/lib/pkgconfig PKG_CONFIG_PATH
|
---|
122 | pathappend $KF5_PREFIX/lib/python&python2-majorver;/site-packages PYTHONPATH
|
---|
123 |
|
---|
124 | pathappend /etc/xdg XDG_CONFIG_DIRS
|
---|
125 | pathappend $KF5_PREFIX/etc/xdg XDG_CONFIG_DIRS
|
---|
126 | pathappend /usr/share XDG_DATA_DIRS
|
---|
127 | pathappend $KF5_PREFIX/share XDG_DATA_DIRS
|
---|
128 |
|
---|
129 | pathappend /usr/lib/qt5/plugins QT_PLUGIN_PATH
|
---|
130 | pathappend /opt/qt5/plugins QT_PLUGIN_PATH
|
---|
131 | pathappend $KF5_PREFIX/lib/qt5/plugins QT_PLUGIN_PATH
|
---|
132 |
|
---|
133 | pathappend /usr/lib/qt5/qml QML_IMPORT_PATH
|
---|
134 | pathappend /opt/qt5/qml QML_IMPORT_PATH
|
---|
135 | pathappend $KF5_PREFIX/lib/qt5/qml QML_IMPORT_PATH
|
---|
136 |
|
---|
137 | pathappend /usr/lib/qt5/qml QML2_IMPORT_PATH
|
---|
138 | pathappend /opt/qt5/qml QML2_IMPORT_PATH
|
---|
139 | pathappend $KF5_PREFIX/lib/qt5/qml QML2_IMPORT_PATH
|
---|
140 |
|
---|
141 | # End /etc/profile.d/kf5.sh</literal>
|
---|
142 | EOF</userinput></screen>
|
---|
143 |
|
---|
144 | <para>
|
---|
145 | Expand your <filename>/etc/ld.so.conf</filename> file:
|
---|
146 | </para>
|
---|
147 |
|
---|
148 | <screen role="root"><userinput>cat >> /etc/ld.so.conf << "EOF"
|
---|
149 | <literal># Begin KF5 addition
|
---|
150 |
|
---|
151 | /opt/kf5/lib
|
---|
152 |
|
---|
153 | # End KF5 addition</literal>
|
---|
154 | EOF</userinput></screen>
|
---|
155 |
|
---|
156 | <indexterm zone="frameworks-intro">
|
---|
157 | <primary sortas="e-etc-ld.so.conf">/etc/ld.so.conf</primary>
|
---|
158 | </indexterm>
|
---|
159 |
|
---|
160 | <para>
|
---|
161 | Several <application>KDE Frameworks 5</application> packages install files into
|
---|
162 | <application>D-Bus</application> and <application>Polkit</application> directories.
|
---|
163 | When installing <application>KDE Frameworks 5</application> in a location other than
|
---|
164 | <filename class="directory">/usr</filename>, <application>D-Bus</application> and
|
---|
165 | <application>Polkit</application> need to be able to find these files. The easiest
|
---|
166 | way to achieve this is to create the following symlinks (as the
|
---|
167 | <systemitem class="username">root</systemitem> user):
|
---|
168 | </para>
|
---|
169 |
|
---|
170 | <screen role="root"><userinput>install -v -dm755 $KF5_PREFIX/{etc,share} &&
|
---|
171 | ln -sfv /etc/dbus-1 $KF5_PREFIX/etc &&
|
---|
172 | ln -sfv /usr/share/dbus-1 $KF5_PREFIX/share &&
|
---|
173 | ln -sfv /usr/share/polkit-1 $KF5_PREFIX/share</userinput></screen>
|
---|
174 |
|
---|
175 | <para>
|
---|
176 | Some packages may also install icons from the "hicolor" icon set. Since that
|
---|
177 | icon set is used by many packages, it is a good idea to create a
|
---|
178 | symlink to the one in <filename class="directory">/usr/share</filename>
|
---|
179 | to avoid having multiple installations of <xref linkend="hicolor-icon-theme"/>.
|
---|
180 | Run the following commands as the <systemitem class="username">root</systemitem>
|
---|
181 | user:
|
---|
182 | </para>
|
---|
183 |
|
---|
184 | <screen role="root"><userinput>install -v -dm755 $KF5_PREFIX/share/icons &&
|
---|
185 | ln -sfv /usr/share/icons/hicolor $KF5_PREFIX/share/icons</userinput></screen>
|
---|
186 |
|
---|
187 | <tip>
|
---|
188 | <para>
|
---|
189 | Sometimes, the installation paths are hardcoded into installed files.
|
---|
190 | This is the reason why <filename class="directory">/opt/kf5</filename>
|
---|
191 | is used as installation prefix instead of <filename
|
---|
192 | class="directory">/opt/kf5-&kf5-version;</filename>. After installing
|
---|
193 | <application>KDE Frameworks</application>, you may rename the directory
|
---|
194 | and create a symlink:
|
---|
195 | </para>
|
---|
196 |
|
---|
197 | <screen role="root"><userinput>mv /opt/kf5{,-&kf5-version;}
|
---|
198 | ln -sfv kf5-&kf5-version; /opt/kf5</userinput></screen>
|
---|
199 |
|
---|
200 | <para>
|
---|
201 | Later on, you may want to install other versions of
|
---|
202 | <application>KDE Frameworks 5</application>. To do that, just remove
|
---|
203 | the symlink and use <filename class="directory">/opt/kf5</filename>
|
---|
204 | as the prefix again. Which version of
|
---|
205 | <application>KDE Frameworks 5</application> you use depends only on
|
---|
206 | where the symlink points to. No other reconfiguration will be needed.
|
---|
207 | </para>
|
---|
208 | </tip>
|
---|
209 |
|
---|
210 | </sect2>
|
---|
211 |
|
---|
212 | </sect1>
|
---|