[SailfishDevel] SailfishOS as an OS/platform in Qt

Tone Kastlunger users.giulietta at gmail.com
Thu Dec 4 20:12:37 UTC 2014


Anything that makes a developer's life easier is absolutely welcomed I'd
say.
I must admit to have cursed many times over such a feature not being
present (either as macro OR as selectior that win32:unix:mac: are..)

best,
tortoisedoc

On Thu, Dec 4, 2014 at 6:38 PM, Alejandro Exojo <suy at badopi.org> wrote:

> Hi.
>
> I've asked this a couple of times on IRC, but I haven't found a fully
> satisfying answer. I want to see SailfishOS as any other OS/platform is
> featured in Qt: by having some qmake support to detect wheter I'm compiling
> for SailfishOS or not.
>
> Once that is done, having a Q_OS_SAILFISH preprocessor macro that can also
> choose different paths in C++ and adding support in QFileSelector is
> trivial.
>
> The big question is: do you want such thing in Qt? If yes, I would gladly
> do
> it myself, since I have some time available and I'm looking for ways to
> contribute to Qt, learn, etc.
>
> Rationale:
>
> Right now everyone is baking its own way, with varying degrees of success.
> ;-)
>
> I looked at it a year ago when I started writing my Sailfish application,
> and
> I was pointed to puzzle-master's sources, where a simple
> packagesExist(sailfishapp) did the trick... or so I thought. Since I wasn't
> testing the non-Sailfish branch much, I didn't realize Creator always
> returns
> true on this condition (by design: not allowed to fork a process when
> parsing
> .pro files). Seems a petty complaint (who cares about Creator that much? it
> works for qmake just fine), but with harbour requiring a "harbour-" prefix
> in
> the name of the executable, Creator might not even be able to start the
> application because it doesn't find it if you use a different value for
> TARGET.
>
> Lately I've been finding time for the app again and I finally noticed the
> problem, so I asked on IRC again. I was pointed at other application, and
> the
> check used was even worse. :-)
>
> Then I searched a bit in the branch of the mer-qt/qtbase repo. I see you
> don't
> use any mkspec for SailfishOS or Jolla, right? That's where I thought you
> might have it, and where I think it could be. Blackberry sets there the
> QMAKE_PLATFORM and Q_OS_BLACKBERRY.
>
> Yes, yes. I know there is a solution: pass a parameter to the qmake
> invocation. Store the invocation flag on the RPM packaging for final
> deployment, and maybe a .pro.shared file for development. That's what
> Puzzle
> Master has now too. Still I think there is some value in having this sorted
> out in a more general way, specially given that you'll want people to also
> distinguish a build for the Jolla phone or the Jolla tablet.
>
> Cheers.
>
> --
> Alex (a.k.a. suy) | GPG ID 0x0B8B0BC2
> http://barnacity.net/ | http://disperso.net
> _______________________________________________
> SailfishOS.org Devel mailing list
> To unsubscribe, please send a mail to
> devel-unsubscribe at lists.sailfishos.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.sailfishos.org/pipermail/devel/attachments/20141204/f5fc2360/attachment.html>


More information about the Devel mailing list