|
|
Line 1: |
Line 1: |
| Marble Touch supports both the Qt Components for Meego and the Plasma Components (for touch). This article describes how to setup and run <tt>marble-touch</tt> for Plasma Active (using plasma components in the touch platform variant).
| | {{ Moved To Community }} |
| | |
| === Overview ===
| |
| We'll briefly cover the prerequisites needed -- an installation of Qt 4.7 or later, an installation of the plasma components from KDE 4.9 or later and the setup of environment variables -- and the compilation of Marble. At the time of writing KDE 4.9 was not released yet, so we'll perform a local installation of kdelibs and kde-runtime which in turns brings you the required version of plasma components.
| |
| | |
| === Qt and other System Libraries ===
| |
| Make sure to have a development version of Qt 4.7 or later installed. Qt Declarative support must be there. Marble Touch also requires (at runtime) the following declarative extensions of Qt or Qt related packages that you may have to install separately: QtMobility systeminfo, QtWebKit, Qt labs folderlistmodel.
| |
| | |
| On a Debianish system, install the following packages:
| |
| | |
| <syntaxhighlight lang="bash">sudo aptitude install libqt4-dev libqtwebkit-qmlwebkitplugin libdeclarative-systeminfo libqt4-declarative-folderlistmodel</syntaxhighlight>
| |
| | |
| === KDE Libraries and Runtime ===
| |
| Skip this section if KDE 4.9 is installed on your system.
| |
| | |
| Please refer to the KDE development articles for details. In short, clone both kdelibs and kde-runtime
| |
| <syntaxhighlight lang="bash">git clone git://anongit.kde.org/kdelibs.git
| |
| git clone git://anongit.kde.org/kde-runtime</syntaxhighlight>
| |
| and install them using the same <tt>CMAKE_INSTALL_PREFIX</tt>. Let's assume this is <tt>/home/me/kde49</tt>. Check your installation by verifying that <tt>lib/kde4/imports/org/kde/plasma/components/qmldir</tt> exists in <tt>/home/me/kde49</tt>.
| |
| | |
| Now setup your environment as follows:
| |
| <syntaxhighlight lang="bash">
| |
| export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/home/me/kde49/lib
| |
| export QML_IMPORT_PATH=${QML_IMPORT_PATH}:/home/me/kde49/lib/kde4/imports
| |
| export KDE_PLASMA_COMPONENTS_PLATFORM=touch
| |
| </syntaxhighlight>
| |
| | |
| === Marble (Touch) ===
| |
| Like before I'll keep the description brief and ask you to refer to other articles for details.
| |
| | |
| Get a recent copy of Marble from git master. Note that when setting it up for compilation you can compile either the KDE or the Qt only version. There'll be no difference; in doubt choose the <tt>-DQTONLY=TRUE</tt> variant.
| |
| | |
| There's one important step now: Execute the script <tt>switch.bash</tt> to toggle between MeeGo and Plasma Components. Since MeeGo are default, you have to execute it once. When you do changes to the code which you plan to commit, switch back to MeeGo before committing them. With that in mind, switch to Plasma Components now:
| |
| <syntaxhighlight lang="bash">tools/qt-components/switch.bash plasma</syntaxhighlight>
| |
| | |
| You can check what the script did using <tt>git diff</tt>. If you want to go back, just execute <tt>tools/qt-components/switch.bash meego</tt>.
| |
| | |
| If you compile Marble now and install it to a local directory (let's say <tt>/home/me/marble</tt>, you need to alter your environment further:
| |
| <syntaxhighlight lang="bash">
| |
| export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/home/me/marble/lib
| |
| export QML_IMPORT_PATH=${QML_IMPORT_PATH}:/home/me/marble/lib/marble/plugins
| |
| </syntaxhighlight>
| |
| | |
| Finally you can start <tt>/home/me/marble/bin/marble-touch</tt>.
| |
| | |
| It's easy to forget one or the other dependency or setup the environment in the wrong way, leading to <tt>marble-touch</tt> refusing to start. Here's a checklist:
| |
| * Install the declarative packages mentioned in the sections above
| |
| * Setup the <tt>LD_LIBRARY_PATH</tt> variable to include (colon separated) the KDE <tt>lib/</tt> directory and Marble's <tt>lib/</tt> directory.
| |
| * Setup the <tt>QML_IMPORT_PATH</tt> variable to include (colon separated) the KDE <tt>lib/kde4/imports</tt> directory and Marble's <tt>lib/marble/plugins</tt> directory.
| |
| | |
| {{Tip|Set the <tt>QML_IMPORT_TRACE</tt> environment variable to <tt>1</tt> as a handy tool to debug qml import path issues:
| |
| <syntaxhighlight lang="bash">export QML_IMPORT_TRACE=1</syntaxhighlight>
| |
| }}<br> | |
| | |
| When running marble-touch in a normal window, some things behave different compared to their behavior on a touch device with limited resolution. For example, menus can popup outside the window and sheets and dialogs can be larger than the window itself. To emulate a touch device display, it's useful to run marble-touch inside of Xephyr. Install it and execute
| |
| <syntaxhighlight lang="bash">
| |
| Xephyr -screen 800x480 :1 &
| |
| export DISPLAY=:1
| |
| </syntaxhighlight>
| |
| once in a shell. A new, empty window will open, which represents its own xserver where you can run programs in. Setting the environment variable <tt>DISPLAY</tt> to <tt>:1</tt> in this shell results in all programs started from this shell being opened in the Xephyr window. When you execute marble-touch now, it is started inside the Xephyr window, emulating a screen with a resolution of 800x480 pixel. Menus, dialogs and sheets behave more realistic now.
| |