View Single Post
Old 05-19-2020, 03:53 PM   #1
Namret
Junior Member
Namret began at the beginning.
 
Posts: 4
Karma: 10
Join Date: May 2020
Device: Kobo Glo HD
Question (Help requested) Getting started with Qt on Kobo

Hello everyone!

I stumbled upon this corner of the internet the last few days and decided I want to dabble in developing a simple application for my Kobo, just for fun.

I am a software developer and regularly use C++ with Qt for desktop apps in my job, so seeing that Nickel is built on Qt was a nice surprise

To get started, I successfully extracted the toolchain from this docker image: https://github.com/geek1011/NickelTC and setup my Qt Creator Kit to use this toolchain.
I've also installed NickelMenu in order to launch my future app.

So far so good! I've got a binary compiled with the toolchain, let's run it!

I've created the following script based on the launch script from plato:
Code:
#! /bin/sh

WORKDIR=$(dirname "$0")
cd "$WORKDIR" || exit 1

# shellcheck disable=SC2046
export $(grep -sE '^(INTERFACE|WIFI_MODULE|DBUS_SESSION|NICKEL_HOME|LANG)=' /proc/"$(pidof nickel)"/environ)
sync
killall -TERM nickel hindenburg sickel fickel fmon > /dev/null 2>&1

echo $QT_PLUGIN_PATH >> info.log
echo "starting.." >> info.log
./kobo-test-app -qws >> info.log 2>> error.log
echo "stopping.." >> info.log

./nickel.sh &
And setup NickelMenu like this:
Code:
menu_item :main   :Start test app     :cmd_spawn      :/mnt/onboard/.adds/kobo-test-app/kobo-test-app.sh
At this point, I'm running into an issue I'm not sure how to fix: NickelMenu starts the script, but my app immediately quits and returns to Nickel. My error.log contains the following:
Code:
This application failed to start because it could not find or load the Qt platform plugin "xcb".

Reinstalling the application may fix this problem.
Aborted
Does anyone have any tips on how I could proceed? Is the xcb plugin necessary, is it available on the Kobo itself or should I ship it with the app? It seems like $QT_PLUGIN_PATH is not set by itself.

Any help would be highly appreciated
Namret is offline   Reply With Quote