Ask / Submit
7

Can you develop for Sailfish on Sailfish? [answered]

asked 2014-11-21 18:15:33 +0200

brousch gravatar image

updated 2014-11-21 19:06:31 +0200

One of my biggest frustrations with tablets and phones today is that you can't develop an app for the device on the device itself (aside from some third party tools on Android) - you have to use a bloated IDE on a desktop OS. I think this does a great disservice to children and others who want to learn development. So is it possible to develop an app for Sailfish on a device running Sailfish?

Edit: It appears this is possible, so what tools and languages exist for doing this now? Can QT Creator run on Sailfish?

edit retag flag offensive reopen delete

The question has been closed for the following reason "the question is answered, an answer was accepted" by eric
close date 2014-11-21 19:25:35.009341

3 Answers

Sort by » oldest newest most voted
4

answered 2014-11-21 18:47:19 +0200

juiceme gravatar image

Sure. You do not need to use the IDE to develop applications, not even on a computer and likewise not on the device itself.

All the steps can be on the device; You can use vi to create/edit QML and c/c++ files, you can run the QML directly on the device UI to see what it looks like and you can compile the sources to executables in the device and packet the result to a RPM.

The only hindurance for me is lack of a HWKBD, fingerterm is nice but starts to get on your nerves when editing large files.

edit flag offensive delete publish link more

Comments

Can you use a Bluetooth or USB keyboard (and mouse)?

brousch ( 2014-11-21 18:54:34 +0200 )edit
3

Yes, that can be done. I have an Apple-compatible BT keyboard which helps a bit. However, to make it really useful I'd need to glue it to the TOH or something... and I do not like the idea of having a separately-charged device with me, the KBD I have uses up it's battery pretty quickly.

juiceme ( 2014-11-21 19:01:17 +0200 )edit
4

answered 2014-11-21 18:51:01 +0200

MartinK gravatar image

As long as you choose the right language - yes you can! And I'm already more or less doing that. :-)

I'm using Python (via PyOtherside) and QML to develop the modRana flexible navigation system. Both Python and QML don't need to be compiled, so I just rsync the source code directly to my Jolla phone and start the application from my SSH session - no need for the SDK in any of this. :)

Also while I'm using a text editor running on my PC to edit the source code, I could very well edit the source directly on the device - either over SSH or even directly in the terminal emulator (I sometimes do that when testing modRana on the go). :)

edit flag offensive delete publish link more

Comments

1

Creating apps in Python is very interesting to me. Can you distribute apps created this way via the usual Sailfish app distribution channels?

brousch ( 2014-11-21 18:56:19 +0200 )edit
1

Using sshfs could streamline working with code kept on device. No need to ssh to device, and with sshfs one can use whatever tool is available on the desktop to work with the code.

piero ( 2014-11-21 19:51:29 +0200 )edit
2

I agree with Martin, this is the workflow I use as well -- with one addition: I often automate the rsync part using inotify, see e.g. onchange.sh.

otsaloma ( 2014-11-21 23:34:49 +0200 )edit

@brouch Sure - currently it is possible to distribute Python applications through OpenRepos and there are multiple Python applications present in the repository (modRana, Gpodder, Poor Maps and others).

As for the official Jolla store (Harbor), support for Python (and SDL) apps has been coming really soon now (TM) for at least half a year, pending multi-version support in the store backend and frontend. We would be actually reaching a one year anniversary or not being able to submit Python applications to Harbor in a few days (November 27 - one year anniversary of the Jolla launch). :)

There is already a question tracking this and you are welcome to vote for it and/or voice your opinion on this important issue:

https://together.jolla.com/question/6116/python-application-support-in-jolla-store-harbour/

@Osmo Salomaa That's a nice idea! :) But I usually change a bunch of stuff before running modRana again, so having it start again all the time might not be always needed, but should be definitely useful in other circumstances. BTW, to follow up on my workflow, I actually have single script that:

  • rsyncs any changes
  • runs modRana

And I just run it once I want to try the changes I did. :) I also made a custom desktop icon for the development version of modRana, so I can run both it and the version installed from OpenRepos. Also it helps to use USB networking as you have a pretty much assured stable connectivity and the Jolla also does not suspend as long as it is connected to USB, unlike when connecting to it over WiFi.

MartinK ( 2014-11-22 03:25:32 +0200 )edit
3

answered 2014-11-21 19:13:53 +0200

szopin gravatar image

Yup: http://talk.maemo.org/showpost.php?p=1419369&postcount=266 Will be much more usable on tablet

edit flag offensive delete publish link more

Comments

I see a chroot is involved. Would gaining root on this device be a problem/void the warranty?

brousch ( 2014-11-21 20:31:55 +0200 )edit
2

@brousch, you gain root in jolla just by command "devel-su" :)

Now why should that void any warranty, it is included in the device for that reason...

juiceme ( 2014-11-21 21:14:36 +0200 )edit

@juiceme, Y U bring up devel-su? You know that chroot has nothing to do with root, rooting and that kind of stuff :)

OTOH, chroot is a hassle and as such is my only objection to the above guide. I can build C++ directly on the device. The only thing I cannot do is run Qt Creator. Having rather limited resources to interact with it on the Jolla, that is perhaps not such a terrible disaster.

pichlo ( 2015-01-27 09:18:40 +0200 )edit

wot, me? not :)

I was just correcting @brousch who seems to think that "gaining root" means something bad in SFOS context, when it is actually just required to install packages.

As for using chroot'ed part of the FS to allow developing using libs not normally installed to the deviece, possible of course but I also think it is a bit too cumbersome way to do it.

juiceme ( 2015-01-27 09:41:15 +0200 )edit

Question tools

Follow
5 followers

Stats

Asked: 2014-11-21 18:15:33 +0200

Seen: 796 times

Last updated: Nov 21 '14