Ask / Submit
1

Using system libraries for Sailfish IDE

asked 2017-02-19 15:17:28 +0300

Falk Alexander gravatar image

updated 2017-02-19 15:17:58 +0300

The QtCreator of the Sailfish OS IDE on Linux is using it own Qt libraries (bundled) by default. Given this fact, the IDE is using Qt 5.5 (Sailfish OS IDE 17.01 Beta) and the remaining part of the system uses Qt 5.8. Problem here is: the QtCreator of the Sailfish OS IDE isn't able to run native under Wayland, because a Wayland Platform Plugin is missing. In addition it isn't able to use the Qt Platformthemes which are configured system-wide. In my case there are several glitches when using it in Xwayland, therefore it would be really productive to have it running native under Wayland.

My question now: Is there a way to let the Sailfish OS IDE use the system libraries, like normal QtCreator does it? I know there are qt.conf configuration files to override paths to grab the libraries, but I wasn't able to configure it.

edit retag flag offensive close delete

Comments

I can suggest you go and compile your own: https://github.com/sailfish-sdk/sailfish-qtcreator

coderus ( 2017-02-19 18:12:12 +0300 )edit

1 Answer

Sort by » oldest newest most voted
3

answered 2017-02-20 11:51:40 +0300

martyone gravatar image

The approach taken - rationale

[...] use the system libraries, like normal QtCreator does it?

Let me outline the problem being solved and why "normal" can have different meanings.

Qt Creator installed from your Linux distribution's repository (most likely) uses system libraries. Qt Creator installed from official Qt installers comes with its own copy of Qt libraries (and a bunch of other required libraries) so that its requirements to the underlaying system are minimized - this way a broad range of Linux distributions (and their versions) can be supported with a common installer.

Sailfish OS SDK uses the same approach as the official Qt distribution.

Possible workarounds

I do not think redirecting with qt.conf or other mechanisms will work for you. Qt Creator uses Qt private headers IIRC, which makes it dependent on an exact version of Qt. Similar restriction is likely to exist for the platform plugin.

If your only concern is about the Wayland platform support then I would recommend to first try to compile the Wayland Platform Plugin (not verified). Configure Qt using the options used in the buildqt5.sh script from sdk-build-tools as a base, adding the options necessary to enable Wayland platform support. Build just the minimum to get the Wayland Platform Plugin binary and copy it to ~/SailfishOS/lib/Qt/plugins/platforms/. You may also need to build ICU before that to meet all dependencies.

If the above fails, try to compile Qt Creator and Qt QmlLive Bench from sources. Check the buildqtc.sh and buildqmllive.sh scripts from sdk-build-tools. Certain paths are resolved relative to the Qt Creator executable, so you will either have to create symlinks or figure out how to replace the package installed under ~/SailfishOS with your own build. Unfortunately there is no official guide ho to do this.

What to expect from future

We will work on including support for Wayland platform in future Sailfish OS SDK releases. Currently it is not on our roadmap to provide distribution specific packages for Sailfish OS SDK.

edit flag offensive delete publish link more
Login/Signup to Answer

Question tools

Follow
1 follower

Stats

Asked: 2017-02-19 15:17:28 +0300

Seen: 493 times

Last updated: Feb 20 '17