QtComponents/Butaca

Butaca is an application to fetch movie-related information. You could see a more detailed description at its home page.

Contents

Fetch sources

Get master code from git repository located at butaca repo

Remove unsupported libraries

Check control file to see deps of this apps. At first shight, it dependends of applauncherd and ShareUI. Right now, theres no replacement for this on Fremantle, so functionality provided should be removed.

Applauncherd

Provides a boost at instantiation time for apps that link with it. You could see more info at Harmmatan API Docs Besides that, provides invoker a tool to launch programs and add splashscreen while application is starting.

We are going to loose splash screen

To remove this library, lookup for MDeclarativeCache inside code. Once again grep is your friend. Once located, replace it by standard QApplication and QDeclarativeView classes.

<syntaxhighlight lang="diff"> diff --git a/src/main.cpp b/src/main.cpp index f27f608..8f1c989 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -22,24 +22,21 @@

#include <QtGui/QApplication>
#include <QtDeclarative>
#include <QDeclarativeContext>

-#include <MDeclarativeCache>

Q_DECL_EXPORT int main(int argc, char *argv[])
{

- QApplication *app = MDeclarativeCache::qApplication(argc, argv); - QDeclarativeView *view = MDeclarativeCache::qDeclarativeView(); + QApplication app = QApplication(argc, argv); + QDeclarativeView view = QDeclarativeView();

- QDeclarativeContext *context = view->rootContext(); + QDeclarativeContext *context = view.rootContext();

    ButacaController *controller = new ButacaController(context);

- view->setSource(QUrl("qrc:/qml/main.qml")); - view->showFullScreen(); + view.setSource(QUrl("qrc:/qml/main.qml")); + view.showFullScreen();

    int result = app->exec();

    delete controller;

- delete view; - delete app;

    return result;
}

</syntaxhighlight>

And remove boostable deps from project files.

<syntaxhighlight lang=diff> diff --git a/butaca.pro b/butaca.pro index 465a010..a493faf 100644 --- a/butaca.pro +++ b/butaca.pro @@ -55,14 +55,8 @@ OTHER_FILES += \

RESOURCES += \
    res.qrc

-# enable booster -CONFIG += qt-boostable qdeclarative-boostable \ - shareuiinterface-maemo-meegotouch \ +CONFIG += shareuiinterface-maemo-meegotouch \

          mdatauri

-QMAKE_CXXFLAGS += -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -QMAKE_LFLAGS += -pie -rdynamic - -LIBS += -lmdeclarativecache

butacascript.files = butaca
butacascript.path = /usr/bin/

</syntaxhighlight>

commit

ShareUI

Refactor QML files

As on [QtComponents/Miniature], we need to replace namespace by the fremantle one. In this case we need to go a bit further use migrateTo for this task.

Update hardcoded paths

Remove QtQuick 1.1 code

commit.


Handle Close events

This is easy in this case.

<syntaxhighlight lang="diff"> </syntaxhighlight>

commit

Adapt deployment to Fremantle

Some changes on how Butaca is deployed are needed to match Fremantle requirements.

Optify code

Update Desktop file

And finally, update desktop file. There's no applauncerd on fremantle, so remove invoker from Exec. With this action we loose splash-screen.

commit

Update packing scripts

Now that all required changes are commited. generate patches with <syntaxhighlight lang="bash">git format-patch origin/master</syntaxhighlight> and copy generated files into debian/patches directory.

Finally, modify rules file at debian directory to merge patches. At config-stamp rule add: <syntaxhighlight lang="make">for p in debian/patches/*; do patch -p1 < $$p; done </syntaxhighlight>

And thats all. You have Butaca working on Maemo5