Saturday, 2 November 2013

Deploying Additional Packages to the Sailfish Emulator and SDK

Latest update is 24 Dec 2013 11:40 UK time.

One of the areas that raises the most questions on the Sailfish Developers' mailing list is the sticky topic of Installing additional packages to the Sailfish Emulator and SDK. Many developers, including myself have found installation very confusing.

The reasons for the confusion are clear: there is no official documentation on this topic yet, thought it is promised; there are a number of different ways that a package can be installed; both the Emulator and SDK may required installation; each package is available in a number of flavours; and then there is the challenge of identifying the correct package in the first page, and determining the correct name of that package. And if that was not enough, due to the refactoring of Qt Mobility from Qt 4 to Qt 5, some of our favourite components are now offered by quite different packages.

This post should give you a broad understanding of the different installation techniques. To those who live and breath Linux, who first compiled the kernel before they went to school, much of this may be obvious. To the rest of us from different development backgrounds it is less so, hence this post

We will look at zypper, PkCon, ScratchBox2, yaml and spectacle. We will find out how to install "by hand*, and automatically on building and running.


Friday, 25 October 2013

Alpha 2: After the update of 22 Oct 2013

Hi All

As announced by Jarko here there is a refresh of the Sailfish Alpha available now.

This post lists some immediate differences I have noticed, and some changes I had to make to get "things" working again.

As / If I discover other stuff, I will update this post


Saturday, 12 October 2013

Alpha 2: Migrating Landed

Note this article is work-in-profess, reflecting work that is work-in-progress, and will be updated / corrected as the migration moves forwards . . .

Last update is: 06 Nove 2013

It is the weekend, but as it is wet and cold outside, with new snow only a few hundred metres higher, there is no flying today. So I am back to programming, and more importantly porting my app Landed to the Sailfish Alpha 2.

As I explained in my last post, recently I have concentrated on the Harmattan version of Landed, making it easier to use, and adding more functionality. While it is not yet finished (will it ever be?). Landed is now fully functional, and thus another stab at porting to the Sailfish Alpha 2 makes sense.

This time, rather than porting all of Landed, I decided to cut out the section I had spent most time on recently into a throwaway demo, and port that. I know from my first attempt that porting all of Landed will take quite some effort: Porting part of it first follows the old software engineering concept of solving large problems by dividing into smaller problems.

The demo is called MigratePhoneContactsDemo. I will soon post the Harmattan code, and the ported Sailfish equivalent code to Github, and add links here.

This article charts the progress of the porting. As the porting is not yet finished at the time I start this article, I will revisit the article over the next few days and make updates as I find solutions, and as I walk into new problems. I will try and keep the article at a high level, and will add child posts if I need to go into detail on particular challenges.


Thursday, 26 September 2013

A Status Update

The eagle-eyed will have noticed that I have not updated this blog for several weeks. For this I apologise.

The evil-minded will probably have suspected that I have thrown in the towel, and have moved on to better things. They are wrong, I have been very busy, fighting on two fronts.

I spent quite a bit of time porting Landed and LandedSettings to the new Sailfish Alpha 2 (Qt 5.x), and was on the point of writing an article on the lessons learned when I went on holiday to Greece.


Tuesday, 6 August 2013

Alpha 2: Passing simple C++ properties from main.cpp to the QML Side with Qt5

One of the first challenges in migrating LandedSettings from the Sailfish Alpha 1 7 Qtt to Alpha 2 / Qt5 was that I pass a simple property from the main.cpp file (C++) to the QML side via a setContextProperty call.

The property was platform, and was intended to allow the Qml side to change font size etc according to the platform it was running on. I originally added this functionality to handle differences between the Nokia Simulator and the Haramattan Emulator (QEMU).

In Qt4 I was able to pass such properties via a call to setContextProperty, offered by a bit of Nokia code called the QmlApplicationViewer. As this is no longer included with the Sailfish Alpha 2, and will not run unchanged, I needed to migrate this to something different. As we will see their were a number of approaches I could have taken.


Monday, 5 August 2013

Alpha 2: Installing an Import Library on the Emulator

In a previous post I covered the code migration of my import library AbstractUI from Qt4 to Qt5.

However the greatest problem proved to be not in the code, but rather where to install my newly migrated library. Read on to find out the solution.


Alpha 2: Migrating LocalStorage from Qt4 to Qt5

This morning I successfully migrated the LocalStorage part of my app LandedSettings from the Sailfish Alpha 1 (Qt4) style to the new Sailfish Alpha 2 (Qt5) style.

 

In LandedSettings all the Database access functionality is encapsulated in 3 javascript files. In order to focus the migration on the LocalStorage only, I created a new throwaway project QT5TestLS, copied the 3 JavaScript files to the new project, and added just enough code to the project to setup and populate the Database.


The Full code of  QT5TestLS can be found on GitHub.

 

 

Below is a summary of the things I had to change: