[SailfishDevel] Multiplatform apps on Sailfish, a.k.a. scoping and ifdeffing

Ruediger Gad r.c.g at gmx.de
Sat Sep 28 10:50:07 UTC 2013


On 03/19/2013 10:34 AM, Attila Csipa wrote:
> On 14-Mar-13 11:06, Attila Csipa wrote:
>>>> scenario, I would expect at least something along the lines of what
>>>> Harmattan
>>>> had (see
>>>> http://wiki.meego.com/Porting_Fremantle_Applications_to_Harmattan#Harmattan_scope
>>>>
>>>> ).
>>> Yes. What would you like?
>>
>> A way for conditionals in qmake (mostly for packaging), and #ifdef. I
>> have no particular emotional attachments of how to call these constants
>> (also depends on how Sailfish sees itself in terms of future versioning,
>> licensing, subsequent releases, etc), but the mechanism used in
>> Harmattan is good enough for me - have a .prf that qmake can pull in
>> (it's linux enough that I would refrain from OS-style platform scoping)
>> and a qplatformdefs.h for the C++ side.
> 
> The cheap, ugly, and completely you-should-not-be-doing-this-at-home way
> I'm using currently, if any misguided individuals are interested:
> 
> load(sailfishsilicabackground)
> contains(LIBS,-lsailfishsilicabackground): {
>     message(SailfishOS build)
> 
>     DEFINES += MER_EDITION_SAILFISH
>     MER_EDITION = sailfish
> 
>     # QML files and folders
>     qml.files = *.qml pages cover main.qml
> 
>     # The .desktop file
>     desktop.files = qtinfo_sailfish.desktop
>     
>     # Please do not modify the following line.
>     include(../sailfishapplication/sailfishapplication.pri)
>     
>     OTHER_FILES = qtinfo.yaml
> }
> 
> If you provide a way of doing this on a system level, I'm happy to
> retire hacks like this :)
> 
> Best regards,
> Attila
> 

Hi,

this hack doesn't work in the Qt5-based alpha SDK.
For now I use the following hack as workaround:

exists("/usr/lib/qt5/qml/Sailfish/Silica/SilicaGridView.qml"): {
    message(SailfishOS build)


Is there a better way to do this?



Best regards,

Ruediger




> 
> _______________________________________________
> SailfishOS.org Devel mailing list


-- 
http://ruedigergad.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4441 bytes
Desc: S/MIME Cryptographic Signature
URL: <https://lists.sailfishos.org/pipermail/devel/attachments/20130928/f920f73e/attachment.bin>


More information about the Devel mailing list