All of lore.kernel.org
 help / color / mirror / Atom feed
* qt4-embedded - image size
@ 2013-06-10 10:31 John Stirling
  2013-06-10 10:55 ` Paul Eggleton
  0 siblings, 1 reply; 12+ messages in thread
From: John Stirling @ 2013-06-10 10:31 UTC (permalink / raw)
  To: openembedded-core

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

I've successfully built qt4-embedded (oe-core, denzil, beaglebone) and have
got a Qt/QML application running (on a beaglebone)

The image size is quite big however and I notice there a load of
examples/demos etc that I don't need on the filesystem.

I presume I am probably just building the wrong thing ? Can someone advise
the recommended way to get Qt built without all the demos etc  ?

This is what I added to our image -

IMAGE_INSTALL += " \
  qt4-embedded \
  "

Thanks
John

[-- Attachment #2: Type: text/html, Size: 1534 bytes --]

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

* Re: qt4-embedded - image size
  2013-06-10 10:31 qt4-embedded - image size John Stirling
@ 2013-06-10 10:55 ` Paul Eggleton
  2013-06-10 11:19   ` John Stirling
  0 siblings, 1 reply; 12+ messages in thread
From: Paul Eggleton @ 2013-06-10 10:55 UTC (permalink / raw)
  To: John Stirling; +Cc: openembedded-core

Hi John,

On Monday 10 June 2013 11:31:26 John Stirling wrote:
> I've successfully built qt4-embedded (oe-core, denzil, beaglebone) and have
> got a Qt/QML application running (on a beaglebone)
> 
> The image size is quite big however and I notice there a load of
> examples/demos etc that I don't need on the filesystem.
> 
> I presume I am probably just building the wrong thing ? Can someone advise
> the recommended way to get Qt built without all the demos etc  ?
> 
> This is what I added to our image -
> 
> IMAGE_INSTALL += " \
>   qt4-embedded \
>   "

It's not what you're building that's the problem, but the package you're 
selecting to go into the image. The "qt4-embedded" package will pull in all of 
the Qt/Embedded packages, which probably isn't what you want. Assuming your Qt 
application is compiled rather than pure QML, most of the time you can get 
away with only installing your Qt application - the Qt libraries that it uses 
will be installed automatically as dependencies. Then the only thing you will 
need to install as far as Qt is concerned are any plugins (database, image, 
etc.). You may also want qt4-embedded-qml-plugins and qt4-embedded-qmlviewer 
depending on how you start your application.

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre


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

* Re: qt4-embedded - image size
  2013-06-10 10:55 ` Paul Eggleton
@ 2013-06-10 11:19   ` John Stirling
  2013-06-10 12:10     ` Nicolas Dechesne
  2013-06-10 12:17     ` Paul Eggleton
  0 siblings, 2 replies; 12+ messages in thread
From: John Stirling @ 2013-06-10 11:19 UTC (permalink / raw)
  To: Paul Eggleton; +Cc: openembedded-core

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

Hi Paul,

Thanks for the reply.

The Qt application (qtui) is compiled and has some C++, some QML and needs
to use dbus. I am kicking it off via './qtui -qws'.

So basically if I had this -

IMAGE_INSTALL += " \
qt4-embedded \
qtui \
"

You suggest just cutting it down to

IMAGE_INSTALL += " \
qtui \
"
and it should work itself out ?

qtui.bb is -
I am not entirely sure on the 'inherit qt4e' line. If there are any glaring
errors here let me know. I'll kick off a build in the meantime.

SRC_URI = "git://${SOURCE_REPO}/git/${PN}.git;protocol=ssh;tag=${PV}"
LICENSE="CLOSED"
PROVIDES = "${PN}_${PV}"
DEPENDS = "qt4-embedded"
S = "${WORKDIR}/git"
RPROVIDES = "qtui_${PV}"
PACKAGES="${PN}"
FILES_${PN} += "/root/qtui /usr/share/reciva/qml/qtui
${sysconfdir}/dbus-1/system.d/"

inherit qt4e

do_compile() {
  cd ${S}
  ./rebuild
}

do_install() {
  install -d ${D}/usr/share/reciva/
  install -d ${D}/usr/share/reciva/qml/
  install -d ${D}/usr/share/reciva/qml/qtui/
  install -d ${D}/root/
  install -d ${D}/${sysconfdir}/
  install -d ${D}/${sysconfdir}/dbus-1/
  install -d ${D}/${sysconfdir}/dbus-1/system.d/

  install -m 0755 ${S}/qtui ${D}/root/
  install -m 0755 ${S}/qml/qtui/* ${D}/usr/share/reciva/qml/qtui/

  # So that qtui can use dbus system bus
  install -m 0644 ${S}/dbus_config/qtui.conf
${D}/${sysconfdir}/dbus-1/system.d/
}




On 10 June 2013 11:55, Paul Eggleton <paul.eggleton@linux.intel.com> wrote:

> Hi John,
>
> On Monday 10 June 2013 11:31:26 John Stirling wrote:
> > I've successfully built qt4-embedded (oe-core, denzil, beaglebone) and
> have
> > got a Qt/QML application running (on a beaglebone)
> >
> > The image size is quite big however and I notice there a load of
> > examples/demos etc that I don't need on the filesystem.
> >
> > I presume I am probably just building the wrong thing ? Can someone
> advise
> > the recommended way to get Qt built without all the demos etc  ?
> >
> > This is what I added to our image -
> >
> > IMAGE_INSTALL += " \
> >   qt4-embedded \
> >   "
>
> It's not what you're building that's the problem, but the package you're
> selecting to go into the image. The "qt4-embedded" package will pull in
> all of
> the Qt/Embedded packages, which probably isn't what you want. Assuming
> your Qt
> application is compiled rather than pure QML, most of the time you can get
> away with only installing your Qt application - the Qt libraries that it
> uses
> will be installed automatically as dependencies. Then the only thing you
> will
> need to install as far as Qt is concerned are any plugins (database, image,
> etc.). You may also want qt4-embedded-qml-plugins and
> qt4-embedded-qmlviewer
> depending on how you start your application.
>
> Cheers,
> Paul
>
> --
>
> Paul Eggleton
> Intel Open Source Technology Centre
>

[-- Attachment #2: Type: text/html, Size: 4119 bytes --]

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

* Re: qt4-embedded - image size
  2013-06-10 11:19   ` John Stirling
@ 2013-06-10 12:10     ` Nicolas Dechesne
  2013-06-10 12:59       ` Eric Bénard
  2013-06-10 12:17     ` Paul Eggleton
  1 sibling, 1 reply; 12+ messages in thread
From: Nicolas Dechesne @ 2013-06-10 12:10 UTC (permalink / raw)
  To: John Stirling
  Cc: Paul Eggleton, Patches and discussions about the oe-core layer

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

On Mon, Jun 10, 2013 at 1:19 PM, John Stirling
<ap.john.stirling@gmail.com>wrote:

> You suggest just cutting it down to
>
> IMAGE_INSTALL += " \
> qtui \
> "
> and it should work itself out ?
>

hi, i have observed the same issue, and I used the following 'workaround':

BAD_RECOMMENDATIONS = " \
    qt4-embedded-demos \
    qt4-embedded-examples \
    qt4-embedded-demos-doc \
    qt4-embedded-tools \
    qt4-embedded-assistant \
    "
which I added in my image recipe, that would ensure that the packages which
are RECOMMENDS don't get installed in the final image.

I would be happy to use another (nicer?) method, too.

[-- Attachment #2: Type: text/html, Size: 1482 bytes --]

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

* Re: qt4-embedded - image size
  2013-06-10 11:19   ` John Stirling
  2013-06-10 12:10     ` Nicolas Dechesne
@ 2013-06-10 12:17     ` Paul Eggleton
  2013-06-10 13:46       ` John Stirling
  1 sibling, 1 reply; 12+ messages in thread
From: Paul Eggleton @ 2013-06-10 12:17 UTC (permalink / raw)
  To: John Stirling; +Cc: openembedded-core

On Monday 10 June 2013 12:19:48 John Stirling wrote:
> The Qt application (qtui) is compiled and has some C++, some QML and needs
> to use dbus. I am kicking it off via './qtui -qws'.
> 
> So basically if I had this -
> 
> IMAGE_INSTALL += " \
> qt4-embedded \
> qtui \
> "
> 
> You suggest just cutting it down to
> 
> IMAGE_INSTALL += " \
> qtui \
> "
> and it should work itself out ?

Apart from plugins and anything else that your application doesn't get 
directly linked to, yes.

> I am not entirely sure on the 'inherit qt4e' line.

You do want this here, yes.

> SRC_URI = "git://${SOURCE_REPO}/git/${PN}.git;protocol=ssh;tag=${PV}"

I think you probably should specify SRCREV here, even if it's SRCREV = 
"${AUTOREV}" to build the latest version on the specified branch. For tags that 
won't change, typically we recommend that you specify the full sha1 hash in 
SRCREV and then the system knows it doesn't need to query the git server to 
get the current hash corresponding to the tag.

> PROVIDES = "${PN}_${PV}"

This should not be necessary.

> DEPENDS = "qt4-embedded"

This is already done for you by inheriting qt4e.

> RPROVIDES = "qtui_${PV}"

This should not be necessary either.

> PACKAGES="${PN}"

Unless you have a good reason to do this I would recommend not doing so; the 
standard package splitting should work for most situations and for those where 
it needs to be tweaked slightly that can be done fairly easily.

> FILES_${PN} += "/root/qtui /usr/share/reciva/qml/qtui
> ${sysconfdir}/dbus-1/system.d/"

Typically you would install binaries such as this to ${bindir} rather than 
/root.

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre


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

* Re: qt4-embedded - image size
  2013-06-10 12:10     ` Nicolas Dechesne
@ 2013-06-10 12:59       ` Eric Bénard
  2013-06-10 13:07         ` Nicolas Dechesne
  0 siblings, 1 reply; 12+ messages in thread
From: Eric Bénard @ 2013-06-10 12:59 UTC (permalink / raw)
  To: Nicolas Dechesne
  Cc: Paul Eggleton, Patches and discussions about the oe-core layer

Hi Nicolas,

Le Mon, 10 Jun 2013 14:10:15 +0200,
Nicolas Dechesne <nicolas.dechesne@linaro.org> a écrit :

> On Mon, Jun 10, 2013 at 1:19 PM, John Stirling
> <ap.john.stirling@gmail.com>wrote:
> 
> > You suggest just cutting it down to
> >
> > IMAGE_INSTALL += " \
> > qtui \
> > "
> > and it should work itself out ?
> >

this will work but if you need plugins they will be missing as only the
linked libraries will be automatically integrated.

> 
> hi, i have observed the same issue, and I used the following 'workaround':
> 
> BAD_RECOMMENDATIONS = " \
>     qt4-embedded-demos \
>     qt4-embedded-examples \
>     qt4-embedded-demos-doc \
>     qt4-embedded-tools \
>     qt4-embedded-assistant \
>     "
> which I added in my image recipe, that would ensure that the packages which
> are RECOMMENDS don't get installed in the final image.
> 
> I would be happy to use another (nicer?) method, too.


check packagegroup-core-qt4e.bb and remove :
        qt4-embedded-demos \
        qt4-embedded-examples \
        qt-demo-init \
        qt4-embedded-assistant \

(and also the plugins & libs you may not need)

FWIW I'm using this to build a quite full featured qt4e base image :
RDEPENDS_append += " \
	qt4-embedded \
	"

QT_INSTALL = " \
	libqt-embedded3support4 \
	libqt-embeddedclucene4 \
	libqt-embeddedcore4 \
	libqt-embeddedgui4 \
	libqt-embeddednetwork4 \
	libqt-embeddedsvg4 \
	libqt-embeddedsql4 \
	libqt-embeddedxml4 \
	libqt-embeddedxmlpatterns4 \
	libqt-embeddedwebkit4 \
	libqt-embeddedscripttools4 \
	libqt-embeddedtest4 \
	libqt-embeddedmultimedia4 \
	libqt-embeddedhelp4 \
	libqt-embeddeddeclarative4 \
	libqt-embeddeddbus4 \
	libqt-embeddedphonon4 \
	\
	qt4-embedded-fonts-ttf-vera \
	qt4-embedded-fonts-ttf-dejavu \
	qt4-embedded-plugin-mousedriver-tslib \
	qt4-embedded-plugin-sqldriver-sqlite2 \
	qt4-embedded-plugin-sqldriver-sqlite \
	qt4-embedded-plugin-phonon-backend-gstreamer \
	qt4-embedded-plugin-iconengine-svgicon \
	qt4-embedded-plugin-imageformat-gif \
	qt4-embedded-plugin-imageformat-ico \
	qt4-embedded-plugin-imageformat-jpeg \
	qt4-embedded-plugin-imageformat-mng \
	qt4-embedded-plugin-imageformat-svg \
	qt4-embedded-plugin-imageformat-tiff \
	sqlite3 \
"

QWT_INSTALL = " \
	qwt-e \
"

IMAGE_INSTALL += "\
	${QT_INSTALL} \
	${QWT_INSTALL} \
"

and I add this when I want the examples :
IMAGE_INSTALL += "\
	qt4-embedded-demos qt4-embedded-examples qt-demo-init \
	qwt-e-examples \
"
(qt-demo-init is a homemade init script).

Eric


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

* Re: qt4-embedded - image size
  2013-06-10 12:59       ` Eric Bénard
@ 2013-06-10 13:07         ` Nicolas Dechesne
  2013-06-10 13:13           ` Eric Bénard
  0 siblings, 1 reply; 12+ messages in thread
From: Nicolas Dechesne @ 2013-06-10 13:07 UTC (permalink / raw)
  To: Eric Bénard
  Cc: Paul Eggleton, Patches and discussions about the oe-core layer

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

On Mon, Jun 10, 2013 at 2:59 PM, Eric Bénard <eric@eukrea.com> wrote:

> Hi Nicolas,
>
> Le Mon, 10 Jun 2013 14:10:15 +0200,
> Nicolas Dechesne <nicolas.dechesne@linaro.org> a écrit :
>
> > On Mon, Jun 10, 2013 at 1:19 PM, John Stirling
> > <ap.john.stirling@gmail.com>wrote:
> >
> > > You suggest just cutting it down to
> > >
> > > IMAGE_INSTALL += " \
> > > qtui \
> > > "
> > > and it should work itself out ?
> > >
>
> this will work but if you need plugins they will be missing as only the
> linked libraries will be automatically integrated.
>
> >
> > hi, i have observed the same issue, and I used the following
> 'workaround':
> >
> > BAD_RECOMMENDATIONS = " \
> >     qt4-embedded-demos \
> >     qt4-embedded-examples \
> >     qt4-embedded-demos-doc \
> >     qt4-embedded-tools \
> >     qt4-embedded-assistant \
> >     "
> > which I added in my image recipe, that would ensure that the packages
> which
> > are RECOMMENDS don't get installed in the final image.
> >
> > I would be happy to use another (nicer?) method, too.
>
>
> check packagegroup-core-qt4e.bb and remove :
>         qt4-embedded-demos \
>         qt4-embedded-examples \
>         qt-demo-init \
>         qt4-embedded-assistant \
>
> (and also the plugins & libs you may not need)
>
> FWIW I'm using this to build a quite full featured qt4e base image :
> RDEPENDS_append += " \
>         qt4-embedded \
>         "
>
> QT_INSTALL = " \
>         libqt-embedded3support4 \
>         libqt-embeddedclucene4 \
>         libqt-embeddedcore4 \
>         libqt-embeddedgui4 \
>         libqt-embeddednetwork4 \
>         libqt-embeddedsvg4 \
>         libqt-embeddedsql4 \
>         libqt-embeddedxml4 \
>         libqt-embeddedxmlpatterns4 \
>         libqt-embeddedwebkit4 \
>         libqt-embeddedscripttools4 \
>         libqt-embeddedtest4 \
>         libqt-embeddedmultimedia4 \
>         libqt-embeddedhelp4 \
>         libqt-embeddeddeclarative4 \
>         libqt-embeddeddbus4 \
>         libqt-embeddedphonon4 \
>         \
>         qt4-embedded-fonts-ttf-vera \
>         qt4-embedded-fonts-ttf-dejavu \
>         qt4-embedded-plugin-mousedriver-tslib \
>         qt4-embedded-plugin-sqldriver-sqlite2 \
>         qt4-embedded-plugin-sqldriver-sqlite \
>         qt4-embedded-plugin-phonon-backend-gstreamer \
>         qt4-embedded-plugin-iconengine-svgicon \
>         qt4-embedded-plugin-imageformat-gif \
>         qt4-embedded-plugin-imageformat-ico \
>         qt4-embedded-plugin-imageformat-jpeg \
>         qt4-embedded-plugin-imageformat-mng \
>         qt4-embedded-plugin-imageformat-svg \
>         qt4-embedded-plugin-imageformat-tiff \
>         sqlite3 \
> "
>
> QWT_INSTALL = " \
>         qwt-e \
> "
>
> IMAGE_INSTALL += "\
>         ${QT_INSTALL} \
>         ${QWT_INSTALL} \
> "
>
> and I add this when I want the examples :
> IMAGE_INSTALL += "\
>         qt4-embedded-demos qt4-embedded-examples qt-demo-init \
>         qwt-e-examples \
> "
> (qt-demo-init is a homemade init script).
>

hi Eric,

thanks for your answer. so, yes I kind of figured out I could do that. But
in fact I was hoping that re-using the existing packagegroup from oe-core
*should* be the right thing to do, instead of re-implementing another one.
and perhaps the packagegroup being called core-qt4e should be restricted to
'core' components, and we could have 1 (or more) additional packagegroups
that could be pulled into images, instead? otherwise what's the point of
having a 'core QT4e packagegroup' if it's not suitable for any real usage?

now, given the current QT4/QT5 stuff, i don't know how relevant this
discussion is.. but i wanted to point out that as a newcomer to this area,
that has been quite confusing!



>
> Eric
>

[-- Attachment #2: Type: text/html, Size: 5076 bytes --]

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

* Re: qt4-embedded - image size
  2013-06-10 13:07         ` Nicolas Dechesne
@ 2013-06-10 13:13           ` Eric Bénard
  2013-06-10 16:37             ` Paul Eggleton
  0 siblings, 1 reply; 12+ messages in thread
From: Eric Bénard @ 2013-06-10 13:13 UTC (permalink / raw)
  To: Nicolas Dechesne
  Cc: Paul Eggleton, Patches and discussions about the oe-core layer

Le Mon, 10 Jun 2013 15:07:01 +0200,
Nicolas Dechesne <nicolas.dechesne@linaro.org> a écrit :

> On Mon, Jun 10, 2013 at 2:59 PM, Eric Bénard <eric@eukrea.com> wrote:
> 
> > Hi Nicolas,
> >
> > Le Mon, 10 Jun 2013 14:10:15 +0200,
> > Nicolas Dechesne <nicolas.dechesne@linaro.org> a écrit :
> >
> > > On Mon, Jun 10, 2013 at 1:19 PM, John Stirling
> > > <ap.john.stirling@gmail.com>wrote:
> > >
> > > > You suggest just cutting it down to
> > > >
> > > > IMAGE_INSTALL += " \
> > > > qtui \
> > > > "
> > > > and it should work itself out ?
> > > >
> >
> > this will work but if you need plugins they will be missing as only the
> > linked libraries will be automatically integrated.
> >
> > >
> > > hi, i have observed the same issue, and I used the following
> > 'workaround':
> > >
> > > BAD_RECOMMENDATIONS = " \
> > >     qt4-embedded-demos \
> > >     qt4-embedded-examples \
> > >     qt4-embedded-demos-doc \
> > >     qt4-embedded-tools \
> > >     qt4-embedded-assistant \
> > >     "
> > > which I added in my image recipe, that would ensure that the packages
> > which
> > > are RECOMMENDS don't get installed in the final image.
> > >
> > > I would be happy to use another (nicer?) method, too.
> >
> >
> > check packagegroup-core-qt4e.bb and remove :
> >         qt4-embedded-demos \
> >         qt4-embedded-examples \
> >         qt-demo-init \
> >         qt4-embedded-assistant \
> >
> > (and also the plugins & libs you may not need)
> >
> > FWIW I'm using this to build a quite full featured qt4e base image :
> > RDEPENDS_append += " \
> >         qt4-embedded \
> >         "
> >
> > QT_INSTALL = " \
> >         libqt-embedded3support4 \
> >         libqt-embeddedclucene4 \
> >         libqt-embeddedcore4 \
> >         libqt-embeddedgui4 \
> >         libqt-embeddednetwork4 \
> >         libqt-embeddedsvg4 \
> >         libqt-embeddedsql4 \
> >         libqt-embeddedxml4 \
> >         libqt-embeddedxmlpatterns4 \
> >         libqt-embeddedwebkit4 \
> >         libqt-embeddedscripttools4 \
> >         libqt-embeddedtest4 \
> >         libqt-embeddedmultimedia4 \
> >         libqt-embeddedhelp4 \
> >         libqt-embeddeddeclarative4 \
> >         libqt-embeddeddbus4 \
> >         libqt-embeddedphonon4 \
> >         \
> >         qt4-embedded-fonts-ttf-vera \
> >         qt4-embedded-fonts-ttf-dejavu \
> >         qt4-embedded-plugin-mousedriver-tslib \
> >         qt4-embedded-plugin-sqldriver-sqlite2 \
> >         qt4-embedded-plugin-sqldriver-sqlite \
> >         qt4-embedded-plugin-phonon-backend-gstreamer \
> >         qt4-embedded-plugin-iconengine-svgicon \
> >         qt4-embedded-plugin-imageformat-gif \
> >         qt4-embedded-plugin-imageformat-ico \
> >         qt4-embedded-plugin-imageformat-jpeg \
> >         qt4-embedded-plugin-imageformat-mng \
> >         qt4-embedded-plugin-imageformat-svg \
> >         qt4-embedded-plugin-imageformat-tiff \
> >         sqlite3 \
> > "
> >
> > QWT_INSTALL = " \
> >         qwt-e \
> > "
> >
> > IMAGE_INSTALL += "\
> >         ${QT_INSTALL} \
> >         ${QWT_INSTALL} \
> > "
> >
> > and I add this when I want the examples :
> > IMAGE_INSTALL += "\
> >         qt4-embedded-demos qt4-embedded-examples qt-demo-init \
> >         qwt-e-examples \
> > "
> > (qt-demo-init is a homemade init script).
> >
> 
> hi Eric,
> 
> thanks for your answer. so, yes I kind of figured out I could do that. But
> in fact I was hoping that re-using the existing packagegroup from oe-core
> *should* be the right thing to do, instead of re-implementing another one.
> and perhaps the packagegroup being called core-qt4e should be restricted to
> 'core' components, and we could have 1 (or more) additional packagegroups
> that could be pulled into images, instead? otherwise what's the point of
> having a 'core QT4e packagegroup' if it's not suitable for any real usage?

true, I'll cook & test a split of the packagegroup to make the examples
& demos optional

Eric


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

* Re: qt4-embedded - image size
  2013-06-10 12:17     ` Paul Eggleton
@ 2013-06-10 13:46       ` John Stirling
  2013-06-10 14:03         ` Paul Eggleton
  0 siblings, 1 reply; 12+ messages in thread
From: John Stirling @ 2013-06-10 13:46 UTC (permalink / raw)
  To: Paul Eggleton; +Cc: openembedded-core

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

Looking fairly promising so far. Image size down from 280Mb to 90Mb and
only Qt related stuff now seems to be in /usr/lib/

The font's seem to be missing though -
QFontDatabase: Cannot find font directory /usr/lib/fonts - is Qt installed
correctly?

We won't need all the fonts in any case but would you expect them to have
been pulled in automatically ?

Here's what I now have in /usr/lib/libQt*

-rwxr-xr-x root       root          3157228 ./usr/lib/libQtCoreE.so.4.8.0
-rwxr-xr-x root       root           481476 ./usr/lib/libQtDBusE.so.4.8.0
-rwxr-xr-x root       root          3571644
./usr/lib/libQtDeclarativeE.so.4.8.0
-rwxr-xr-x root       root          9643544 ./usr/lib/libQtGuiE.so.4.8.0
-rwxr-xr-x root       root          1231712
./usr/lib/libQtNetworkE.so.4.8.0
-rwxr-xr-x root       root          2507000 ./usr/lib/libQtScriptE.so.4.8.0

-rwxr-xr-x root       root           217564 ./usr/lib/libQtSqlE.so.4.8.0
-rwxr-xr-x root       root           247056 ./usr/lib/libQtXmlE.so.4.8.0
-rwxr-xr-x root       root          4412572
./usr/lib/libQtXmlPatternsE.so.4.8.0

Total approx 25Mb there.

Pretty sure I need the first 3, but not sure about the rest. Does that look
about right to you size wise ? We're just trying to tie down flash sizes at
the moment and want to get a fairly accurate estimate for Qt.

I guess also at some point we might want to switch to Qt5. Is that
comparable in size ?



On 10 June 2013 13:17, Paul Eggleton <paul.eggleton@linux.intel.com> wrote:

> On Monday 10 June 2013 12:19:48 John Stirling wrote:
> > The Qt application (qtui) is compiled and has some C++, some QML and
> needs
> > to use dbus. I am kicking it off via './qtui -qws'.
> >
> > So basically if I had this -
> >
> > IMAGE_INSTALL += " \
> > qt4-embedded \
> > qtui \
> > "
> >
> > You suggest just cutting it down to
> >
> > IMAGE_INSTALL += " \
> > qtui \
> > "
> > and it should work itself out ?
>
> Apart from plugins and anything else that your application doesn't get
> directly linked to, yes.
>
> > I am not entirely sure on the 'inherit qt4e' line.
>
> You do want this here, yes.
>
> > SRC_URI = "git://${SOURCE_REPO}/git/${PN}.git;protocol=ssh;tag=${PV}"
>
> I think you probably should specify SRCREV here, even if it's SRCREV =
> "${AUTOREV}" to build the latest version on the specified branch. For tags
> that
> won't change, typically we recommend that you specify the full sha1 hash in
> SRCREV and then the system knows it doesn't need to query the git server to
> get the current hash corresponding to the tag.
>
> > PROVIDES = "${PN}_${PV}"
>
> This should not be necessary.
>
> > DEPENDS = "qt4-embedded"
>
> This is already done for you by inheriting qt4e.
>
> > RPROVIDES = "qtui_${PV}"
>
> This should not be necessary either.
>
> > PACKAGES="${PN}"
>
> Unless you have a good reason to do this I would recommend not doing so;
> the
> standard package splitting should work for most situations and for those
> where
> it needs to be tweaked slightly that can be done fairly easily.
>
> > FILES_${PN} += "/root/qtui /usr/share/reciva/qml/qtui
> > ${sysconfdir}/dbus-1/system.d/"
>
> Typically you would install binaries such as this to ${bindir} rather than
> /root.
>
> Cheers,
> Paul
>
> --
>
> Paul Eggleton
> Intel Open Source Technology Centre
>

[-- Attachment #2: Type: text/html, Size: 4435 bytes --]

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

* Re: qt4-embedded - image size
  2013-06-10 13:46       ` John Stirling
@ 2013-06-10 14:03         ` Paul Eggleton
  2013-06-10 16:20           ` John Stirling
  0 siblings, 1 reply; 12+ messages in thread
From: Paul Eggleton @ 2013-06-10 14:03 UTC (permalink / raw)
  To: John Stirling; +Cc: openembedded-core

On Monday 10 June 2013 14:46:57 John Stirling wrote:
> Looking fairly promising so far. Image size down from 280Mb to 90Mb and
> only Qt related stuff now seems to be in /usr/lib/
> 
> The font's seem to be missing though -
> QFontDatabase: Cannot find font directory /usr/lib/fonts - is Qt installed
> correctly?
> We won't need all the fonts in any case but would you expect them to have
> been pulled in automatically ?

Right, for Qt/E if you are displaying any text you'll need to explicitly 
install the package for this since nothing depends upon it. You can install 
the qt4-embedded-fonts package which brings in all fonts that are distributed 
with Qt, or alternatively you can install only the fonts you want (qt4-
embedded-fonts-ttf-vera, etc.)
 
> Pretty sure I need the first 3, but not sure about the rest. Does that look
> about right to you size wise ? We're just trying to tie down flash sizes at
> the moment and want to get a fairly accurate estimate for Qt.

This looks reasonable to me. Note however if you start changing some of the 
build-time configuration options for Qt you may be able to disable a few things 
you don't need. Have a look at Qt's configuration options [1]. You can see 
exactly which options are being used to build Qt with:

bitbake -e | grep "^QT_CONFIG_FLAGS="

If you search for QT_CONFIG_FLAGS under meta/recipes-qt/qt4/ you'll see how 
this variable gets set.

> I guess also at some point we might want to switch to Qt5. Is that
> comparable in size ?

Not sure I'm afraid, although I believe it is more modular so in theory you 
should be able to cut out more pieces you don't need.

Cheers,
Paul

[1] http://qt-project.org/doc/qt-4.8/configure-options.html

-- 

Paul Eggleton
Intel Open Source Technology Centre


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

* Re: qt4-embedded - image size
  2013-06-10 14:03         ` Paul Eggleton
@ 2013-06-10 16:20           ` John Stirling
  0 siblings, 0 replies; 12+ messages in thread
From: John Stirling @ 2013-06-10 16:20 UTC (permalink / raw)
  To: Paul Eggleton; +Cc: openembedded-core

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

Thanks Paul. Fonts all ok now.

For the benefit of anyone else listening here's what I ended up with

IMAGE_INSTALL += " \
  qt4-embedded-fonts-ttf-vera \
  qtui \
  "

ttf-vera fonts are about 500k in total, but could be cut down to ~100k in
my case as I don't really need italics (eg just use Vera.ttf and VeraBd.ttf)

Qt libraries were about 25Mb in total which I expect could be reduced a
bit, but think I have enough information for now.



On 10 June 2013 15:03, Paul Eggleton <paul.eggleton@linux.intel.com> wrote:

> On Monday 10 June 2013 14:46:57 John Stirling wrote:
> > Looking fairly promising so far. Image size down from 280Mb to 90Mb and
> > only Qt related stuff now seems to be in /usr/lib/
> >
> > The font's seem to be missing though -
> > QFontDatabase: Cannot find font directory /usr/lib/fonts - is Qt
> installed
> > correctly?
> > We won't need all the fonts in any case but would you expect them to have
> > been pulled in automatically ?
>
> Right, for Qt/E if you are displaying any text you'll need to explicitly
> install the package for this since nothing depends upon it. You can install
> the qt4-embedded-fonts package which brings in all fonts that are
> distributed
> with Qt, or alternatively you can install only the fonts you want (qt4-
> embedded-fonts-ttf-vera, etc.)
>
> > Pretty sure I need the first 3, but not sure about the rest. Does that
> look
> > about right to you size wise ? We're just trying to tie down flash sizes
> at
> > the moment and want to get a fairly accurate estimate for Qt.
>
> This looks reasonable to me. Note however if you start changing some of the
> build-time configuration options for Qt you may be able to disable a few
> things
> you don't need. Have a look at Qt's configuration options [1]. You can see
> exactly which options are being used to build Qt with:
>
> bitbake -e | grep "^QT_CONFIG_FLAGS="
>
> If you search for QT_CONFIG_FLAGS under meta/recipes-qt/qt4/ you'll see how
> this variable gets set.
>
> > I guess also at some point we might want to switch to Qt5. Is that
> > comparable in size ?
>
> Not sure I'm afraid, although I believe it is more modular so in theory you
> should be able to cut out more pieces you don't need.
>
> Cheers,
> Paul
>
> [1] http://qt-project.org/doc/qt-4.8/configure-options.html
>
> --
>
> Paul Eggleton
> Intel Open Source Technology Centre
>

[-- Attachment #2: Type: text/html, Size: 3241 bytes --]

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

* Re: qt4-embedded - image size
  2013-06-10 13:13           ` Eric Bénard
@ 2013-06-10 16:37             ` Paul Eggleton
  0 siblings, 0 replies; 12+ messages in thread
From: Paul Eggleton @ 2013-06-10 16:37 UTC (permalink / raw)
  To: Eric Bénard; +Cc: openembedded-core

On Monday 10 June 2013 15:13:56 Eric Bénard wrote:
> Le Mon, 10 Jun 2013 15:07:01 +0200,
> Nicolas Dechesne <nicolas.dechesne@linaro.org> a écrit :
> > thanks for your answer. so, yes I kind of figured out I could do that. But
> > in fact I was hoping that re-using the existing packagegroup from oe-core
> > *should* be the right thing to do, instead of re-implementing another one.
> > and perhaps the packagegroup being called core-qt4e should be restricted
> > to 'core' components, and we could have 1 (or more) additional
> > packagegroups that could be pulled into images, instead? otherwise what's
> > the point of having a 'core QT4e packagegroup' if it's not suitable for
> > any real usage?
> 
> true, I'll cook & test a split of the packagegroup to make the examples
> & demos optional

This sounds like a good idea. 

FWIW, the contents of this packagegroup came up on IRC a week or two ago and 
it was pointed out that the main package includes qt4-embedded which pulls in 
everything, but also includes a subset of the qt4-embedded-* packages and 
having both seems a bit pointless. I did test removing qt4-embedded from the 
packagegroup to see what would be removed from a qt4e-demo-image; 
unfortunately I don't seem to have the buildhistory output to hand, but IIRC 
it didn't seem to me that anything we would have needed was being removed.

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre


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

end of thread, other threads:[~2013-06-10 16:37 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-10 10:31 qt4-embedded - image size John Stirling
2013-06-10 10:55 ` Paul Eggleton
2013-06-10 11:19   ` John Stirling
2013-06-10 12:10     ` Nicolas Dechesne
2013-06-10 12:59       ` Eric Bénard
2013-06-10 13:07         ` Nicolas Dechesne
2013-06-10 13:13           ` Eric Bénard
2013-06-10 16:37             ` Paul Eggleton
2013-06-10 12:17     ` Paul Eggleton
2013-06-10 13:46       ` John Stirling
2013-06-10 14:03         ` Paul Eggleton
2013-06-10 16:20           ` John Stirling

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.