All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-qt5] Do_install_append() with qmake
@ 2018-05-25  9:31 Dylan Bartlett
  2018-05-25 15:01 ` Trevor Woerner
  2018-05-25 17:10 ` Dylan Bartlett
  0 siblings, 2 replies; 3+ messages in thread
From: Dylan Bartlett @ 2018-05-25  9:31 UTC (permalink / raw)
  To: openembedded-devel

[-- Attachment #1: Type: text/plain, Size: 1536 bytes --]

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

[-- Attachment #2: project.pro.txt --]
[-- Type: text/plain, Size: 262 bytes --]

#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

[-- Attachment #3: stoke_git.bb.txt --]
[-- Type: text/plain, Size: 1047 bytes --]

# 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"
#}

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [meta-qt5] Do_install_append() with qmake
  2018-05-25  9:31 [meta-qt5] Do_install_append() with qmake Dylan Bartlett
@ 2018-05-25 15:01 ` Trevor Woerner
  2018-05-25 17:10 ` Dylan Bartlett
  1 sibling, 0 replies; 3+ messages in thread
From: Trevor Woerner @ 2018-05-25 15:01 UTC (permalink / raw)
  To: Dylan Bartlett; +Cc: openembedded-devel

Maybe IMAGE_POSTPROCESS_COMMAND might help?
https://www.yoctoproject.org/docs/2.5/ref-manual/ref-manual.html#var-IMAGE_POSTPROCESS_COMMAND

There's an example of using it in:
https://github.com/resin-os/meta-resin/blob/master/meta-resin-common/recipes-core/images/resin-image.bb


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [meta-qt5] Do_install_append() with qmake
  2018-05-25  9:31 [meta-qt5] Do_install_append() with qmake Dylan Bartlett
  2018-05-25 15:01 ` Trevor Woerner
@ 2018-05-25 17:10 ` Dylan Bartlett
  1 sibling, 0 replies; 3+ messages in thread
From: Dylan Bartlett @ 2018-05-25 17:10 UTC (permalink / raw)
  To: openembedded-devel

Sorry all, ignore this. Do_install_append works, from what I can only call
a formatting issue in my recipe seems to have stopped the _append from
running.

Fixing some of the formatting in my _append function seems to have started
things working.

My next issue seems to be that my application is building in a debug
configuration and the linker is producing a pretty large binary (~150MB).
But I haven't exhausted myself on that issue yet.

Thanks for taking the time to reply even though this is my own fault,
Dylan
On Fri, 25 May 2018 at 10:31 Dylan Bartlett <
dylan.bartlett@metixmedical.co.uk> wrote:

> 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
>


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-05-25 17:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-25  9:31 [meta-qt5] Do_install_append() with qmake Dylan Bartlett
2018-05-25 15:01 ` Trevor Woerner
2018-05-25 17:10 ` Dylan Bartlett

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.