How can I run a Qt applicaton on ivi-shell?

Yang Zhonghua happy2discover at gmail.com
Thu Dec 7 09:32:11 EST 2017


Hi Zhao,

Thanks again!

My Weston version is 3.0.90. The ivi-shell I used has been merged in
Weston. I didn't use wayland-ivi-extension.
Please tell me specifically if you know how to use wayland-ivi-extension
instead of ivi-shell.

Here is my weston.ini:

[core]
shell=ivi-shell.so

[ivi-shell]
ivi-module=hmi-controller.so
ivi-shell-user-interface=/home/ubuntu/Downloads/weston/
weston-ivi-shell-user-interface

#developermode=true

cursor-theme=default
cursor-size=32

base-layer-id=1000
base-layer-id-offset=10000

workspace-background-layer-id=2000
workspace-layer-id=3000
application-layer-id=4000

transition-duration=300

background-image=/home/ubuntu/Downloads/weston/data/background.png
background-id=1001
panel-image=/home/ubuntu/Downloads/weston/data/panel.png
panel-id=1002
surface-id-offset=10
tiling-image=/home/ubuntu/Downloads/weston/data/tiling.png
tiling-id=1003
sidebyside-image=/home/ubuntu/Downloads/weston/data/sidebyside.png
sidebyside-id=1004
fullscreen-image=/home/ubuntu/Downloads/weston/data/fullscreen.png
fullscreen-id=1005
random-image=/home/ubuntu/Downloads/weston/data/random.png
random-id=1006
home-image=/home/ubuntu/Downloads/weston/data/home.png
home-id=1007
workspace-background-color=0x99000000
workspace-background-id=2001

[input-method]
path=/home/ubuntu/install/libexec/weston-keyboard

[ivi-launcher]
workspace-id=0
icon-id=4001
icon=/home/ubuntu/Downloads/weston/data/icon_ivi_flower.png
path=/home/ubuntu/Downloads/weston/weston-flower

[ivi-launcher]
workspace-id=0
icon-id=5002
icon=/home/ubuntu/Downloads/weston/data/icon_ivi_clickdot.png
path=/home/ubuntu/Downloads/weston/weston-clickdot

[ivi-launcher]
workspace-id=1
icon-id=4003
icon=/home/ubuntu/Downloads/weston/data/icon_ivi_simple-egl.png
path=/home/ubuntu/Downloads/weston/weston-simple-egl

[ivi-launcher]
workspace-id=1
icon-id=4004
icon=/home/ubuntu/Downloads/weston/data/icon_ivi_simple-shm.png
path=/home/ubuntu/Downloads/weston/weston-simple-shm

[ivi-launcher]
workspace-id=2
icon-id=4005
icon=/home/ubuntu/Downloads/weston/data/icon_ivi_smoke.png
path=/home/ubuntu/Downloads/weston/weston-smoke

[ivi-launcher]
workspace-id=3
icon-id=4006
icon=/home/ubuntu/Downloads/weston/data/icon_ivi_flower.png
path=/home/ubuntu/Downloads/weston/weston-flower

[ivi-launcher]
workspace-id=3
icon-id=4007
icon=/home/ubuntu/Downloads/weston/data/icon_ivi_clickdot.png
path=/home/ubuntu/Downloads/weston/weston-clickdot

[ivi-launcher]
workspace-id=3
icon-id=4008
icon=/home/ubuntu/Downloads/weston/data/icon_ivi_simple-egl.png
path=/home/ubuntu/Downloads/weston/weston-simple-egl

[ivi-launcher]
workspace-id=3
icon-id=4009
icon=/home/ubuntu/Downloads/weston/data/icon_ivi_simple-shm.png
path=/home/ubuntu/Downloads/weston/weston-simple-shm

[ivi-launcher]
workspace-id=3
icon-id=4010
icon=/home/ubuntu/Downloads/weston/data/icon_ivi_smoke.png
path=/home/ubuntu/Downloads/weston/weston-smoke

[ivi-launcher]
workspace-id=3
icon-id=9011
icon=/home/ubuntu/projects/hello-qt-quick2/qt.png
path=/home/ubuntu/projects/hello-qt-quick2/hello-qt-quick2


After applying patches for qtwayland and qtquickcontrols, I modified
main.cpp of my Qt application:

QQuickView view(QUrl(QStringLiteral("qrc:/main.qml")));
view.setProperty("IVI-Surface-ID", "9011");
view.show();


I tried the following lines after launching ivi-shell:

export QT_QPA_PLATFORM=wayland
export QT_WAYLAND_SHELL_INTEGRATION=ivi-shell
export QT_IVI_SURFACE_ID=9011
./hello-qt-quick2


My Qt application still couldn't run with outputting logs:

[22:20:09.313] id_surface(9011) is already created
The Wayland connection broke. Did the Wayland compositor die?


Where did I go wrong? I've no idea...

________________________________

B.R.&Thanks,
Yang Zhonghua
happy2discover at gmail.com

On Thu, Dec 7, 2017 at 6:03 PM, zhangyang <zhangyang-0206 at 163.com> wrote:

> Hi Yang:
> what's your ivi version? mine is 1.9.1. And from your weston.ini,  I do
> not find shell=ivi-shell.so, are you really using ivi-shell? Here is a
> weston.ini like:
> [core]
> shell=ivi-shell.so
>
> [ivi-shell]
> ivi-module=ivi-controller.so
> ivi-input-module=ivi-input-controller.so
>
> [output]
> name=HDMI-A-1
> transform=90
>
> And make sure you have libwaylandegl.so, libilmCommon.so, libilmControl.so
> ......   in your board lib path(from your photo, I guess  you are running
> qt app in embedded board, not PC, right?).
> ivi-extension is a extension for weston, and weston is only a backend, but
> I see a program is shown in your screen, are you sure this program is using
> ivi-shell as its backend?
>
> At 2017-12-07 11:06:29, "Yang Zhonghua" <happy2discover at gmail.com> wrote:
>
> Hi Zhao,
>
> First of all, I would like to thank you for taking your time to
> answer my question.
>
> 1.
> After launching weston(ivi-shell):
>
> Then I tried following lines via serial port:
>
>     export QT_WAYLAND_SHELL_INTEGRATION=ivi-shell
>     ./hello-qt-quick2 -platform wayland
>
> And I got:
>
>     Using Wayland-EGL
>     Failed to load shell integration ivi-shell
>
>
> 2.
> My Qt version is 5.5.1. After applying patches for qtquickcontrols &
> qtwayland, and rebuilding Qt application. Executing following lines should
> lead to succeed?
>
>     export QT_WAYLAND_SHELL_INTEGRATION=ivi-shell
>     export QT_IVI_SURFACE_ID=4010
>     ./hello-qt-quick2 -platform wayland
>
>
> 3.
> I don't know how to ensure whether my Ubuntu
> supports genivi-ivi-extension. Could you tell me more specifically?
>
> B.R.&Thanks,
>
> Yang Zhonghua
> happy2discover at gmail.com
>
> On Wed, Dec 6, 2017 at 5:34 PM, zhangyang <zhangyang-0206 at 163.com> wrote:
>
>> Hi yang:
>> 1. If you want your qt application run with ivi-shell, you should export
>> QT_WAYLAND_SHELL_INTEGRATION=ivi-shell first.
>> 2. I don't know your qt version, if it is >= 5.7,  you can set
>> QT_IVI_SURFACE_ID to specify ivi-surface-id for your qt app. follows this:
>>
>> https://codereview.qt-project.org/#/c/121297/
>>
>> else if it is <5.7, you should apply genivi-ivi patch here:
>> https://github.com/GENIVI/genivi-dev-platform/tree/master/me
>> ta-genivi-dev/meta-qt5
>>
>> 3. Be sure your ubuntu already have genivi-ivi-extension support
>>
>> good luck!
>>
>>
>>
>> At 2017-12-06 09:30:09, "Yang Zhonghua" <happy2discover at gmail.com> wrote:
>> >Hi guys,
>> >
>> >I am new to wayland.
>> >
>> >[situation]
>> >The ivi-shell demo could run correctly on Ubuntu 17.10 so far.
>> >
>> >[goal]
>> >1. I made a hello-world Qt Quick2 application and tried to make it managed
>> >by ivi-shell.
>> >2. Two fullscreen applications could run on diffrent layers at the same
>> >time. The bottom one could show directly when the top one exits.
>> >
>> >[problem]
>> >I copied weston.ini in ivi-shell folder and added the following lines.
>> >
>> >[ivi-launcher]
>> >workspace-id=3
>> >icon-id=4010
>> >icon=/home/ubuntu/Downloads/weston/data/icon_ivi_hello-world-qt-quick2.png
>> >path=/home/ubuntu/Projects/hello-world-qt-quick2/hello-
>> world-qt-quick2
>> >
>> >
>> >But the hello-world Qt Quick2 application couldn't run on ivi-shell.
>> >AFAIK, the Qt application should make a request to generate surface-id.
>> >Anybody knows how to do it? Thanks so much!
>> >
>> >I've been stuck for almost one month...
>> >_______________________________________________
>> >genivi-ivi-layer-management mailing list
>> >genivi-ivi-layer-management at lists.genivi.org
>> >https://lists.genivi.org/mailman/listinfo/genivi-ivi-layer-management
>>
>>
>>
>>
>>
>
>
>
>
>



More information about the genivi-ivi-layer-management mailing list