![]() |
Jolla developing
Hello
Is there any documentation and/or tutorial for Jolla? If I watch QML tutorials, will they work at least almost the same way when creating a Jolla app? Thanks -noob |
Re: Jolla developing
https://sailfishos.org/develop/ should get you started.
The SDK has some examples and studying other people's code (e.g. from Github) is one way to learn. Here's one collection of open source apps https://github.com/sailfishapps |
Re: Jolla developing
Quote:
|
Re: Jolla developing
You can also take a look at a demo application on github https://github.com/amarchen/helloworld-pro-sailfish
|
Re: Jolla developing
There are also several videos about it on youtube. Just search for Jolla SDK and you will find a few. Some old ones but as a basic start still good enough.
|
Re: Jolla developing
Is it a requirement to use an SDK to develop programs/apps for Jolla?
SDK is really a really big no no in general. Does Jolla not have the tools to install for example GCC? One of the worst things about Nokia N900 is the lack of libc and core GNU components. As far as I know Mer is GNU and not busybox, right? Does Jolla support libc/make/gcc? If not, then Jolla is no better than N9 which was pretty bad compared to N900 which again was not perfect. The natural way forward from N900 which used Busybox was ofcourse full GNU and replace GTK with QT and keep everything else. This unfortunately did not happen, which still makes Nokia N900 king of mobile devices in 2015, which is quite sad considering it was released in 2008. The mobile marked sucks! |
Re: Jolla developing
Quote:
https://together.jolla.com/question/...h-on-sailfish/ In short, you can comfortably develop QML only or Python & QML applications directly on the device. And you can use the Mer OBS with the Sailfish OS target to build stuff that needs to be compiled (it is quite easy to reuse packaging from other RPM based distros such as Fedora). Not sure about installing compilers & co. directly on the device but I don't think anything technical should be preventing that as long as the needed packages are available. |
Re: Jolla developing
Of course you can install the usual compilers and tools to Jolla, it is a Mer-Linux-distribution after all.
If it wasn't so, how would you be able to compile your kernel on it, huh?? [nemo@Jolla ~]$ [nemo@Jolla ~]$ gcc --version gcc (Linaro GCC 4.6-2013.05) 4.6.4 20130412 (Mer 4.6.4-1) Copyright © 2011 Free Software Foundation, Inc. Tämä ohjelma on vapaaohjelmisto; Katsokaa kopiointiehdot lähdekoodista. Tällä ohjelmistolla EI OLE TAKUUTA; ei edes KAUPALLISESTI HYVÄKSYTTÄVÄSTÄ LAADUSTA tai SOPIVUUDESTA TIETTYYN TARKOITUKSEEN. [nemo@Jolla ~]$ |
Re: Jolla developing
Quote:
I couldn't imagine anything worse than having to develop on device with no tools. |
Re: Jolla developing
Quote:
Quote:
|
Re: Jolla developing
Quote:
Not only you can install gcc/make on it, but it's also much cleaner than on the N900 -- where the compilers in the official SDK repo had some problems thanks to scratchbox1 contamination. Quote:
|
Re: Jolla developing
Quote:
Quote:
Quote:
|
Re: Jolla developing
Wasn't sure where to ask so I ask here. Seems just a good a place as any, short of starting a new thread.
I am trying to build an existing Harmattan application on Sailfish. I have absolutely zero time and incentive to faff around with SDKs so I am building it on the phone itself. Please bear that in mind and please, please, please avoid answers of the "use the SDK" type. If I cannot build it on the phone itself, I cannot build it at all. Simple as that. So, here it goes. I have the Harmattan sources. QMake gives me: Code:
Project ERROR: Unknown module(s) in QT: declarative 'pkcon search name declarative' gives me a loooong list, containing amongst others... Code:
Installed qt5-qtdeclarative-5.2.1+git39-1.32.3.armv7hl Qt Declarative library (Yes, I am such a noob! :o) |
Re: Jolla developing
Code:
pkcon install <name of package> Code:
zypper in <name of package> |
Re: Jolla developing
Quote:
Oh, and the "use the SDK" answer is really what you want to hear. The SDK is a Sailfish system, too. That means, you could add the SDK-specific packages to your phone (a not so good idea on the phone's struggling btrfs filesystem IMHO) and build natively on your phone instead of in the SDK. |
Re: Jolla developing
Quote:
Quote:
|
Re: Jolla developing
Never mind, I found my answer.
|
Re: Jolla developing
you should not use declarative module in Qt5, use QT += quick and QT += qml instead
|
Re: Jolla developing
And the best place to solve dev questions is #sailfishos freenode irc channel :)
|
Re: Jolla developing
Quote:
Quote:
|
Re: Jolla developing
You shouldn't be online 24/7 if you can't: http://www.merproject.org/logs/%23sailfishos/
|
Re: Jolla developing
Thanks, coderus. It's not just the 24/7 presence, I find IRC generally a pain to use. It's kinda OK for an immediate interaction but otherwise... Too much irrelevant info ("XY has joined/left"), no threading, no easy search... Basically if I have a question that has been already asked and answered 200 times, the only way to get the answer is to get online and ask again, hoping that someone who knows the answer is also online. It's just way too much effort.
Mailing lists are only marginally better. The best medium for getting answers are Usenet newsgroups, but very few youngsters even know such a thing exists. |
Re: Jolla developing
Quote:
The best way you can use IRC is to have a 24/7 server that is logged on to the channels you are intrested on, and ircnotify set up to email a ping to you if something that interests you happens...) As for usenet, yes, that is the coolest thing since fridges :D As it happens I run our company-internal news server (inn2), with a fair amount of traffic (301 articles posted last week, just checked now) |
Re: Jolla developing
Quote:
news is what got me hooked on the internet (well, gopher and e-mail as well). I always found it (and still find it) much more comfortable and elegant to use than "modern" internet forums. I especially hate the jolla forum. I really cannot find my way around it. |
Re: Jolla developing
Another silly question. (My QML is not very good. I have done some Qt but I am mostly an embedded dev novadays and my idea of a UI is flashing an LED through GPIO ;))
How does one iterate through a string in QML? The QML documentation on the topic is rather sparse and I find the Qt discussion forum even worse to navigate than TJC, however unlikely that may seem. Basically, I want to check if all characters in a string are from a given set. I tried...
Eventually I had to resort to a nested for loop, but there must be a better way. Please note that this is for editing a QML for a Sailfish patch, i.e. I do not have the option to change the C++ source. Only pure QML please. |
Re: Jolla developing
Quote:
Code:
Component.onCompleted { edit: But you might consider using regex on that string… should be even easier… or even something like if(string.indexOf(substring) > -1) |
Re: Jolla developing
I tried this, but it would always return true, no matter what the contents of text was.
Code:
property string alphabet: "abcdefgh" I have not tried indexOf() but if contains() did not work I am skeptical indexOf() would. Thanks, I will try your forEach syntax when I get some time (in the next couple of hours or so). EDIT1: Yey, your forEach works! :cool::cool::cool: EDIT2: No, it doesn't. I forgot to save the file (:o) and it was still picking up my old version. D'oh! EDIT3: Thank you for your regex suggestion but my alphabet is more complex than that and contains some Unicode characters that give me even more headache ;) |
Re: Jolla developing
oh, by the way, regex would look something like this:
Code:
if (string.search(/[^a-zA-Z]+/) === -1) { |
All times are GMT. The time now is 19:03. |
vBulletin® Version 3.8.8