./configure
make
make install
This is true if you aren't cross-compiling, in our case you need to do
a few more things.
TFTP_ROOTFS=/tftpboot/rootfs
INSTALL_DIR=${TFTP_ROOTFS}/usr/local
# Make pkg-config use the target packages, not the hosts
export PKG_CONFIG_LIBDIR=${INSTALL_DIR}/lib/pkgconfig
export PKG_CONFIG_PATH=
./configure \
--host=sh4-linux-gnu \
--prefix=${INSTALL_DIR}
make
sudo make install
sudo env PATH=$PATH make install
export CPPFLAGS="-I${INSTALL_DIR}/include"
export LDFLAGS="-L${INSTALL_DIR}/lib"
make \
CC=sh4-linux-gnu-gcc \
LIBS="-lz -lpng -ljpeg"
sudo make \
DESTDIR=${A_LOCAL_DIR} install
CONFIG_INPUT_MOUSEDEV=y
CONFIG_INPUT_MOUSEDEV_PSAUX=y
When you have a touchscreen you will now get /dev/input/eventX and a corresponding /dev/input/mouseY.
When you have a USB mouse plugged in you will get additional event & mouse entries in /dev/input.
(Note: /dev/input/mice combines all mouseN events)
-plugin-mouse-linuxis -qt-mouse-tslib
However Qt needs to be told to handle touchscreen and mice differently. You
need to parse /proc/bus/input/devices to find out what you have attached.
Since I'm using Busybox, I'm limited in the tools available to do the parsing.
The Qt documentations says that multiple inputs are specified like this:
export QWS_MOUSE_PROTO="<driver>[:<driver specific options>]
<driver>[:<driver specific options>]
<driver>[:<driver specific options>]"
The driver for touchscreen needs to be "tslib:/dev/input/eventX" whereas the USB mouse needs "IntelliMouse:/dev/input/
mouseY". If you list multiple inputs, just separate them with a space. Here's an simple awk script to set QWS_MOUSE_PROTO.
TMP=`grep -E 'Name|Handlers' /proc/bus/input/devices`
# Find the touchscreen if there
MOUSE=`echo $TMP | awk '
BEGIN{RS="N: Name="; FS="[NH]: ";}
$2 ~ /mouse/ {
ev = $2
if ($1 ~ /Touchscreen/) {
sub("Handlers=mouse[0-9]+ event", "", ev)
text = sprintf("%s tslib:/dev/input/event%d",text,ev)
}
else {
sub("Handlers=mouse", "", ev)
text = sprintf("%s IntelliMouse:/dev/input/mouse%d",text,ev)
}
}
END{sub(" ", "", text); print text}
'`
export QWS_MOUSE_PROTO="$MOUSE"
Getting a USB keyboard working is easier, pass -qt-kbd-usb to configure and set QWS_KEYBOARD=Usb:/dev/input/eventX
You can isolate the keyboard event inputs by adding this to the above script:
KEYBOARD=`echo $TMP | awk '
BEGIN{RS="N: Name="; FS="[NH]: ";}
$2 ~ /kbd/ {
ev = $2
sub("Handlers=kbd event", "", ev)
text = sprintf("%s Usb:/dev/input/event%d",text,ev)
}
END{sub(" ", "", text); print text}
'`
export QWS_KEYBOARD="$KEYBOARD"
Normally I just pass the name of the Qt app to run to the scripts and run it within the script.