First try to port a Qt application to Sailfish

So last week I prepared v0.3 and put it to git. Yesterday I tried to port it to Sailfish as was the original plan. I went at it as below: 
I used an existing test application to get the required files and project settings. I added them to my project. This part included copying various tidbits to the .pro file. Also included is copying over folders for RPM, translations, icons etc. 
Then I went through the files and updated the file names wherever needed to reflect my app. This gave me a build which built successfully using the mer-arm toolchain.
Now to get it running on the device. I plugged in the Aqua Fish to Laptop with microUSB cord, and enabled debugging. Then tried to debug-run the app. First problem - debug-run doesn't work. I got error as - gdbserver not found. On googling for this, found out I need gdbserver installed on device and it will probably take a while since I'm not familiar with this functionality of Sailfish. So I decided to skip debug-run, and go with only run. 
This worked fine but the app won't launch and I got some qml errors on console. After going through them I learned couple of things - 1. Sailfish SDK doesn't yet have support for Qt Quick Controls, confirmed this by going to SDK's qml folder and found only Quick 2.0 qml's there. 2. Debugging QML's is a real pain. There were times when I wanted to give up. Going through the errors one by one, finding dependencies and then fixing it, and then verifying the fix, it's exhausting. One problem which was my doing, was not checking in advance what QML things are supported on Sailfish. 
Anyway after couple of hours of hair pulling and redoing the code, the app did launch on AquaFish. One major deployment related issue is I need to figure out the location for the database, because it's not getting deployed right now. Other major issue is UI related. My app used flexible positioning but Sailfish UI expects some stuff like padding and widths according to theme guidelines and so these all need change. Plus most of the screen looked white with barely visible gray fonts - this also needs fixing. I wish I had a screenshot to post here to show how bad it looks, but it's just some stuff that needs fixing. 
So well that's my experience porting my app to Sailfish OS. It was good experience, in that I got some hands on the various files related to packaging the app, and I got more hands on Silica Controls. So my goal is to get the app working and push a Sailfish OS compatible v0.4 to git. Lets see if I can nail it!

Comments

Popular posts from this blog

Morning Quotes

QCalendarWidget CSS Stylesheeting