[oe] [meta-qt5] Do_install_append() with qmake

Dylan Bartlett dylan.bartlett at metixmedical.co.uk
Fri May 25 09:31:02 UTC 2018


Hello all,

I hope you'll be able to help clear some things up for me.

I have created a recipe to build and install a Qt Application I've been
developing, so far everything has been working great and the program gets
compiled, installed and packaged.

However there is one additional install step I need to complete, which is
creating a symbolic link to my binary in /opt to /usr/bin/b2qt. I want to
do this so that the Boot2Qt appcontroller starts my application on boot.

There are two ways I thought I could do this.
1. Use do_install_append() in the recipe to create the symbolic link.
However qmake5.bbclass does not export the do_install function. Modifying
the .bbclass with EXPORT_FUNCTIONS do_install breaks everything so I think
that this is the wrong way to go about it.

2. Use target.extra in the qmake .pro file to add the extra commands.
This one I had a bit more success with, I added my commands to target.extra
and built the recipe.
In this case do_install appeared to run properly. I could see my symbolic
link in the image directory however the binary that was complied no longer
appears in the image directory. So I've fixed one thing and broke another.

At this point I've reached the end of what I think I can try, I'm sure I'm
missing something simple since extra install steps are a common task. Can
someone tell me what the canonically correct way that I should be doing
this is?

I've attached my recipe and a segment of my .pro if that helps.

Best Regards,
Dylan Bartlett
-------------- next part --------------
#Define where files should be installed. Create b2qt symlink to launch on boot.
target.path = /opt/$${TARGET}/bin
#target.extra = mkdir -p "$(INSTALL_ROOT)/usr/bin/" && ln -sfr /opt/$${TARGET}/bin/$${TARGET} "$(INSTALL_ROOT)/usr/bin/b2qt"
INSTALLS   += target
-------------- next part --------------
# Recipe created by recipetool
# This is the basis of a recipe and may need further editing in order to be fully functional.
# (Feel free to remove these comments when editing.)

# WARNING: the following LICENSE and LIC_FILES_CHKSUM values are best guesses - it is
# your responsibility to verify that the values are complete and correct.
#
# The following license files were not able to be identified and are
# represented as "Unknown" below, you will need to check them yourself:
#   dependencies/QtAwesome/LICENSE.md
#
LICENSE = "Proprietary"
LIC_FILES_CHKSUM = "file://LICENSE;md5=cfda683bec95082a12c32568ef09d144"

SRC_URI = "git://git@gitlab.com/redacted.git;protocol=ssh;branch=master-simulation-yoctomods"

# Modify these as desired
PV = "1.0+git${SRCPV}"
SRCREV = "eda003822f7bf0868482097902e4c0eccc213803"

S = "${WORKDIR}/git"
D = "${WORKDIR}/images"
inherit qmake5

FILES_${PN} += "/opt/metix-wg-ui/bin/metix-wg-ui \"

#This doesn't work with qmake
#do_install_append() {
#	ln -sfr /opt/$${TARGET}/bin/$${TARGET} "${D}/usr/bin/b2qt"
#}


More information about the Openembedded-devel mailing list