Top Banner
Getting Started with coding for Jolla Sailfish OS Artem Marchenko @AgileArtem 29.03.2014, Tampere, Finland 29.03.14 @AgileArtem http://www.codingsubmarine.com
22

Getting started with coding for Jolla Sailfish OS. 29 Mar 2014, Tampere, Finland

May 24, 2015

Download

Software

Artem Marchenko

Slides from the talk. Not sure how useful they are without the talk and discussion. Covers steps of getting started using Hello World Pro project so that you could get a package that passes Jolla Harbour acceptance criteria for sure and explains what's built how and where during the app process.
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Getting started with coding for Jolla Sailfish OS. 29 Mar 2014, Tampere, Finland

Getting Started with coding for Jolla Sailfish OS

Artem Marchenko@AgileArtem

29.03.2014, Tampere, Finland

29.03.14 @AgileArtemhttp://www.codingsubmarine.com

Page 2: Getting started with coding for Jolla Sailfish OS. 29 Mar 2014, Tampere, Finland

Today

• Quick start on emulator– And how to run on device

• Structure of the build process and artifacts• Packaging for app store• Troubleshooting / debugging• Support channels and further questions

29.03.14 @AgileArtemhttp://www.codingsubmarine.com

Page 3: Getting started with coding for Jolla Sailfish OS. 29 Mar 2014, Tampere, Finland

QUICK START

29.03.14 @AgileArtemhttp://www.codingsubmarine.com

Page 4: Getting started with coding for Jolla Sailfish OS. 29 Mar 2014, Tampere, Finland

Preparing SDK1. Get Python (project renaming script will need it)2. Install SDK https://sailfishos.org/develop.html3. Run its Updater ( Help -> Start Updater)4. Get HelloWorld Pro from

https://github.com/amarchen/helloworld-pro-sailfish and open it (you need a project for Updating part of SDK)– Configure for all available platforms

5. Rename project into harbour-my-great-app via rename-to-my-project.py

6. Start Mer build machine (can take a couple of clicks)

7. Install more updates via Sailfish OS tab

29.03.14 @AgileArtemhttp://www.codingsubmarine.com

Page 5: Getting started with coding for Jolla Sailfish OS. 29 Mar 2014, Tampere, Finland

Starting app on emulator

• Set i486 platform as active

• Deploy as RPM

• Run subproject src

29.03.14

Page 6: Getting started with coding for Jolla Sailfish OS. 29 Mar 2014, Tampere, Finland

Start emulator and app

29.03.14

Page 7: Getting started with coding for Jolla Sailfish OS. 29 Mar 2014, Tampere, Finland

Running tests on emulator

• Run /usr/share/tst-harbour-my-great-app/runTestsOnDevice.sh– As README.md says

29.03.14 @AgileArtemhttp://www.codingsubmarine.com

Page 8: Getting started with coding for Jolla Sailfish OS. 29 Mar 2014, Tampere, Finland

@AgileArtemhttp://www.codingsubmarine.com

Connecting device• https://sailfishos.org/develop-firstapp-article.html covers it well

– Works fine on WiFi– Couldn’t make it work via USB

29.03.14

Page 9: Getting started with coding for Jolla Sailfish OS. 29 Mar 2014, Tampere, Finland

Then run on device• Same as on

emulator• Just don’t

forget to select armv7 platform

29.03.14

Page 10: Getting started with coding for Jolla Sailfish OS. 29 Mar 2014, Tampere, Finland

Continue in QML

29.03.14 @AgileArtemhttp://www.codingsubmarine.com

Page 11: Getting started with coding for Jolla Sailfish OS. 29 Mar 2014, Tampere, Finland

STRUCTURE OF THE BUILD PROCESS

29.03.14 @AgileArtemhttp://www.codingsubmarine.com

Page 12: Getting started with coding for Jolla Sailfish OS. 29 Mar 2014, Tampere, Finland

Project directories

29.03.14 @AgileArtemhttp://www.codingsubmarine.com

Page 13: Getting started with coding for Jolla Sailfish OS. 29 Mar 2014, Tampere, Finland

Building-packaging

29.03.14 @AgileArtemhttp://www.codingsubmarine.com

Page 14: Getting started with coding for Jolla Sailfish OS. 29 Mar 2014, Tampere, Finland

PACKAGING FOR APP STORE

29.03.14 @AgileArtemhttp://www.codingsubmarine.com

Page 15: Getting started with coding for Jolla Sailfish OS. 29 Mar 2014, Tampere, Finland

Build RPM package

1. Choose ARMV7 platform

2. *Clean* not to package i486 binaries

3. Deploy RPM

Page 16: Getting started with coding for Jolla Sailfish OS. 29 Mar 2014, Tampere, Finland

Validate

Page 17: Getting started with coding for Jolla Sailfish OS. 29 Mar 2014, Tampere, Finland

Submit to harbour

• http://harbour.jolla.com• Icon templates can be found at

https://sailfishos.org/apps_icons.html– As mentioned in README.md

• You’ll need screenshots– Use Screenshot or SailshotMe app on device– Upload to Dropbox via Sailbox app

29.03.14 @AgileArtemhttp://www.codingsubmarine.com

Page 18: Getting started with coding for Jolla Sailfish OS. 29 Mar 2014, Tampere, Finland

TROUBLESHOOTING DEPLOYMENTS

29.03.14 @AgileArtemhttp://www.codingsubmarine.com

Page 19: Getting started with coding for Jolla Sailfish OS. 29 Mar 2014, Tampere, Finland

Troubleshooting failed deployments and not runnable apps

• Examine the content of the Mer machine and emulator directories. And device too if you need

• Is covered well at https://sailfishos.org/develop-faq.html

• Mer: ssh -p 2222 -i ~/SailfishOS/vmshare/ssh/private_keys/engine/root root@localhost

• Emulator: ssh -p 2223 -i ~/SailfishOS/vmshare/ssh/private_keys/SailfishOS_Emulator/root root@localhost

• Real device: ssh [email protected] – Address and password from the Developer Settings on device

29.03.14 @AgileArtemhttp://www.codingsubmarine.com

Page 20: Getting started with coding for Jolla Sailfish OS. 29 Mar 2014, Tampere, Finland

Debugging

• C++ debugging doesn’t work from IDE• If you comfortable with GDB, it is supposed to

work• Rumors tell that QML debugging does– I failed to get it working

• Use logging• Use automated tests

29.03.14 @AgileArtemhttp://www.codingsubmarine.com

Page 21: Getting started with coding for Jolla Sailfish OS. 29 Mar 2014, Tampere, Finland

Getting support and further questions

• IRC: #sailfishos on freenode (irc.freenode.net)

[email protected]

• This slideset – http://www.codingsubmarine.com/tag/class/@AgileArtem on twitter

29.03.14 @AgileArtemhttp://www.codingsubmarine.com

Page 22: Getting started with coding for Jolla Sailfish OS. 29 Mar 2014, Tampere, Finland

Artem needs help

• I want to make a Telegram client, help me understand what the biz model for it could be like– And for a collaboration of several authors?

• Push @JollaHQ to communicate more about business opportunities for small devs

• Contribute to HelloWorld Pro, Log4Qt Demo• Try my apps in Jolla app store and review them

(Flashlight, Quick Launcher)29.03.14 @AgileArtem

http://www.codingsubmarine.com